跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
安全

audit

Comprehensive project audit — security, dependencies, code quality, architecture, performance, infra, docs, and mesh analytics. Use when needing a full 8-dimension health-score snapshot before a major release, M&A diligence, or quarterly review. Delegates to specialist skills (sentinel, dependency-doctor, perf, autopsy, etc.).

Rune-kit · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add Rune-kit/rune --skill audit

技能说明


name: audit description: "Comprehensive project audit — security, dependencies, code quality, architecture, performance, infra, docs, and mesh analytics. Use when needing a full 8-dimension health-score snapshot before a major release, M&A diligence, or quarterly review. Delegates to specialist skills (sentinel, dependency-doctor, perf, autopsy, etc.)." metadata: author: runedev version: "0.5.0" layer: L2 model: opus group: quality tools: "Read, Bash, Glob, Grep" emit: audit.complete listen: context.preview

audit

Purpose

Comprehensive project health audit across 8 dimensions (7 project + 1 mesh analytics). Delegates security scanning to sentinel, dependency analysis to dependency-doctor, and code complexity to autopsy, then directly audits architecture, performance, infrastructure, and documentation. Applies framework-specific checks (React/Next.js, Node.js, Python, Go, Rust, React Native/Flutter) based on detected stack. Produces a consolidated health score and prioritized action plan saved to AUDIT-REPORT.md.

Triggers

  • /rune audit — full 8-dimension project health audit
  • /rune audit dx — DX Review Mode (Addy Osmani 8 principles, see below)
  • User says "audit", "review project", "health check", "project assessment"
  • User says "developer experience", "DX audit", "onboarding experience", "time to hello world"

Calls (outbound)

  • scout (L2): Phase 0 — project structure and stack discovery
  • dependency-doctor (L3): Phase 1 — vulnerability scan and outdated dependency check
  • sentinel (L2): Phase 2 — security audit (OWASP Top 10, secrets, config)
  • autopsy (L2): Phase 3 — code quality and complexity assessment
  • improve-architecture (L2): Phase 3.5 — architecture sub-score (depth / leverage / locality across top modules)
  • perf (L2): Phase 4 — performance regression check
  • db (L2): Phase 5 — database health dimension (schema, migrations, indexes)
  • journal (L3): record audit date, overall score, and verdict
  • constraint-check (L3): audit HARD-GATE compliance across project skills
  • sast (L3): Phase 2 — deep static analysis (Semgrep, Bandit, ESLint security rules)
  • retro (L2): Phase 6 — engineering velocity and health dimension (rune:retro)
  • browser-pilot (L3): DX Review Mode — real browser testing of docs, setup guides, error pages

Called By (inbound)

  • cook (L1): pre-implementation audit gate
  • launch (L1): pre-launch health check
  • User: /rune audit direct invocation

Executable Instructions

Phase 0: Project Discovery

Call rune:scout for a full project map. Then use Read on:

  • README.md, CLAUDE.md, CONTRIBUTING.md, .editorconfig (if they exist)

Determine:

  • Language(s) and version(s)
  • Framework(s) — determines which Framework-Specific Checks below apply
  • Package manager, build tool(s), test framework(s), linter/formatter config
  • Project type: API/backend | frontend/SPA | fullstack | CLI tool | library | mobile | infra/IaC
  • Monorepo setup (workspaces, turborepo, nx, etc.)

Output before proceeding: Brief project profile, stack summary, and which Framework-Specific Checks will be applied.

Phase 0.5: Context-Building (Pure Understanding)

For each critical module (entry points, auth, data layer, core business logic):

  1. Read line-by-line. Note at minimum:
    • 3 invariants: What MUST always be true for this code to work? (e.g., "user is authenticated before reaching this handler")
    • 5 assumptions: What does this code assume about its inputs, environment, and callers?
    • 3 risks: What could break if assumptions are violated?
  2. Record findings as context notes — these feed into Phases 1-7, NOT into the final report directly

Why: Without this phase, the auditor pattern-matches against known vulnerability lists and hallucinates findings that don't exist in THIS specific codebase. The invariants + assumptions ground all later analysis in reality.


Phase 1: Dependency Audit

Delegate to dependency-doctor. The dependency-doctor report covers:

  • Vulnerability scan (CVEs by severity)
  • Outdated packages (patch / minor / major)
  • Unused dependencies
  • Dependency health score

Pass the full dependency-doctor report through to the final audit.


Phase 2: Security Audit

Delegate to sentinel. Request a full security scan covering:

  • Hardcoded secrets, API keys, tokens, passwords in source code
  • OWASP Top 10: injection, broken auth, sensitive data exposure, XSS, CSRF, insecure deserialization, broken access control
  • Configuration security (debug mode in prod, CORS *, missing HTTP security headers)
  • Input validation at API boundaries
  • .gitignore coverage of sensitive files

Pass the full sentinel report through to the final audit.


Phase 3: Code Quality Audit

Delegate to autopsy for codebase health (complexity, coupling, hotspots, dead code, health score per module).

In addition, use Grep to find supplementary issues autopsy may not cover:

# console.log in production code
grep -r "console\.log" src/ --include="*.ts" --include="*.js" -l

# TypeScript any types
grep -r ": any" src/ --include="*.ts" -n

# Empty catch blocks
grep -rn "catch.*{" src/ --include="*.ts" --include="*.js" -A 1 | grep -E "^\s*}"

# Python print() in production
grep -r "^print(" . --include="*.py" -l

# Rust .unwrap() outside tests
grep -rn "\.unwrap()" src/ --include="*.rs"

Merge autopsy report + supplementary findings.

3.5 Zombie Code Detection

Identify code that is effectively dead but hasn't been formally removed. Zombie code increases surface area, confuses contributors, and accumulates security debt.

SignalDetection MethodSeverity
No commits in 6+ months`git log
阅读完整来源 ↗