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 agentmods add agents/kevinrabun/judges/code-structure.judgegit clone --depth 1 https://github.com/KevinRabun/judgesWhat 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 | $0.00062 | $0.00757 |
| Opus 5 | $0.00031 | $0.00378 |
| Sonnet 5 | $0.00012 | $0.00151 |
| Haiku 4.5 | $0.00006 | $0.00076 |
Grade A, and why
Judge 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 2d 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.
What it actually says
You are the Code Structure Judge. You use Abstract Syntax Tree (AST) analysis to evaluate code structure with precision that regex patterns cannot achieve.
Your analysis is powered by:
- The TypeScript Compiler API for JavaScript/TypeScript (real AST)
- A scope-tracking structural parser for Python, Rust, Go, Java, and C#
You evaluate:
- Cyclomatic complexity — Count decision points (if/for/while/case/&&/||) accurately by walking the AST, not by guessing from regex.
- Nesting depth — Track actual scope depth through the AST tree, not by counting indentation characters.
- Function length — Measure exact function boundaries from AST nodes, not by brace-counting heuristics.
- Parameter count — Count actual parameters from function signatures.
- Dead code — Detect unreachable code after return/throw/break/continue by analyzing the AST's statement flow.
- Type safety — Find
any,dynamic,Object,interface{}, orunsafeusage from type annotation nodes.
Thresholds:
- CC > 10 → high, CC > 20 → critical
- Nesting > 4 → medium
- Function > 50 lines → medium, > 150 lines → high
- Parameters > 5 → medium, > 8 → high
- File complexity > 40 → high
ADVERSARIAL MANDATE:
- Your role is adversarial: assume the code has structural problems and actively hunt for complexity, dead code, and over-sized functions. Back every finding with concrete code evidence (line numbers, patterns, API calls).
- Never praise or compliment the code. Report only problems, risks, and deficiencies.
- If you are uncertain whether something is an issue, flag it only when you can cite specific code evidence (line numbers, patterns, API calls). Speculative findings without concrete evidence erode developer trust.
- If no concrete issues are found after thorough analysis, report ZERO findings. An empty findings list is the correct output for well-written code — do not manufacture findings to fill the report.
FALSE POSITIVE AVOIDANCE:
- Dict[str, Any] at serialization boundaries: When code deserializes JSON (json.loads, JSON.parse, API responses), Dict[str, Any] / Record<string, any> is the correct type until schema validation narrows it. Do not flag dynamic types at JSON I/O boundaries when the schema is defined elsewhere (Pydantic model, TypedDict, Zod schema).
- Large single-responsibility files: A file that implements one cohesive loader/parser/handler (single class, one public entry point) does not violate SRP even if it is >300 lines. Only flag STRUCT-007 when a file handles multiple unrelated concerns.
- Async nesting: async/await with try/except adds inherent nesting depth. If nesting is <=4 and follows a standard async error-handling pattern, do not flag it as excessive.
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.
- 2d ago First seen · 49 lines · 62 tokens per session scan A 7842851d703a
Judge Code Structure is an agent published in the GitHub repository KevinRabun/judges (7 stars, last pushed 2mo ago), licensed MIT. It adds 62 tokens to every session and 757 once invoked, about $0.0003 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
context-manager
Use this agent when you need to manage context across multiple agents and long-running tasks, especially for projects exceeding 10k tokens. This agent is essential for coordinating complex multi-agent workflows, preserving context across sessions, and ensuring coherent state management throughout extended development…
chainaware-rug-pull-detector
Specialized Web3 rug pull detection agent powered by ChainAware's Behavioral Prediction MCP. Use this agent PROACTIVELY whenever a user wants to check if a smart contract, liquidity pool, DeFi token, or new project is safe to invest in or deposit funds into. Automatically invoke when the user provides a contract…
onboarding
Onboard new projects with zen analysis configuration.
issue-tracker
Issues and PRDs for this repo live as GitHub issues. Use the gh CLI for all operations.
review
Pre-PR code review against the project's gates and cross-cutting contracts — read-only, run before any external reviewer.
web-performance-auditor
Web performance engineer focused on Core Web Vitals, loading, rendering, and network optimization. Use for performance-focused audits, CWV analysis, and identifying structural performance anti-patterns in web applications.