promotelisted
Install: claude install-skill kopp0510/claude-dd
# /self-improving-agent:promote — Graduate Learnings to Rules
Moves a proven pattern from Claude's auto-memory into the project's rule system, where it becomes an enforced instruction rather than a background note.
## Usage
```
/self-improving-agent:promote <pattern description> # Auto-detect best target
/self-improving-agent:promote <pattern> --target claude.md # Promote to CLAUDE.md
/self-improving-agent:promote <pattern> --target rules/testing.md # Promote to scoped rule
/self-improving-agent:promote <pattern> --target rules/api.md --paths "src/api/**/*.ts" # Scoped with paths
```
## Workflow
### Step 1: Understand the pattern
Parse the user's description. If vague, ask one clarifying question:
- "What specific behavior should Claude follow?"
- "Does this apply to all files or specific paths?"
### Step 2: Find the pattern in auto-memory
```bash
# Search MEMORY.md for related entries. Claude Code replaces EVERY non-alphanumeric
# character in the resolved absolute cwd with a single "-" (dots, spaces and CJK included).
MEMORY_DIR="$HOME/.claude/projects/$(pwd -P | sed 's/[^a-zA-Z0-9]/-/g')/memory"
# Verify first; a missing directory means "wrong path", not "nothing to promote".
# Under LC_ALL=C sed goes per byte, so glob as a fallback:
# [ -d "$MEMORY_DIR" ] || ls -d ~/.claude/projects/*"$(basename "$PWD" | sed 's/[^a-zA-Z0-9]/-/g')"*
grep -ni "<keywords>" "$MEMORY_DIR/MEMORY.md"
```
Show the matching entries and confirm they'r