用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/tomes --skill tsa-health-watch命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
> Use when this capability is needed.
Use when writing kernel, account, or note MASM code that reads from or writes to the advice provider (advice stack / advice map) — validate advice data.
Use when writing a Rust test that exercises a failure path or a MASM test that expects a `panic` / `assert` — assert on the specific expected error variant or error code.
基于 SOC 职业分类
正在显示 SKILL.md
| name | tsa-health-watch |
| description | | Use when this capability is needed. |
Grades files A→F across 6 dimensions (complexity, structure, dependencies, duplication, size, git-hotspot). Daemon mode alerts on grade drops live.
| Goal | Tool |
|---|---|
| Project portrait + worst files | health action=project |
| One-file deep dive | health action=file |
| Top hubs + sensory neurons | health action=overview |
| Find dead functions | health action=dead |
| Complexity hotspots (visualize) | health action=heatmap |
| Watch & alert on degradation | --watch-health CLI (Bash) |
Fan out in one message:
health action=project with max_files: 20 — grade distribution + worst-20health action=dead with max_dead: 50 — pruning candidateshealth action=overview — hub functions + entry points + 0-degree leavesRead the verdict. If D/F files exist in worst-20, drill into each with
health action=file to get the per-dimension breakdown + recommendation.
health action=file file_path="<path>"
Returns:
grade: A | B | C | D | F (overall)dimensions: {complexity, structure, dependencies, duplication, size, git_hotspot}weakest_dimension: which one dragged grade downsignal: healthy | moderate_depth | high_complexity | etc.recommendation: next concrete actionRun in a separate terminal:
uv run tree-sitter-analyzer --watch-health \
--threshold-grade C \
--watch-interval 60 \
--notify-channel stdout,file \
--notify-file .tree-sitter-cache/health-events.jsonl \
--on-degradation 'echo "ALERT: {file} {previous_grade}→{grade} ({recommendation})"'
Daemon fires alerts when:
--threshold-grade (B→D when threshold=C)History persists in .ast-cache/health_scores.db table health_score_history.
Grade letters use A=best, F=worst ordering. Score ranges:
Weakest dimension tells you why:
complexity → split functionsstructure → too many globals, missing typesdependencies → too many imports / circularduplication → DRY opportunitysize → split filegit_hotspot → modified too often, churn riskuv run tree-sitter-analyzer --project-health --output-format toon
uv run tree-sitter-analyzer <file> --file-health --output-format toon
uv run tree-sitter-analyzer --overview --output-format toon
uv run tree-sitter-analyzer --dead-code --output-format toon
uv run tree-sitter-analyzer --watch-health --threshold-grade C # daemon
health action=project once instead of N file-health calls.dimensions and just look at the grade letter — the
recommendation lives in the weakest dimension.--watch-health for one-shot checks — it's a long-running daemon.project (when health action=project):
grade_distribution: {A: n, B: n, C: n, D: n, F: n}
worst_files: [{path, grade, score, weakest_dimension}, ...]
file (when health action=file):
grade: A | B | C | D | F
score: 0-100
signal: healthy | moderate_depth | ...
weakest_dimension: <name>
dimensions: {complexity: 0-100, structure: 0-100, ...}
recommendation: <next concrete action>
Source: aimasteracc/tree-sitter-analyzer — distributed by TomeVault.