Oxyd22/ContextKit / .claude/skills/ck-doctor
ck-doctor
VerifiedKnowledge-base hygiene: setup doctor, schema lint, rebuild the index, freshness stamp. Run: /ck-doctor
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.5 KB |
SKILL.md
View on GitHub---
name: ck-doctor
description: "Knowledge-base hygiene: setup doctor, schema lint, rebuild the index, freshness stamp. Run: /ck-doctor"
disable-model-invocation: true
---
# ck-doctor
Keeps the "second brain" consistent. Deterministic checks run in a script; then report the findings.
> If `.claude/contextkit/` is missing (script or `contextkit.config.json` not found) →
> ContextKit is not installed here: stop, and install via `/ck-setup` in the hub.
## Resolve project root
```bash
CK_ROOT="${CLAUDE_PROJECT_DIR:-}"; [ -d "$CK_ROOT/.claude/contextkit" ] || CK_ROOT="$(d="$PWD"; while [ "$d" != "/" ] && [ ! -d "$d/.claude/contextkit" ]; do d="$(dirname "$d")"; done; echo "$d")"; [ -d "$CK_ROOT/.claude/contextkit" ] || { echo "ContextKit not found: no .claude/contextkit in this directory or any parent"; exit 1; }
echo "$CK_ROOT"
```
1. **Check the setup:**
```bash
CK_ROOT="${CLAUDE_PROJECT_DIR:-}"; [ -d "$CK_ROOT/.claude/contextkit" ] || CK_ROOT="$(d="$PWD"; while [ "$d" != "/" ] && [ ! -d "$d/.claude/contextkit" ]; do d="$(dirname "$d")"; done; echo "$d")"; [ -d "$CK_ROOT/.claude/contextkit" ] || { echo "ContextKit not found: no .claude/contextkit in this directory or any parent"; exit 1; }
python3 "$CK_ROOT/.claude/contextkit/scripts/doctor.py"
```
2. **Lint + index** (lint first — required fields `id` / `type` / `summary`, a valid `status`, `id` equal to the filename, dangling or one-sided `related` edges; rebuilds `INDEX.md` when the schema is clean, otherwise stops with the errors):
```bash
CK_ROOT="${CLAUDE_PROJECT_DIR:-}"; [ -d "$CK_ROOT/.claude/contextkit" ] || CK_ROOT="$(d="$PWD"; while [ "$d" != "/" ] && [ ! -d "$d/.claude/contextkit" ]; do d="$(dirname "$d")"; done; echo "$d")"; [ -d "$CK_ROOT/.claude/contextkit" ] || { echo "ContextKit not found: no .claude/contextkit in this directory or any parent"; exit 1; }
python3 "$CK_ROOT/.claude/contextkit/scripts/knowledge.py"
```
3. **Content** (model judgment, report only — do not rewrite in bulk without approval).
Use this fixed rubric every session:
- **Missing Definition of Done**: a `ticket` without a `## Definition of Done` section → add it on the next edit (see `ck-create-note`).
- **Duplicate / overlap**: same `type` and the same topic or a similar `summary` → propose a merge. Do not merge automatically.
- **Contradiction**: two `related` entries, or two entries on the same topic (especially `decision`s), assert opposite facts, or a decision that is not `superseded` contradicts a newer one → mark it in the findings and ask for a resolution.
- **LOG.md as a trace**: read the last 20 `## [` headings of `<knowledgePath>/LOG.md`. The same `id` several times in a short span is a signal that the entry was created too early or is still half-formed, beyond the audit trail itself.
(Stale `proposed` / `open`, and dangling or one-sided `related` edges, are already caught deterministically in step 2 — only sharpen the content here.)
4. **Freshness stamp + log:**
```bash
CK_ROOT="${CLAUDE_PROJECT_DIR:-}"; [ -d "$CK_ROOT/.claude/contextkit" ] || CK_ROOT="$(d="$PWD"; while [ "$d" != "/" ] && [ ! -d "$d/.claude/contextkit" ]; do d="$(dirname "$d")"; done; echo "$d")"; [ -d "$CK_ROOT/.claude/contextkit" ] || { echo "ContextKit not found: no .claude/contextkit in this directory or any parent"; exit 1; }
mkdir -p "$CK_ROOT/.claude/contextkit/cache" && date > "$CK_ROOT/.claude/contextkit/cache/.last-knowledge-check"
python3 "$CK_ROOT/.claude/contextkit/scripts/knowledge.py" --log lint "<n> entries · <m> warnings"
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |