Hub doctor
Agent-agnostic template for a personal knowledge monorepo your coding agents read, write, and maintain: charter-routed sub-hubs, prime/capture/maintain skills, deterministic hygiene loop. AGENTS.md contract + plain CLIs work with any agent.
npx -y skills add eyupcanbodur/agent-knowledge-hub --skill hub-doctorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Diagnose and repair the knowledge-hub installation itself. Use when hub retrieval returns wrong or missing notes, a hub skill seems absent or stale, store-to-hub writes land in the wrong place, results mention an unexpected hub name, or the user says "hub is broken", "wrong hub", "hub-doctor", "/hub-doctor". Runs a deterministic diagnosis first (env vars, symlinks, matcher resolution, machinery), then fixes safe issues on confirmation or proposes exact commands for the rest.
SKILL.md
2.7 KB, 538 tokens by cl100k_base, as published. Nobody here has run it
hub-doctor
When the hub misbehaves, the cause is usually mechanical (a stale env var, a hijacked symlink, an unbuilt step), not conceptual. The deterministic diagnosis is the skill; do not reason about symptoms before running it. This skill exists because a real bug (a stale HUB_ROOT in .zshrc silently re-routing all retrieval to another repo) was once mis-diagnosed by pure reasoning while a one-second env check would have caught it.
Procedure
-
Run the doctor first, always:
"${HUB_ROOT:-$HOME/workspace/agent-knowledge-hub}"/scripts/checks/doctor.shIt checks, in order:
HUB_ROOTenv sanity (set, exists, matches the repo),.zshrc-vs-process drift (stale long-lived sessions), skill symlinks per harness (broken, missing, or pointing at a different hub), matcher resolution (does retrieval actually read this repo), and machinery health (executables, git, fzf). Output isOK/WARN/FAILlines, each WARN/FAIL with the exact fix command. -
Fix or propose, by class:
- Safe mechanical fixes (relink, chmod): offer to run
doctor.sh --fix(it re-runsinstall.sh). Apply on confirmation. - Environment fixes (
HUB_ROOTwrong in~/.zshrc, stale session env): NEVER edit shell config silently. Show the exact line change, apply only on explicit confirmation, and tell the user that running sessions keep the old env until restarted. - Anything the doctor reports OK but symptoms persist: only now reason beyond the script. Read the relevant SKILL.md / matcher / INDEX directly and propose; do not guess. If you find a new mechanical failure class, the fix belongs in
doctor.sh(extend it), not in a one-off workaround.
- Safe mechanical fixes (relink, chmod): offer to run
-
Report: what was wrong, what was fixed, what remains for the user (e.g. restart sessions carrying stale env). If another agent session reported the symptom, state explicitly which diagnosis was confirmed or refuted so wrong to-dos get dropped.
Notes
- Deterministic checks live in
scripts/checks/doctor.sh; this skill is the judgment wrapper. Extend the script, not the prose, when new failure modes appear. - The doctor is also the post-install verification: run it after any
install.sh, machine migration, or when adopting a second hub repo.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.