scorecard
Evaluate code quality with letter grades across multiple dimensions
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
Evaluate code quality with letter grades across multiple dimensions
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle SOC
Build a lightweight single-file web application with no external dependencies
Walk through project setup improvements for efficient AI-assisted development
Set up automated cross-platform binary releases for a Go project
Work through a project's bug list autonomously, fixing bugs in priority order
Generate or update project README documentation
Discover and import Claude Code skills into this shared repo
| name | scorecard |
| description | Evaluate code quality with letter grades across multiple dimensions |
| argument-hint | ["directory | --quick"] |
Perform a comprehensive, critical third-party audit of a codebase and produce a structured scorecard with letter grades. This is a deep analysis, not a surface-level check.
/scorecard # Full codebase audit of current directory
/scorecard src/ # Audit specific directory
/scorecard --quick # Abbreviated audit (summary table only)
You MUST perform thorough investigation before grading. Do not grade from vibes — read actual code and docs. Launch multiple exploration agents in parallel to maximize coverage.
Launch these investigations simultaneously using the Task tool with subagent_type=Explore:
Agent 1 — Structure & Architecture:
Agent 2 — Code Quality & Bugs:
Agent 3 — Security & Licensing:
Agent 4 — Tests & Documentation:
Agent 5 — Performance & Duplication:
After all agents complete, synthesize findings into grades. Be honest and critical. A "B" should mean genuinely good code, not "I didn't look hard enough to find problems."
How well-structured is the codebase? Are responsibilities clear?
Is the code correct, readable, and maintainable?
Are patterns, naming, and conventions uniform across the codebase?
Are there vulnerabilities? Is the threat model appropriate?
Is the code efficient where it matters?
Is logic expressed once, or copy-pasted?
Is the code designed to be testable?
Do tests exist, and do they actually catch bugs?
Is the type system used effectively? (Grade within the language's capabilities — don't penalize Perl for not being TypeScript.)
any/Object/untyped areas)Is the project documented? Are docs accurate?
Does the code handle failures gracefully?
How easy is it to add features or modify behavior?
Is the repository clean, well-organized, and professional?
# Codebase Scorecard: [Project Name]
**Audited**: [date] | **Size**: [X files, Y KLOC] | **Language(s)**: [primary languages]
| # | Category | Grade | Key Finding |
|---|-------------------|-------|-------------|
| 1 | Architecture | B+ | Clean renderer; Editor is a god object |
| 2 | Code Quality | B- | Good conventions documented, inconsistently followed |
| 3 | Consistency | B | Mostly uniform, some mixed patterns |
| 4 | Security | C- | Multiple shell injection vectors |
| 5 | Performance | C | Uncached hot-path computation |
| 6 | DRY | C+ | 5+ duplicated patterns identified |
| 7 | Testability | B+ | Pure renderer, DI in most modules |
| 8 | Test Coverage | B- | Good breadth, tautological in places |
| 9 | Type Safety | N/A | Perl — no type system |
| 10| Documentation | C | Multiple stale references |
| 11| Error Handling | C+ | Inconsistent user-facing messages |
| 12| Extensibility | B | Good plugin points, tight core coupling |
| 13| Repo Hygiene | B- | Junk files, missing .gitignore entries |
**Overall: C+**
After the summary table, provide these sections:
What the project does well. Be specific — cite files and patterns.
Issues that should block a release or be fixed immediately. Include:
Honest assessment of the overall design. What's the biggest structural problem? What design decision will cause the most pain as the project grows?
List every place where documentation contradicts the actual code. Be specific with quotes from docs and what the code actually does.
Easy fixes that would meaningfully improve quality. Each should be achievable in a single commit.
Larger structural issues that need sustained effort. For each item, describe the current state, the target state, and a rough sense of scope (single file vs cross-cutting).
| Grade | Meaning | Implication |
|---|---|---|
| A+/A | Excellent | Ship with confidence |
| A-/B+ | Very good | Minor polish needed |
| B/B- | Solid | Some issues to address |
| C+/C | Fair | Needs attention before scaling |
| C-/D+ | Below average | Significant work needed |
| D/D- | Poor | Major problems |
| F | Failing | Fundamental issues |
Overall grade = weighted average, but drag it down if any HIGH-weight category is D or below. A project with A architecture but F security is not a B — it's a C at best.
# Codebase Scorecard: payment-service
**Audited**: 2026-03-06 | **Size**: 42 files, 8.2 KLOC | **Language(s)**: TypeScript
| # | Category | Grade | Key Finding |
|---|-------------------|-------|-------------|
| 1 | Architecture | A- | Clean adapter pattern, single responsibility |
| 2 | Code Quality | B+ | One off-by-one in retry logic |
| 3 | Consistency | A | Uniform error handling and naming throughout |
| 4 | Security | A | Input sanitized, no secrets in code |
| 5 | Performance | B | Minor: unbatched DB reads in reconciliation |
| 6 | DRY | B | Validation logic duplicated in 2 handlers |
| 7 | Testability | A | DI throughout, pure business logic functions |
| 8 | Test Coverage | B | 80% coverage, needs E2E for webhook flow |
| 9 | Type Safety | A | Full TypeScript strict, no `any`, proper generics |
| 10| Documentation | B- | Missing JSDoc on PaymentProcessor class |
| 11| Error Handling | B+ | Good custom error classes, add retry for transient |
| 12| Extensibility | A | Easy to add new payment providers via adapter |
| 13| Repo Hygiene | A- | Clean history, CI configured, one stale branch |
**Overall: B+**
### Top Strengths
- Adapter pattern in `src/providers/` makes adding payment providers trivial — add one file, register in factory
- Custom error hierarchy (`PaymentError` → `ValidationError` | `ProviderError` | `TimeoutError`) with proper propagation
- Comprehensive TypeScript strict mode, zero `any` usages, well-typed generics on `Result<T, E>`
### Critical Issues
- **MEDIUM [Bug]** `src/retry.ts:45` — off-by-one in exponential backoff: `delay = baseDelay * (2 ** attempt)` should be `2 ** (attempt - 1)` since `attempt` is 1-indexed. First retry waits 2x too long.
- **MEDIUM [Performance]** `src/reconciliation.ts:112-130` — reconciliation handler loads transactions one-by-one in a loop instead of batching. Will hit N+1 at scale.
### Architecture Assessment
Clean layered architecture. The provider adapter pattern (`src/providers/base.ts` → Stripe, PayPal, etc.) is well-designed and follows open/closed principle. Business logic is properly separated from I/O in `src/domain/`.
The one concern is that `src/handlers/webhook.ts` (340 lines) is doing too much — parsing, validation, idempotency checking, event dispatching, and error recovery. This should be split into a webhook parser and an event dispatcher.
### Quick Wins
1. Extract `src/validation.ts:45-89` shared logic from `src/handlers/charge.ts:23-67` — removes duplication, DRY grade → A-
2. Add JSDoc to `PaymentProcessor` and `ProviderFactory` public methods — Documentation grade → B+
3. Fix retry off-by-one — Code Quality grade → A-