基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/flonat/claude-research --skill session-health命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Use when you need to audit a research project against the init-project-research template.
Use when you need to validate a paper's bibliography — cross-references \cite{} keys against .bib files or embedded \bibitem entries, finds missing/unused/typo'd keys, and checks every key against the Paperpile library via the local resolver. Deep verification mode spawns parallel agents for DOI/metadata validation at scale. Fix mode rekeys drifted keys to canonical and stages missing entries for Paperpile.
Use when you need to bootstrap a full research project with directory scaffold and Overleaf symlink.
| name | session-health |
| description | Use when you need to check current context status and session health. |
| allowed-tools | ["Read","Glob","Bash(ls*, cat*)"] |
On-demand diagnostic showing context usage, preservation state, and open work items. Fast and lightweight — no vault queries.
Read the context monitor state file to get the current tool call count:
~/.claude/sessions/{project-hash}/context-monitor-state.json
The project hash is a SHA-256 of CLAUDE_PROJECT_DIR (first 12 chars). If the state file doesn't exist, report "No context monitor data — hook may not be active."
Calculate:
fired array)Find the latest file in log/plans/:
Find the latest non-compact .md file in log/ (skip files with -compact in the name):
Check when .context/current-focus.md was last modified:
/update-focus"Verify these hooks are configured in ~/.claude/settings.json:
PreCompact → precompact-autosave.py (pre-compact state save)SessionStart compact → postcompact-restore.py (post-compact restore)PostToolUse → context-monitor.py (this monitor)For each: report CONFIGURED or MISSING.
Count unchecked items (- [ ]) in .context/current-focus.md:
Present as a compact status panel:
## Session Health
| Metric | Value |
|--------|-------|
| Context usage | ~XX% (N/150 tool calls) |
| Thresholds fired | none / info / warning / critical |
| Active plan | filename (DRAFT/APPROVED) / none |
| Latest log | filename / none |
| Focus freshness | N days ago / stale warning |
| Open loops | N items |
### Preservation Hooks
| Hook | Status |
|------|--------|
| PreCompact auto-save | CONFIGURED / MISSING |
| Post-compact restore | CONFIGURED / MISSING |
| Context monitor | CONFIGURED / MISSING |
### Recommendations
[Only if there are issues — e.g., stale focus, missing hooks, high context usage]
When context is high (>60%), include these reference tables in the output:
When to compact:
| Phase Transition | Compact? | Why |
|---|---|---|
| Research to Planning | Yes | Research context is bulky; plan is the distilled output |
| Planning to Implementation | Yes | Plan is in a file; free up context for code |
| Implementation to Testing | Maybe | Keep if tests reference recent code |
| Debugging to Next feature | Yes | Debug traces pollute context |
| Mid-implementation | No | Losing file paths and partial state is costly |
| After a failed approach | Yes | Clear dead-end reasoning |
What survives compaction:
| Persists | Lost |
|---|---|
| CLAUDE.md + rules | Intermediate reasoning |
| Task list | File contents previously read |
| MEMORY.md | Multi-step conversation context |
| Git state | Tool call history |
| Files on disk | Verbal preferences |
| precompact-autosave state | — |