AI Today

🛡️ Preflight: a command-line tool that checks coding-agent skills, plugins and hooks before you install them

· 4 min

Preflight CLI banner: scan before your AI coding agent loads it

In brief


🛡️ Anyone working with Claude Code collects skills, plugins, hooks and settings files from different places over time. The agent follows those files, and a hook can run commands without asking. Developer [Kiran Chanda](https://deepwissen.com/articles/why-i-built-preflight) built Preflight for that situation: a small command-line tool that checks what an agent is about to load before you install it. 🔍 Preflight first lists everything installed in the project and in the personal ~/.claude folder, with the token cost each item adds to every prompt. It then checks each item for embedded credentials, prompt injection, invisible Unicode characters, over-broad tool access, dangerous commands in bundled bash and PowerShell scripts, auto-running hooks, risky MCP servers, and settings that redirect traffic or skip permission prompts. From a repository it installs only the skills you want, after scanning them. 💻 The tool runs locally on macOS, Linux and Windows, needs Node 18 or later and starts with npx. According to the developer it sends no telemetry and uploads no scanned content. He writes himself that a clean scan only means nothing was found, not that nothing is there.


⚙️ Three jobs, one command line. The manifest command lists the agent's loadout: which skills load, with what scope, how many tokens they always cost and how many on demand, and whether the check found anything. Adding --all includes the personal folder; that way, the developer says, you also find a shadowed copy of a skill in the home directory that overrides the project version. The check command inspects a single folder before you install it, plugins audits installed plugins and their hooks, and add pulls skills from a repository: it clones it, scans it and installs only the selected ones, say three skills out of a pack of twenty. With --dry-run nothing is installed at all.

🧪 What a finding looks like. In the developer's examples Preflight flags a Stop hook in a settings.json that fetches a remote script and pipes it into a shell as an error, labelled remote code execution. A Python script in a downloaded skill that opens a socket connection and hands over a shell is detected as a reverse shell; installing that skill is then blocked, with the reason and the command for a closer look.

🔁 For teams and CI. With manifest --fail-on warning the run exits with an error code as soon as anything at warning level or above turns up. Preflight can write its results as SARIF, so GitHub code scanning shows a risky change as an annotation on the pull request. Frequent users can also install it globally through npm. Adding skills from a repository also needs git; according to the developer the clone is the only network call.

📚 Why the developer built it. Chanda points to a study for the USENIX Security 2026 conference which, as he describes it, behaviourally checked 98,380 skills from two community registries and confirmed 157 malicious ones with 632 vulnerabilities, split into credential thieves and agent hijackers. He also cites Check Point research on hooks that ran before the trust dialog, since fixed by Anthropic, a Datadog report on three malicious npm packages that installed Claude Code SessionStart hooks, and Pillar Security's work on invisible Unicode in rules files. Claude Code's built-in commands manage installed extensions but do not read them for malice; Preflight is meant as a security layer on top of that management, not a replacement.

🎯 False alarms as a problem. According to the developer every release is tested against more than 200 attack scenarios and, at the same time, against harmless skills that only look suspicious, such as documentation that warns against curl | sh. Before each publish Preflight scans Anthropic's public skills at a pinned commit; if any of them would need --force to install, the release is stopped. The rule exists because earlier versions wrongly blocked the official skills three times, among other things by treating placeholders such as ghp_your_github_token as real credentials.

👥 Who it suits. Preflight is aimed at developers who extend Claude Code with skills and plugins from other sources or copy settings files from colleagues, and at teams that keep such files in a repository. Someone using only the built-in features has little to check. The tool finds known dangerous patterns; a payload split across several files or obfuscated in a new way can slip through, the developer says. The same detection engine also drives the sibling tool vet, which checks code and configuration for secrets and risky settings, and the AI Preflight extension for VS Code. 🧰

Sources

Open in the interactive reader →

This post was selected, researched, written and rated by AI. The AI can be wrong: check the sources. Imprint, privacy policy and terms of service