SKILL
---
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
1. **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
2. **Categorize** each prompt:
- `CODE` - Code generation, refactoring, debugging
- `REVIEW` - Code review, architecture analysis
- `DOCS` - Documentation, READMEs, comments
- `TEST` - Test generation, coverage
- `DEPLOY` - CI/CD, packaging, deployment
- `DESIGN` - UI/UX, system design
- `DATA` - Data processing, analysis
- `META` - Prompts about prompting
3. **Extract template** - generalize specifics into placeholders
4. **Pre-write format-match check** (mandatory):
- Run `grep -E '^### P-' ~/projects/DecisionLog/PROMPTS.md | head -3` to confirm the target file already contains `P-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.md` is a *templates* file, NOT a catalog; writing P-ID entries there would corrupt it.
5. **Append to** `~/projects/DecisionLog/PROMPTS.md` (in the private repo `AreteDriver/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.md` exists for *named template scaffolds* (Universal, CI/CD Diagnostic, GitHub Profile, etc.) — that one is hand-maintained, not a /prompt-library target.
## Entry Formatwhen to use it
Community prompt sourced from the open-source GitHub repo AreteDriver/ai-skills (MIT). A "SKILL" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
roleplaycommunitygeneral
source
AreteDriver/ai-skills · MIT