feat(agents): ship memd skills + a self-healing SessionStart hook - #6
Merged
Conversation
Add two Claude Code skills, bundled in the binary and installed into ~/.claude/skills/ by `memd setup`: - /memd-doctor: ordered diagnose-and-repair playbook wrapping `memd doctor`/`status`/`logs`. - /memd-memory: recall-and-save usage playbook mapping each action to its MCP tool and CLI equivalent. Add a fast, silent `memd ensure` command and run it before `memd context` in the SessionStart hook, so recall self-heals if the daemon crashed or was never started. Also add `memd skills install/uninstall` for manual control, a `skills` flag on the agent registry, and matching README/docs updates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Operational tooling so memd is easier to run and use on a machine — all installed automatically by
memd setup.Skills (bundled in the binary, written to
~/.claude/skills/)/memd-doctor— ordered diagnose-and-repair playbook wrappingmemd doctor/status/logs(daemon down →memd up, db mismatch →memd doctor --fix, agent unwired →memd setup)./memd-memory— recall-and-save usage playbook mapping each action to its MCP tool and CLI equivalent (recall before acting, search-before-save to dedupe, scope/type correctly).Self-healing SessionStart hook
memd ensurecommand — no-ops if healthy, otherwise kicks launchd / spawns the daemon and waits briefly. Never writes to stdout or errors the caller.memd ensure; memd context …, so recall keeps working even if the daemon crashed or was never started. Existing installs upgrade cleanly on the nextmemd setup.Plumbing
skills: boolfield on the agent registry;memd setupinstalls skills for Claude Code (regardless of--no-hooks, since skills are inert until invoked).memd skills install/uninstallcommands for manual control.include_str!so the prebuilt binary needs no extra files.docs/cli.mdxupdated.Testing
cargo fmt --check,cargo clippy(clean),cargo build— all pass.cargo test— 56 passing (2 new skill tests: install/remove roundtrip + idempotency, frontmatter validity).memd skills installverified: files land in~/.claude/skills/, re-run is idempotent.