codebase-audit skill
✓ 인증됨전체 코드베이스를 감사하고, 발견된 문제에 대해 GitHub issue를 생성하며, 격리된 git worktree와 pull request를 사용하여 문제를 수정합니다.
- GitHub 스타
- 1,164
- 파일
- 8
- 마지막 커밋
- 2026년 11월 11일
- 라이선스
- MIT
- 허용된 도구
- —
codebase-audit skill은 무엇을 하나요?
codebase-audit은(는) agent skill입니다. 전체 코드베이스를 감사하고, 발견된 문제에 대해 GitHub issue를 생성하며, 격리된 git worktree와 pull request를 사용하여 문제를 수정합니다.
skill의 SKILL.md에서 생성된 요약입니다.
codebase-audit skill 정보
저장소의 높은 표준을 유지하려는 개발자는 이 SKILL을 사용하여 포괄적인 코드 리뷰와 자동 수정을 수행할 수 있습니다. 이 도구는 디렉토리 전체를 체계적으로 스캔하여 보안 취약점, 로직 버그, 타입 안정성 문제 및 리소스 누수를 식별합니다. 프로세스는 리뷰 전략을 읽고 code explorer를 사용하여 모든 소스 파일을 검사하는 것으로 시작하며, 이어서 npm audit 및 Dependabot 알림을 사용한 의존성 스캔이 진행됩니다.
문제점이 식별되면 도구가 심각도에 따라 분류하고 구조화된 GitHub issue를 생성합니다. 메인 브랜치를 직접 수정하는 대신, 격리된 git worktree를 사용하여 각 문제에 대한 수정을 구현합니다. 이를 통해 모든 수정 작업이 개별 환경 내에서 이루어지도록 보장합니다. 수정을 완료하면 SKILL이 로컬 빌드와 테스트를 실행하고, conventional-changelog 형식을 사용하여 변경 사항을 커밋한 뒤 pull request를 제출합니다. 마지막으로 worktree를 정리하고 생성된 모든 issue와 pull request 링크가 포함된 최종 보고서를 제공하며 마무리됩니다.
agent가 수행할 수 있는 작업
- 1전체 코드베이스 감사 수행보안 및 품질 문제를 찾기 위해 전체 저장소에 대한 포괄적인 리뷰를 요청하십시오.
- 2의존성 취약점 패치 자동화의존성 감사를 실행하고 pull request를 제출하여 보안에 취약한 패키지를 식별하고 수정하십시오.
- 3코드 발견 사항을 추적 가능한 작업으로 변환식별된 코드 스멜과 버그를 팀을 위한 체계적인 GitHub issue로 전환하십시오.
- 4격리된 버그 수정 적용메인 브랜치를 오염시키지 않도록 별도의 git worktree를 사용하여 여러 문제를 독립적으로 수정하십시오.
skill의 SKILL.md를 기반으로 작성되었습니다. 모든 사용 사례는 해당 문서의 인용구와 대조 확인되었습니다.
codebase-audit skill 설치 방법
각 명령은 skill 폴더를 클라이언트의 skills 디렉터리에 복사합니다. 클라이언트를 재시작하거나 새 세션을 시작하여 로드하세요.Claude Code에 codebase-audit skill 설치
~/.claude/skills/codebase-audit/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/codebase-audit ~/.claude/skills/codebase-auditClaude Code (project)에 codebase-audit skill 설치
.claude/skills/codebase-audit/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/codebase-audit .claude/skills/codebase-auditCodex에 codebase-audit skill 설치
~/.agents/skills/codebase-audit/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/codebase-audit ~/.agents/skills/codebase-auditGemini CLI에 codebase-audit skill 설치
~/.gemini/skills/codebase-audit/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/codebase-audit ~/.gemini/skills/codebase-auditClaude.ai에 codebase-audit skill 설치
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
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 보안 감사는 아닙니다. 에이전트가 실행하기 전에 스크립트를 읽어 보세요. 검사 방식
- 소스 저장소 연결 및 접근 가능tencentcloudbase/cloudbase-ai-toolkit/skills/codebase-audit is public and reachablegithub.com/tencentcloudbase/cloudbase-ai-toolkit/tree/HEAD/s ↗통과
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit 2026-11-11github.com/tencentcloudbase/cloudbase-ai-toolkit/commits ↗통과
- 스크립트에 다운로드 후 실행이나 자격 증명 탈취가 없음No scripts in the skill folder통과
- SKILL.md에 숨겨진 지침 없음No override phrases, safeguard switches, credential requests or hidden charactersgithub.com/tencentcloudbase/cloudbase-ai-toolkit/blob/HEAD/s ↗통과
- 사전 허용 도구가 제한됨No pre-approved tools; the agent asks before using onegithub.com/tencentcloudbase/cloudbase-ai-toolkit/blob/HEAD/s ↗통과
SKILL.md
GitHub에서 보기Codebase 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?
이 스킬의 파일
8codebase-audit skill 질문
Claude Code에 codebase-audit skill을 어떻게 설치하나요?
npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/codebase-audit ~/.claude/skills/codebase-audit를 실행합니다. Claude Code는 ~/.claude/skills(모든 프로젝트) 또는 .claude/skills(한 프로젝트)에서 skills를 로드하며, 설명이 작업과 일치할 때 skill을 사용합니다.
codebase-audit skill을 사용할 수 있는 클라이언트는 무엇인가요?
Agent Skills 형식을 읽는 모든 클라이언트(Claude Code, Codex, Gemini CLI, claude.ai(ZIP으로 업로드))가 사용할 수 있습니다. skill 내 스크립트는 클라이언트가 코드 실행을 허용하는 경우에만 실행됩니다.
codebase-audit SKILL은 언제 사용해야 하나요?
전체 코드 리뷰, 선제적인 보안 및 품질 감사, 발견 사항의 GitHub issue 전환, 또는 정기적인 코드베이스 상태 점검이 필요할 때 사용하십시오.
이 SKILL로 의존성 취약점을 수정할 수 있나요?
네, Dependabot 알림을 확인하고 npm audit을 실행하여 의존성 보안 취약점을 감사하고 수정할 수 있습니다.