一键导入
audit-fix
审计问题修复技能。读取模块的 AUDIT.md,逐个修复安全/质量问题,修复后归档到 AUDIT_HISTORY.md。严格约束只修改 AUDIT.md 列出的文件。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
审计问题修复技能。读取模块的 AUDIT.md,逐个修复安全/质量问题,修复后归档到 AUDIT_HISTORY.md。严格约束只修改 AUDIT.md 列出的文件。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Save and resume work context across Claude sessions with Hapi integration. Supports thread-level continuity spanning multiple Hapi sessions, automatic context threshold detection, and conversation history archival. Triggers on "save checkpoint", "resume", "断点续传", "保存进度", "恢复上下文", "checkpoint enable", "checkpoint status".
统一项目分析 CLI 工具。支持 DAG 调度、LLM 批量任务、依赖图构建、测试分析/修复、文档生成、代码审计、Web Dashboard。与 project-index 功能完全一致,推荐作为统一入口。
Use this skill for large project maintenance with layered CLAUDE.md index system. Triggers when users need to (1) analyze and document existing codebases, (2) generate hierarchical CLAUDE.md files for modules, (3) set up incremental update hooks after code changes, or (4) navigate large projects efficiently. Supports legacy project onboarding and automatic context management.
JS/JSDoc 微内核项目代码降熵扫描与修复。适用于纯 JavaScript + JSDoc 架构的 Agent 系统。 触发条件: - 用户请求对 js/agents 或类似 JS 微内核项目进行代码质量扫描 - 用户说 "/js-entropy-scan" 或 "扫描代码熵" - 需要检查:JSDoc 覆盖率、TODO/FIXME 清理、console 残留、错误处理规范、导出一致性、死代码检测
Use this skill when entering a new or legacy project for the first time, to scan and localize global skills for project-specific conventions. Triggers on "onboard", "init skills", "localize skills", "project setup", or when Claude detects an unfamiliar codebase that would benefit from adapted workflows.
Code Kanban 本地任务管理系统。支持项目、任务、Worktree 的完整 CRUD 操作。私有数据不暴露到公开 GitHub。
| name | audit-fix |
| description | 审计问题修复技能。读取模块的 AUDIT.md,逐个修复安全/质量问题,修复后归档到 AUDIT_HISTORY.md。严格约束只修改 AUDIT.md 列出的文件。 |
修复 AUDIT.md 中记录的安全和代码质量问题,保持修改范围最小化。
/audit-fix <module-path> # 修复指定模块
/audit-fix <module-path> --issues 1,3,5 # 只修复指定 issue
/audit-fix <module-path> --dry-run # 预览修复计划
/audit-fix --batch <severity> # 批量修复指定级别 (critical/high/medium/low)
⚠️ 严格限制: 只能修改 AUDIT.md 列出的文件和行号 ❌ 禁止: 扩展修改范围、重构其他代码、添加新功能、"顺便"优化 ✅ 允许: 新增必要的工具函数文件(如 path-utils.js)
# 检查 AUDIT.md 存在
cat <module-path>/AUDIT.md
# 或使用脚本查看
node ~/.claude/skills/project-index/scripts/audit-archive.js <module-path> --show
解析内容:
对每个 issue:
# 归档单个 issue
node ~/.claude/skills/project-index/scripts/audit-archive.js <module-path> <issue-id>
touch CLAUDE.md 更新时间戳# 提交格式
git commit -m "fix(<module>): resolve N security audit issues
- issue1: <brief description>
- issue2: <brief description>
...
BREAKING: <if any breaking changes>"
// Before
const absPath = p.startsWith('/') ? p : `${workDir}/${p}`;
// After
import path from 'path';
const resolved = path.resolve(workDir, p);
if (!resolved.startsWith(workDir + path.sep)) {
throw new Error('Path traversal detected');
}
// Before
} catch { /* ignore */ }
// After
} catch (err) {
return { error: err.message, available: false };
}
// Before
const defaultHandler = async () => 'allow-once';
// After
const defaultHandler = async () => 'deny';
// Before
workDir = process.cwd()
// After - 要求显式传入
if (!workDir) {
throw new Error('workDir is required');
}
// Before
export function foo(x, y) { ... }
// After
/**
* Brief description
* @param {string} x - Description
* @param {number} y - Description
* @returns {boolean} Description
*/
export function foo(x, y) { ... }
// Before
emit('agent.step.completed', data);
// After
emit('agent:stepCompleted', data);
// Before
const proc = spawn(cmd, args);
// After
const proc = spawn(cmd, args);
const timer = setTimeout(() => proc.kill('SIGTERM'), timeoutMs);
proc.on('exit', () => clearTimeout(timer));
使用 Task 工具并行修复多个模块:
// Claude 会话中执行(建议 6-8 并发)
const modules = ['js/agents/core', 'js/agents/runtime', ...];
// 7 个 Task 工具并行调用,每个 run_in_background: true
# 1. 导入审计任务到 Kanban
node ~/.claude/skills/audit-fix/import-to-kanban.js
# 或只导入 CRITICAL
node ~/.claude/skills/audit-fix/import-to-kanban.js --severity=critical
# 预览模式
node ~/.claude/skills/audit-fix/import-to-kanban.js --dry-run
# 2. 查看导入的任务
node ~/.claude/skills/kanban/kanban-cli.js list --status=todo
# 3. 批量执行
/kanban-batch --priority=0
# 查看所有后台任务
ls /tmp/claude/*/tasks/*.output
# 查看单个任务输出
tail -50 /tmp/claude/-mnt-f-pb-paper-burner/tasks/<agent-id>.output
# 检查审计修复状态
node ~/.claude/skills/project-index/scripts/audit-status.js
审计修复可与 Code Kanban 结合,提供任务追踪和隔离开发环境。
CLI="$HOME/.claude/skills/kanban/kanban-cli.js"
# 创建审计任务
node "$CLI" add "[AUDIT] js/agents/core/sandbox/system (7 issues)" \
--priority=0 \
--tags=type/audit,severity/critical \
--description="修复 AUDIT.md 中的 7 个安全问题"
# 查看待办
node "$CLI" list --status=todo
# 认领任务并在独立 worktree 中修复
/kanban-implement <task-id>
Worktree 隔离的好处:
# 把所有 CRITICAL 审计问题导入 Kanban 后
/kanban-batch --priority=0
自动分析依赖关系,并行执行无依赖的任务。
# 开始任务
node "$CLI" start <id>
# 完成任务
node "$CLI" done <id>
1. audit-status.js 检查问题分布
↓
2. CLI 创建 Kanban 任务 (P0=CRITICAL, P1=HIGH...)
↓
3. /kanban-batch 或手动 /kanban-implement
↓
4. 每个模块修复后:
- audit-archive.js 归档
- git commit
- node "$CLI" done <id>
修复完成后检查:
--show 返回 Issues: 0)~/.claude/skills/project-index/scripts/audit-archive.js - 归档脚本~/.claude/skills/project-index/scripts/audit-status.js - 状态检查/project-index - 索引管理/js-agents-entropy-scan - 生成审计报告