Token导航 LogoToken导航

Agent Skill · 研究检索

codebase-audit(代码库审计)

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

codebase-audit 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证为 MIT,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 57,063。

总安装 441周安装 18GitHub Stars 公开资料未说明下载 143核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:codebase-audit(代码库审计)
来源仓库:https://github.com/saturate/claude
仓库路径:skills/codebase-audit
安装命令:
npx skills add https://github.com/saturate/claude --skill codebase-audit
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/saturate/claude --skill codebase-audit

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

codebase-audit 用于辅助安全审计与常见漏洞排查,重点检查权限控制、凭据风险和认证逻辑完整性。适合梳理敏感配置、分析依赖安全风险或生成安全复核清单,提升代码健壮性。基于静态分析与规则检查,识别硬编码密钥、弱验证机制及潜在攻击面。不能将输出直接视为最终结论,涉及生产数据时须先确认最小权限与脱敏策略。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/codebase-audit

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/saturate/claude --skill codebase-audit;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

codebase-audit 怎么安装?

在终端执行 npx skills add https://github.com/saturate/claude --skill codebase-audit。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

codebase-audit 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

codebase-audit 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

codebase-audit 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

codebase-audit 用的人多吗?

公开数据是累计安装 441 次,近一周安装 18 次,下载 143 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

codebase-audit 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
codebase-audit

代码库审计 · 本页

441—调用外部服务MIT未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Codebase Audit

Audit the codebase like you're inheriting someone else's mess - be thorough and honest. No diplomacy, no softening. Focus on what actually matters: security holes, bugs, maintainability problems, and tech debt. If something is broken or badly done, say it.

Audit Process

Copy this checklist to track your progress:

Codebase Audit Progress:
- [ ] Step 1: Check available tools
- [ ] Step 2: Detect project type and run audits
- [ ] Step 3: Detect tech stack and framework patterns
- [ ] Step 4: Identify and document critical issues
- [ ] Step 5: Generate high-level findings summary

1. Check Available Tools

Start by checking what tools you have available:

command -v trufflehog
command -v npm # or pnpm, yarn, pip, cargo, etc.

If any expected tools are missing, list them in your output and ask the user if they want to continue without them. Don't let missing tools block the entire audit.

2. Detect Project Type and Run Audits

Figure out the package manager and run the right audit:

  • package-lock.json → npm audit --json
  • pnpm-lock.yaml → pnpm audit --json
  • yarn.lock → yarn audit --json
  • requirements.txt / poetry.lock → pip-audit --format json or safety check --json
  • Cargo.toml → cargo audit --json
  • go.mod → go list -json -m all | nancy sleuth
  • *.csproj → dotnet list package --vulnerable --include-transitive

Secret scanning: Need help with TruffleHog? Check references/secret-scanning.md for scanning both current files and git history.

Parse the JSON output from these tools and integrate what you find into the audit report.

TypeScript projects (if tsconfig.json exists):

  • Check if strict mode is enabled (critical issue if it's false or missing)
  • Count how many times any is used explicitly (this defeats type safety)
  • Count type assertions using as or <Type> (suggest using type narrowing instead)

OWASP Top 10 checks: See references/owasp-top-10.md for vulnerability patterns and detection commands. Report findings as critical with file:line, what the risk is, and how to fix it.

Accessibility checks: Check references/accessibility-checklist.md for a11y detection commands and testing procedures. Report these as important because they exclude real users from using the app.

Monitoring/Observability: Look for error tracking tools (Sentry, DataDog, NewRelic), structured logging libraries (winston, pino), health check endpoints, and watch out for console.logs making it to production. Report missing observability as important for production systems.

3. Detect Tech Stack and Understand Project

Figure out the tech stack: Need help identifying package managers, frameworks, cloud platforms, or IaC tools? See references/tech-stack-detection.md for the complete detection guide.

Build a summary that covers: language(s), framework, build tools, testing framework, cloud platform, IaC tools, and CI/CD platform.

Framework best practices:

Once you know what framework they're using, check the relevant patterns guide:

Performance testing (if Chrome MCP is available):

If this is a web app and you have access to chrome-devtools MCP:

  • Ask the user: "Want me to run performance tests? Provide a URL or say skip."
  • If they give you a URL, use Chrome MCP to run a Lighthouse-style audit
  • Report Core Web Vitals (LCP, FID, CLS), bundle size, unoptimized images, and render-blocking resources

Don't forget to also check the project structure, documentation quality, and CI/CD setup.

4. Critical Issues (Show Details Immediately)

Surface these issues with full context right away - don't bury them:

Security (from tools + manual review)

  • Secrets found by trufflehog - show file:line, what type of secret, and severity
  • Vulnerable dependencies from npm/pip/cargo/dotnet audit - package name, CVE, severity
  • Hardcoded credentials or API keys sitting in the code
  • Missing authentication or authorization checks
  • Unsafe ways of handling data
  • Sensitive endpoints that are exposed
  • .NET projects: see auth, data, crypto

TypeScript Configuration (if it's a TypeScript project)

  • strict mode is disabled or missing from tsconfig.json
  • explicit any types being used (this defeats the whole point of TypeScript)
  • type casting/assertions (suggest type narrowing instead)

Breaking Problems

  • Build failures or broken configuration
  • Missing dependencies that are critical
  • Incompatible version requirements
  • Database migrations that can't be rolled back
  • Entity Framework projects: see references/entity-framework.md

Data Loss Risks

  • Operations running without validation
  • Missing error handling in paths that matter
  • Race conditions in how data is handled

5. High-Level Findings (Summary Only)

Organize what you found into categories with counts and brief summaries. Need help with the full category breakdown? Check references/report-template.md.

Categories to cover:

  • Architecture & Structure
  • Tech Debt
  • Testing
  • Documentation
  • Dependencies
  • Performance
  • Developer Experience
  • Best Practices

For each one: give a brief assessment, count the major issues, and summarize the patterns you're seeing. Don't list every single detail here - that's what "Areas to Investigate" is for.

Output Format

Structure your audit report like this (see references/report-template.md for examples):

  1. Tool Check - What tools are available, what's missing
  2. Tech Stack - Languages, frameworks, cloud platform, CI/CD
  3. Security Scan Results - What trufflehog, npm audit, and OWASP checks found
  4. TypeScript Check - Strict mode status, any usage, type casting
  5. Accessibility Check - Missing alt text, ARIA labels, keyboard support
  6. Monitoring/Observability - Error tracking, logging, health endpoints
  7. Performance - If Chrome MCP is available and user provided a URL
  8. Critical Issues 🚨 - Detailed breakdown with file:line, what the risk is, how to fix it
  9. Audit Summary - Overall health rating plus brief assessment for each category
  10. Areas to Investigate - Offer to dive deeper into specific areas with file:line details

Investigation Process

When the user asks you to investigate a specific area:

  • Search for relevant patterns in the code
  • Give them file:line references so they can jump right to it
  • Show specific examples of what you found
  • Suggest concrete fixes they can implement
  • Prioritize by what will have the most impact

Tool Output Handling

Parse the JSON output from security tools and work the findings into your report:

  • Group them by severity (critical → low)
  • Show which package or file, what the vulnerability is, and how to fix it
  • Link to the CVE or advisory when you can
  • For trufflehog results, make it clear if the secret is in git history vs current files

If a tool fails to run, note it and keep going - don't let one tool failure block the entire audit.

Guidelines

Be brutally honest:

  • Call out bad code. Don't soften it.
  • If something is a mess, say it's a mess
  • No hedging with "might", "could", or "possibly"
  • Don't say "consider fixing" - say "fix this" or "this is wrong"
  • If strict mode is off in TypeScript, that's a critical issue, not a suggestion
  • Explicit any defeats the whole point of TypeScript - call it out as breaking type safety
  • Tech debt is tech debt, not "areas for improvement"

Focus and priority:

  • Only report findings they can actually act on, not theoretical problems
  • Prioritize by real impact on security, stability, and maintainability
  • Skip nitpicks that linters should catch
  • Tool findings are facts - just report them straight

Context matters:

  • Startup MVPs can have some shortcuts, but still call them out
  • Enterprise systems need to meet higher standards
  • Personal projects can be looser, but point out what's missing
  • Don't excuse bad practices just because "it works right now"

Tone:

  • Be direct and clear, not diplomatic
  • If tests are missing, say "no tests" not "test coverage could be improved"
  • If docs are bad, say "documentation is inadequate" not "could benefit from more documentation"
  • Be specific about what's wrong and why it matters
  • Acknowledge what's good, but keep it brief - don't pad with praise

References

Need more detailed guidance? Check these references:

  • Tech Stack Detection - How to figure out what package managers, frameworks, cloud platforms, and IaC tools they're using
  • Secret Scanning Reference - Complete guide to running TruffleHog on both current files and git history, plus common patterns and how to fix them
  • OWASP Top 10 Reference - Detection patterns and grep commands for finding all OWASP Top 10 vulnerabilities, with severity guidelines
  • Accessibility Checklist - Practical commands for finding a11y issues and testing for WCAG compliance
  • Report Template - What the final report should look like, with example critical issues

Framework-specific patterns:

平台分布

Claude Code

31.65%
按下载量换算45

windsurf

21%
按下载量换算30

trae

17.6%
按下载量换算25

OpenCode

14.18%
按下载量换算20

Codex

8.19%
按下载量换算12

Antigravity

3.19%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills