session-health SKILL.md skillA
session-health from ninjasln-labs/agent-skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add ninjasln-labs/agent-skills/session-health@v1.0.3Pins v1.0.3 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- ninjasln-labs/agent-skills
- Path
session-health/SKILL.md- Versions recorded
- 4
- Latest version
- v1.0.3, committed Sep 22, 2026
- First version recorded
- Aug 3, 2026
- Size
- 15,281 bytes
- Repository stars
- 3
- License
- none declared
Session Health: assess the current AI coding tool session — context compaction/condensation ratio, message count, context occupation cost, work nature, recoverability (git/handoff/runtime), and token economics — to judge continue vs new-session. Reads tool session storage read-only. Use when the user mentions context compaction, starting a new session, high context overhead, or long-session continuation (e.g. "go" / "keep going"). NOT for: auditing skill descriptions, full-codebase…
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 会话健康度评估(Session Health) 在长会话中评估「继续 vs 新开」的得失,判断是否该新开会话。**只评估不修改**任何会话文件。 核心原则:**压缩比例高 ≠ 该切换**;**窗口占比低 ≠ 经济无忧**。决策 = 继续成本(容量 + 质量 + 每轮 token 经济)vs 切换成本(丢失早期精确细节 + 交接轮次)的权衡。 ## 何时使用 - **被动**:用户提到「压缩 / 新开会话 / 上下文开销 / context」时,立即完整评估。 - **主动**:长会话中用户持续推进(go / 继续 / 按计划推进)时,顺带检查一次;仅在**状态明显恶化或达到阈值**时提醒,否则一句「会话健康(压缩 x%)」带过。 ## 硬约束 1. **只读评估**——不得修改任何工具的会话存储(Deep Code:`~/.deepcode/projects/`;Cursor:`~/.cursor/`;其他工具按适配层定位)。会话 JSONL / SQLite / 索引 / 快照一律只读。 2. **不夸大、不虚构**——数字来自实际文件统计;查不到就说明查不到,不猜。 3. **不机械建议切换**——必须评估工作性质与可恢复性;依赖早期内容的工作(重构/优化)即使压缩高也未必该切换。 4. **未达阈值不展开**——健康时一句话确认即可,完整报告只在达到阈值或用户要求时给。 5. **信号缺失走降级,不装精确**——工具适配层声明「能测什么、不能测什么」;缺失维度按降级规则处理(见「信号缺失降级规则」),不因缺数据默认健康或默认不健康。 ## 工具适配层(数据来源入口) 本技能不硬编码任何工具的数据格式——每工具的读取方式集中在 **工具适配层**: - **`references/tool-data-sources.md`**——已实现的工具适配节(Deep Code / Cursor):会话目录定位、各信号读取命令、恢复能力入口。 - **`references/tool-adapter-template.md`**——新工具接入模板:按模板 + 探测流程为新工具生成适配节。 > **防双源**:SKILL.md 不写具体数据命令(命令会随工具版本漂移——见刷新机制);命令一律只存在于 `references/tool-data-sources.md`。本页只留稳定方法论。 ### 工具探测(确定当前跑在哪个工具上) 按以下优先级确认,取第一个可行的: 1. 会话上下文/环境变量已显式说明当前工具(如 agent 自知所在工具)→ 直接用。 2. 探测各工具会话存储目录,取**最近有写入**的那个(`ls -td` 按 mtime 排序比对)。 3. 仍不确定 → AskUserQuestion 问用户当前在哪个工具。 …
Read the whole file at its exact version.
How to install
mdr add ninjasln-labs/agent-skills/session-health@sha256:35acb0dc43339086The line at the top of this page pins the label v1.0.3, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_xoyz5jjndie763ih)
1 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 4 versions of this file, between Aug 3, 2026 and Sep 22, 2026, about one every 17 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| v1.0.3 latest | 2026-09-22 | 75c75c0 | 15,281 B | A | view · diff |
| v1.0.0 | 2026-09-18 | cbc6719 | 15,204 B | A | view · diff |
| git:20260813.1cc67b3 | 2026-08-13 | 1cc67b3 | 15,140 B | A | view · diff |
| git:20260803.cf548c9 | 2026-08-03 | cf548c9 | 15,164 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (15281 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
ninjasln-labs/agent-skills · 3 stars · license none declared · pushed 2026-10-05 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_xoyz5jjndie763ih GET https://markdownregistry.com/api/v1/resolve?ref=ninjasln-labs/agent-skills/session-health GET https://markdownregistry.com/api/v1/blob/35acb0dc433390868a3416446c75e3f0bdbe8f2da3ed6054044af7b42abf16d5
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.
More from ninjasln-labs/agent-skills
Every file in ninjasln-labs/agent-skills