Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Threadnote Health?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/threadnote-threadnote-health)
---
name: threadnote-health
description: Audit and maintain a local Threadnote memory corpus, or resolve one scoped context-health case.
---
<!-- BEGIN THREADNOTE USER INSTRUCTIONS -->
# Threadnote health
Use for a requested maintenance session or a scoped health decision packet. Incomplete coverage during an ordinary coding
task does not authorize a corpus rewrite. Use `threadnote-context` for initial routing, `threadnote-code-graph` for unfamiliar
source relationships, and `threadnote-memory` to retrieve evidence and leave a private handoff.
## Maintain the selected corpus
For a corpus request, use the CLI. Treat the user's request as the run boundary. If the user requests an audit, use
`threadnote context corpus audit --drain --json` with the applicable `--project` and `--team` selectors. If the user explicitly
requests private changes, use `threadnote context corpus begin --apply --json` with those selectors. Continue either run
with `threadnote context corpus audit --run <id> --drain --json` until the audit continuation ends. A run keeps its initial scope.
If the journal reaches its storage limit, start a new run with a narrower scope.
The audit restarts once if the inventory changes. If the status still reports a change, wait for it to settle.
Repeat the audit with `--refresh`.
If a private change needs recovery, run `threadnote context corpus apply --run <id> --json` before refreshing.
Set `--body-target-kib` when you begin the run to change the 48 KiB body target. A resumed run uses the same target.
Pass `--active-feature <project>/<feature>` for each active workflow the user identifies when you begin the run.
Use exact registered identities. The CLI checks each current plan phase against committed primary history.
A verified closeout also establishes completion. The CLI protects pending operations, unverified workflows,
workflow manifests, and closeout outputs.
1. Read `threadnote context corpus status --run <id> --json` for case counts and coverage after the audit completes.
2. Use `threadnote context corpus apply --run <id> --json` for exact repairs and exact duplicates in an apply run.
3. Record the verified changes from the apply command and its case status.
4. If housekeeping changes records, refresh the audit with `threadnote context corpus audit --run <id> --refresh --drain --json`.
5. Use `threadnote context corpus review --run <id> --json` for remaining cases that need semantic judgment.
6. Read `status --run <id> --case <case-id> --json` for exact local evidence before a lead decision.
7. In an apply run, pass verified lead decisions in a private JSON array with `apply --decisions-file <absolute-file>`.
8. Check the final status for verified changes, working Markdown links, and cases that still need evidence.
9. Report counts of archived, consolidated, moved, and repaired records, plus unresolved cases and their next evidence needs.
Treat worker decisions as private recommendations. Require a verified lead decision for each semantic change.
A lead decision carries `caseId`, `evidenceRevision`,
`action`, `support`, and `rationale`. For a section edit, include
`sectionEdits` with `selector`, `markdown`, and `support`. Copy support IDs from the same exact case.
To select a memory, copy its `target` from `memories` in the case status into the lead decision.
Follow `nextCursor` with `--cursor` and `nextEvidenceCursor` with `--evidence-cursor`.
Use `--kind`, `--category`, or `--state` to filter the case list. Keep the same filters when you follow a case cursor.
Keep local drafts private. Refresh a stale case before another decision.
Let the CLI handle inventory, exact repairs, size checks, provenance, links, and worker limits.
Use the least expensive eligible workers for independent cases. Keep one verified memory per coherent subject.
Use headings for long records. Keep useful citations and relation targets. Keep the subject together when reads need sections.
Protection covers active workflow artifacts, their saved references, and external records. The writer field records provenance.
## Preserve completed workflow knowledge before archive
Read exact case status for `completed-handoff`, `completed-workflow-scaffolding`, and `handoff-completion-unverified`.
Use native evidence to distinguish a claimed completion from a verified terminal outcome.
If completion, ownership, or protection of active work is uncertain, defer the archive.
If native proof confirms completion of a compact workflow without an authored specification, continue with preservation.
If proof for a known authoritative specification is missing, defer the archive.
1. Group each verified workflow by its registered project and feature.
2. Collect all archive batches for the feature before you update its feature memory.
3. Read each authoritative specification in `specifications`, the closeout, and relevant decisions and evidence.
4. Keep each listed specification active at its exact revision.
5. Update one active personal durable memory under the registered feature topic in the same project.
6. Link each exact specification URI from the feature memory.
7. Preserve decisions, rationale, constraints, delivered outcomes, and operational verification in the feature memory.
8. Check current architecture claims against the primary repository's `main` history.
9. Preserve evidence for investigations, debug findings, on-call observations, and runbooks in their own context.
10. Use evidence such as a reproduction, an incident outcome, or a verified procedure.
11. Make the evidence understandable when code links are absent.
12. Run `threadnote recall --project <project> --query <question>` with a realistic question about the feature.
13. Read the returned feature memory and verify its specification links and retained knowledge.
14. Refresh the audit after the preservation write and read the current exact case status.
15. Apply only the exact archive decisions that the run permits and that the preserved knowledge supports.
16. Verify each archived record and its original Markdown link before you report the result.
Use low-cost eligible workers for independent feature groups. Verify their recommendations before you write the feature memory.
The lead owns the feature memory and the archive decisions. The CLI verifies the archive proof.
Use `threadnote remember --kind durable --project <project> --topic <feature-leaf> --stdin` to save the feature memory.
To update the active feature memory, add `--replace <exact-active-memory-uri>` and keep the same project and topic.
Add `--relation references=<spec-uri>` for each exact specification. Retain all valid relations if you replace the memory.
Use the ordinary active project scope with the future question. Leave `--uri` and `--include-archived` out of the command.
If ordinary recall or verification fails, leave the source records active.
The archive command also checks ready lexical recall without a model.
If ordinary recall finds the successor but archive defers on lexical recall, inspect the recall index warning.
If the refresh is queued, let it finish. Retry once with the same scoped query.
If that retry still fails, leave the source records active.
For a completed record archive, add `preservation` to the lead decision. Set `uri` to the active memory from ordinary recall.
Set `revision` to the SHA-256 of its full canonical Markdown. Set `query` to the realistic question you used for ordinary recall.
Select the successor from `preservationCandidates` in exact case status.
For a registered workflow, use the case's exact `feature` identity.
For a handoff without a registered feature, use an active durable successor with the same project and topic.
If the case lists no eligible successor, prepare one and refresh the audit before you submit an archive decision.
Submit the archive through `apply --decisions-file <absolute-file>` in the authorized run.
A history copy preserves provenance. The CLI verifies the original Markdown copy before it changes the record.
Report the active feature memory, intact specification, and any archived records as links to verified absolute Markdown files.
Use `threadnote context corpus history --run <id> --case <case-id>` to open the original copies after an audit refresh.
For a prior archive with no feature memory, use verified originals to write the same stable active summary.
Keep the records in the archive.
## Read citation history and publication proposals
If a private consolidation exceeds the inline citation limit, the CLI retains the citations with verified original Markdown.
Read this historical evidence with `threadnote context corpus citations --uri <exact-personal-memory-uri> --json`.
Pass `nextCursor` as `--cursor` with the same URI to read more citations.
If a citation shows `nextHistoryCursor`, pass its `citationIndex` as `--citation-index`.
Pass `nextHistoryCursor` as `--cursor` to read more original Markdown links for that citation.
Use the local Markdown links to inspect the original records.
Check current source separately when a claim needs current evidence.
A configured remote endpoint needs explicit permission for its endpoint, model, and data before
`begin --provider-grant <file>`.
Use `codeScopes` in that grant for each explicitly authorized primary project and `repositoryId`. A memory scope or a team
scope gives no access to local source. Credentials alone confer no permission. If capacity is absent, continue mechanical
work and defer unsupported cases. A model recommendation to keep or defer still permits a different lead decision.
Decide supported changes yourself. If evidence leaves a material decision unresolved, ask a concrete question and
continue independent cases. Present affected memories as links to verified absolute Markdown files. If no local file exists,
state the reason. Keep publication proposals private. A separate reviewed publication workflow owns any remote change.
Preview a publication proposal with `threadnote context corpus publication --proposal <id> --json`. If the user separately
approves that exact proposal, pass `--apply --approval-digest <id>` to create its local branch. This command does not push.
## Maintain one context-health case
Read local cases with `context_maintenance_status`, then fetch the selected `caseId` with
`context_maintenance_packet`. CLI fallback: `threadnote context maintain --action status --json`, then
`threadnote context maintain --action packet --case-id <case-id> --json`. These tools require the full local MCP toolset;
use the installed CLI when that toolset is unavailable.
Compact status retains bounded pages. Follow `page.caseNextCursor` and `page.receiptNextCursor` with the same project
and corresponding `caseCursor`/`receiptCursor` selector (CLI: `--case-cursor`/`--receipt-cursor`). An exact `caseId` or
`receiptId` status selector reads retained details. A stale generation requires restarting from the first page.
Read the selected case and its memory pointers. Confirm project, absolute `callerCwd`, evidence revision, and operations
available on this surface before editing. Refresh a stale packet. Shared or remote authority does not imply access to local
personal storage.
Refresh one selected stale decision with `context_maintain` action `refresh`, its exact `project` and `caseId`, and
absolute `callerCwd`. CLI fallback: `threadnote context maintain --action refresh --project <project> --case-id <case-id>
--source-cwd <absolute-checkout> --json`. Refresh only updates local observations; it never repairs canonical memories,
publishes shared changes, or starts automatic draft work. Exact `run --case-id` remains citation-only. If the bounded
refresh reports incomplete or unavailable evidence, follow its specific prerequisite instead of widening to a corpus run
or treating unreadable targets as absent.
Packets identify the stable family/slot and exact citation or relation target, original citation provenance, content hash,
source revision, attempted recovery ladder, policy and budget. Read their bounded evidence excerpts with their hashes,
coverage and provenance. `supportsCitation=false` means current bytes need claim review; historical bytes never become
current proof. Keep excerpts bounded and verify revisions again after asynchronous reads before proposing a change.
Compare the engineering claim with authoritative current source and recoverable historical evidence. A new citation hash
does not validate old prose. An old snapshot proves historical provenance, not current source. Accept a relocation only
when the target is uniquely and exactly verified; ambiguous or fuzzy matches require a specific decision.
Choose the smallest supported outcome: restore an exact citation, correct the claim, designate an explicit successor,
classify the memory as historical, or retire it under its lifecycle policy. Preserve memory identity, unrelated body
sections, unknown metadata, useful independent anchors, and every valid relation. Unreadable targets are not absent.
Do not recreate a deleted user worktree merely to recover a reference.
Use the tool-returned revision-bound repair workflow. Apply deterministic private changes inside the session's existing
authorization. Ask only for a concrete unresolved semantic choice or an action outside that scope. Shared canonical
changes use reviewed publication; never export personal context or silently publish a maintenance outcome.
For `ownerProposal`, inspect only its exact selected canonical edits and expected shared content/base revision. This is a
read-only proposal, not local repair authorization. The owner verifies team target authority, reviews the selected shared
change through `review_session_context`, explicitly approves/applies the exact candidate, then explicitly approves
`share_propose` with applied candidate IDs and the current review revision. That exporter binds the shared Git base and
target content without publishing it. Refresh changed or unavailable base evidence before owner publication review.
Recheck the affected case and source after mutation. A successful write is not a resolved issue. Record what changed,
verified postconditions, remaining uncertainty, and the event or evidence needed next. If the evidence is unchanged and
no safe repair exists, leave one waiting/deferred outcome and stop; do not repeat the same repair or create another
failure memory. Return a specific evidence-backed choice instead of an unexplained “citation unknown”.
Do not store secrets, credentials, customer data, or raw production logs. Finish with a concise private handoff that
references the selected cases and verification. This skill does not install schedules or expand publication permissions.
<!-- END THREADNOTE USER INSTRUCTIONS -->