From knowledge-distillery
Processes reviewer feedback on Report PRs to selectively accept, reject, or modify changeset entries. Triggered by /curate comment on knowledge/batch-* PRs. Reads PR comments, interprets natural language feedback, updates the changeset file, regenerates report, and commits.
How this skill is triggered — by the user, by Claude, or both
Slash command
/knowledge-distillery:curate-reportThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- Triggered by `/curate` comment on a Report PR (branch: `knowledge/batch-*`)
/curate comment on a Report PR (branch: knowledge/batch-*)issue_comment trigger/knowledge-distillery:curate-reportpull_requests,issues toolsetsjq CLI availablegit CLI availableUse GitHub MCP to read the PR that triggered the workflow:
knowledge/batch- — if not, post a comment "This is not a Report PR. Curation is only available on knowledge/batch-* branches." and exitopen — if merged or closed, post "This PR is already merged/closed. Curation is only available on open PRs." and exitknowledge/batch-2026-03-24 → 2026-03-24){id} in each list item) — only these entries may be modifiedgit checkout <pr-branch>
git pull origin <pr-branch>
Locate the changeset file:
ls .knowledge/changesets/batch-YYYY-MM-DD.json
Validate: Changeset file exists and is valid JSON. If not found, post an error comment and exit.
Use GitHub MCP to list all comments on the PR:
/curate trigger comment itselfFor each reviewer comment, interpret the natural language intent and classify into actions:
| Action | Examples | Result |
|---|---|---|
| REJECT | "reject entry-x", "remove entry-x", "entry-x is wrong" | Mark entry as rejected in changeset |
| UPDATE | "change claim of entry-x to: ...", "update title of entry-x" | Modify entry data in changeset |
| KEEP | "looks good", "approve", general discussion | No action |
| UNRESOLVED | Ambiguous, unclear reference, contradictory | Flag for human clarification |
Rules:
Build an action plan — a structured list of (action, entry_id, details/reason).
For each REJECT action, modify the changeset JSON:
# Read changeset, update entry status to "rejected"
jq '(.entries[] | select(.data.id == "<entry-id>")) |= . + {"status": "rejected", "reject_reason": "<reviewer reason>"}' \
.knowledge/changesets/batch-YYYY-MM-DD.json > tmp && mv tmp .knowledge/changesets/batch-YYYY-MM-DD.json
For each UPDATE action, modify the entry's data fields in the changeset JSON:
# Read changeset, update specific fields in the entry's data object
jq '(.entries[] | select(.data.id == "<entry-id>") | .data.claim) = "<new claim>"' \
.knowledge/changesets/batch-YYYY-MM-DD.json > tmp && mv tmp .knowledge/changesets/batch-YYYY-MM-DD.json
After all actions are executed, regenerate .knowledge/reports/batch-YYYY-MM-DD.md to reflect the current changeset state.
Read entry data from the changeset file:
jq '.entries[]' .knowledge/changesets/batch-YYYY-MM-DD.json
Write the updated report with the same structure as the original, but:
### Curation Log
| Action | Entry ID | Details | Timestamp |
|--------|----------|---------|-----------|
| Rejected | entry-x | Reason: reviewer said ... | 2026-03-24T12:00:00Z |
| Updated | entry-y | Changed: claim | 2026-03-24T12:00:00Z |
Also update the PR body's "Summary" table metrics (accepted count, etc.) to reflect the new state. Use GitHub MCP to update the PR body.
git add .knowledge/changesets/ .knowledge/reports/
git commit -m "knowledge: curate batch YYYY-MM-DD — N rejected, M updated"
git push origin <branch>
If push fails (e.g., concurrent curate), try:
git pull --rebase origin <branch>
git push origin <branch>
Use GitHub MCP to post a comment on the PR:
## Curation Complete
| Action | Entry ID | Details |
|--------|----------|---------|
| Rejected | `entry-x` | Reason: ... |
| Updated | `entry-y` | Changed: claim |
| Kept | `entry-z` | No changes requested |
{If any UNRESOLVED:}
### Unresolved Feedback
The following comments could not be processed automatically:
- "{original comment text}" — Reason: ambiguous / entry not in batch / conflicting feedback
---
Changeset updated. Please review the updated diff.
Run `/curate` again after leaving additional feedback, or merge when satisfied.
If no actionable feedback was found:
## Curation Complete — No Changes
No actionable feedback found. All entries remain as-is.
To provide feedback, leave comments referencing specific entry IDs and run `/curate` again.
| Failure Mode | Behavior |
|---|---|
| Not a Report PR branch | Post comment explaining this, exit |
| PR is merged/closed | Post comment explaining this, exit |
| Changeset file not found | Post error comment, exit |
| No actionable feedback | Post "no changes" comment, exit |
| Single reject/update fails | Log error, continue with remaining actions, report failure in summary |
| All actions fail | Post summary with all failures, suggest manual intervention |
| git push fails after rebase | Post error comment, output manual instructions |
| GitHub MCP unavailable | Abort — cannot read comments or post summary without it |
npx claudepluginhub ether-moon/knowledge-distillery --plugin knowledge-distilleryProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
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.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.