audit-codebase
From rtk-ai
RTK Codebase Health Audit — 7 catégories scorées 0-10
Install
/audit-codebaseFacts
- Repository
- rtk-ai/rtk
- Status
- Actively maintained
- Last commit
- Declared tools
- [Read, Grep, Glob, Bash, Write]
- Model
- sonnet
- Source file
- .claude/commands/tech/audit-codebase.md
Source preview
The instructions Claude Code reads when this command runs.
# Audit Codebase — Santé du Projet RTK
Score global et par catégorie (0-10) avec plan d'action priorisé.
## Arguments
- `--category <cat>` — Auditer une seule catégorie : `secrets`, `security`, `deps`, `structure`, `tests`, `perf`, `ai`
- `--fix` — Après l'audit, proposer les fixes prioritaires
- `--json` — Output JSON pour CI/CD
## Usage
```bash
/tech:audit-codebase
/tech:audit-codebase --category security
/tech:audit-codebase --fix
/tech:audit-codebase --json
```
Arguments: $ARGUMENTS
## Seuils de Scoring
| Score | Tier | Status |
| ----- | --------- | -------------------- |
| 0-4 | 🔴 Tier 1 | Critique |
| 5-7 | 🟡 Tier 2 | Amélioration requise |
| 8-10 | 🟢 Tier 3 | Production Ready |
## Phase 1 : Audit Secrets (Poids: 2x)
```bash
# API keys hardcodées
Grep "sk-[a-zA-Z0-9]{20}" src/
Grep "Bearer [a-zA-Z0-9]" src/
# Credentials dans le code
Grep "password\s*=\s*\"" src/
Grep "token\s*=\s*\"[^$]" src/
# .env accidentellement commité
git ls-files | grep "\.env" | grep -v "\.env\.example"
# Chemins absolus hardcodés (home dir, etc.)
Grep "/home/[a-z]" src/
Grep "/Users/[A-Z]" src/
```
| Condition | Score |
| ----------------------- | ------------ |
| 0 secrets trouvés | 10/10 |
| Chemin absolu hardcodé | -1 par occ. |
| Credential réel exposé | 0/10 immédiat|
## Phase 2 : Audit Sécurité View full source on GitHub →Other slash commands
feature-development
★ 229,918Workflow command scaffold for feature-development in everything-claude-code.
affaan-mupdated 14d agoMITdatabase-migration
★ 229,918Workflow command scaffold for database-migration in everything-claude-code.
affaan-mupdated 14d agoMITadd-language-rules
★ 229,918Workflow command scaffold for add-language-rules in everything-claude-code.
affaan-mupdated 14d agoMITcommit-push-pr
★ 137,934Commit, push, and open a PR
anthropicsupdated 13d agodedupe
★ 137,934Find duplicate GitHub issues
anthropicsupdated 13d agotriage-issue
★ 137,934Triage GitHub issues by analyzing and applying labels
anthropicsupdated 13d ago