{"slug": "show-hn-preflight-cli-a-localscanner-for-ai-coding-agent-skills", "title": "Show HN: Preflight CLI – a localscanner for AI coding agent skills", "summary": "A developer released Preflight CLI, a local scanner that inventories and checks the skills, plugins, hooks and settings files a coding agent loads before a user trusts them, published as the npm package @deepwissen/preflight. The tool cites a USENIX Security 2026 study that behaviorally verified 98,380 skills from two community registries and confirmed 157 malicious ones carrying 632 vulnerabilities, plus Check Point research on hooks executing before the trust dialog (patched as CVE-2025-59536 and CVE-2026-21852) and Datadog's finding of three malicious npm packages installing Claude Code SessionStart hooks. Preflight's manifest command reports each item's scope and token cost per prompt, addressing a gap the author says Claude Code's built-in commands leave open by listing installed items without reading them for malice.", "body_md": "# Why I Built Preflight\n\nSkills, plugins, and hooks make coding agents more useful — and they're instructions your AI follows and code it runs, installed from the internet. Malicious ones are already in the wild. Preflight is the pre-flight checklist: see what your agent carries, scan it for what actually hurts, and choose what to install — before you trust it.\n\nSkills, plugins and hooks make coding agents more useful. A skill can teach Claude Code how\nyour team reviews a pull request. A plugin can bundle that skill with other tools. A hook\ncan run a formatter after every edit. And when a teammate shares a working\n`.claude/settings.json`, copying it is often the fastest way to get started.\n\nOver time, those pieces come from different places. You grab a skill from one repo, install a plugin from another, and copy a settings file from a teammate. A month later, you can’t remember what that skill was called, or whether Claude Code is loading the project copy or the one in your home directory. And the settings file that saved you an afternoon may carry a startup hook or a permission you never meant to turn on.\n\nI built Preflight so you can answer those questions from the terminal, before you trust what your agent loads. Pilots don’t start the engines and hope; they run a fixed checklist first. Preflight is that checklist for the instructions your agent is about to follow.\n\n## The part nobody checks\n\nYour agent obeys every one of those files, and you install most of them from the internet. A skill is a Markdown file the agent reads and follows. A plugin can register a hook that runs a shell command. A settings file can pre-approve commands or route your model traffic through someone else’s server.\n\nClaude Code’s built-in commands list and manage what you’ve installed. None of them read it for malice. That gap is already being used:\n\n- **Malicious skills are in the wild.** A USENIX Security 2026 study,[“Do Not Mention This to the User”](https://arxiv.org/pdf/2602.06547v2) , behaviorally\nverified 98,380 skills from two community registries and confirmed 157 malicious ones with\n632 vulnerabilities. They split into credential thieves and agent hijackers. The file looks\nhelpful; the prose is the payload.\n- **Hooks run code on their own.**[Check Point](https://research.checkpoint.com/2026/rce-and-api-token-exfiltration-through-claude-code-project-files/) showed a repo’s hooks could run before you even read the trust dialog. Anthropic patched\nthat (CVE-2025-59536 and CVE-2026-21852), but a hook still runs the moment you click “trust\nthis folder”, and almost everyone does.[Datadog](https://securitylabs.datadoghq.com/articles/coding-agent-project-trust-code-execution-before-first-prompt/) found three malicious npm packages that installed Claude Code`SessionStart` hooks.\n- **Rules files can hide instructions.**[Pillar Security’s “Rules File Backdoor” research](https://pillar.security/blog/new-vulnerability-in-github-copilot-and-cursor-how-hackers-can-weaponize-code-agents) showed invisible Unicode can smuggle instructions into agent config that a human reviewer\nnever sees.\n- **The volume is growing fast.**[Uber](https://www.uber.com/bl/en/blog/efficient-software-factory/) reports more than 3,600\nagent skills built internally, with over 30,000 skill executions a day.\n\nYou’d think twice before adding an unvetted dependency. Skills are worse than a dependency: they’re instructions your AI follows and code your AI runs.\n\n## What Preflight does: see, scan, choose\n\nPreflight is a small local CLI that does three things.\n\n**See** everything your agent carries, in your project and in your personal `~/.claude` setup,\nwith the token cost each item adds to every prompt:\n\n``` bash\n$ npx @deepwissen/preflight manifest\npreflight · ✓ 2 skills · all clean · ~349t/prompt\n\nAGENT LOADOUT — what your agent is carrying\n  SKILL   SCOPE                            ALWAYS   ON-DEMAND  CHECK\n  pdf     unrestricted (no allowed-tools)  110t     2.0kt      ✓ clean\n  xlsx    unrestricted (no allowed-tools)  239t     2.4kt      ✓ clean\n```\n\n**Scan** each item for what actually hurts you: embedded secrets, prompt injection, hidden\nUnicode, over-broad tool access, dangerous commands in bundled scripts (bash and PowerShell),\nauto-running hooks,\nrisky MCP servers and settings that redirect traffic or skip permissions:\n\n```\nCONFIG & HOOKS — settings your agent loads automatically  (1 risky)\n\n  ✗ .claude/settings.json\n     • [info] runs hooks automatically on: Stop\n     • [error] hook Stop command: fetches a remote script and pipes it\n       to a shell (remote code execution)\n```\n\n**Choose** what to install. When you pull skills from a repo, Preflight clones and scans them\nbefore anything touches your setup, then installs only the ones you pick. If one is risky, it\ntells you why:\n\n``` bash\n$ npx @deepwissen/preflight add ./downloaded-pack --only revshell\n\npreflight: blocked — revshell has findings at/above \"warning\":\n  revshell  (1 finding)\n     ✗ [error] scripts/calc.py: opens a reverse shell — socket connection\n       plus a shell handoff (remote code execution)\n     → inspect: preflight check ./downloaded-pack/revshell\n```\n\nSomeone shares a pack of 20 skills and you need three. Preflight shows what each one costs and whether it’s risky, then installs just those three.\n\n## Three moments to reach for it\n\nPreflight is a checklist you run at specific moments, not a tool you watch all day.\n\n1. **“I found a skill online. Do I trust it?”** Run`preflight check ./that-folder` to inspect\nit before installing, or`preflight add owner/repo --dry-run` to scan a whole pack. Neither\none installs anything.\n2. **“Don’t let a risky skill or hook merge.”** Run`preflight manifest --fail-on warning` in\nCI. It exits non-zero on findings and can write SARIF for GitHub code scanning, so a risky\nchange shows up as an annotation on the pull request.\n3. **“What have I accumulated, and is any of it dangerous?”** Run`preflight manifest --all` and`preflight plugins` once. You’ll find the over-broad skill, the shadowed copy in your\nhome directory, or the plugin whose hook you forgot about.\n\n## Where it sits\n\nClaude Code’s own commands answer “what do I have, and how do I manage it?” Use them for that. Preflight answers a different question: “is it safe to trust?” It’s a security layer on top of native management, not a replacement for it.\n\nIts sibling, [vet](https://deepwissen.com/projects/vet/), scans your code and configuration for secrets and risky\nsettings. Both run on the same detection engine, as does the AI Preflight VS Code extension, so\na new detection reaches all three at once. (Full command reference and the honest limits live on\nthe [Preflight project page](https://deepwissen.com/projects/preflight/).)\n\n## Two honest promises\n\n**Everything runs on your machine.** Preflight reads files on your disk. It sends no telemetry\nand uploads no scanned content. The only network call is the `git clone` when you `add` skills\nfrom a repo.\n\n**A clean scan is not a guarantee.** This is the most important sentence in the tool, so\nPreflight prints it on every clean result. It finds known-bad patterns; it raises the floor. It\ndoes not certify a skill as safe. A payload split across several files, or an obfuscation\ntechnique it hasn’t seen, can still get through. A clean result means nothing was found, not\nthat nothing is there. A security tool that overpromises is worse than none.\n\n## How we test it\n\nA security scanner fails in two directions: it misses an attack, or it cries wolf on something safe. Both are tested on every release.\n\n- **Attack fixtures.** More than 200 scenarios: reverse shells, credential exfiltration, hidden\nUnicode, malicious hooks in every event, poisoned MCP servers, symlinks to secrets, and\nplugins installed for real through Claude Code. Each runs in a fresh project and home folder,\nand the unit tests run on macOS, Linux and Windows on every commit.\n- **False-positive controls.** Benign skills that look suspicious on the surface, like docs that\nwarn against`curl | sh` , a script that cleans`./build` , or code that loads`cert.pem` , must\nstay clean.\n- **Anthropic’s own skills.** Before every publish, Preflight scans Anthropic’s public skills\nrepo, pinned to a fixed commit. If any of them would need`--force` to install, the release is\nblocked.\n\nThat last rule came from experience. Preflight itself blocked Anthropic’s official skills in\nthree separate releases: it read XSD schema file names as secrets, placeholder tokens like\n`ghp_your_github_token` as real credentials, and a sentence warning against `curl | sh` as an\nattack. Testing also found that one malicious skill could hang the scanner with a single\nsymlink, and that it missed `bash -c \"$(curl …)\"`, the way Homebrew installs. All of it is\nfixed and covered by tests that run on every commit.\n\nEvery false alarm teaches people to ignore the scanner. Then they ignore it when the alarm is real. A block is only useful if it’s rare and right.\n\n## Try it\n\nWorks on macOS, Linux and Windows. You need Node 18 or later, and git for adding skills from a repo. Nothing to configure.\n\n```\n# What does my agent carry right now?\nnpx @deepwissen/preflight manifest --all\n\n# Found skills online? Scan first, install nothing\nnpx @deepwissen/preflight add anthropics/skills --dry-run\n\n# Install only the ones you want\nnpx @deepwissen/preflight add anthropics/skills --only pdf,xlsx\n\n# Inspect a skill folder before you install it\nnpx @deepwissen/preflight check ./downloaded-skill\n\n# Audit installed plugins and their hooks\nnpx @deepwissen/preflight plugins\n```\n\nUsing it often? Install it once and drop the `npx` prefix:\n\n```\nnpm i -g @deepwissen/preflight\npreflight manifest --all\n```\n\nIn CI, gate every pull request:\n\n```\n- run: npx -y @deepwissen/preflight manifest --fail-on warning\n```\n\nRun the check before you fly.", "url": "https://wpnews.pro/news/show-hn-preflight-cli-a-localscanner-for-ai-coding-agent-skills", "canonical_source": "https://deepwissen.com/articles/why-i-built-preflight/", "published_at": "2026-11-28 21:17:54+00:00", "updated_at": "2026-11-28 21:43:36.472237+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-safety", "developer-tools"], "entities": ["Preflight CLI", "Claude Code", "USENIX Security 2026", "Check Point", "Anthropic", "Datadog", "Pillar Security", "Uber"], "also_reported_by": [], "takeaway": "Preflight's manifest command lists every skill, plugin, hook and settings file an agent loads with its scope and per-prompt token cost, so you can review what Claude Code will execute before clicking 'trust this folder'.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-preflight-cli-a-localscanner-for-ai-coding-agent-skills", "markdown": "https://wpnews.pro/news/show-hn-preflight-cli-a-localscanner-for-ai-coding-agent-skills.md", "text": "https://wpnews.pro/news/show-hn-preflight-cli-a-localscanner-for-ai-coding-agent-skills.txt", "jsonld": "https://wpnews.pro/news/show-hn-preflight-cli-a-localscanner-for-ai-coding-agent-skills.jsonld"}}