Generalize a lesson and stage it for boilerplate contribution
You are preparing a generalized contribution that can be pulled into the shared boilerplate repo. The contribution must be project-agnostic — no project names, file paths, domain terms, API keys, or internal details.
Gather input: If a lesson or improvement was passed as argument, use it. Otherwise, read .claude/memory/lessons-learned.md and ask the user which lessons they'd like to contribute back.
Classify the contribution into one of these types:
skill-update — improvement to an existing skill's instructionsnew-skill — a new skill that would benefit all projectsconvention — a general coding or workflow conventionmemory-template — improvement to memory file structure or initial contentdocs — improvement to documentation in .claude/docs/config — improvement to .mcp.json, settings.json, or CLAUDE.mdGeneralize: Rewrite the lesson to remove all project-specific details:
[project] or generic termssrc/auth/login.ts → "authentication modules")Write the contribution: Create a new file in .claude/contributions/ with this format:
Filename: YYYY-MM-DD-<short-slug>.md (e.g., 2025-06-15-improve-hello-mcp-retry.md)
Content:
# Contribution: <title>
**Type**: skill-update | new-skill | convention | memory-template | docs | config
**Target**: <which file(s) in the boilerplate this would affect>
**Date**: YYYY-MM-DD
## Problem
<What problem or gap was discovered>
## Recommendation
<The generalized improvement, with specific text/changes to apply>
## Rationale
<Why this improves the boilerplate, based on real project experience>
Review with user: Show the contribution and ask:
Save: Write the file to .claude/contributions/.
Report:
Contribution staged
===================
File: .claude/contributions/<filename>.md
Type: <type>
Target: <target files>
To integrate into boilerplate, run /pull-contributions from the boilerplate repo
and point it at this project's .claude/contributions/ folder.