plugin/skills/learnings-write/SKILL.md
Use this skill when capturing patterns, lessons learned, or architectural decisions worth surfacing in future sessions — to perform a curated write to L4 (project) or L5 (user-global, opt-in) learnings memory. Spawns memory-curator agent to dedupe + PII-filter + schema-validate before append.
npx skillsauth add avav25/ai-assets learnings-writeInstall 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.
Append a curated entry to learnings.md (L4 project, default) or ~/.claude/ai-skills/learnings.md (L5 user-global, with --global). Spawns the memory-curator agent for dedupe, PII filter, schema validation per learnings-schema.md.
startTransition for non-urgent updates"text column ignores trailing whitespace in indexes"/learnings-write "Async state management — startTransition for non-urgent updates"
/learnings-write "Why we chose gRPC over REST" --global
/learnings-write "Postgres text column index trailing whitespace gotcha" --tags "postgres,index"
/learnings-write "ADR: adopt outbox pattern for cross-service events" --committed
| Flag | Default | Effect |
|---|---|---|
| <text> (positional) | required | The learning to capture (1 sentence to 1 paragraph) |
| --global | off | Write to L5 (requires userConfig.user_global_memory_enabled: true) |
| --tags "tag1,tag2" | none | Comma-separated tags for search |
| --source <id> | auto | Workflow run-id this learning came from |
| --committed | off | Write to the committed L4 layer (.ai-skills-memory/.committed/learnings.md) — routes through the pre-tool-use-committed-write.py allowlist hook |
--global permission per memory-discipline.md rule 3 — must have BOTH userConfig.user_global_memory_enabled: true AND --global flag.memory-curator agent (the agent is spawn-only — not user-invocable) with G7 spawn payload:
goal: "Add a learning entry the user wrote: <text>"state_slice: existing learnings.md (target layer) for dedupe contextallowed_tools: Read, Writememory-validation.md--global (rejects entries with project paths/names per memory-discipline.md rule 4)apply_pii_filter() from _lib.py)learnings-schema.md (H2 entity heading + Type/Source/Confidence/Created/Last confirmed/Scope frontmatter + body)status: ok → entry written; report path + entity headingstatus: partial → some content rejected (e.g., L5 scope violation); report what was rejected and whystatus: needs_clarification → conflict with existing entry; surface the question to usermemory-discipline.md rule 1redactions.log.committed/ writes route through pre-tool-use-committed-write.py hook — committed learnings must match the allowlist pattern (default: learnings.md, architecture-decisions/*.md, etc.)--global without permission: refuse with same error as /memory-recallstatus: needs_clarification with the existing entry; user picks merge / skip / supersede_lib.py import error): memory-curator returns status: failed; never write without filter| Layer | Trigger | Path |
|---|---|---|
| L4 (default) | Always | <repo>/.ai-skills-memory/learnings.md |
| L4 (.committed/) | If user explicitly opts in via --committed flag | <repo>/.ai-skills-memory/.committed/learnings.md (allowlist-validated) |
| L5 | Requires --global AND userConfig.user_global_memory_enabled | ~/.claude/ai-skills/learnings.md |
memory-curator agent (Read, Write only; no Task; no Bash)plugin/schemas/spawn-payload.schema.json, plugin/schemas/return-contract.schema.jsonplugin/memory/templates/learnings-schema.md (entry format), plugin/memory/templates/committed-allowlist.txt (committed write rules)memory-discipline (write rules + PII filter mandate + L5 scope), memory-validation (dedupe + conflict resolution)pre-tool-use-committed-write.py (committed allowlist enforcement)/memory-recall to search; /memory-init to initialize the treeplugin/docs/concepts/memory.md documents the L0–L5 layers (L4 = project memory, L5 = user-global). This skill writes only to L4 (default) and L5 (opt-in).development
Use this skill when running the recurring (daily) knowledge-base rescan for a repo that already has knowledge/.knowledge-sync.yml — the main-thread dispatcher that reads the config, computes the git delta since last_scanned_sha, maps changed paths to affected doc areas, early-exits cheaply when nothing changed, then fans out one Agent(content-writer) per affected area, applies the propose/direct update policy, advances the baseline only on success, and writes an L4 run log — all with the G1 untrusted-content choke-point, secret-scan, deny-list, and budget controls woven in. For first-time setup use /knowledge-sync-init.
development
Use this skill when bootstrapping scheduled knowledge-base sync for a repo that has no knowledge/.knowledge-sync.yml yet — to run one-time setup that detects the knowledge_root from CLAUDE.md/AGENTS.md, maps doc areas to source globs, records opt-in external sources (Linear/Notion/WebFetch, all disabled by default), captures a baseline last_scanned_sha, sets the per-area update policy, generates or seeds knowledge/CONVENTIONS.md, provisions the L4 memory dir, and offers to register the daily routine. Routes ongoing recurring sync operations to /knowledge-sync.
tools
Use this skill when bootstrapping a target repository to be ai-skills-aware — on the first run of any ai-skills workflow in a fresh repo, when adopting the ai-skills plugin in an existing repo, or after upgrading to a plugin version that adds new memory paths or templates, including when the user does not say "init" but asks to "set up" or "onboard" the repo — to detect codebase type, create CLAUDE.md + AGENTS.md scaffolding, initialize the .ai-skills-memory/ directory tree from L1 templates, and configure .gitignore. Idempotent — safe to re-run. Accepts `--codebase-type <type>` and `--overwrite`. Not for re-initializing only memory — use `/memory-init` instead.
tools
Use this skill when extending, repairing, or improving plugin assets, when ingesting a `/feedback` report as a fix-cycle backlog, or when you do not remember which lower-level command is right for the job — the umbrella workflow for ai-skills plugin-asset authoring and maintenance: creating, auditing, fixing, improving, refactoring, and migrating skills, agents, rules, hooks, prompts, schemas, and rubrics inside the plugin. Auto-classifies the request, loads the right knowledge skills (`@prompt-engineering`, `@context-engineering`, `@team-protocols`), and spawns the right subagents (`prompt-engineer`, `system-architect`, `python-engineer`, `software-engineer`, `qa-engineer`, `eval-judge`) via the `Agent` tool.