From ctx
Records project-specific learnings on gotchas, bugs, and unexpected behaviors into LEARNINGS.md via ctx CLI. Prompts for context, lesson, and application; checks for novelty before adding.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ctx:ctx-add-learningThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Record a learning in LEARNINGS.md.
Record a learning in LEARNINGS.md.
Three questions: if any answer is "no", don't record:
Learnings should capture principles and heuristics, not code snippets.
If the user provides only a title, ask:
ctx add learning "Title" --context "..." --lesson "..." --application "..."
Example: behavioral pattern:
ctx add learning "Agent ignores repeated hook output (repetition fatigue)" \
--context "PreToolUse hook ran ctx agent on every tool use, injecting the same context packet repeatedly. Agent tuned it out and didn't follow conventions." \
--lesson "Repeated injection causes the agent to ignore the output. A cooldown tombstone emits once per window. A readback instruction creates a behavioral gate harder to skip than silent injection." \
--application "Use --session \$PPID in hook commands to enable cooldown. Pair context injection with a readback instruction."
Example: technical gotcha:
ctx add learning "go:embed only works with files in same or child directories" \
--context "Tried to embed files from parent directory, got compile error" \
--lesson "go:embed paths are relative to the source file and cannot use .. to escape the package" \
--application "Keep embedded files in internal/assets/ or child directories, not project root"
Example: workflow insight:
ctx add learning "ctx init overwrites user content without guard" \
--context "Commit a9df9dd wiped 18 decisions from DECISIONS.md, replacing with empty template" \
--lesson "Init treats all context files as templates, but after first use they contain user data" \
--application "Skip existing files by default, only overwrite with --force"
Before recording, verify:
Confirm the learning was added.
npx claudepluginhub activememory/ctx --plugin ctxExtracts learnings from the current conversation and appends them to the project's CLAUDE.md as generalized rules. Captures non-obvious solutions and workarounds.
Captures learnings from completed development sessions into reusable knowledge files organized by pattern, pitfall, decision, tool insight, and process improvement.
Records reusable lessons from resolved bug fixes, architectural changes, interface updates, or recurring pitfalls into project memory docs, anchored to git commits.