{"id":"95bbac45-1d5b-4db6-92a2-32732a0b0fab","shortId":"6CHf3m","kind":"skill","title":"capture-learning","tagline":"Captures a validated learning and writes it to the correct learnings.md. Invoke when: a bug is resolved non-obviously, a pattern is discovered, the user corrects a mistake, or a solution took 2+ attempts. Do NOT invoke for typos, obvious errors, or one-time config changes.","description":"# Capture Learning\n\n## When to invoke\n\n- Bug resolved with non-obvious root cause\n- Pattern discovered that applies beyond this one case\n- User corrected your approach\n- Solution took 2+ attempts to get right\n- Framework or library quirk discovered\n\nDo NOT invoke for: typos, missing imports, obvious variable errors, one-off config.\n\n## Protocol\n\n### Step 1 — Choose target skill\n\n| Domain | Target |\n|--------|--------|\n| Debugging, error fixing | `systematic-debugging/learnings.md` |\n| Next.js, React, App Router | `next-best-practices/learnings.md` |\n| CodeGraph usage | `codegraph-context/learnings.md` |\n| UI, components, styling | `frontend-design/learnings.md` |\n| Session/workflow patterns | `verification-before-completion/learnings.md` |\n| Vercel, React performance | `vercel-react-best-practices/learnings.md` |\n\nIf uncertain: use the skill most closely related to the DOMAIN, not the activity.\n\n### Step 2 — Draft the learning\n\nFill ALL required fields:\n\n```yaml\n## Learning L-{skill}-{NNN}\nid: \"L-{skill}-{NNN}\"\ndate: \"{today YYYY-MM-DD}\"\ntype: \"{bug-fix|pattern|anti-pattern|preference|negative}\"\nstatus: \"active\"\nproject: \"{project-name or global}\"\nscope: \"{project-specific|global}\"\ntags: [{tag1}, {tag2}]\nconfidence: 1\ncontext: \"In [technology/version], when [specific situation]...\"\nproblem: \"{what went wrong or was unclear}\"\nsolution: \"{what worked — actionable, specific}\"\nreason: \"{WHY this works — not just what}\"\nvalidated_by: [\"{session-date}\"]\ncreated_in: \"{session-date}\"\nsupersedes: null\nsuperseded_by: null\nreinforces: []\ncontradicts: []\n```\n\n### Step 3 — Validate (no exceptions)\n\nBefore writing, verify ALL of these:\n\n1. `context`, `problem`, `solution`, `reason` are filled and non-empty\n2. `tags` has between 2 and 5 items\n3. `problem` and `solution` contain NO absolute file paths\n4. `solution` is at least 10 words and actionable\n5. `reason` explains WHY (not just restates the solution)\n6. If `type: negative` then `confidence` must be 1\n\nFix any failure before writing. Do not skip any check.\n\n### Step 4 — Contradiction check\n\nSearch existing learnings for entries sharing 2+ tags with the new one:\n\n```bash\ngrep -r \"tags:\" \"/Users/dan/Desktop/progetti-web/Fullstack session/.agents/skills/*/learnings.md\" \\\n  | grep \"{tag1}\\|{tag2}\"\n```\n\nIf a conflict is found, surface it to the user:\n\n```\nCONFLICT DETECTED\nNew:      \"{summary}\" [tags: ...]\nExisting: L-{id} \"{summary}\" — confidence: N\n\nA) New supersedes old → set supersedes/superseded_by fields\nB) Both valid with different scope → adjust scope\nC) Cancel new learning\n```\n\nWait for the user's decision. Never auto-resolve.\n\n### Step 5 — Write\n\nCalculate the next ID: count existing `## Learning` lines in the target file + 1, zero-padded to 3 digits.\n\nAppend the learning between `<!-- LEARNINGS START -->` and `<!-- LEARNINGS END -->`.\n\n### Step 6 — Re-index skills with embeddings\n\n```bash\nnode \"/Users/dan/Desktop/progetti-web/Fullstack session/packages/codegraph/dist/cli.js\" analyze \"/Users/dan/Desktop/progetti-web/Fullstack session/.agents/skills\" --skip-git 2>&1 | tail -3\n```\n\nThis updates the structural index. Semantic search works at query-time via the embedding model (loaded automatically on first query).\n\n### Step 7 — Confirm\n\n```\n✅ Learning captured: L-{skill}-{NNN}\n   Type: {type} | Confidence: 1 | Scope: {scope}\n   Tags: {tags}\n   File: {skill}/learnings.md\n```\n\n## Multi-agent safety\n\nIf running as a subagent, do NOT write directly to `learnings.md`.\nWrite to a temp file instead:\n\n```\n/Users/dan/Desktop/progetti-web/Fullstack session/.agents/skills/_pending/learning-{date}-{random}.yml\n```\n\nThe parent agent or `post-session-review` will merge these at session end.","tags":["capture","learning","synapse","deve1993","agent-skills","ai-agents","ai-coding","ai-workspace","anti-poisoning","auto-learning-ai","automation","claude-code"],"capabilities":["skill","source-deve1993","skill-capture-learning","topic-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workspace","topic-anti-poisoning","topic-auto-learning-ai","topic-automation","topic-claude-code","topic-code-quality","topic-cursor","topic-developer-tools","topic-devops"],"categories":["Synapse"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/deve1993/Synapse/capture-learning","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add deve1993/Synapse","source_repo":"https://github.com/deve1993/Synapse","install_from":"skills.sh"}},"qualityScore":"0.453","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 7 github stars · SKILL.md body (3,686 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:14:13.180Z","embedding":null,"createdAt":"2026-05-18T13:21:45.741Z","updatedAt":"2026-05-18T19:14:13.180Z","lastSeenAt":"2026-05-18T19:14:13.180Z","tsv":"'-3':464 '/learnings.md':117,126,132,139,146,155,362,504 '/users/dan/desktop/progetti-web/fullstack':360,453,456,526 '1':105,221,275,329,431,462,497 '10':308 '2':37,79,171,286,290,350,461 '3':265,294,436 '4':303,341 '5':292,312,417 '6':321,444 '7':487 'absolut':300 'action':238,311 'activ':169,205 'adjust':400 'agent':507,533 'analyz':455 'anti':200 'anti-pattern':199 'app':120 'append':438 'appli':68 'approach':76 'attempt':38,80 'auto':414 'auto-resolv':413 'automat':482 'b':394 'bash':356,451 'best':124,153 'beyond':69 'bug':18,57,196 'bug-fix':195 'c':402 'calcul':419 'cancel':403 'captur':2,4,52,490 'capture-learn':1 'case':72 'caus':64 'chang':51 'check':339,343 'choos':106 'close':162 'codegraph':127,130 'codegraph-context':129 'complet':145 'compon':134 'confid':220,326,385,496 'config':50,102 'confirm':488 'conflict':368,376 'contain':298 'context':131,222,276 'contradict':263,342 'correct':13,30,74 'count':423 'creat':252 'date':188,251,256,528 'dd':193 'debug':111,116 'decis':411 'design':138 'detect':377 'differ':398 'digit':437 'direct':517 'discov':27,66,88 'domain':109,166 'draft':172 'embed':450,479 'empti':285 'end':544 'entri':348 'error':45,98,112 'except':268 'exist':345,381,424 'explain':314 'failur':332 'field':178,393 'file':301,430,502,524 'fill':175,281 'first':484 'fix':113,197,330 'found':370 'framework':84 'frontend':137 'frontend-design':136 'get':82 'git':460 'global':211,216 'grep':357,363 'id':184,383,422 'import':95 'index':447,469 'instead':525 'invok':15,41,56,91 'item':293 'l':181,185,382,491 'learn':3,7,53,174,180,346,405,425,440,489 'learnings.md':14,519 'least':307 'librari':86 'line':426 'load':481 'merg':540 'miss':94 'mistak':32 'mm':192 'model':480 'multi':506 'multi-ag':505 'must':327 'n':386 'name':209 'negat':203,324 'never':412 'new':354,378,388,404 'next':123,421 'next-best-practic':122 'next.js':118 'nnn':183,187,493 'node':452 'non':22,61,284 'non-empti':283 'non-obvi':21,60 'null':258,261 'obvious':23,44,62,96 'old':390 'one':48,71,100,355 'one-off':99 'one-tim':47 'pad':434 'parent':532 'path':302 'pattern':25,65,141,198,201 'perform':149 'post':536 'post-session-review':535 'practic':125,154 'prefer':202 'problem':228,277,295 'project':206,208,214 'project-nam':207 'project-specif':213 'protocol':103 'queri':475,485 'query-tim':474 'quirk':87 'r':358 'random':529 're':446 're-index':445 'react':119,148,152 'reason':240,279,313 'reinforc':262 'relat':163 'requir':177 'resolv':20,58,415 'restat':318 'review':538 'right':83 'root':63 'router':121 'run':510 'safeti':508 'scope':212,399,401,498,499 'search':344,471 'semant':470 'session':250,255,537,543 'session-d':249,254 'session/.agents/skills':361,457 'session/.agents/skills/_pending/learning-':527 'session/packages/codegraph/dist/cli.js':454 'session/workflow':140 'set':391 'share':349 'situat':227 'skill':108,160,182,186,448,492,503 'skill-capture-learning' 'skip':337,459 'skip-git':458 'solut':35,77,235,278,297,304,320 'source-deve1993' 'specif':215,226,239 'status':204 'step':104,170,264,340,416,443,486 'structur':468 'style':135 'subag':513 'summari':379,384 'supersed':257,259,389 'supersedes/superseded_by':392 'surfac':371 'systemat':115 'systematic-debug':114 'tag':217,287,351,359,380,500,501 'tag1':218,364 'tag2':219,365 'tail':463 'target':107,110,429 'technology/version':224 'temp':523 'time':49,476 'today':189 'took':36,78 'topic-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workspace' 'topic-anti-poisoning' 'topic-auto-learning-ai' 'topic-automation' 'topic-claude-code' 'topic-code-quality' 'topic-cursor' 'topic-developer-tools' 'topic-devops' 'type':194,323,494,495 'typo':43,93 'ui':133 'uncertain':157 'unclear':234 'updat':466 'usag':128 'use':158 'user':29,73,375,409 'valid':6,247,266,396 'variabl':97 'vercel':147,151 'vercel-react-best-practic':150 'verif':143 'verifi':271 'verification-before-complet':142 'via':477 'wait':406 'went':230 'word':309 'work':237,243,472 'write':9,270,334,418,516,520 'wrong':231 'yaml':179 'yml':530 'yyyi':191 'yyyy-mm-dd':190 'zero':433 'zero-pad':432","prices":[{"id":"fd15cd19-e36e-4c77-8506-1837cfa2fb5b","listingId":"95bbac45-1d5b-4db6-92a2-32732a0b0fab","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"deve1993","category":"Synapse","install_from":"skills.sh"},"createdAt":"2026-05-18T13:21:45.741Z"}],"sources":[{"listingId":"95bbac45-1d5b-4db6-92a2-32732a0b0fab","source":"github","sourceId":"deve1993/Synapse/capture-learning","sourceUrl":"https://github.com/deve1993/Synapse/tree/main/skills/capture-learning","isPrimary":false,"firstSeenAt":"2026-05-18T13:21:45.741Z","lastSeenAt":"2026-05-18T19:14:13.180Z"}],"details":{"listingId":"95bbac45-1d5b-4db6-92a2-32732a0b0fab","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"deve1993","slug":"capture-learning","github":{"repo":"deve1993/Synapse","stars":7,"topics":["agent-skills","ai-agents","ai-coding","ai-workspace","anti-poisoning","auto-learning-ai","automation","claude-code","code-quality","cursor","developer-tools","devops","fullstack-development","multi-agent-systems","nextjs","opencode","persistent-memory","self-improving","telegram-bot"],"license":"other","html_url":"https://github.com/deve1993/Synapse","pushed_at":"2026-05-15T21:34:01Z","description":"Self-improving AI brain for Claude Code & Desktop — 28 MCP tools, 253 skills, collective memory, project tracking, work logs. One server, all your sessions share the same knowledge. Deploy on Coolify in 2 minutes.","skill_md_sha":"60a1ebe882dacf0dadbb26140613c45f5c107bc0","skill_md_path":"skills/capture-learning/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/deve1993/Synapse/tree/main/skills/capture-learning"},"layout":"multi","source":"github","category":"Synapse","frontmatter":{"name":"capture-learning","description":"Captures a validated learning and writes it to the correct learnings.md. Invoke when: a bug is resolved non-obviously, a pattern is discovered, the user corrects a mistake, or a solution took 2+ attempts. Do NOT invoke for typos, obvious errors, or one-time config changes."},"skills_sh_url":"https://skills.sh/deve1993/Synapse/capture-learning"},"updatedAt":"2026-05-18T19:14:13.180Z"}}