Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate a local repository risk receipt before Claude Code or other AI-agent edits. Use when the user asks to prepare a repository for agent changes, check for risky hooks or credential-writing automation, or run the /agent-preflight command. Trigger with "run agent preflight", "check this repo before agent edits", or "/agent-preflight".
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 176% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -8% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 10% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 19% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 65% | 0% |
Agent Safety Preflight helps Claude inspect a local repository before making AI-agent-assisted edits. It produces a compact Green, Yellow, or Red risk receipt from local files only, with special attention to destructive shell patterns, credential-writing automation, agent authority surfaces, uncommitted changes, and unavailable git state.
The skill pairs with the /agent-preflight command in this plugin. Prefer the bundled lightweight scanner when it is available from a trusted Claude install root, then explain the decision and next safe action before editing.
agent_preflight_lite.py scanner.Do not send source, secrets, tokens, private repository contents, payment credentials, or environment variables to external services while using this skill.
Read only for local documentation or configuration files that explain the workspace; do not copy private source into the response./agent-preflight when the command is installed, or invoke the bundled scanner from a trusted Claude install root.Return a short receipt in Markdown that is safe to paste into the local work log or pull request notes:
markdown## Agent Safety Preflight Receipt - Decision: Green | Yellow | Red - Repository: <path> - Git state: clean | dirty | unavailable - Risk buckets: <bullets> - Evidence: <file/path markers> - Next safe action: proceed | checkpoint | stop
.claude/, .cursor/, .github/, shell scripts, JSON/YAML/TOML config, package manifests, and environment files.User request: "Run a preflight before you update this README."
The skill runs the scanner, sees a clean git state and no high-risk automation markers, then returns Green with the repository path and evidence summary.
User request: "Check this repo before the agent refactor."
The skill detects agent hook configuration or broad tool permissions, returns Yellow, and recommends a checkpoint or narrower edit scope before continuing.
User request: "Start editing this generated-project repo."
The skill finds a destructive recursive delete pattern in an automation file, returns Red, and stops until a human reviews the workflow.
plugins/security/agent-safety-preflight/commands/agent-preflight.mdplugins/security/agent-safety-preflight/scripts/agent_preflight_lite.pyreferences/decision-rules.mdOther measured skills in the registry, with their headline benchmark lift.