src/skills/learning-patterns/SKILL.md
Extract durable learnings from a session and propose project customizations — agent-instructions file, CONTEXT.md, ADRs, project skills, hooks. Use when the user says "learn", "extract learnings", "what did we learn", "save learnings", "adapt config", "capture domain language", or wants to encode session patterns durably. NOT for documentation edits (use documenting-code) or committing changes (use committing-code).
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 actionable, durable learnings and propose project-specific customizations. Ground every change in actual conversation or tool evidence. Ask one question at a time when confirmation is needed.
documenting-code.If the user passed a topic, scope extraction to that topic. If the user passed --dry-run, run Phases 1–7 only.
Read existing customization files. Default portable paths (adapt to the platform's conventional locations):
AGENTS.md — agent instructions / project memory.agents/skills/*/SKILL.md — project skills.agents/agents/*.md — project subagents.agents/commands/*.md — project commandsCONTEXT.md, CONTEXT-MAP.md — domain languagedocs/adr/*.md — durable decisions.out-of-scope/*.md — rejected scope with reasoningRecord counts for the budget check.
Scan the conversation for these signal types.
Instruction signals → agent-instructions file:
Domain signals:
CONTEXT.md ("call this X", "X means", overloaded jargon)CONTEXT.md ("not account, customer", "avoid Y")docs/adr/ (surprising, real alternative).out-of-scope/ ("we will not support X because")Skill signals → project skills directory. Promote to a skill only when the workflow is repeated or likely to recur, multi-step enough to forget details, tool-heavy or evidence-heavy, and specific enough to trigger reliably. Prefer updating an existing skill over creating a duplicate.
Hook signals → settings:
Only HIGH-confidence items become skills or hooks. MEDIUM items become single-line entries in the agent-instructions file instead.
Pick exactly one target artifact per learning before drafting text:
AGENTS.md)CONTEXT.mddocs/adr/NNNN-slug.md.agents/skills/<name>/SKILL.md.out-of-scope/<concept>.mdIf no target is justified, drop the learning.
Agent-instructions entries — one-line rules, ~80 chars max:
Use X for Y.Prefer X over Y.When X, run Y.Never X without confirmation.Run: `<command>.``Note: `<surprise>.``CONTEXT.md entry shape:
**Term**:
One-sentence definition.
Avoid: overloaded synonym.
ADR entry shape (docs/adr/NNNN-slug.md):
# Decision title
Context, decision, why — one to three sentences.
Write ADRs only when the decision is hard to reverse, surprising without context, and has a real alternative.
Out-of-scope entry: capture rejected enhancements with reasoning and any prior requests so the same idea is not re-litigated.
Project skill: follow agentskills.io. Required name and description frontmatter + markdown body. Description must state what the skill does and concrete trigger phrases. Body under ~150 lines; deep references go in sibling files. Vendor-neutral instructions, no platform-specific tool names.
Read each existing artifact and look for overlaps. Merge rules:
Prefer updating existing over creating new.
Recommended limits:
CONTEXT.md: concise — domain terms onlyOver budget → propose consolidations or stale removals before adding more.
Show all proposed changes grouped by target file. Use + for additions, ~ for updates. Include the rollback command (typically git checkout).
Ask one question for approval: apply all / select items / edit first / no. For "select items", show one selector per category.
CONTEXT.md, ADRs, out-of-scope: write or edit.SKILL.md, plus supporting files when needed.Re-read every changed file. Check:
Report verification results and any skipped checks with reasons.
LEARNED
Instructions: +N ~N
Domain docs: +N ~N
Skills: +N ~N
Hooks: +N ~N
Applied:
- file — change
Verification:
- check — pass/fail
--dry-run → run Phases 1–7, skip 8, still show what would change.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).