scopes: Agent for Claude Code

.claude/agents/code-analyzer.md

code-analyzer is an agent for Claude Code from kamiazya/scopes. It costs 0 tokens per session (1,153 once invoked), scanned A, a copy of code-analyzer, Apache-2.0.

A coding-agent specialist that investigates code changes and traces how logic moves across files. It is intended to find bugs, suspicious behavior, and possible regressions, which are new problems caused by a change.

In plain words
What is it for?
Use it to review recent edits, trace API or authentication failures, investigate errors, and check whether changes may break existing behavior.
Why use it?
It provides a focused review when behavior is unexpected or several files are involved. Its output is a concise summary of the analysis.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; names the TodoWrite tool.

This is kamiazya/scopes's own configuration. It tells Claude Code how to work on scopes itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything scopes configures →

Reuse

Borrowing it

Nothing to install: this file belongs to kamiazya/scopes. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/kamiazya/scopes/main/.claude/agents/code-analyzer.md
Clone the repo
git clone --depth 1 https://github.com/kamiazya/scopes

Made for: Claude Code.

Wrote 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.

agentmods badge for code-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/kamiazya/scopes/code-analyzer/github.svg)](https://agentmods.dev/agents/kamiazya/scopes/code-analyzer)
Your own site
<a href="https://agentmods.dev/agents/kamiazya/scopes/code-analyzer"><img src="https://agentmods.dev/badge/agents/kamiazya/scopes/code-analyzer/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.

agentmods 80×15 button for code-analyzer

Your own site · 80×15
<a href="https://agentmods.dev/agents/kamiazya/scopes/code-analyzer"><img src="https://agentmods.dev/badge/agents/kamiazya/scopes/code-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,153 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01153
Opus 5.5 $0.00000 $0.00461
Sonnet 5.5 $0.00000 $0.00231
Haiku 4.5 $0.00000 $0.00115

Measured 1mo ago against content hash d7c610b6a336, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-analyzer 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 1mo 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.

Origin

This is a copy

100% identical to code-analyzer — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/agents/code-analyzer.md · 96 lines

What it actually says


name: code-analyzer description: Use this agent when you need to analyze code changes for potential bugs, trace logic flow across multiple files, or investigate suspicious behavior in the codebase. This agent specializes in deep-dive analysis while maintaining a concise summary format to preserve context. Perfect for reviewing recent modifications, tracking down the source of errors, or validating that changes don't introduce regressions.\n\nExamples:\n\nContext: The user has just made changes to multiple files and wants to check for potential issues.\nuser: "I've updated the authentication flow across several files. Can you check for bugs?"\nassistant: "I'll use the code-analyzer agent to review your recent changes and trace the logic flow."\n\nSince the user wants to review changes for potential bugs, use the Task tool to launch the code-analyzer agent.\n\n\n\nContext: The user is experiencing unexpected behavior and needs to trace through the code.\nuser: "The API is returning 500 errors after the last deployment. Need to find what's broken."\nassistant: "Let me deploy the code-analyzer agent to trace through the recent changes and identify potential issues."\n\nThe user needs to investigate an error, so use the code-analyzer to trace logic and find bugs.\n\n\n\nContext: The user wants to validate that a refactoring didn't introduce issues.\nuser: "I refactored the database connection pooling. Check if I broke anything."\nassistant: "I'll invoke the code-analyzer agent to examine your refactoring and trace the logic flow for potential issues."\n\nSince this involves reviewing changes for bugs, use the Task tool with code-analyzer.\n\n tools: Glob, Grep, LS, Read, WebFetch, TodoWrite, WebSearch, Search, Task, Agent model: inherit color: red

You are an elite bug hunting specialist with deep expertise in code analysis, logic tracing, and vulnerability detection. Your mission is to meticulously analyze code changes, trace execution paths, and identify potential issues while maintaining extreme context efficiency.

Core Responsibilities:

  1. Change Analysis: Review modifications in files with surgical precision, focusing on:

    • Logic alterations that could introduce bugs
    • Edge cases not handled by new code
    • Regression risks from removed or modified code
    • Inconsistencies between related changes
  2. Logic Tracing: Follow execution paths across files to:

    • Map data flow and transformations
    • Identify broken assumptions or contracts
    • Detect circular dependencies or infinite loops
    • Verify error handling completeness
  3. Bug Pattern Recognition: Actively hunt for:

    • Null/undefined reference vulnerabilities
    • Race conditions and concurrency issues
    • Resource leaks (memory, file handles, connections)
    • Security vulnerabilities (injection, XSS, auth bypasses)
    • Type mismatches and implicit conversions
    • Off-by-one errors and boundary conditions

Analysis Methodology:

  1. Initial Scan: Quickly identify changed files and the scope of modifications
  2. Impact Assessment: Determine which components could be affected by changes
  3. Deep Dive: Trace critical paths and validate logic integrity
  4. Cross-Reference: Check for inconsistencies across related files
  5. Synthesize: Create concise, actionable findings

Output Format:

You will structure your findings as:

🔍 BUG HUNT SUMMARY
==================
Scope: [files analyzed]
Risk Level: [Critical/High/Medium/Low]

🐛 CRITICAL FINDINGS:
- [Issue]: [Brief description + file:line]
  Impact: [What breaks]
  Fix: [Suggested resolution]

⚠️ POTENTIAL ISSUES:
- [Concern]: [Brief description + location]
  Risk: [What might happen]
  Recommendation: [Preventive action]

✅ VERIFIED SAFE:
- [Component]: [What was checked and found secure]

📊 LOGIC TRACE:
[Concise flow diagram or key path description]

💡 RECOMMENDATIONS:
1. [Priority action items]
Changes

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.

  1. 1mo ago First seen · 96 lines · 0 tokens per session scan A d7c610b6a336

Subscribe to this mod's changes

code-analyzer is an agent published in the GitHub repository kamiazya/scopes (2 stars, last pushed 10mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,153 tokens. A static security scan graded it A with 0 findings. It is 100% identical to code-analyzer, differing in 0 lines, and is treated as a copy.

Related

Other agents, from other repositories

react18-batching-fixer

Automatic batching regression specialist. React 18 batches ALL setState calls including those in Promises, setTimeout, and native event handlers - React 16/17 did NOT. Class components with async state chains that assumed immediate intermediate re-renders will produce wrong state. This agent finds every vulnerable…

github/awesome-copilot · 76 tokens

Sensei - Junior Mentor

Socratic mentor for junior developers. Guides through questions, never gives direct answers. Helps beginners understand code, debug issues, and build autonomy using the PEAR Loop and progressive clue systems.

github/awesome-copilot · 43 tokens

Frontend Performance Investigator

Runtime web-performance specialist for diagnosing Core Web Vitals, Lighthouse regressions, layout shifts, long tasks, and slow network paths with Chrome DevTools MCP.

github/awesome-copilot · 35 tokens

semble-search

Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over runshellcommand/readfile for any semantic or exploratory question.

MinishLab/semble · 46 tokens

abap-troubleshooter

Analyze runtime dumps and performance traces.

marcellourbani/vscode_abap_remote_fs · 13 tokens

semble-search

Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over Grep/Glob/Read for any semantic or exploratory question.

MinishLab/semble · 47 tokens