harvest-template-lessons
Pull reusable lessons from agent/PROMOTE.md across all projects registered in PROJECTS.md and propose them as additions to this master template (CLAUDE.md, AGENTS.md, TOOL_REGISTRY.md, skills). Use wh
SKILL.md.claude/skills/harvest-template-lessons/SKILL.md
GitHubHarvest Template Lessons
This is the return half of the template loop: template → project (via bootstrap) → back into template (via this skill). Run this from within the master template directory (this repo).
Steps
- Read
PROJECTS.mdto get the list of registered project paths. - For each project path that still exists on disk:
- Read
<project>/agent/PROMOTE.md. - Skip rows already covered by "Last Harvested" in
PROJECTS.mdfor that project (compare log entry dates against the last-harvested date). - Collect any new, real (non-example) rows.
- Read
- If a project path no longer exists, note it and skip — don't fail the whole run.
- Group the collected lessons by target (CLAUDE.md / AGENTS.md / a skill / a hook / TOOL_REGISTRY.md / WORKFLOW.md / EVALS.md). Where two projects logged near-identical lessons, merge them into one proposed change instead of duplicating.
- Present the proposed changes to the user as a clear diff-style summary, grouped by target file — do not apply anything yet.
- Wait for approval. Apply only what's approved, using the Edit tool on the actual template files in this repo.
- After applying, update
PROJECTS.md's "Last Harvested" column for each project you pulled from to today's date, so the same lessons aren't re-proposed next time. - Do not clear or edit the source project's
agent/PROMOTE.md— leave it as the project's own history. The "Last Harvested" date inPROJECTS.mdis what prevents re-proposing the same rows.
Guardrails
- Never auto-apply anything to CLAUDE.md/AGENTS.md/TOOL_REGISTRY.md without explicit approval in this run — same rule as the weekly external-tool check.
- Discard anything that's clearly project-specific despite being logged (use judgment — if in doubt, ask rather than silently dropping or silently applying).
- If a proposed lesson would make CLAUDE.md/AGENTS.md longer than ~200 lines, flag that explicitly and suggest what to prune, rather than just adding on top.