plugins/dev-tools/skills-pi/learning-patterns/SKILL.md
Extract learnings and generate Pi/project customizations (AGENTS.md, CONTEXT.md, ADRs, skills, agents, commands, hooks). Use when user says "learn", "extract learnings", "what did we learn", "save learnings", "adapt config", "capture domain language", or wants to improve Pi based on conversation patterns.
npx skillsauth add alexei-led/claude-code-config learning-patternsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Extract durable learnings and propose concrete customization updates. Ground changes in actual conversation/tool output. Ask one question at a time when confirmation is needed.
Find relevant project and Pi customization files:
AGENTS.md # agent instructions
.pi/agents/*.md # project-local subagents
~/.pi/agent/skills/*/SKILL.md # Pi user skills
CONTEXT.md / CONTEXT-MAP.md # domain language
docs/adr/*.md # durable decisions
.out-of-scope/*.md # rejected requests, if used
For global Pi config, edit the chezmoi source first:
/Users/alexei/.local/share/chezmoi/dot_pi/agent/...
Then apply to live config under ~/.pi/agent/. Pi user skills live under ~/.pi/agent/skills/; chezmoi source lives under dot_pi/agent/skills/. Do not edit generated/live-only files when a source file exists.
For broad customization reviews, use a background scout or reviewer agent to inspect independent file sets. The parent decides what to write.
Use web_answer or web_search only for current Pi docs or external tool behavior. Prefer local Pi docs under the installed package when available.
| Signal | Look For | |-------------------|-----------------------------------------------| | Corrections | "no", "wrong", "actually", "instead" | | Direct guidance | "always", "prefer", "use X", "never" | | Repeated explains | Same thing clarified 2+ times | | Project quirks | Unexpected behavior, edge cases, workarounds | | Workflows | Commands or sequences that worked |
| Signal | Artifact | Look For | |--------------------|------------|-----------------------------------------------| | Term resolution | CONTEXT.md | "call this X", "X means", overloaded jargon | | Ambiguity resolved | CONTEXT.md | "not account, customer", "avoid Y" | | Durable trade-off | ADR | hard-to-reverse, surprising, real alternative | | Scope rejection | out-of-scope | "we will not support X because" |
Only record domain concepts meaningful to domain experts. General implementation terms do not belong in CONTEXT.md.
Create or update a skill only for a workflow that is:
Prefer updating an existing skill over creating a near-duplicate.
Create or update an agent only when isolation helps:
Do not make an agent for generic advice. That is how prompt zoos happen.
Use terse rules:
Use X for Y.
Prefer X over Y.
When X, run Y.
Never do X without confirmation.
One instruction per line. Avoid stories.
**Term**:
One-sentence definition.
_Avoid_: overloaded synonym, fuzzy alias
# Decision title
One to three sentences: context, decision, why.
Write ADRs only when the decision is hard to reverse, surprising without context, and a real trade-off.
name and description.SKILL.md concise; move deep reference material to sibling files only when needed.Recommended limits:
| Artifact | Limit | Why | |------------|-----------|--------------------| | AGENTS.md | 200 lines | context efficiency | | CONTEXT.md | concise | domain terms only | | ADRs | sparse | decisions, not diary | | Skills | focused | discoverability | | Agents | few | routing clarity |
If the budget is exceeded, propose consolidation before adding more text.
Before editing, show proposed changes:
## Proposed Learnings
### AGENTS.md
- + Use prepared statements for SQL.
- ~ Prefer explicit errors -> Prefer domain error types at service boundaries.
### Domain docs
- + CONTEXT.md: Materialization
- + docs/adr/0003-use-events-for-materialization.md
### Skills
- + auth-patterns — OAuth2/JWT workflow
- ~ reviewing-code — add architecture seam checks
Rollback: git checkout <files>
Stop for approval unless the user already explicitly asked to apply changes.
LEARNED
-------
Instructions: +N ~N
Domain docs: +N ~N
Skills: +N ~N
Agents: +N ~N
Applied:
- file — change
Verification:
- <command> — pass/fail
tools
Use when planning, executing, checkpointing, finishing, or inspecting lightweight spec-driven work. Runs one task at a time using `.spec/` markdown files and the bundled `specctl` helper. NOT for broad product discovery beyond a short requirement interview. NOT for generic implementation planning that does not read or write `.spec/` files.
development
Simple web development with HTML, CSS, JS, and HTMX. Use when working with .html, .css, or .htmx files, web templates, stylesheets, or vanilla JS scripts. NOT for React/Vue/Angular (use writing-typescript) or Node.js backends.
tools
Idiomatic TypeScript development. Use when writing TypeScript code, Node.js services, React apps, or TypeScript design advice. Emphasizes strict typing, boundary validation, composition, fast feedback, behavior tests, and project-configured tooling. NOT for Go, Python, Rust, plain HTML/CSS/JS, or server-rendered templates (use writing-web).
tools
Idiomatic shell development for POSIX sh, Bash, Zsh, Fish, hooks, CI shell steps, and scriptable CLI glue. Use when writing or changing `.sh`, `.bash`, `.zsh`, `.fish`, `.bats`, shell functions, shell pipelines, CI `run:` shell bodies, or command-runner recipes. Emphasizes portability, quoting, safe filesystem/process handling, non-TUI CLI tools, ShellCheck, shfmt, Bats, and ShellSpec. NOT for Python, Rust, TypeScript, Go, web code, or GitHub Actions workflow/job/permissions semantics; use operating-infra.