guardian

guardian is a command for Claude Code from doncheli/don-cheli-sdd. It costs 13 tokens per session (746 once invoked), scanned A, original, Apache-2.0.

An AI code review that runs before commits and checks staged changes against the team's documented coding standards.

In plain words
What is it for?
Use it as a pre-commit hook or to review staged files, branch changes, or CI changes against rules in the project standards file.
Why use it?
It can warn about problems or block a commit before unsuitable code enters the branch, with modes for pull requests and continuous integration.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Part of the don-cheli-sdd plugin — 28 skills, 115 commands, 1 agent shipped together

Good fit Use it as a pre-commit hook or to review staged files, branch changes, or CI changes against rules in the project standards file.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/doncheli/don-cheli-sdd/guardian
Install

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.

Clone the repo
git clone --depth 1 https://github.com/doncheli/don-cheli-sdd

Made for: Claude Code.

Or install don-cheli-sdd, the plugin that ships this one along with the rest of its 28 skills, 115 commands, 1 agent.

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 guardian

README.md
[![agentmods](https://agentmods.dev/badge/commands/doncheli/don-cheli-sdd/guardian.svg)](https://agentmods.dev/commands/doncheli/don-cheli-sdd/guardian)
Your own site
<a href="https://agentmods.dev/commands/doncheli/don-cheli-sdd/guardian"><img src="https://agentmods.dev/badge/commands/doncheli/don-cheli-sdd/guardian.svg" alt="Measured on agentmods" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 746 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 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.00013 $0.00746
Opus 5 $0.00006 $0.00373
Sonnet 5 $0.00003 $0.00149
Haiku 4.5 $0.00001 $0.00075

Measured 4d ago against content hash 0944275c04c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

guardian 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 4d 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.

scripts/.claude/commands/dc/guardian.md · 100 lines

How it starts

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

/dc:guardian

Objetivo

Ejecutar revisión de código automatizada usando IA como puerta de calidad antes de cada commit. Actúa como un "Ángel Guardián" que valida que el código cumple con los estándares del equipo.

Inspirado en GGA (Gentleman Guardian Angel) de Gentle-AI.

Uso

/dc:guardian                    # Revisar archivos staged
/dc:guardian --modo pr          # Revisar todos los cambios del branch vs base
/dc:guardian --modo ci          # Para integración continua
/dc:guardian --instalar-hook    # Instalar como pre-commit hook

Cómo Funciona

git add <archivos>
git commit -m "feat: agregar login"
    │
    ├── Hook pre-commit se activa
    │   └── /dc:guardian
    │       ├── Lee archivos staged
    │       ├── Lee reglas de .dc/estandares.md
    │       ├── Envía al LLM para revisión
    │       └── Resultado:
    │           ├── ✅ PASS → commit permitido
    │           ├── ⚠️ WARN → commit con advertencias
    │           └── ❌ FAIL → commit BLOQUEADO
    │
    └── Resultado del commit

Estandares de Revisión

El archivo .dc/estandares.md define las reglas que el Guardian valida:

# Estándares de Código

## Obligatorios (❌ si falta)
- [ ] Type hints en todas las firmas de función
- [ ] No hay `any` / `Any` sin justificación
- [ ] Tests para lógica de negocio nueva
- [ ] No credenciales en código fuente
- [ ] Manejo de errores (no try/catch vacíos)

## Recomendados (⚠️ si falta)
- [ ] Docstrings en funciones públicas
- [ ] Nombres descriptivos (no variables de 1 letra)
- [ ] Imports organizados

Output

=== Guardian Angel: Revisión de Código ===

Archivos revisados: 3
Modelo usado: sonnet

✅ PASS: app/services/auth_service.py
  • Type hints completos
  • Manejo de errores correcto
  • Tests existentes

⚠️ WARN: app/routers/auth.py
  • Falta docstring en endpoint /login (recomendado)
  • Import no usado: `from typing import Optional`

❌ FAIL: app/config.py
  • Línea 23: API_KEY hardcodeada — usar variable de entorno
  • Línea 45: try/except vacío que engulre errores

RESULTADO: BLOQUEADO (1 FAIL)
→ Corregir los issues marcados con ❌ antes de commitear

Read the full file on GitHub · 100 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. 4d ago First seen · 100 lines · 13 tokens per session scan A 0944275c04c8

Subscribe to this mod's changes

guardian is a command published in the GitHub repository doncheli/don-cheli-sdd (57 stars, last pushed 28d ago), licensed Apache-2.0. It adds 13 tokens to every session and 746 once invoked, about $0.0001 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-09-03.