spbreed/cyber-commons/agent-code-surface-analyzer
Claude Code and agent skill by spbreed/cyber-commons
- community
Checking that the SKILL.md file is still in the repository.
Statically enumerate an agent or MCP server's declared tools, dangerous actions and declared-versus-actual capability surface from its repository or image. Use to inventory what a deployment can do before trusting what it says it does, to check MCP tool annotations against the code, or to baseline tool descriptions for rug-pull detection.
Install
npx vskill@latest install spbreed/cyber-commons/agent-code-surface-analyzerSKILL.md
The same SKILL.md was published earlier as spbreed/cyber-commons/agent-code-surface-analyzer.
Agent Code Surface Analyzer
Controls: Static basis for controls 1, 2 and 5
What this establishes
Every other control is about constraining capability. This skill establishes what the capability actually is, from the code rather than from the manifest — because the manifest is a claim made by the thing being audited.
When to use this
Before trusting what a deployment says it does — a new MCP server, an agent framework you are adopting, a vendor integration. Also on a schedule against anything already deployed: tool descriptions are fetched at connect time and a server can change one after review, so the baseline this produces is what makes a rug-pull visible.
Procedure
- Enumerate declared tools. From the MCP tool manifest, the tool registry,
or the decorator/registration sites in code.
- Classify each tool by what it actually reaches, by locating sinks:
subprocess,os.system,exec,eval→ process executionopen(...,'w'), file writes,shutil,os.remove→ filesystem write- HTTP clients, sockets → network egress
- SDK credential reads, environment access → credential access
DELETE,DROP,TRUNCATE→ destructive downstream
- Cross-check annotations against the code. MCP tool annotations
(readOnlyHint, destructiveHint, idempotentHint, openWorldHint) are hints, not guarantees — the specification says so explicitly, and a server can mislabel a destructive tool as read-only. Treat every annotation as a claim to verify, never as truth.
Apply the spec's pessimistic defaults: an unannotated tool is assumed destructiveHint: true and openWorldHint: true.
- Record the declared-versus-actual delta. A tool annotated
readOnlyHint
whose body writes a file is the highest-value finding this skill produces.
- Hash the tool descriptions. Store
tool_description_hashper tool. This
is the rug-pull baseline: a server can change a tool's description after the client approved it, and the hash is what detects that.
Example
Input — the fixture committed at the top of `scripts/agent_code_surface_analyzer.py`. Edit it and re-run: the buckets, counts and verdicts below are derived from it, not hard-coded.
Output — the opening lines of a real run:
The run continues past this. test_skills.py executes the script on every build, with no model configured — so what CI proves is that it runs and refuses legibly, not that it prints these lines. The output above is a recorded run against a real model, and nothing re-diffs it: a model's answer is not reproducible, and this repository does not claim otherwise anywhere it can be checked.
Output contract
Failure modes
- Believing the annotations. They are advisory. Cross-check or do not
report on them at all.
- Missing dynamic registration. Tools registered at runtime from config do
not appear in a static scan; record that as a PARTIAL, not a clean pass.
- Hashing the tool name instead of the description. The description is what
the model reads and what a rug-pull changes.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/attestation/agent-code-surface-analyzer/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/spbreed/cyber-commons/agent-code-surface-analyzer)