name: prompt-library description: Extract effective prompts from the current session and save them to a reusable library. Captures prompts that worked well for future reference. Invoke with /prompt-library or /prompts. lifecycle: experimental
Prompt Library Skill
Extract and save effective prompts from work sessions.
Process
Scan session for prompts that:
- Achieved the desired outcome efficiently
- Used clever techniques or patterns
- Could be reused for similar tasks
- Demonstrated good prompt engineering
Categorize each prompt:
CODE- Code generation, refactoring, debuggingREVIEW- Code review, architecture analysisDOCS- Documentation, READMEs, commentsTEST- Test generation, coverageDEPLOY- CI/CD, packaging, deploymentDESIGN- UI/UX, system designDATA- Data processing, analysisMETA- Prompts about prompting
Extract template - generalize specifics into placeholders
Pre-write format-match check (mandatory):
- Run
grep -E '^### P-' ~/projects/DecisionLog/PROMPTS.md | head -3to confirm the target file already containsP-YYYYMMDD-###entries. - If the file has zero
P-entries OR has entries in a different format (e.g., named templates without P-IDs), STOP. The destination has drifted. Surface to user: "PROMPTS.md format doesn't match the skill's catalog shape (P-IDs + Category field). Which file should I write to, or should we re-route the skill?" - This catches path-drift before silently writing into the wrong file. Discovered 2026-05-23 — the public-notes
PROMPTS.mdis a templates file, NOT a catalog; writing P-ID entries there would corrupt it.
- Run
Append to
~/projects/DecisionLog/PROMPTS.md(in the private repoAreteDriver/DecisionLog). This is the skill's design target: P-IDs + Category field + the same CODE/REVIEW/DOCS/TEST/DEPLOY/DESIGN/DATA/META vocabulary as the Categories table above. A separate file at~/projects/notes/PROMPTS.mdexists for named template scaffolds (Universal, CI/CD Diagnostic, GitHub Profile, etc.) — that one is hand-maintained, not a /prompt-library target.
Entry Format
### P-YYYYMMDD-###: [Short Title]
**Category:** [CODE|REVIEW|DOCS|TEST|DEPLOY|DESIGN|DATA|META]
**Context:** [When to use this]
**Prompt:**
[The prompt text with {{placeholders}} for variable parts]
**Why it works:**
- [Key technique 1]
- [Key technique 2]
**Example use:**
[Brief example of how it was used]
What to Extract
Good candidates:
- Prompts that got it right first try
- Novel approaches to common problems
- Prompts with good constraint specification
- Multi-step workflows that worked well
- Effective few-shot examples
Skip:
- Simple one-off requests
- Prompts that needed multiple corrections
- Context-heavy prompts that won't generalize
Prompt Patterns to Look For
- Constraint sandwich: Context → Constraints → Task
- Output format spec: Explicit structure requests
- Role assignment: "Act as X with Y years experience"
- Negative examples: "Do NOT do X"
- Step-by-step: Breaking complex tasks into phases
- Few-shot: Examples before the actual request