/skills:agent-config-audit [path to a repo, or a folder of repos]from Cole's AI Skills
Audits coding-agent config files for security risks: hooks, MCP servers, VS Code tasks, poisoned dependencies, secrets in settings and conversation history, fake extensions, and LLMjacking doors. Use before opening a cloned repo or after pulling config changes.
Ships in Cole's AI Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Coding agents run commands from files that live in the repo. A hook in
.claude/settings.json, a server in .mcp.json, a folderOpen task in
.vscode/tasks.json: each one executes with the user's full access, and a git pull
can add one. In November 2026 Google's threat intelligence group reported attackers
editing .claude/settings.json in internal repos "so that when users started up Claude
Code, it would automatically trigger the download" of a backdoor. No agent was hacked.
The tool did what its config said.
The split that matters: instruction files (CLAUDE.md, AGENTS.md, rules, skills)
can only persuade. Settings files run code. This skill inventories the second kind
and checks the first for hidden text.
.claude/settings.json hooks; an npm worm planted SessionStart hooks..pth file that runs whenever Python starts.settings.local.json, and that file committed to git. Apiiro found 1,122 public ones.sk-1234) and endpoint
overrides that route your prompts and keys through someone else's server.CLAUDE.md, AGENTS.md and rules,
text the agent reads and you cannot see.SessionStart hooks and MCP servers may already have run, for example after a trust
prompt was accepted or in a headless run that never shows one. Pass the path from a
session started somewhere else. If this session was started inside the target, say so
in the report: the audit still finds problems, but it may no longer prevent the first run.npx of a
listed package. To read an encoded payload, decode it to text and never pipe it
anywhere.cat a config file
or a transcript into the conversation, since that bypasses redaction; quote only the
lines needed. Use --show-values only when the user explicitly asks on their own
machine, and still never repeat a value back. History hits are always reported as
type, first four characters, file and line, even with --show-values; never open the
transcript to look at the rest.Use the path the user gave. With none, ask, and offer the current directory. A single
repo is the usual case; a folder of repos works too (the scanner walks it, skipping
node_modules, .git, virtualenvs and build output). When the user means "my agent
config" in general, add --user to include ~/.claude, ~/.claude.json, ~/.codex,
~/.cursor, ~/.gemini and installed editor extensions.
--history-for <repo> to scan that repo's stored Claude Code
and Codex conversations (worktrees included) for pasted secrets.--user --history scans user config, extensions and every
stored conversation.python <skill>/scripts/agent_config_audit.py <repo> --history-for <repo> # one repo
python <skill>/scripts/agent_config_audit.py <code folder> --user --history # the machine
Add --json for structured output.
Stdlib only, strictly read-only, tested on Python 3.12 (3.11+ is needed to parse
Codex TOML; older versions report that file as unparsed). Read its
output, never its source. It lists every entry that can run or grant something, then
dependencies, extensions and history hits, marks suspicious ones with !!, and ends with
counts. A large folder takes a while; a single repo takes seconds. The history scan reads
newest transcripts first and stops at --history-max-seconds (default 300); if the
output says CAPPED, say so in the report.
The flags are deliberately few, so each deserves a sentence in the report. Treat them as leads, then read the entry itself.
| Flag | What it means in plain words |
|---|---|
pipe-to-shell, download-then-run | Fetches code from the internet and runs it. Whoever controls that server controls the machine, and can change the payload at any time. The single strongest signal. |
encoded-payload | base64 or -EncodedCommand: the readable command is a wrapper and the real one is hidden. Legitimate config almost never needs this. |
remote-host | Contacts a host each time it runs. Ask who owns the domain and why a hook needs the network at all. "Silenced output" on top of that is worse. |
hidden-process | A hidden window, nohup, setsid: keeps running after the agent moves on. |
credential-files | Touches ~/.ssh, ~/.aws, .npmrc, agent login files. A formatter has no reason to. |
endpoint-override | ANTHROPIC_BASE_URL, *_BASE_URL, proxies, NODE_OPTIONS: routes every prompt, file and key through someone else's server, or changes what code loads. |
unpinned-package | An MCP server run through npx, uvx or bunx with no version, so the next release to that package runs automatically. Check the package exists, is the one intended (typosquats), and pin it. |
auto-approve-mcp | enableAllProjectMcpServers: true approves every server in .mcp.json, including ones a later pull adds. |
bypass-permissions | bypassPermissions, Codex approval_policy = "never" or danger-full-access: nothing asks before acting. |
broad-allow | Allow rules like Bash, Bash(curl *), Bash(python *) let the agent run arbitrary code without a prompt. Narrow them to exact commands. |
secret-in-config | A literal key, password or token in env, headers, args or an allow rule. If the file was ever committed, rotating is required, not optional: it is still in git history. |
runs-on-open | A VS Code or Cursor task with runOn: folderOpen: runs the moment the folder opens, before any agent starts. |
hidden-characters | Zero-width or tag characters in an instruction file: instructions the agent reads and a reviewer cannot see. |
plugin-source | Adds a plugin marketplace. Plugins ship their own hooks and MCP servers. |
hooks-reenabled | A project file sets disableAllHooks: false, overriding a user who turned hooks off. |
no-lockfile | A manifest with dependencies and no lockfile (in its folder or above it), so every install takes the newest release. That is how a poisoned release reaches a machine. |
known-compromised | A lockfile, requirements pin or installed package matches a release known to carry malware. Remove it; if it was ever installed, treat every key on the machine as stolen. |
suspicious-pth | A .pth file in a project virtualenv that is not a standard one and runs code every time Python starts. Only its name is printed; read it by hand. |
local-settings-tracked | .claude/settings.local.json is in the git index, so approved commands and the secrets inside them get pushed. |
secret-in-history | A key pasted into or printed in a stored Claude Code or Codex conversation. Rotate it, then delete or redact the transcript. |
known-bad-extension | An installed editor extension version known to be fake or malicious. |
default-gateway-key | A LiteLLM gateway set to its documented default key sk-1234: anyone who can reach it spends on your account. |
unparsed, unreadable | The file could not be parsed or read. Read it by hand; a broken file can still run. |
Then read what no flag covers:
SessionStart, Setup) and every statusLine:
they run before the user types anything, or constantly.url servers on unfamiliar domains.Zero flags is not a clean bill of health. Say so in the report rather than "no problems found".
A repo the user already opens daily is where a malicious change lands unnoticed. Trust is remembered per folder: tested on Claude Code 2.1.330 (2026-11-21), a hook committed to an already-trusted repo ran on the next launch with no new prompt. Show what changed in the agent config and who changed it:
git log -p -- .claude .mcp.json .codex .cursor .vscode .gemini AGENTS.md CLAUDE.md
git diff HEAD@{1} -- .claude .mcp.json .codex .cursor .vscode AGENTS.md CLAUDE.md # since the last pull
git ls-files | grep settings.local.json # should print nothing
The classic sign is a config change inside a commit whose message is about something else, or from an author who does not normally touch tooling.
Lead with the single most serious finding in one sentence, then one short block per flagged entry: the file, what the entry does, when it runs, why it matters, and the fix. Then the summary counts, then the scanner's closing line on LLMjacking: one key per tool with a spend limit, and never an AI gateway (LiteLLM, Ollama, Open WebUI) exposed with a default key. Do not paste the full inventory unless asked. If something already ran (the session started inside the repo, or a startup hook fetched a payload), say plainly that the machine should be treated as exposed.
Offer the fixes that match the findings, and apply them only when the user agrees. The two to say every time:
claude --settings '{"disableAllHooks": true}'.
In Windows PowerShell, put {"disableAllHooks": true} in a file and pass its path:
claude --settings no-hooks.json. Setting it in user settings alone is not enough,
because project settings can turn it back on. claude --setting-sources user skips
project settings entirely./hooks and /mcp before turning hooks back on.Deny rules, pinning, CODEOWNERS on agent config, managed settings for teams, editor
settings and the cleanup steps after a real compromise are in
references/remediation.md. Read it when a finding needs more than the two lines above.
scripts/agent_config_audit.py: the scanner. --json for structured output,
--user for home-directory config and extensions, --history or --history-for <repo> for stored conversations, --show-values to disable config redaction. Run it;
do not read it into context.scripts/_test_agent_config_audit.py: builds a booby-trapped repo and a clean one in
a temp dir, plus fake transcripts, virtualenvs and extensions, and checks every flag,
redaction, and that the scan changes no file. Run
it after editing the scanner.references/remediation.md: concrete fixes for individuals and teams, and what to
do when a hook already ran.references/secrets-guard-hook.py: a PreToolUse hook that blocks the agent from
reading secrets (env files, keys, environment dumps). Recommend it whenever the scan
finds secrets in config or the user has no secret guard; setup is in remediation.md.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub coleam00/skills --plugin skills40 skills in this plugin
/ablate-ai-layerMeasure whether a repository's AI instructions still earn their place, by running the same real task many times with the layer intact and with it stripped, then grading every rule against what actually changed. Runs both arms itself in throwaway git worktrees and never touches the working tree. Agent-agnostic across CLAUDE.md, AGENTS.md, .claude/, .agents/, .cursor/rules, .clinerules, .windsurfrules and copilot-instructions. Use when the user wants to prune, audit, clean up, shrink or "delete" their CLAUDE.md, AGENTS.md, cursor rules, agent instructions or AI layer; when they ask whether their rules are still needed, whether their context is bloated, or what to cut; or when they mention ablating, ablation, or testing their agent without its instructions./agent-browserBrowser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.Other plugins' skills for the same job