learn
The facts
Its description
Manage project learnings. Triggers: show learnings; what have we learned; manage project learnings
The description the agent reads to decide when to use it. Phrases the author says should start it.
When it starts
The agent only sees the name 'learn' and the description 'Manage project learnings.' with triggers about showing or managing learnings, so it fires when someone asks what the project has learned, wants to search or add a learning, or wants the learnings file pruned. It is a self-contained bookkeeping skill, not one that runs code changes.
Things a person might say (the model's guesses)
- “show learnings”
- “what have we learned about the deploy script?”
- “add a learning: the staging DB needs the VPN”
A model's summary of when it is used.
Tools it may use, or may not
allowed-tools: Bash, Read, Write, Edit, AskUserQuestion, Glob, Grep
Tools it may use while it runs without asking you first.
Runs scripts
bin/gstack-skill-start, scripts/question-registry.ts, bin/gstack-question-preference, bin/gstack-question-log, bin/gstack-skill-end (first 5 of 13 lines)
Scripts the text names. Found by matching words, so treat them as pointers.
Stops for a person
3 lines stop to ask a person
Lines that stop and wait for a person before going on. Found by matching words, so treat them as pointers.
What leads to it
- gstack hands off to this PROACTIVE all, or user names it gstack, line 237
Other skills that hand off to this one, call it, require it or offer it instead, as a model read them.
Licence
MIT, from LICENSE
The terms its author shares it under, which let it be shown here.
Other files in this skill (1) Close
The text
Most marks come from matching words in the file, so treat them as pointers.
<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly --> <!-- Regenerate: bun run gen:skill-docs -->
Raw lines 1 to 21Boilerplate, lines 22 to 78. The same text appears in 45 other files here. Close
Telemetry (run last)
After workflow completion, log telemetry with ONE command. OUTCOME is success/error/abort/unknown; SESSION_ID and TEL_START are the values the preamble's skill-start output echoed. It also drains the artifacts-sync queue (the former skill-end sync step — do not run gstack-brain-sync separately).
PLAN MODE EXCEPTION — ALWAYS RUN: This writes telemetry to $GSTACK_STATE_ROOT/analytics/, matching preamble analytics writes.
~/.claude/skills/gstack/bin/gstack-skill-end --skill "learn" --outcome OUTCOME \
--session-id "SESSION_ID" --tel-start "TEL_START" --used-browse USED_BROWSE \
--error-message "ERROR_MESSAGE" --failed-step "FAILED_STEP" 2>/dev/null || trueReplace OUTCOME and USED_BROWSE (yes/no) before running; substitute SESSION_ID/TEL_START from the skill-start echoes. ERROR_MESSAGE/FAILED_STEP are "" unless outcome is error. If the command is missing (stale install), skip telemetry — it never blocks the workflow.
/learn: project learnings
Hard gate: manage learnings only. Make no code changes, even when a learning names a fix.
gstack-learnings-search reads this project's learnings (latest entry per key+type); gstack-learnings-log appends one. Both live in ~/.claude/skills/gstack/bin/ and take --help. Pick the mode from the request:
| Request | Run | Then |
|---|---|---|
| show (default) | ~/.claude/skills/gstack/bin/gstack-learnings-search --limit 20 | group by type; if empty, say none are recorded yet and that /review, /ship, /investigate and other skills record them as they work |
| search | ~/.claude/skills/gstack/bin/gstack-learnings-search --query "<words>" --limit 20 | show the matches |
| other projects | add --cross-project | only user-stated learnings from other projects appear |
| stats | ~/.claude/skills/gstack/bin/gstack-learnings-search --stats | show the counts as a table |
| export | ~/.claude/skills/gstack/bin/gstack-learnings-search --limit 50 | a ## Project Learnings section, ### <Type>s per type, lines - **key**: insight (confidence: N/10); show it, and write it into CLAUDE.md or a file only if the user asks |
| add | ~/.claude/skills/gstack/bin/gstack-learnings-log '<json>' | ask only for what is missing: type, kebab-case key, one-sentence insight, confidence 1-10, files; "source":"user-stated" |
| prune | ~/.claude/skills/gstack/bin/gstack-learnings-search --limit 100 | see Prune |
Prune
Flag each learning that is:
- STALE: a path in its
filesno longer exists in the repo. - CONFLICT: the same key appears under two types with opposing insights (within one type the latest entry already wins).
For each flagged entry, ask: remove, keep, or update. Only a request that already names the action for these entries ("remove the stale ones without asking") answers it; never infer approval.
- Remove: delete its lines (that key and type) from the file this prints, leaving every other line as it is: ``
bash SLUG=$(~/.claude/skills/gstack/bin/gstack-slug --get SLUG) GSTACK_STATE_ROOT=$(~/.claude/skills/gstack/bin/gstack-paths --get GSTACK_STATE_ROOT); : "${GSTACK_STATE_ROOT:?gstack-paths failed; reinstall with ./setup or /gstack-upgrade}" echo "$GSTACK_STATE_ROOT/projects/$SLUG/learnings.jsonl" - Update: log a corrected entry with the same key and type; the latest one wins.
From garrytan/gstack at 3f79d81, 2026-11-01. Skills read by DeepSeek V4.1 Flash on 2026-11-04. Summary and techniques by Claude Opus 5.5 on 2026-11-06.