claude-soul: Agent for Claude Code

.claude/agents/code-quality-guardian.md

code-quality-guardian is an agent for Claude Code from tomdwipo/claude-soul. It costs 0 tokens per session (2,314 once invoked), scanned C, original, MIT.

An Android code-quality review agent focused on coding standards, maintainable design, documentation, and linting. It uses principles such as avoiding duplication and unnecessary complexity.

In plain words
What is it for?
Use it to review Kotlin or Android projects for naming, structure, method and class size, complexity, nesting, parameters, and test coverage. The supplied description lists target thresholds for these checks.
Why use it?
It helps identify inconsistent or difficult-to-maintain Android code and checks it against stated quality rules and limits.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is tomdwipo/claude-soul's own configuration. It tells Claude Code how to work on claude-soul 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 claude-soul configures →

Reuse

Borrowing it

Nothing to install: this file belongs to tomdwipo/claude-soul. 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/tomdwipo/claude-soul/main/.claude/agents/code-quality-guardian.md
Clone the repo
git clone --depth 1 https://github.com/tomdwipo/claude-soul

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-quality-guardian

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/tomdwipo/claude-soul/code-quality-guardian"><img src="https://agentmods.dev/badge/agents/tomdwipo/claude-soul/code-quality-guardian.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 2,314 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.02314
Opus 5.5 $0.00000 $0.00926
Sonnet 5.5 $0.00000 $0.00463
Haiku 4.5 $0.00000 $0.00231

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

Security

Grade C, and why

code-quality-guardian scanned grade C with 1 finding 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 2mo 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- Ignore in test files -->
.claude/agents/code-quality-guardian.md · 348 lines

How it starts

The opening of the file, as written. The whole thing — 348 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a Principal Software Quality Engineer specializing in Android code quality, clean code principles, and development best practices. Your mission is to ensure consistently high code quality, maintainability, and adherence to established coding standards.

Core Quality Principles

Clean Code Principles

  • SOLID: Single Responsibility, Open-Closed, Liskov Substitution, Interface Segregation, Dependency Inversion
  • DRY: Don't Repeat Yourself - eliminate duplication
  • KISS: Keep It Simple, Stupid - avoid unnecessary complexity
  • YAGNI: You Aren't Gonna Need It - don't over-engineer
  • Boy Scout Rule: Leave code better than you found it

Code Quality Metrics

// Maintain these quality thresholds:
object QualityMetrics {
    const val MAX_METHOD_LENGTH = 20 // lines
    const val MAX_CLASS_LENGTH = 300 // lines
    const val MAX_CYCLOMATIC_COMPLEXITY = 10
    const val MIN_TEST_COVERAGE = 80 // percent
    const val MAX_METHOD_PARAMETERS = 5
    const val MAX_NESTING_DEPTH = 3
}

Kotlin Code Standards

Naming Conventions

// Classes: PascalCase
class UserRepository

// Functions: camelCase, verb phrases
fun getUserById(id: String): User

// Properties: camelCase
val userName: String

// Constants: UPPER_SNAKE_CASE
const val MAX_RETRY_COUNT = 3

// Packages: lowercase
package com.example.app.feature.lending

// Test functions: backticks for readability
@Test
fun `getUserById returns null when user not found`() { }

Code Organization

// Standard file structure
class UserViewModel(
    // 1. Properties (dependencies first)
    private val userRepository: UserRepository,
    private val analyticsTracker: AnalyticsTracker
) : ViewModel() {
    
    // 2. Public properties
    val userState = MutableStateFlow<UserState>(UserState.Loading)
    
    // 3. Initialization block
    init {
        loadUser()
    }
    
    // 4. Public functions
    fun refreshUser() { }
    
    // 5. Private functions
    private fun loadUser() { }
    
    // 6. Companion object
    companion object {
        const val USER_ID_KEY = "user_id"
    }
}

Read the full file on GitHub · 348 lines

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. 2mo ago First seen · 348 lines · 0 tokens per session scan C 8e4ecc93b6dd

Subscribe to this mod's changes

code-quality-guardian is an agent published in the GitHub repository tomdwipo/claude-soul (24 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,314 tokens. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

code-quality-guardian compared with agents from other repositories

code-quality-guardian next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
code-quality-guardiantomdwipo/claude-soulAgent242mo agoMITC0Claude Code
build-failure-analystdotnet/skillsAgent5.8kyesterdayMITA108Claude Code
swiftui-performance-analyzerCharlesWiltgen/AxiomAgent1.3kyesterdayMITA45Claude Code
review-obsidian-guidelinesuphy/obsidian-reminderAgent662yesterdayMITA63Claude Code
predictive-analystsoftspark/ai-toolkitAgent17910d agoApache-2.0A35Claude Code
fec-ui-checkerbovinphang/frontend-craftAgent22yesterdayMITA89Claude Code
detectivenxtg-ai/forge-pluginAgent6yesterdayMITA473Claude Code