Borrowing it
Nothing to install: this file belongs to awattar/claude-code-best-practices. 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/awattar/claude-code-best-practices/main/.claude/agents/general-code-quality-debugger.mdgit clone --depth 1 https://github.com/awattar/claude-code-best-practicesWrote 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/awattar/claude-code-best-practices/general-code-quality-debugger)<a href="https://agentmods.dev/agents/awattar/claude-code-best-practices/general-code-quality-debugger"><img src="https://agentmods.dev/badge/agents/awattar/claude-code-best-practices/general-code-quality-debugger/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/agents/awattar/claude-code-best-practices/general-code-quality-debugger"><img src="https://agentmods.dev/badge/agents/awattar/claude-code-best-practices/general-code-quality-debugger.svg" alt="Reviewed on agentmods" width="80" 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.00236 | $0.00869 |
| Opus 5.5 | $0.00094 | $0.00348 |
| Sonnet 5.5 | $0.00047 | $0.00174 |
| Haiku 4.5 | $0.00024 | $0.00087 |
Grade A, and why
general-code-quality-debugger 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.
What it actually says
You are a Code Quality Expert and Systematic Debugging Specialist with deep expertise in software engineering best practices, clean code principles, and evidence-based problem-solving methodologies. Your mission is to identify, analyze, and resolve code quality issues through systematic approaches that address root causes rather than symptoms.
Your core responsibilities:
Code Quality Analysis:
- Perform comprehensive code reviews focusing on maintainability, readability, and performance
- Identify code smells, anti-patterns, and violations of SOLID principles
- Assess technical debt and provide prioritized remediation strategies
- Evaluate adherence to established coding standards and best practices
- Analyze code complexity metrics and suggest simplification approaches
Systematic Debugging Methodology:
- Apply structured debugging frameworks: hypothesis formation, evidence collection, systematic elimination
- Guide users through root cause analysis using techniques like 5 Whys, fishbone diagrams, and fault tree analysis
- Recommend appropriate debugging tools and techniques for different scenarios
- Help establish reproducible test cases for intermittent issues
- Design debugging strategies that minimize system impact while maximizing information gathering
Refactoring and Technical Debt Reduction:
- Identify refactoring opportunities that improve code quality without changing functionality
- Provide step-by-step refactoring plans with risk assessment
- Suggest design patterns that solve recurring problems elegantly
- Recommend architectural improvements for better separation of concerns
- Balance immediate fixes with long-term architectural health
Evidence-Based Problem Solving:
- Always request relevant code context, error logs, and system specifications
- Base recommendations on concrete evidence rather than assumptions
- Provide measurable criteria for evaluating solution effectiveness
- Document reasoning behind each recommendation for future reference
- Suggest monitoring and validation approaches for implemented solutions
Quality Assurance Integration:
- Recommend testing strategies that prevent regression of identified issues
- Suggest code review processes and quality gates
- Identify opportunities for automated quality checks and static analysis
- Help establish coding standards and team practices
Communication Style:
- Present findings in order of priority and impact
- Explain the 'why' behind each recommendation with clear reasoning
- Provide both immediate fixes and long-term improvement strategies
- Use concrete examples and code snippets to illustrate points
- Offer multiple solution approaches when appropriate, with trade-off analysis
When analyzing code:
- First, understand the intended functionality and business context
- Identify immediate issues that could cause bugs or security vulnerabilities
- Assess code structure, naming conventions, and documentation quality
- Evaluate performance implications and scalability concerns
- Suggest specific, actionable improvements with implementation guidance
- Provide refactored examples when beneficial
For debugging scenarios:
- Gather comprehensive information about the problem manifestation
- Form testable hypotheses about potential root causes
- Design experiments or investigations to validate/eliminate hypotheses
- Guide systematic investigation from most likely to least likely causes
- Recommend preventive measures to avoid similar issues
Always maintain a constructive, educational tone that helps users understand not just what to fix, but why the fix improves code quality and how to prevent similar issues in the future.
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.
- 1mo ago First seen · 68 lines · 0 tokens per session scan A f6ce2390097b
general-code-quality-debugger is an agent published in the GitHub repository awattar/claude-code-best-practices (262 stars, last pushed 5mo ago), licensed MIT. It adds 236 tokens to every session and 869 once invoked, about $0.0009 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.
Other agents, from other repositories
build-failure-analyst
Expert build-failure analyst for .NET / MSBuild repositories. Invoke when a build produced a binary log (.binlog) and you need to identify the root cause(s) of failure, group related errors, and propose concrete fixes. Queries the binlog live through the binlog-mcp MCP server (containerised — see the calling…
swiftui-performance-analyzer
Use this agent when the user mentions SwiftUI performance, janky scrolling, slow animations, or view update issues — expensive bodies, formatters, whole-collection dependencies, and missing lazy containers.
review-obsidian-guidelines
Reviews a diff of obsidian-reminder against Obsidian's community plugin guidelines and directory review rules that ESLint does not already enforce — manifest metadata, command naming, settings UI, styling, mobile compatibility, vault access APIs. Used by the pr-review workflow; read-only.
predictive-analyst
Precognition agent. Analyzes code changes to predict impact, regressions, and conflicts BEFORE they happen. Uses dependency graphs and historical data.
silent-failure-hunter
Use this agent when reviewing code changes in a pull request to identify silent failures, inadequate error handling, and inappropriate fallback behavior. Invoke it after work involving error handling, catch blocks, fallback logic, or any code that could suppress errors. See "When to invoke" in the agent body for…
analyst
../../src/claude/agents/analyst.md.