Skill codebase-audit
✓ VerifiedMelakukan audit codebase secara menyeluruh, membuat GitHub issues untuk temuan yang ada, dan memperbaikinya menggunakan git worktrees yang terisolasi serta pull requests.
- Bintang GitHub
- 1.164
- File
- 8
- Commit terakhir
- 11 Nov 2026
- Lisensi
- MIT
- Tool yang diizinkan
- —
Apa fungsi skill codebase-audit?
codebase-audit adalah agent skill. Melakukan audit codebase secara menyeluruh, membuat GitHub issues untuk temuan yang ada, dan memperbaikinya menggunakan git worktrees yang terisolasi serta pull requests.
Ringkasan dibuat dari SKILL.md skill ini.
Tentang skill codebase-audit
Developer yang ingin menjaga standar repositori tetap tinggi dapat menggunakan skill ini untuk melakukan code review komprehensif dan perbaikan otomatis. Tool ini memindai seluruh direktori secara sistematis untuk mengidentifikasi kerentanan keamanan, bug logika, masalah type safety, dan kebocoran resource. Proses dimulai dengan membaca strategi review dan menggunakan code explorer untuk memeriksa semua file source, diikuti dengan pemindaian dependency menggunakan npm audit dan alert dari Dependabot.
Setelah temuan diidentifikasi, tool ini akan mengategorikannya berdasarkan tingkat keparahan dan membuat GitHub issues yang terstruktur. Alih-alih memodifikasi main branch secara langsung, tool ini menggunakan git worktrees yang terisolasi untuk mengimplementasikan perbaikan pada setiap issue. Hal ini memastikan bahwa setiap perbaikan tetap terisolasi di lingkungannya masing-masing. Setelah perbaikan diimplementasikan, skill ini akan menjalankan build dan test lokal, melakukan commit perubahan menggunakan format conventional-changelog, dan mengirimkan pull request. Proses diakhiri dengan membersihkan worktrees dan memberikan laporan akhir yang berisi link ke semua issue dan pull request yang telah dibuat.
Apa yang bisa dilakukan agent dengannya
- 1Melakukan audit codebase secara menyeluruhMinta review komprehensif pada seluruh repositori Anda untuk menemukan masalah keamanan dan kualitas.
- 2Otomatisasi patching kerentanan dependencyIdentifikasi dan perbaiki package yang tidak aman dengan menjalankan audit dependency dan mengirimkan pull request.
- 3Mengonversi temuan kode menjadi tugas yang terlacakUbah code smells dan bug yang teridentifikasi menjadi GitHub issues yang terorganisir untuk tim Anda.
- 4Menerapkan perbaikan bug secara terisolasiPerbaiki berbagai issue secara independen menggunakan git worktrees terpisah untuk menghindari kontaminasi pada main branch.
Ditulis dari SKILL.md milik skill tersebut. Setiap use case diverifikasi dengan kutipan darinya.
Cara install skill codebase-audit
Setiap perintah menyalin folder skill ke direktori skills client. Restart client atau mulai sesi baru untuk memuatnya.Install skill codebase-audit di Claude Code
~/.claude/skills/codebase-audit/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/codebase-audit ~/.claude/skills/codebase-auditInstall skill codebase-audit di Claude Code (project)
.claude/skills/codebase-audit/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/codebase-audit .claude/skills/codebase-auditInstall skill codebase-audit di Codex
~/.agents/skills/codebase-audit/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/codebase-audit ~/.agents/skills/codebase-auditInstall skill codebase-audit di Gemini CLI
~/.gemini/skills/codebase-audit/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/codebase-audit ~/.gemini/skills/codebase-auditInstall skill codebase-audit di 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
Pengecekan otomatis
Berjalan 14 Nov 2026Laporan lengkap →Lolos cek otomatis kami. Ini bukan audit keamanan: baca skripnya sebelum membiarkan agent menjalankannya. Cara kerja checks
- Source repository terhubung dan dapat dijangkautencentcloudbase/cloudbase-ai-toolkit/skills/codebase-audit is public and reachablegithub.com/tencentcloudbase/cloudbase-ai-toolkit/tree/HEAD/s ↗Lolos
- Lisensi open source (OSI)MITspdx.org/licenses/MIT.html ↗Lolos
- Ada commit atau release dalam satu tahun terakhirLast commit 2026-11-11github.com/tencentcloudbase/cloudbase-ai-toolkit/commits ↗Lolos
- Skrip tanpa unduh-lalu-jalankan atau pencurian kredensialNo scripts in the skill folderLolos
- Tidak ada instruksi tersembunyi di SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/tencentcloudbase/cloudbase-ai-toolkit/blob/HEAD/s ↗Lolos
- Tool yang diizinkan otomatis dibatasiNo pre-approved tools; the agent asks before using onegithub.com/tencentcloudbase/cloudbase-ai-toolkit/blob/HEAD/s ↗Lolos
SKILL.md
Lihat di 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?
Berkas dalam skill ini
8Pertanyaan seputar skill codebase-audit
Bagaimana cara install skill codebase-audit di Claude Code?
Jalankan npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/codebase-audit ~/.claude/skills/codebase-audit. Claude Code memuat skill dari ~/.claude/skills (semua proyek) atau .claude/skills (satu proyek) dan menggunakan skill saat deskripsinya cocok dengan tugas.
Client mana saja yang bisa menggunakan skill codebase-audit?
Client apa pun yang membaca format Agent Skills: Claude Code, Codex, Gemini CLI, dan claude.ai (unggah sebagai ZIP). Script dalam skill hanya berjalan di client yang mengizinkan eksekusi kode.
Kapan saya harus menggunakan skill codebase-audit?
Gunakan skill ini untuk code review menyeluruh, audit keamanan dan kualitas secara proaktif, mengubah temuan menjadi GitHub issues, atau menjalankan pengecekan kesehatan codebase secara berkala.
Apakah skill ini bisa memperbaiki kerentanan dependency?
Ya, skill ini dapat mengaudit dan memperbaiki kerentanan keamanan dependency dengan memeriksa alert dari Dependabot dan menjalankan npm audit.