Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add SebastienDegodez/copilot-instructions --skill analyzing-code-structuregit clone --depth 1 https://github.com/SebastienDegodez/copilot-instructionsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/sebastiendegodez/copilot-instructions/analyzing-code-structure)<a href="https://agentmods.dev/skills/sebastiendegodez/copilot-instructions/analyzing-code-structure"><img src="https://agentmods.dev/badge/skills/sebastiendegodez/copilot-instructions/analyzing-code-structure/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/sebastiendegodez/copilot-instructions/analyzing-code-structure"><img src="https://agentmods.dev/badge/skills/sebastiendegodez/copilot-instructions/analyzing-code-structure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00042 | $0.00806 |
| Opus 5.5 | $0.00017 | $0.00322 |
| Sonnet 5.5 | $0.00008 | $0.00161 |
| Haiku 4.5 | $0.00004 | $0.00081 |
Grade A, and why
analyzing-code-structure scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ast-grep: Structural Code Search and Editing
Always invoke the ast-grep skill for structural code search and refactoring - do not execute bash commands directly.
Default Strategy
Invoke analyzing-code-structure skill for structural code search and refactoring. Use when:
- Text-based Edit tool fails with "old_string not unique"
- Need formatting-independent pattern matching
- Performing structural changes across code
Common workflow: Invoke extracting-code-structure skill first, then analyzing-code-structure skill for structural modifications.
Use ast-grep to solve the "old_string not unique" problem by matching code structure instead of exact text. This enables refactoring across formatting variations and structural patterns.
When to Use analyzing-code-structure vs Text Tools
Use analyzing-code-structure when:
- Structural code changes - Refactoring function signatures, method calls, class structures
- Formatting-independent matching - Need to find code regardless of whitespace/line breaks
- Pattern variations - Matching similar structures with different variable names/arguments
- "old_string not unique" problem - Edit tool fails because text appears in multiple contexts
- Complex queries - Finding nested structures, specific AST patterns
Use text tools (Edit/Grep) when:
- Simple, unique string replacement - The exact text appears once or in consistent format
- Non-code files - Markdown, configs, data files
- Comment/documentation edits - Content that isn't code structure
- Very small changes - Single line, obvious context, no ambiguity
Key Decision Rule
If editing code structure and there's any ambiguity in text matching → use analyzing-code-structure.
ast-grep's primary value: Solves the "old_string not unique" problem by matching structure instead of exact text.
Detailed Reference
For comprehensive patterns, syntax, metavariables, common use cases, language-specific tips, and best practices, load analyzing-code-structure guide when needing:
- Complex pattern matching with metavariables
- Language-specific syntax variations
- Advanced refactoring workflows
- Integration with other tools
- Common pitfalls and solutions
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 75 lines · 42 tokens per session scan A d7b37c00c927
analyzing-code-structure is a skill published in the GitHub repository SebastienDegodez/copilot-instructions (199 stars, last pushed 28d ago), licensed Apache-2.0. It adds 42 tokens to every session and 806 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
analyzing-code-structure compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| analyzing-code-structureSebastienDegodez/copilot-instructions | Skill | 199 | 28d ago | Apache-2.0 | A | 42 | Claude Code, Codex |
| blazing-fast-dotnetmanagedcode/dotnet-skills | Skill | 530 | yesterday | MIT | A | 72 | Claude Code, Codex |
| chrome-devtools-mcpmanagedcode/dotnet-skills | Skill | 530 | yesterday | MIT | A | 130 | Claude Code, Codex |
| managedcode-orleans-graphmanagedcode/dotnet-skills | Skill | 530 | yesterday | MIT | A | 114 | Claude Code, Codex |
| asynkron-profilermanagedcode/dotnet-skills | Skill | 530 | yesterday | MIT | A | 122 | Claude Code, Codex |
| profilingmanagedcode/dotnet-skills | Skill | 530 | yesterday | MIT | A | 119 | Claude Code, Codex |
| observabilityTheBeardedBearSAS/claude-craft | Skill | 108 | 18d ago | MIT | A | 36 | Claude Code |