# Skill: Scan AI agent settings for security holes before sharing or deploying > Apply this skill after any change to agent configuration files and always before publishing a project -- it finds exposed credentials, over-broad permissions, prompt injections, and silently swallowed errors in the agent's own settings. Source: sodigi·learn -- vibecoding/proverka-ii-na-dyry · https://sodigi.io/learn/vibecoding/proverka-ii-na-dyry ## When to use - Before pushing a project to GitHub or any public repository. - After installing or copying someone else's CLAUDE.md, settings pack, or agent configuration. - After adding new tools, MCP servers, or permissions to the agent. - As routine hygiene: any time agent settings change, run a scan. ## Core rules - The agent's settings files (.claude folder, CLAUDE.md, settings.json, mcp.json, hooks) are part of the attack surface -- treat them with the same care as application code. - Never paste an API key or password directly into a settings file. Use environment variables and keep only the variable name in the file. - Never grant the agent "run any command" permission unless strictly necessary. Use a narrow allowlist plus an explicit denylist of dangerous operations. - Never use another person's CLAUDE.md or settings pack without reading or scanning it first. It may contain prompt injection -- a hidden instruction to exfiltrate files or run commands. - Silent error swallowing in hooks or commands hides ongoing failures. Any command that suppresses its own errors is a red flag. - Run `npx ecc-agentshield scan` to get a graded report (A to F). Fix all Critical and High findings before sharing the project. - Treat a D or F grade as "fix right now," not "fix later." ## Procedure 1. Open the terminal in the project root. 2. Run: `npx ecc-agentshield scan` 3. Read the grade (A-F) and the findings list, sorted from Critical down to Info. 4. For each Critical finding: stop everything and fix it immediately (exposed key, "run everything" permission). 5. For each High finding: fix before sharing the project (suspicious auto-run in instructions, missing denylist). 6. For each Medium finding: fix soon (silently swallowed errors in hooks). 7. To auto-fix safe issues: run `npx ecc-agentshield scan --fix`. 8. To generate a shareable report: add `--format html`. ## Ready-to-use prompt ``` Check this project's settings for security. Run the command npx ecc-agentshield scan and show me the report with the grade. Then go through each problem found and explain it in plain language: what it is, what it could lead to, and how to fix it. Start with the most critical ones. If something can be safely fixed automatically, offer to do it. ``` ## Pitfalls - Pasting API keys or passwords directly into settings files -- they will leak when the project is shared or pushed to version control. - Granting "allow the agent to do everything" permission -- one hallucination or bad piece of advice and the agent can delete or exfiltrate files. - Copying someone else's CLAUDE.md without reading it -- it may contain a line that sends your files to a stranger's address on every startup. - Publishing a project without running a scan -- 30 seconds of scanning is cheaper than a stolen key. - Ignoring a D or F grade -- these are not advisory, they represent real risks that exist right now. - Running the scan once and never again -- every new setting or tool can introduce a new hole.