
This is a comprehensive codebase health check that runs SAST scans, reviews architecture patterns, and scores your project 0-100 based on severity-weighted findings. It pulls in security audits (including OWASP checks and AI-generated code vulnerabilities), examines your largest files against multiple lenses like silent failures and type design, and outputs a phased improvement plan. The scoring is unforgiving: any critical issue caps you at 40/100, with deductions ranging from -1 for low-priority items to -15 for critical flaws. What's interesting is the feedback loop requirement. Every high-severity finding forces you to update the relevant skill's anti-pattern rules and test assertions, so the tool theoretically gets smarter with each audit.
$ npx -y skills add hoangnguyen0403/agent-skills-standard --skill codebase-review --agent claude-codeInstalls into .claude/skills of the current project.
[!IMPORTANT] Review an entire codebase for architecture, engineering health, and exploitable risk; generate a prioritized remediation plan, an evidence-anchored system knowledge document, or both.
Optional args: slug=, ticket=<id/url>, mode=interactive|autonomous|channel, channel=, auto_continue=true|false, profile=business|hybrid|technical.
When the user asks to perform this workflow, execute the following steps:
Goal: Map a codebase from evidence, expose systemic risk, and produce the review and/or knowledge artifact requested.
Set the review contract:
analysis=fast|deep and deliverable=review|knowledge|both; default to fast + review to preserve the existing audit behavior. Use deep for knowledge or both unless the user explicitly requests otherwise.package.json, go.mod, pubspec.yaml, pom.xml) and locate source, tests, docs, IaC, runtime config, entry points, data stores, and generated paths.common-architecture-audit, common-security-audit, common-owasp, and common-llm-security.trusted, semi-trusted, or untrusted; record missing or inaccessible evidence.Map the system before judging it:
trigger -> validation/auth -> state mutation -> side effect -> consumer. Map cross-cutting logging, caching, error handling, authentication, and authorization.Inspect the mapped surface:
fast: inspect largest non-generated files, changed hotspots, auth surfaces, execution/config chokepoints, and the highest-centrality modules.deep: also inspect service-to-service flows, state lifecycle, persistence/migrations, jobs/events, feature boundaries, architecture drift, compliance-sensitive paths, and LLM/agent runtime risks.Assess and validate risk:
reviewContext for the pass: analysisMode, promptInjectionRisk, delegationMode, assignedRoles, and false-positive controls used by the human or agent team.confirmed.confirmed, needs validation, and not enough evidence separate.design-solution with explicit security constraints and follow-up questions.Write the requested evidence:
review or both, write artifacts/codebase-review.md with engineering health, architecture, delivery risk, severity-ranked findings, evidence gaps, and phased remediation. Score from 100: Critical -15, High -8, Medium -3, Low -1; cap at 40 for any P0.knowledge or both, write docs/architecture/codebase-knowledge.md with system purpose, evidence/assumptions, component map, critical flows and state ownership, integrations/trust boundaries, interaction matrix, change cautions, risks, glossary, and coverage/next-read queue. Use Mermaid only when it clarifies a real relationship.artifacts/security-review.md with scope, trust boundaries, review context, runtime contract, findings, evidence gaps, source provenance, confidence, exploit path, control mapping, and handoff notes.partial, preserve the ordered next-read queue, and do not present the knowledge document as complete.Feed back improvements:
slug, analysis/deliverable mode, artifact paths, confirmed findings, evidence gaps, next workflow.# Codebase Review: [Name]
## Scope And Review Context
## Component Map
## Findings
## Evidence Gaps
## Remediation Plan
## Outcome Report
{schema_version: 1, run_id: "[run-id]", slug: "[slug]", workflow: codebase-review, feature_status: implemented, started_at: "[timestamp]", completed_at: "[timestamp]", requirement_trace: {brd_objectives: [], requirements: [], acceptance_criteria: [], srs: []}, completed_evidence: [], missing_evidence: [], decision_needed: [], recommended_next_workflow: design-solution, cost: {source: unavailable}, agent: {identity: "[agent-identity]", model: "[model]"}}
## Next Workflow
design-solution | dev-fix
## Cost Report
Call `get_session_cost(workflow="codebase-review")` before final handoff.
Sponsors