From knowledge-distillery
Records a project decision as a committed markdown file under .knowledge/decisions/ for the knowledge distillery pipeline. Auto-triggered when clear project decisions are detected during a session — scope decisions, architectural choices, confirmed constraints, or direction after deliberation all qualify. Do not wait for the user to ask; invoke proactively when a decision moment is observed.
npx claudepluginhub ether-moon/knowledge-distillery --plugin knowledge-distilleryThis skill uses the workspace's default tool permissions.
Records a project-level decision as a structured markdown file and commits it to git. The commit flows into the distillery pipeline when the branch merges as a PR (mark-evidence → batch-refine → vault), preserving the decision as verified team knowledge.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Guides code writing, review, and refactoring with Karpathy-inspired rules to avoid overcomplication, ensure simplicity, surgical changes, and verifiable success criteria.
Share bugs, ideas, or general feedback.
Records a project-level decision as a structured markdown file and commits it to git. The commit flows into the distillery pipeline when the branch merges as a PR (mark-evidence → batch-refine → vault), preserving the decision as verified team knowledge.
Mirrors the auto-memory pattern: Claude detects a clear decision moment and invokes this skill automatically without explicit user request.
Auto-invoke when a clear project decision is confirmed during the session:
Do NOT invoke for:
Bash (mkdir, git commands only). No MCP servers, no vault access, no knowledge-gate CLI.
From the session conversation, extract:
| Field | Description | Example |
|---|---|---|
| title | Short descriptive title (under 60 chars) | "PR body template is out of scope" |
| slug | Kebab-case identifier (3-5 words) from title | pr-template-out-of-scope |
| decision | Single imperative statement — what the project does or does not do | "Do not provide PR body templates or format guidelines" |
| context | 2-4 sentences: what situation prompted this decision | "The question arose whether..." |
| rationale | Why this choice, including rejected alternatives if any | "Each project has its own PR conventions..." |
| alternatives | (optional) Considered alternatives and why each was rejected | "Approach B was rejected because..." |
| supersedes | (optional) Previous decision file this one replaces | 2026-03-24-pr-template-out-of-scope |
Optional field guidelines:
.knowledge/decisions/ and the new decision explicitly replaces or revises it. Use the full filename without extension (e.g., 2026-03-24-pr-template-out-of-scope). Omit if no prior decision is being replaced.Language: Write in the language primarily used during the session (same rule as memento-commit).
IMPORTANT — No command substitution: Never use $(...) or backtick substitution in Bash calls. Claude Code's security layer blocks these patterns.
test -d .knowledge || { echo "knowledge-distillery not initialized. Run /knowledge-distillery:setup"; exit 1; }
mkdir -p .knowledge/decisions && cat > ".knowledge/decisions/YYYY-MM-DD-<slug>.md" << 'DECISION_EOF'
# Decision: <title>
**Decision**: <decision statement>
**Context**: <context>
**Rationale**: <rationale>
DECISION_EOF
git add ".knowledge/decisions/YYYY-MM-DD-<slug>.md" &&
git commit --only ".knowledge/decisions/YYYY-MM-DD-<slug>.md" -m "decision: <slug>"
Optional sections — when alternatives or supersedes apply (from Step 1), append them to the heredoc body before the DECISION_EOF marker:
**Alternatives considered**:
- **<Option A>**: <why rejected>
- **<Option B>**: <why rejected>
**Supersedes**: `YYYY-MM-DD-<previous-slug>`
Include only the sections that apply. Most decisions will use only the core 4 fields.
Key details:
test -d .knowledge fails fast if the distillery is not initialized, matching the error handling table.mkdir -p ensures the decisions/ subdirectory exists (idempotent).git add + git commit --only ensures ONLY the decision file is committed — even if other files are already staged from the user's work in progress, they won't be swept into this commit.decision: prefix — no heredoc or command substitution needed.decision: prefix for pipeline discoverability.Decision recorded: <sha> decision: <slug>
| Failure | Behavior |
|---|---|
.knowledge/ directory does not exist | Report that knowledge-distillery is not initialized. Suggest /knowledge-distillery:setup. |
| File with same date+slug already exists | Append numeric suffix to slug (e.g., pr-template-out-of-scope-2). |
git commit fails | Report the error. The file remains on disk for manual review. |
decision: commit message prefix