Skill codebase-audit
✓ VerificadoRealiza una auditoría completa de la base de código, crea issues en GitHub para los hallazgos y los soluciona utilizando git worktrees aislados y pull requests.
- Estrellas en GitHub
- 1164
- Archivos
- 8
- Último commit
- 11 nov 2026
- Licencia
- MIT
- Herramientas permitidas
- —
¿Qué hace la skill codebase-audit?
codebase-audit es una agent skill. Realiza una auditoría completa de la base de código, crea issues en GitHub para los hallazgos y los soluciona utilizando git worktrees aislados y pull requests.
Resumen generado a partir del SKILL.md de la skill.
Sobre la skill codebase-audit
Los desarrolladores que buscan mantener estándares altos en sus repositorios pueden usar este SKILL para realizar revisiones de código exhaustivas y reparaciones automatizadas. Escanea sistemáticamente directorios completos para identificar vulnerabilidades de seguridad, errores de lógica, problemas de seguridad de tipos y fugas de recursos. El proceso comienza leyendo una estrategia de revisión y utilizando un explorador de código para inspeccionar todos los archivos fuente, seguido de un escaneo de dependencias mediante npm audit y las alertas de Dependabot.
Una vez identificados los hallazgos, la herramienta los categoriza por severidad y crea issues de GitHub estructurados. En lugar de modificar la rama principal directamente, utiliza git worktrees aislados para implementar las correcciones de cada problema. Esto garantiza que cada reparación esté contenida en su propio entorno. Tras implementar una solución, el SKILL ejecuta builds y tests locales, realiza commits siguiendo el formato de conventional-changelog y envía un pull request. Finalmente, limpia los worktrees y proporciona un reporte final con enlaces a todos los issues y pull requests creados.
Lo que un agente puede hacer con ella
- 1Realizar una auditoría completa de la base de códigoSolicita una revisión integral de todo tu repositorio para encontrar problemas de seguridad y calidad.
- 2Automatizar el parcheo de vulnerabilidades en dependenciasIdentifica y soluciona paquetes inseguros ejecutando auditorías de dependencias y enviando pull requests.
- 3Convertir hallazgos de código en tareas rastreablesTransforma los code smells y bugs identificados en issues de GitHub organizados para tu equipo.
- 4Aplicar correcciones de errores de forma aisladaSoluciona múltiples problemas de manera independiente usando git worktrees separados para evitar contaminar la rama principal.
Escrito a partir del SKILL.md de la skill. Cada caso de uso se verifica con una cita del mismo.
Cómo instalar la skill codebase-audit
Cada comando copia la carpeta de la skill al directorio de skills del cliente. Reinicia el cliente o inicia una nueva sesión para cargarla.Instalar la skill codebase-audit en Claude Code
~/.claude/skills/codebase-audit/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/codebase-audit ~/.claude/skills/codebase-auditInstalar la skill codebase-audit en Claude Code (project)
.claude/skills/codebase-audit/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/codebase-audit .claude/skills/codebase-auditInstalar la skill codebase-audit en Codex
~/.agents/skills/codebase-audit/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/codebase-audit ~/.agents/skills/codebase-auditInstalar la skill codebase-audit en Gemini CLI
~/.gemini/skills/codebase-audit/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/codebase-audit ~/.gemini/skills/codebase-auditInstalar la skill codebase-audit en Claude.ai
npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/codebase-audit codebase-audit && zip -r codebase-audit.zip codebase-audit # claude.ai → Customize → Skills → + → Create skill → Upload a skill → codebase-audit.zip
Verificaciones automáticas
Ejecutado 14 nov 2026Informe completo →Superó nuestras comprobaciones automáticas. No es una auditoría de seguridad: lee los scripts antes de dejar que un agente los ejecute. Cómo funcionan las verificaciones
- Repositorio de origen vinculado y accesibletencentcloudbase/cloudbase-ai-toolkit/skills/codebase-audit is public and reachablegithub.com/tencentcloudbase/cloudbase-ai-toolkit/tree/HEAD/s ↗Aprobado
- Licencia de código abierto (OSI)MITspdx.org/licenses/MIT.html ↗Aprobado
- Commit o lanzamiento en el último añoLast commit 2026-11-11github.com/tencentcloudbase/cloudbase-ai-toolkit/commits ↗Aprobado
- Sin descargar y ejecutar ni robo de credenciales en los scriptsNo scripts in the skill folderAprobado
- Sin instrucciones ocultas en SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/tencentcloudbase/cloudbase-ai-toolkit/blob/HEAD/s ↗Aprobado
- Las herramientas preaprobadas están acotadasNo pre-approved tools; the agent asks before using onegithub.com/tencentcloudbase/cloudbase-ai-toolkit/blob/HEAD/s ↗Aprobado
SKILL.md
Ver en GitHubCodebase Audit → Issue → Worktree Fix → PR
End-to-end workflow: systematically review the entire codebase, report findings as GitHub issues, fix each issue in an isolated git worktree, and submit PRs — all in one session.
When to use this skill
Use this skill when you need to:
- Perform a full code review / audit of the codebase
- Proactively find security vulnerabilities, logic bugs, or code quality problems
- Turn code review findings into tracked GitHub issues
- Fix each issue in isolation (worktree per issue) and submit PRs
- Run a periodic codebase health check with automated follow-through
- Audit and fix dependency security vulnerabilities (Dependabot alerts / npm audit)
Do NOT use for:
- Reviewing or fixing a single known bug (use
systematic-debuggingor direct fix) - Triaging existing open PRs (use
pr-review-fix) - Processing attribution issues (use
mcp-attribution-worktree) - Feature development or refactoring unrelated to audit findings
Workflow
Phase 1 — Review
- Read
references/review-strategy.mdfor the review scope and checklist. - Use the
code-explorersubagent to read ALL source files in the target directory (default:mcp/src/). - For each file, systematically check against the review checklist:
- Security: path traversal, injection, unvalidated input, hardcoded secrets, improper error exposure
- Error handling: missing try-catch, swallowed errors, error messages leaking internals
- Type safety:
as any, unsafe casts, missing null checks - Logic bugs: race conditions, incorrect conditionals, unreachable code
- Code quality: dead code, duplication, overly complex functions
- Resource leaks: unclosed connections, missing cleanup
- API design: inconsistent validation, missing required field checks
- Record every finding with: file path, line number(s), category, severity (Critical/High/Medium/Low), description, and suggested fix.
- Dependency scan: Read
references/dependency-audit.mdand run the Dependabot alert fetch +npm auditto discover vulnerable dependencies. Record each finding using the dependency-audit format.
Phase 2 — Analyze & Classify
- Read
references/classification.mdfor severity definitions and grouping rules. - Deduplicate findings — merge instances of the same pattern across files.
- Group findings into fix batches — related issues that should be fixed together in one PR.
- Assign severity and priority:
- P0 (Critical): Security vulnerabilities, data loss risks
- P1 (High): Logic bugs, error handling gaps that cause runtime failures
- P2 (Medium): Type safety, code quality issues affecting maintainability
- P3 (Low): Style, naming, minor cleanup
- Present a structured audit report to the user and wait for confirmation before proceeding.
Phase 3 — Create GitHub Issues
- Read
references/issue-workflow.mdfor issue creation guidelines. - For each fix batch (or individual Critical finding), create a GitHub issue:
gh issue create --title "<type>(<scope>): <summary>" --body "<structured body>" --label "<severity>,<category>" - Issue body must include: affected files, line numbers, problem description, expected behavior, and suggested fix approach.
- Link related issues when findings are connected.
- Present the created issues to the user.
Phase 4 — Worktree Fix
- Read
references/worktree-fix.mdfor the isolation and fix procedure. - For each issue (in priority order):
a. Create an isolated worktree and branch:
b. Work inside the worktree — never in the main checkout. c. Implement the fix, keeping changes minimal and focused. d. Verify locally:git worktree add ../<repo>-audit-fix-<issue-number> -b fix/<slug>-<issue-number> origin/maincd mcp && npm run build && npm run teste. Commit with conventional-changelog format:
f. Push and create PR:git commit -m 'fix(<scope>): 🔒 <english description> Closes #<issue-number>'
g. Remove the worktree after PR is created:git push github fix/<slug>-<issue-number> gh pr create --title "fix(<scope>): 🔒 <summary>" --body "Closes #<issue-number>\n\n<description>" --base maincd <original-dir> git worktree remove ../<repo>-audit-fix-<issue-number> - One worktree per issue. Never mix fixes across worktrees.
- Dependency fixes: For dependency vulnerability batches, follow
references/dependency-audit.mdStep 4. These can be grouped into a single PR since they modifypackage.json/package-lock.json.
Phase 5 — Verify & Report
- Read
references/verification.mdfor the verification checklist. - Check CI status for each PR:
gh pr checks <number> - If CI fails, re-enter the worktree, fix, and push again.
- Generate a final audit report summarizing:
- Total findings by category and severity
- Issues created (with links)
- PRs submitted (with links)
- Remaining items that need human decision
Routing
| Task | Read |
|---|---|
| What to review and how to check each category | references/review-strategy.md |
| Security severity classification (TSRC-style) | references/security-severity-checklist.md |
| How to classify, deduplicate, and batch findings | references/classification.md |
| How to create well-structured GitHub issues | references/issue-workflow.md |
| How to create worktrees and fix issues in isolation | references/worktree-fix.md |
| How to verify fixes and generate the final report | references/verification.md |
| How to audit and fix dependency vulnerabilities | references/dependency-audit.md |
Git safety rules
- Never force-push unless explicitly asked.
- Never amend commits that are already pushed.
- Always work inside the worktree, not the main checkout.
- Always verify build + test locally before pushing.
- One worktree per issue — never mix fixes.
- Clean up worktrees after PR creation.
Commit conventions
Follow the project's conventional-changelog format:
fix(<scope>): 🔒 <english description>
Closes #<issue-number>
Scope examples: security, deps, error-handling, type-safety, code-quality, cloudrun, database, functions
Minimum self-check
- Did I review ALL source files in the target scope, not just a sample?
- Did I categorize each finding with file, line, severity, and description?
- Did I present the audit report and get user confirmation before creating issues?
- Did I create a separate GitHub issue for each fix batch?
- Did I use an isolated worktree for each fix, not the main checkout?
- Did I verify build + test pass before pushing each fix?
- Did I clean up worktrees after creating PRs?
- Did I generate a final report with links to all issues and PRs?
- Did I check Dependabot alerts and npm audit for dependency vulnerabilities?
- Did I apply the correct fix strategy (upgrade / override / replace / dismiss) for each vulnerable dependency?
Archivos de esta skill
8Preguntas sobre la skill codebase-audit
¿Cómo instalo la skill codebase-audit en Claude Code?
Ejecuta npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/codebase-audit ~/.claude/skills/codebase-audit. Claude Code carga las skills desde ~/.claude/skills (todos los proyectos) o .claude/skills (un proyecto) y usa una skill cuando su descripción coincide con la tarea.
¿Qué clientes pueden usar la skill codebase-audit?
Cualquier cliente que lea el formato Agent Skills: Claude Code, Codex, Gemini CLI y claude.ai (subir como ZIP). Los scripts de la skill se ejecutan solo donde el cliente permite la ejecución de código.
¿Cuándo debería usar el SKILL codebase-audit?
Usa este SKILL para revisiones de código completas, auditorías proactivas de seguridad y calidad, convertir hallazgos en issues de GitHub o realizar chequeos periódicos de la salud de tu base de código.
¿Puede este SKILL solucionar vulnerabilidades de dependencias?
Sí, puede auditar y solucionar vulnerabilidades de seguridad en las dependencias revisando las alertas de Dependabot y ejecutando npm audit.