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
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, or command-runner recipes. Emphasizes portability, quoting, safe filesystem/process handling, non-TUI CLI tools, ShellCheck, shfmt, Bats, and ShellSpec. NOT for Python, TypeScript, Go, web code, or infrastructure operations.
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.
testing
Author, inspect, troubleshoot, and review infrastructure across IaC, Kubernetes, cloud resources, containers, CI/CD, and Linux hosts. Use when changing Terraform/OpenTofu, Kubernetes, Helm, Kustomize, Dockerfiles, GitHub Actions, AWS, GCP, Cloud Run, BigQuery, IAM, logs, instances, or service health. NOT for deploy/apply/rollback workflows (see deploying-infra). NOT for shell scripts or generic command pipelines (see writing-shell).
development
Configure safe git workflow hygiene: pre-commit/pre-push hooks, Gitleaks secret scanning, .gitignore rules, local git config, and guardrails. Use when setting up git hooks, gitleaks/git leaks, staged pre-commit checks, pre-push validation, core.hooksPath, .gitignore, or git config best practices. NOT for creating commits (use committing-code), cleaning branches/worktrees (use cleanup-git), or creating worktrees (use using-git-worktrees).