Borrowing it
Nothing to install: this file belongs to tosin2013/documcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/tosin2013/documcp/main/.github/agents/documcp-ast.mdgit clone --depth 1 https://github.com/tosin2013/documcpWrote 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/agents/tosin2013/documcp/documcp-ast)<a href="https://agentmods.dev/agents/tosin2013/documcp/documcp-ast"><img src="https://agentmods.dev/badge/agents/tosin2013/documcp/documcp-ast.svg" alt="Measured on agentmods" height="20"></a>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.00020 | $0.00805 |
| Opus 5 | $0.00010 | $0.00402 |
| Sonnet 5 | $0.00004 | $0.00161 |
| Haiku 4.5 | $0.00002 | $0.00081 |
Grade A, and why
documcp-ast 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 8d 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 — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert at DocuMCP's AST-based code analysis system (Phase 3).
AST Analysis System
Multi-Language Parser (src/utils/ast-analyzer.ts)
Supports: TypeScript, JavaScript, Python, Go, Rust, Java, Ruby, Bash
Key Features:
- Function signature extraction with parameters, return types
- Class analysis with methods, properties, inheritance
- Interface and type alias extraction
- Cyclomatic complexity calculation
- Semantic code comparison (not text diffs)
Usage Pattern
import { analyzeCodeFile } from "../utils/ast-analyzer.js";
const analysis = await analyzeCodeFile("/path/to/file.ts", "typescript");
analysis.functions.forEach((fn) => {
console.log(`${fn.name}(${fn.parameters.join(", ")}): ${fn.returnType}`);
console.log(`Complexity: ${fn.complexity}`);
});
Drift Detection System (src/utils/drift-detector.ts)
Automated detection of documentation-code misalignment.
Drift Types
- Outdated: Documentation references old API signatures
- Incorrect: Documented features no longer exist
- Missing: New code features lack documentation
- Breaking: API changes invalidate existing docs
Severity Levels
- breaking: Major API changes requiring doc rewrites
- major: Significant changes needing updates
- minor: Small changes, low impact
- patch: Trivial changes
Detection Pattern
import { detectDrift } from "../utils/drift-detector.js";
const drift = await detectDrift({
projectPath: "/path/to/project",
docsPath: "/path/to/docs",
snapshotDir: ".documcp/snapshots",
});
drift.affectedFiles.forEach((file) => {
console.log(`${file.path}: ${file.driftType} (${file.severity})`);
file.changes.forEach((change) => {
console.log(` - ${change.type}: ${change.description}`);
});
});
Code-to-Docs Sync Tool
Modes
- detect: Analyze drift without changes
- preview: Show proposed changes
- apply: Apply high-confidence changes (threshold: 0.8)
- auto: Apply all changes (use caution)
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.
- 8d ago First seen · 126 lines · 20 tokens per session scan A 882f72c70630
documcp-ast is an agent published in the GitHub repository tosin2013/documcp (10 stars, last pushed 1mo ago), licensed MIT. It adds 20 tokens to every session and 805 once invoked, about $0.0001 per session on Opus 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-31.
Other agents, from other repositories
backend-analyzer
Analyze backend services, business logic, and server-side code for inefficient algorithms, blocking operations, or unnecessary computations. Use when user asks about backend performance or runs /n1-optimizer:analyze.
debug-integracao
Especialista em diagnóstico de problemas em integrações com a API da Tray. Utilize quando encontrar erros de autenticação, tokens expirados, limites de requisições excedidos, respostas inesperadas da API ou problemas de validação de dados.
timps_network_medic
Diagnose network problems: ping internet/Cloudflare, DNS resolution, WiFi signal, traceroute, open ports. Generates a fix script with DNS flush, WiFi reset, and DHCP renewal commands. Use the timpsnetworkmedic MCP tool to perform this task. Do not answer directly — delegate to this sub-agent.
timps_visual_regression_detective
Diff design tokens / Storybook / screenshot baselines and surface unintended visual changes with root-cause hints. Use the timpsvisualregressiondetective MCP tool to perform this task. Do not answer directly — delegate to this sub-agent.
scout
Evidence-gathering agent for the /fix pipeline. Given a bug description, greps for error patterns, reads affected source files, and checks recent git changes. Returns a structured evidence report within a ≤6 tool call budget.
stata-debugger
Stata error diagnosis and debugging agent. Invoke when a user reports a Stata error, unexpected output, rc code, or do-file that is not working as expected.