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.
curl -O https://raw.githubusercontent.com/tomdwipo/claude-soul/main/.claude/agents/code-quality-guardian.mdgit clone --depth 1 https://github.com/tomdwipo/claude-soulWrote 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/tomdwipo/claude-soul/code-quality-guardian)<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.
<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>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.00000 | $0.02314 |
| Opus 5.5 | $0.00000 | $0.00926 |
| Sonnet 5.5 | $0.00000 | $0.00463 |
| Haiku 4.5 | $0.00000 | $0.00231 |
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 --> 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"
}
}
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.
- 2mo ago First seen · 348 lines · 0 tokens per session scan C 8e4ecc93b6dd
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.
code-quality-guardian compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| code-quality-guardiantomdwipo/claude-soul | Agent | 24 | 2mo ago | MIT | C | 0 | Claude Code |
| build-failure-analystdotnet/skills | Agent | 5.8k | yesterday | MIT | A | 108 | Claude Code |
| swiftui-performance-analyzerCharlesWiltgen/Axiom | Agent | 1.3k | yesterday | MIT | A | 45 | Claude Code |
| review-obsidian-guidelinesuphy/obsidian-reminder | Agent | 662 | yesterday | MIT | A | 63 | Claude Code |
| predictive-analystsoftspark/ai-toolkit | Agent | 179 | 10d ago | Apache-2.0 | A | 35 | Claude Code |
| fec-ui-checkerbovinphang/frontend-craft | Agent | 22 | yesterday | MIT | A | 89 | Claude Code |
| detectivenxtg-ai/forge-plugin | Agent | 6 | yesterday | MIT | A | 473 | Claude Code |