用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill codemaid命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
基于 SOC 职业分类
正在显示 SKILL.md
| name | codemaid |
| description | > Use when this capability is needed. |
Agents should invoke codemaid via CLI and parse structured JSON output.
npm install -g codemaid # global
npx codemaid scan . # or run directly with npx
npx codemaid scan <directory> --format json
Returns a ScanReport JSON object to stdout. Exit code 0 = clean, 1 = errors found.
1. Run: npx codemaid scan ./my-project --format json
2. Parse: JSON.parse(stdout) → ScanReport
3. Filter: report.issues.filter(i => i.confidence === 'high')
4. Act: For each high-confidence issue, apply fix or flag to user
| Command | Description | Agent-Relevant |
|---|---|---|
codemaid scan [dir] | Scan for issues | Yes — use --format json |
codemaid clean [dir] | Interactive fix wizard | No — human-only |
codemaid report [dir] | Show cached report | Yes — use --format json |
codemaid init [dir] | Create config file | No — one-time setup |
codemaid scan [dir]
--format <format> # "json" (agent) or "console" (human). Default: console
--only <type> # Filter: python, js, docs, css, config
--verbose # Show detailed scan progress
--config <path> # Path to .codemaidrc.json
codemaid report --detail dead-files
codemaid report --detail unused-exports
codemaid report --detail stale-refs
codemaid report --detail unused-deps
codemaid report --detail doc-drift
codemaid report --detail modularity
interface ScanReport {
timestamp: string; // ISO 8601
rootDir: string; // Absolute path scanned
duration: number; // Milliseconds
scanners: string[]; // Active scanners: ["javascript", "python", ...]
issues: Issue[]; // All detected issues
stats: {
filesScanned: number;
deadFiles: number;
staleRefs: number;
unusedDeps: number;
unusedExports: number;
docDrift: number;
modularityIssues: number;
};
}
interface Issue {
category: 'dead-file' | 'stale-reference' | 'unused-dependency'
| 'unused-export' | 'doc-drift' | 'modularity';
severity: 'error' | 'warning' | 'info';
filePath: string; // Relative path (in JSON mode)
line?: number;
: ;
: | | ;
?: | | ;
?: ;
?: [];
?: {
: | | | ;
: ;
?: ;
};
}
All unused exports are reported with confidence tags so agents get full data:
| Confidence | When | Severity | Agent Action |
|---|---|---|---|
| high | Only export in file, or no special context | warning | Safe to act on |
| medium | Type-only export (may be consumed indirectly) | info | Verify before acting |
| low | Barrel file (index.ts) or test helper | info | Usually skip |
Agent filtering strategy:
// High-confidence issues — safe to auto-fix
const actionable = report.issues.filter(i => i.confidence === 'high');
// All issues including advisory
const everything = report.issues;
main.py, index.ts, app.js, etc..codemaidrc.jsonpackage.json dependencies and requirements.txtimport { scanProject } from 'codemaid/agent';
const report = await scanProject('./my-project', {
only: 'javascript',
minConfidence: 'medium',
});
// report is a ScanReport — same schema as JSON CLI output
codemaid clean --dry-run previews changes without modifying files.codemaidrc.json falls back to safe defaults with warnings{
"include": ["**/*"],
"exclude": ["node_modules/**", "dist/**", ".git/**"],
"entryPoints": ["src/main.ts"],
"scanners": {
"python": true,
"javascript": true,
"markdown": true,
"config": true,
"css": true
},
"thresholds": {
"maxFileLines": 500,
"maxExports"
| Exit Code | Meaning |
|---|---|
| 0 | Scan complete, no errors (warnings/info may exist) |
| 1 | Scan complete, errors found |
| 2 | Configuration error |
| Language | Extensions | Scanner |
|---|---|---|
| JavaScript/TypeScript | .js, .jsx, .ts, .tsx, .mjs, .cjs | javascript |
| Python | .py | python |
| Markdown | .md | markdown |
| CSS | .css | css |
| Config | .json, .yml, .yaml, .toml, .env | config |
When used within a Claude Flow swarm, CodeMaid can:
optimize background workertestgaps worker when files are removedConverted and distributed by TomeVault — claim your Tome and manage your conversions.