audit
Audit project against golden principles, produce scorecard. Use for /audit, "check project quality". NOT for system setup health (/harness-audit) or eval scoring (/eval-score).
What this skill does
# Audit: Project Quality Scorecard
**EXECUTE this skill now.** Follow the workflow steps below using the provided $ARGUMENTS. Do NOT describe, summarize, or explain this skill — run it.
## Constants
- `PRINCIPLES_DIR`: `C:/Users/gurusharan.gupta/Agents/Claude Code/principles`
- `PRINCIPLES_INDEX`: `C:/Users/gurusharan.gupta/Agents/Claude Code/principles/_index.json`
- `MANIFEST_PATH`: `C:/Users/gurusharan.gupta/Agents/Claude Code/manifest.json`
## Commands
Parse $ARGUMENTS to determine action:
- `/audit` — Audit the current project
- `/audit <project-id>` — Audit a specific registered project by ID
- `/audit all` — Audit all active projects in the manifest
- `/audit principles` — List all golden principles with descriptions
## Workflow: Audit a Project
### Step 1: Identify Target
If no argument, use the current working directory.
If a project-id is given, look it up in the manifest to get the path.
If `all`, iterate over all active projects.
### Step 2: Read Principles
Read `PRINCIPLES_INDEX` to get the list of all principles with severity and enforcement method.
### Step 3: Check Each Principle
For each principle, run the appropriate check against the project directory:
**claude-md-required** (critical):
- Check: `CLAUDE.md` or `.claude/CLAUDE.md` exists
- Check: File is under 150 lines
- Check: Contains "## Commands" and "## Architecture" sections
**formatting-configured** (critical):
- Check for JS/TS: `.prettierrc`, `.prettierrc.json`, `prettier` in package.json, `.eslintrc*`, `eslint.config.*`
- Check for Python: `pyproject.toml` with `[tool.black]` or `[tool.ruff]`, `.flake8`, `setup.cfg` with flake8
- Check for Rust: `rustfmt.toml` or `.rustfmt.toml`
- Check for Go: always passes (gofmt built-in)
- If no recognized tech stack: SKIP (not applicable)
**tests-required** (critical):
- Check for JS/TS: `jest.config.*`, `vitest.config.*`, `*.test.*` or `*.spec.*` files exist, `"test"` script in package.json
- Check for Python: `pytest.ini`, `pyproject.toml` with `[tool.pytest]`, `tests/` directory, `test_*.py` files
- Check for Rust: `#[test]` in source files or `tests/` directory
- If no recognized tech stack: check for any `test` directory
**parse-at-boundaries** (critical):
- Cannot be mechanically checked fully. Check proxy indicators:
- For JS/TS: Zod, joi, yup, or io-ts in dependencies
- For Python: Pydantic in requirements
- Otherwise: MANUAL (flag for human review)
**semantic-file-naming** (recommended):
- Check: No files named `helpers.*`, `utils.*`, `common.*`, `misc.*`, `shared.*` at any level
- Use glob to find violations
**no-utils-helpers-dirs** (recommended):
- Check: `find $PROJECT -type d -name "utils" -o -name "helpers" -o -name "misc" -o -name "common" -o -name "shared"`
- Exclude `node_modules/`, `venv/`, `.git/`
**structured-logging** (recommended):
- Check proxy: structured logging library in dependencies (winston, pino, bunyan for JS; structlog, python-json-logger for Python)
- If no dependencies found: MANUAL
### Step 4: Check Additional Quality Signals
Beyond principles, check:
- `docs/` directory exists with exec-plans/, design-docs/ subdirectories
- `.claude/` directory exists
- `.git/` initialized
- Active exec-plans present and not stale (>30 days since last progress update)
### Step 5: Calculate Quality Score
Scoring:
- Start at 100 points
- Each FAILED critical principle: -20 points
- Each FAILED recommended principle: -10 points
- Each FAILED suggested principle: -5 points
- Missing docs/ structure: -10
- Missing .git/: -10
- Stale exec-plans: -5
Grade:
- A: 90-100
- B: 75-89
- C: 60-74
- D: 40-59
- F: 0-39
### Step 6: Output Scorecard
```
╔══════════════════════════════════════════════════╗
║ Audit: {project_name} ║
║ Path: {project_path} ║
╠══════════════════════════════════════════════════╣
║ ║
║ Golden Principles: ║
║ ✓ parse-at-boundaries PASS ║
║ ✗ claude-md-required FAIL (missing) ║
║ ✗ tests-required FAIL (no config)║
║ ✗ formatting-configured FAIL ║
║ ✓ semantic-file-naming PASS ║
║ ✓ no-utils-helpers-dirs PASS ║
║ ~ structured-logging MANUAL ║
║ ║
║ Infrastructure: ║
║ docs/ structure MISSING ║
║ .claude/ config PRESENT ║
║ .git/ initialized MISSING ║
║ Active exec-plans NONE ║
║ ║
║ Score: 40/100 ║
║ Grade: D ║
║ ║
║ Critical issues (fix first): ║
║ 1. Run /init-project to create CLAUDE.md ║
║ 2. Add test framework for Python ║
║ 3. Add formatter (black/ruff) config ║
║ ║
╚══════════════════════════════════════════════════╝
```
### Step 7: Update Manifest (optional)
If the user wants to persist the score, update the project's entry in manifest.json with:
```json
"quality_score": {
"grade": "D",
"score": 40,
"last_audit": "2026-03-26",
"critical_failures": 3,
"recommended_failures": 0
}
```
## Workflow: List Principles
When the user runs `/audit principles`:
Read all principle files and display:
```
Golden Principles (7):
CRITICAL:
parse-at-boundaries All external data parsed at boundary into typed representations
tests-required All new code must have tests, target 100% coverage
formatting-configured Automated formatting/linting configured before agent work
claude-md-required CLAUDE.md must exist following table-of-contents pattern
RECOMMENDED:
semantic-file-naming Files/dirs use domain-specific names, not generic labels
no-utils-helpers-dirs No utils/, helpers/, misc/ directories
structured-logging Structured logging (JSON/key-value) in production code
```
## Important
- Audit is read-only. Never modify project files during an audit.
- MANUAL checks should be flagged clearly — they require human judgment.
- Always suggest specific remediation actions for each failure.
- The /init-project skill can fix most infrastructure-level failures.
- Quality scores are informational. They help prioritize cleanup, not block work.
Related in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.