Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问clear审计异常

codebase-audit代码库审计

Agent Skill

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

总安装

441

周安装

18

GitHub Stars

公开资料未说明

下载量

143
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 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

简介

codebase-audit 用于辅助安全审计与常见漏洞排查,重点检查权限控制、凭据风险和认证逻辑完整性。

  • 适合梳理敏感配置、分析依赖安全风险或生成安全复核清单,提升代码健壮性。
  • 基于静态分析与规则检查,识别硬编码密钥、弱验证机制及潜在攻击面。
  • 不能将输出直接视为最终结论,涉及生产数据时须先确认最小权限与脱敏策略。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

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.jsonnpm audit --json
  • pnpm-lock.yamlpnpm audit --json
  • yarn.lockyarn audit --json
  • requirements.txt / poetry.lockpip-audit --format json or safety check --json
  • Cargo.tomlcargo audit --json
  • go.modgo list -json -m all | nancy sleuth
  • *.csprojdotnet 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:

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

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

未通过

权限和风险

external-service

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills