[{"data":1,"prerenderedAt":515},["ShallowReactive",2],{"footer-links":3,"content-\u002Fskill":12},[4,9],{"path":5,"title":6,"type":7,"isExternal":8},"https:\u002F\u002Fgithub.com\u002Fahumandev\u002Fautocode","GitHub","link",true,{"path":10,"title":11,"type":7,"isExternal":8},"https:\u002F\u002Fwww.npmjs.com\u002F@ahumandev\u002Fautocode","NPM",{"id":13,"title":14,"body":15,"description":509,"extension":510,"meta":511,"navigation":8,"path":512,"seo":513,"stem":405,"__hash__":514},"content\u002Fskill.md","Skills and local memory",{"type":16,"value":17,"toc":494},"minimark",[18,22,38,43,132,151,161,166,223,227,247,251,280,286,292,297,300,307,313,362,380,384,396,400,406,409,430,454,458,471,475,490],[19,20,14],"h1",{"id":21},"skills-and-local-memory",[23,24,25,29,30,33,34,37],"p",{},[26,27,28],"code",{},"learn"," stores a durable local memory. ",[26,31,32],{},"skill_edit"," creates or updates a reusable skill. Local memories are not reusable ",[26,35,36],{},"SKILL.md"," documents.",[39,40,42],"h2",{"id":41},"storage-locations","Storage locations",[44,45,46,61,67,81,92,98,105],"ul",{},[47,48,49,50,53,54,57,58,60],"li",{},"Active local-memory store: ",[26,51,52],{},".opencode\u002Fautocode\u002Fmemories\u002F",". A fresh transition starts empty; runtime creates Markdown ",[26,55,56],{},".md"," memory files only through ",[26,59,28],{},".",[47,62,63,64,66],{},"Reusable skills: each skill directory contains ",[26,65,36],{}," and may contain supporting files.",[47,68,69,70,73,74,77,78,60],{},"Managed built-in skills: ",[26,71,72],{},"$XDG_CONFIG_HOME\u002Fskills\u002Fautocode"," when ",[26,75,76],{},"XDG_CONFIG_HOME"," is set; otherwise ",[26,79,80],{},"~\u002F.agents\u002Fskills\u002Fautocode",[47,82,83,84,73,87,77,89,60],{},"Managed GitHub skills: ",[26,85,86],{},"$XDG_CONFIG_HOME\u002Fskills\u002Fautocode\u002Fgithub\u002F\u003Cowner>\u002F\u003Cproject>\u002F\u003Cskill>\u002F",[26,88,76],{},[26,90,91],{},"~\u002F.agents\u002Fskills\u002Fautocode\u002Fgithub\u002F\u003Cowner>\u002F\u003Cproject>\u002F\u003Cskill>\u002F",[47,93,94,95,60],{},"Recommended global manual skill path: ",[26,96,97],{},"~\u002F.config\u002Fopencode\u002Fskills\u002F\u003Cskill-name>\u002F",[47,99,100,101,104],{},"Do not put custom skills in managed ",[26,102,103],{},"autocode"," directories; AutoCode reconciles them.",[47,106,107,108,111,112,115,116,119,120,123,124,127,128,131],{},"GitHub is the only supported provider. Its primary cache is ",[26,109,110],{},"~\u002F.cache\u002Fautocode\u002Fgithub\u002F\u003Cowner>\u002F\u003Cproject>\u002F","; the fallback is ",[26,113,114],{},".opencode\u002Fautocode\u002Fcache\u002Fgithub\u002F\u003Cowner>\u002F\u003Cproject>\u002F"," only after primary access returns ",[26,117,118],{},"EACCES"," or ",[26,121,122],{},"EPERM",". Both cache trees are disposable. ",[26,125,126],{},"bun run skill:sync"," refreshes tracked snapshots; ",[26,129,130],{},"bun run skill:sync -- --force-refresh"," bypasses cached repositories.",[23,133,134,135,138,139,142,143,146,147,150],{},"Automatic local-memory recall considers only an eligible user message: ",[26,136,137],{},"output.message.role"," is exactly ",[26,140,141],{},"user",", it has at least one text part, and authoritative runtime agent tier is ",[26,144,145],{},"smart",". Only the first eligible user-role text message for each ",[26,148,149],{},"[sessionID, agentName]"," triggers automatic recall.",[23,152,153,154,156,157,160],{},"Automatic recall records one claim per ",[26,155,149],{},". First eligible event claims it even when recall has no match or fails. Config refresh preserves claims; ",[26,158,159],{},"session.deleted"," clears that session; dispose clears all claims.",[162,163,165],"h3",{"id":164},"manual-memory-tools","Manual memory tools",[44,167,168,177,185],{},[47,169,170,173,174,60],{},[26,171,172],{},"autocode_memory_recall"," schema: ",[26,175,176],{},"{ keywords: string }",[47,178,179,173,182,60],{},[26,180,181],{},"autocode_memory_forget",[26,183,184],{},"{ id_keyword: string }",[47,186,187,188,191,192,195,196,199,200,199,203,199,206,199,209,212,213,216,217,219,220,222],{},"Manual ",[26,189,190],{},"recall"," and ",[26,193,194],{},"forget"," are available only to ",[26,197,198],{},"advise",", ",[26,201,202],{},"assist",[26,204,205],{},"auto",[26,207,208],{},"design",[26,210,211],{},"spy",", and ",[26,214,215],{},"auto-troubleshoot",". ",[26,218,211],{}," ",[26,221,28],{}," remains denied after overrides.",[162,224,226],{"id":225},"manual-recall","Manual recall",[44,228,229,235,238,241,244],{},[47,230,231,234],{},[26,232,233],{},"keywords"," is comma-validated, then each keyword uses NFKC, case, and whitespace normalization with ordered deduplication.",[47,236,237],{},"Recall scans each normalized keyword in declared order. Each keyword gets a full deterministic scan before the next; normalized whole phrases or identifier boundaries match primary ID, aliases, or context keywords on newest active version of each memory. A no-match keyword advances.",[47,239,240],{},"Selected primary IDs persist across scans, output order is deterministic, and each primary ID emits once. Manual recall does not exclude memories already loaded as context.",[47,242,243],{},"Only trusted complete XML memory blocks are returned. One cumulative model-visible UTF-16 budget of 7,000 characters carries across scans: whole blocks only; first overflow or exact-full accepted block stops entire lookup, with no bin-packing or later keyword scans.",[47,245,246],{},"Automatic recall output remains limited to 4,000 characters.",[162,248,250],{"id":249},"manual-forget-and-concurrent-saves","Manual forget and concurrent saves",[44,252,253,259,262,268,271,274],{},[47,254,255,258],{},[26,256,257],{},"id_keyword"," is normalized, then matches exact primary ID only; aliases and context keywords never match.",[47,260,261],{},"Forget deletes every timestamped active version for matching primary ID. Zero matches are idempotent success.",[47,263,264,265,267],{},"Before any removal, forget validates every active ",[26,266,56],{}," filename. A malformed filename aborts before deletes.",[47,269,270],{},"Forget removes at most 8 files concurrently. Filesystem errors use abort\u002Fretry behavior: successful partial deletes remain deleted, and retrying same exact ID safely removes remaining versions.",[47,272,273],{},"Results report IDs, counts, and locations, never memory bodies.",[47,275,276,277,279],{},"Pre-scan is a snapshot. A concurrent ",[26,278,28],{}," or save can create a new version after scan that survives this attempt; removal is best effort during concurrent saves, and retrying exact ID is safe.",[39,281,283,285],{"id":282},"learn-durable-memory",[26,284,28],{}," durable memory",[23,287,288,289,291],{},"Use ",[26,290,28],{}," for concise, durable facts: preferences, corrected fixes, environment configuration, project conventions, safety constraints, and verified findings. Do not store secrets, credentials, tokens, private keys, or temporary task progress. Learning, recall, and forget do not require trusted-attestation metadata.",[23,293,294,296],{},[26,295,28],{}," saves a local memory with a primary ID keyword, optional alias\u002Fcontext keywords, examples, and references. Its result reports saved filename, location, storage root, normalized ID, duplicate-keyword removal, same-time replacements, and recall status.",[23,298,299],{},"There is no legacy import, conversion, or seed step. The archive is outside active-memory scans.",[39,301,303,304,306],{"id":302},"reusable-skillmd-format","Reusable ",[26,305,36],{}," format",[23,308,309,310,312],{},"Each reusable ",[26,311,36],{}," starts with YAML frontmatter, followed by a Caveman English body.",[314,315,320],"pre",{"className":316,"code":317,"language":318,"meta":319,"style":319},"language-yaml shiki shiki-themes github-light github-dark","---\nname: \u003Cskill-name>\ndescription: Use this skill when [TRIGGER] to [BENEFIT]. NEVER for [EXCLUSIONS].\n---\n","yaml","",[26,321,322,331,346,357],{"__ignoreMap":319},[323,324,327],"span",{"class":325,"line":326},"line",1,[323,328,330],{"class":329},"sScJk","---\n",[323,332,334,338,342],{"class":325,"line":333},2,[323,335,337],{"class":336},"s9eBZ","name",[323,339,341],{"class":340},"sVt8B",": ",[323,343,345],{"class":344},"sZZnC","\u003Cskill-name>\n",[323,347,349,352,354],{"class":325,"line":348},3,[323,350,351],{"class":336},"description",[323,353,341],{"class":340},[323,355,356],{"class":344},"Use this skill when [TRIGGER] to [BENEFIT]. NEVER for [EXCLUSIONS].\n",[323,358,360],{"class":325,"line":359},4,[323,361,330],{"class":329},[44,363,364,369,374,377],{},[47,365,366,368],{},[26,367,337],{},": stable reusable skill name.",[47,370,371,373],{},[26,372,351],{},": caller-written trigger \u002F benefit \u002F exclusion guidance in Caveman English, maximum 40 words.",[47,375,376],{},"Body: reusable instructions in Caveman English.",[47,378,379],{},"Put detailed templates and companion material in references. Link every reference from the body using its exact relative path.",[39,381,383],{"id":382},"reusable-skill-creation-and-updates","Reusable skill creation and updates",[23,385,288,386,388,389,392,393,395],{},[26,387,32],{}," to create or update reusable skills and their ",[26,390,391],{},"references[]",". Keep reusable instructions, templates, and references in the skill directory; do not use ",[26,394,28],{}," as a skill-authoring path.",[39,397,399],{"id":398},"skill-discovery-and-loading","Skill discovery and loading",[23,401,402,403,60],{},"The agent system prompt instructs: check skill list before work; load a matching skill through ",[26,404,405],{},"skill",[23,407,408],{},"Skill roots are walked in priority order:",[410,411,412,415,418,424],"ol",{},[47,413,414],{},"Generated plugin-bundled skills.",[47,416,417],{},"Plugin skills parent.",[47,419,420,421,60],{},"Agent skills under ",[26,422,423],{},".agents\u002Fskills\u002F",[47,425,426,427,60],{},"Project skills under ",[26,428,429],{},".opencode\u002Fskills\u002F",[44,431,432,438,441,448],{},[47,433,434,435,60],{},"Match logic is exact name match: ",[26,436,437],{},"candidate.name === name",[47,439,440],{},"Dedup cache: 30-minute TTL, 256 maximum entries per session, keyed by session ID + identity + hash.",[47,442,443,444,447],{},"Legacy ",[26,445,446],{},".agents\u002Fskills\u002Flearned-*"," categories are not registered or discovered. Ordinary reusable skills remain discoverable.",[47,449,450,453],{},[26,451,452],{},".opencode\u002Fautocode\u002Fmemory-archive\u002Fv1\u002F"," is outside skill discovery and active-memory scans.",[39,455,457],{"id":456},"recovering-an-archived-skill-artifact","Recovering an archived skill artifact",[23,459,460,461,464,465,467,468,470],{},"Archived files retain their original path below ",[26,462,463],{},"v1\u002F",". To recover or inspect one old skill artifact, copy the selected ",[26,466,36],{}," to that original relative path only. A restored legacy ",[26,469,446],{}," path remains excluded from skill discovery and is not an active memory.",[39,472,474],{"id":473},"see-also","See also",[44,476,477,484],{},[47,478,479,60],{},[480,481,483],"a",{"href":482},"configuration","Configuration reference",[47,485,486,60],{},[480,487,489],{"href":488},"usage","Usage guide",[491,492,493],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":319,"searchDepth":333,"depth":333,"links":495},[496,501,503,505,506,507,508],{"id":41,"depth":333,"text":42,"children":497},[498,499,500],{"id":164,"depth":348,"text":165},{"id":225,"depth":348,"text":226},{"id":249,"depth":348,"text":250},{"id":282,"depth":333,"text":502},"learn durable memory",{"id":302,"depth":333,"text":504},"Reusable SKILL.md format",{"id":382,"depth":333,"text":383},{"id":398,"depth":333,"text":399},{"id":456,"depth":333,"text":457},{"id":473,"depth":333,"text":474},"learn stores a durable local memory. skill_edit creates or updates a reusable skill. Local memories are not reusable SKILL.md documents.","md",{},"\u002Fskill",{"title":14,"description":509},"M3UkcCLQnoBb0K68Py0AfwiakZrnGi3bzK9RVfPB2Qw",1789711705499]