ワンクリックで
ctx-learning-add
Record a learning. Use when discovering gotchas, bugs, or unexpected behavior that future sessions should know about.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Record a learning. Use when discovering gotchas, bugs, or unexpected behavior that future sessions should know about.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
EXPERIMENTAL (discardable). Hand a loose intent spec (.context/specs/intent-<slug>.md) off to spec-kit's /speckit-specify with a prose synopsis. Optional and graceful — warns and continues if spec-kit is not installed; the intent spec stands either way. Third step of the experimental chain.
EXPERIMENTAL (discardable). Stress-test a plan through adversarial interview, then write a debated brief to .context/briefs/<TS>-<slug>.md. First step of the experimental spec-kit delegation chain: /ctx-experimental-plan → /ctx-experimental-spec → /ctx-experimental-handoff.
EXPERIMENTAL (discardable). Turn a debated brief into a LOOSE intent spec at .context/specs/intent-<slug>.md — deliberately not pre-shaped into spec-kit's template. Second step of the experimental chain: /ctx-experimental-plan → /ctx-experimental-spec → /ctx-experimental-handoff.
Run a disciplined "dream" triage pass over the gitignored ideas/ folder — classify each idea against the codebase and specs, and emit gated, provenance-bearing disposition proposals into the dreams/ notebook for human review. NEVER writes canonical memory and NEVER acts on a proposal. Use when invoked headlessly by the scheduler (cron `claude -p`) or when the user says "run the dream" / "dream over my ideas". The human reviews via /ctx-serendipity.
The human review "garden walk" over ctx-dream proposals. Reads pending proposals from the dreams/ notebook and walks the human through accept / reject / amend / skip, one at a time, substance-forward. Mechanical dispositions apply instantly; generative ones (merge, promote) are done here by reading the full source. Use when the user says "serendipity round", "review my dreams", "walk the garden", or "what did the dream find?". The dream proposes; serendipity disposes.
Record architectural decision. Use when a trade-off is resolved or a non-obvious design choice is made that future sessions need to know.
| name | ctx-learning-add |
| description | Record a learning. Use when discovering gotchas, bugs, or unexpected behavior that future sessions should know about. |
| allowed-tools | Bash(ctx:*) |
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:
Provenance flags (--session-id, --branch, --commit) are required.
Get these values from the hook-relayed provenance line in your context
(e.g., Session: abc12345 | Branch: main @ 68fbc00a).
Prefer this skill over raw ctx learning add: the conversational
approach lets you automatically pick up session ID, branch, and commit
from the provenance line already in your context window.
ctx learning add "Title" \
--session-id SESSION --branch BRANCH --commit HASH \
--context "..." --lesson "..." --application "..."
Example: behavioral pattern:
ctx learning add "Agent ignores repeated hook output (repetition fatigue)" \
--session-id abc12345 --branch main --commit 68fbc00a \
--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 learning add "go:embed only works with files in same or child directories" \
--session-id abc12345 --branch main --commit 68fbc00a \
--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 learning add "ctx init overwrites user content without guard" \
--session-id abc12345 --branch main --commit 68fbc00a \
--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"
When a flag value would be denied: if a --context/--lesson/
--application value contains a substring that trips a permissions.deny
rule on the literal command string (e.g. a path like /usr/local/bin),
put the fields in a JSON file and pass --json-file instead — the values
never reach the command line, and the schema gates still apply:
cat > /tmp/learning.json <<'EOF'
{
"title": "Hooks run in a subprocess",
"context": "env vars set in a hook did not persist to the session",
"lesson": "hook stdout is the only channel back to the agent",
"application": "relay via stdout, never the environment",
"provenance": {"session_id": "abc12345", "branch": "main", "commit": "68fbc00a"}
}
EOF
ctx learning add --json-file /tmp/learning.json
This skill records principle-level lessons discovered through real work. It does not unilaterally promote material from adjacent skills:
/ctx-convention-add's job and requires explicit user ask./ctx-decision-add if the user wants it elevated.Light compression for clarity is allowed; new facts are not.
Before recording, verify:
Confirm the learning was added.