[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6E0DMVEV7CGVJT628JJ4SVC":3,"skill-same:01M6E0DMVEV7CGVJT628JJ4SVC":81},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":14,"repositoryHtmlUrl":53,"repositoryHomepageUrl":6,"ownerHtmlUrl":54,"ownerBlogUrl":55,"ownerDescription":56,"updatedAt":57,"install":58,"resources":70},"01M6E0DMVEV7CGVJT628JJ4SVC","knowledge-loop",null,"Composite skill — query, capture, improve, and persist knowledge in one workflow. Chains recall (RAG query) → sync-memories (write durable note) → rag-curate (improve weak retrievals) → handoff (durable snapshot if session-ending). Use when the work involves \"what did we decide\", \"remember this\", \"save where we are\", or any closing checkpoint.","LucasSantana-Dev\u002Fforgekit","LucasSantana-Dev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F98131142?v=4","01M6E038X8H7VE9GCEJP9PT5CA","Lucas Santana","01M6E0391WB0JYZTWXEBR9WSXA",1,"MIT","https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit\u002Fblob\u002Fmain\u002Fpackages\u002Fcatalog\u002Fcatalog\u002Fskills\u002Fadt-knowledge-loop\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"knowledge loop","knowledge","loop","decide","end","memories","query","task","curate","use","session","write","workflow","work","recall","improve","checkpoint","rag","remember","sync","2026-11-10 10:12:30",false,"---\nname: knowledge-loop\ndescription: Composite skill — query, capture, improve, and persist knowledge in one workflow. Chains recall (RAG query) → sync-memories (write durable note) → rag-curate (improve weak retrievals) → handoff (durable snapshot if session-ending). Use when the work involves \"what did we decide\", \"remember this\", \"save where we are\", or any closing checkpoint.\nuser-invocable: true\nauto-invoke: end-of-task + recall-questions + checkpoint-requests\nmetadata:\n  owner: global-agents\n  tier: contextual\n  canonical_source: ~\u002F.claude\u002Fskills\u002Fknowledge-loop\n---\n\n# Knowledge Loop\n\nUnifies the three knowledge systems (RAG index, claude-mem, handoffs) into one workflow\nso capture and retrieval stop being separate manual acts.\n\n## Auto-invocation triggers\n\n- User asks \"what did we decide about X\" \u002F \"where did we leave Y\" \u002F \"is there a memory note for Z\"\n- End of a meaningful task (commit landed, PR merged, decision reached)\n- User explicitly says \"remember\", \"save this\", \"checkpoint\", \"handoff\"\n- Session-budget guard signals approaching context limit\n\n## Workflow\n\n### Phase 1 — Query (always)\nInvoke `recall` (or `adt-rag-recall` for repo-scoped queries) with the user's question\nor the active task topic. If the user is asking a recall question, return the answer\nimmediately and skip Phase 2\u002F3 unless they also asked to capture something.\n\n### Phase 2 — Capture (if new knowledge produced)\nInvoke `sync-memories` with what was learned, decided, or built this session. Skip if\nthe session was pure read\u002Frecall with no durable output.\n\n### Phase 3 — Improve (conditional)\nIf recall returned weak hits (cosine \u003C0.40) for a query that should have hit something,\ninvoke `rag-curate` to add the missing doc or rewrite the weak chunk. Skip if recall\nwas strong.\n\n### Phase 4 — Snapshot (if session-ending or context-pressured)\nInvoke `handoff` to write a durable resume packet. Skip if work continues immediately.\n\n## Reconciliation\n\nOutput a single capture summary:\n```\nKNOWLEDGE LOOP — \u003Ctopic>\n  Recalled:  \u003Cn> hits, top cosine \u003CX> (skill: recall)\n  Captured:  \u003Cmemory file paths> (skill: sync-memories)\n  Improved:  \u003Cchunks rewritten \u002F docs added> (skill: rag-curate)\n  Snapshot:  \u003Chandoff path> (skill: handoff)\n```\n\nIf a phase was skipped, mark it `(skipped: \u003Creason>)` so the trail is visible.\n\n## Outputs \u002F Evidence\n\n- Recall results inline\n- Memory files written (paths + one-line preview)\n- RAG re-index confirmation (chunk delta)\n- Handoff path if Phase 4 ran\n\n## Failure \u002F Stop Conditions\n\n- If recall returns nothing AND no new knowledge was produced this session → exit clean,\n  no capture needed\n- If `sync-memories` and `rag-curate` would write to the same file → consolidate writes\n  to avoid double-update churn\n- Never skip Phase 4 if context is >80% — handoff is required for cross-session continuity\n\n## Worked example\n\nEnd of a multi-round token-optimization session that shipped 15 hooks + a \u002Fcaveman skill + autocompact tuning.\n\n```\nKNOWLEDGE LOOP — token optimization rounds 1-4\n  Recalled:  3 hits, top cos 0.50 (skill: recall)\n  Captured:  token_opt_round4_2026-05-13.md + token_baseline_2026-05-13.md\n             (skill: sync-memories — manual write because the work was\n              still in-flight when the prompt arrived)\n  Improved:  (skipped: RAG hits strong, no curation needed — top cos 0.50\n              is above the 0.40 weak-hit threshold)\n  Snapshot:  handoffs\u002Flatest.md + precompact_snapshot_2026-05-13T23-53-44Z.md\n             (skill: handoff — auto-written by PreCompact hook 5 min earlier,\n              so phase 4 was effectively idempotent)\n```\n\nKey points the example demonstrates:\n- Each phase output names the underlying skill, even when invoked indirectly (PreCompact hook fired `handoff` for me).\n- A skipped phase says **why**, not just \"skipped\" — the threshold (cos 0.40) is the audit trail.\n- Capture and Snapshot can land in the same turn without conflict; both write to `memory\u002F`.\n","# Knowledge Loop\n\nUnifies the three knowledge systems (RAG index, claude-mem, handoffs) into one workflow\nso capture and retrieval stop being separate manual acts.\n\n## Auto-invocation triggers\n\n- User asks \"what did we decide about X\" \u002F \"where did we leave Y\" \u002F \"is there a memory note for Z\"\n- End of a meaningful task (commit landed, PR merged, decision reached)\n- User explicitly says \"remember\", \"save this\", \"checkpoint\", \"handoff\"\n- Session-budget guard signals approaching context limit\n\n## Workflow\n\n### Phase 1 — Query (always)\nInvoke `recall` (or `adt-rag-recall` for repo-scoped queries) with the user's question\nor the active task topic. If the user is asking a recall question, return the answer\nimmediately and skip Phase 2\u002F3 unless they also asked to capture something.\n\n### Phase 2 — Capture (if new knowledge produced)\nInvoke `sync-memories` with what was learned, decided, or built this session. Skip if\nthe session was pure read\u002Frecall with no durable output.\n\n### Phase 3 — Improve (conditional)\nIf recall returned weak hits (cosine \u003C0.40) for a query that should have hit something,\ninvoke `rag-curate` to add the missing doc or rewrite the weak chunk. Skip if recall\nwas strong.\n\n### Phase 4 — Snapshot (if session-ending or context-pressured)\nInvoke `handoff` to write a durable resume packet. Skip if work continues immediately.\n\n## Reconciliation\n\nOutput a single capture summary:\n```\nKNOWLEDGE LOOP — \u003Ctopic>\n  Recalled:  \u003Cn> hits, top cosine \u003CX> (skill: recall)\n  Captured:  \u003Cmemory file paths> (skill: sync-memories)\n  Improved:  \u003Cchunks rewritten \u002F docs added> (skill: rag-curate)\n  Snapshot:  \u003Chandoff path> (skill: handoff)\n```\n\nIf a phase was skipped, mark it `(skipped: \u003Creason>)` so the trail is visible.\n\n## Outputs \u002F Evidence\n\n- Recall results inline\n- Memory files written (paths + one-line preview)\n- RAG re-index confirmation (chunk delta)\n- Handoff path if Phase 4 ran\n\n## Failure \u002F Stop Conditions\n\n- If recall returns nothing AND no new knowledge was produced this session → exit clean,\n  no capture needed\n- If `sync-memories` and `rag-curate` would write to the same file → consolidate writes\n  to avoid double-update churn\n- Never skip Phase 4 if context is >80% — handoff is required for cross-session continuity\n\n## Worked example\n\nEnd of a multi-round token-optimization session that shipped 15 hooks + a \u002Fcaveman skill + autocompact tuning.\n\n```\nKNOWLEDGE LOOP — token optimization rounds 1-4\n  Recalled:  3 hits, top cos 0.50 (skill: recall)\n  Captured:  token_opt_round4_2026-05-13.md + token_baseline_2026-05-13.md\n             (skill: sync-memories — manual write because the work was\n              still in-flight when the prompt arrived)\n  Improved:  (skipped: RAG hits strong, no curation needed — top cos 0.50\n              is above the 0.40 weak-hit threshold)\n  Snapshot:  handoffs\u002Flatest.md + precompact_snapshot_2026-05-13T23-53-44Z.md\n             (skill: handoff — auto-written by PreCompact hook 5 min earlier,\n              so phase 4 was effectively idempotent)\n```\n\nKey points the example demonstrates:\n- Each phase output names the underlying skill, even when invoked indirectly (PreCompact hook fired `handoff` for me).\n- A skipped phase says **why**, not just \"skipped\" — the threshold (cos 0.40) is the audit trail.\n- Capture and Snapshot can land in the same turn without conflict; both write to `memory\u002F`.\n",{"name":5,"metadata":44,"auto-invoke":48,"description":7,"user-invocable":49},{"tier":45,"owner":46,"canonical_source":47},"contextual","global-agents","~\u002F.claude\u002Fskills\u002Fknowledge-loop","end-of-task + recall-questions + checkpoint-requests",true,"main","4081c4af3adf7955205b04e1f4a7eb3cebaea9f6","packages\u002Fcatalog\u002Fcatalog\u002Fskills\u002Fadt-knowledge-loop","https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit","https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev","https:\u002F\u002Flucassantana.tech","Senior engineer. AI agent tooling and evals on Node\u002FTS backends. Brazil, UTC-3.","2026-11-14 10:13:13",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":49},[60,63,66],{"tool":61,"command":62},"npx","npx skills add LucasSantana-Dev\u002Fforgekit --skill knowledge-loop",{"tool":64,"command":65},"bunx","bunx skills add LucasSantana-Dev\u002Fforgekit --skill knowledge-loop",{"tool":67,"command":68},"pnpm","pnpm dlx skills add LucasSantana-Dev\u002Fforgekit --skill knowledge-loop","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit\u002Fblob\u002Fmain\u002Fpackages\u002Fcatalog\u002Fcatalog\u002Fskills\u002Fadt-knowledge-loop\u002FSKILL.md",[71,77],{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"evals.json","REFERENCE","参考文档",684,"https:\u002F\u002Fgithub.com\u002Flookatitude\u002Fguild\u002Fblob\u002Fmain\u002Fskills\u002Fspecialists\u002Fmobile-performance-tuning\u002Fevals.json",{"path":78,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":79,"sourceHtmlUrl":80},"manifest.json",1222,"https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit\u002Fblob\u002Fmain\u002Fpackages\u002Fcatalog\u002Fcatalog\u002Fskills\u002Fadt-knowledge-loop\u002Fmanifest.json",[82,108,135,156,165,183],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":39},"01M6WR9SQGQ5WDEJY9HH3T93E8","token-audit","Audit historical Claude Code token usage from JSONL session files — shows total spend, cache hit rates, top costly sessions, weekly trends, and where tokens are going. Run after heavy sessions or weekly to measure optimization impact. Answers how many tokens a session used, how expensive was that session, session cost, and token usage report.","https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit\u002Fblob\u002Fmain\u002Fpackages\u002Fcatalog\u002Fcatalog\u002Fskills\u002Fadt-token-audit\u002FSKILL.md",[],[89,90,91,29,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107],"audit","token","token audit","rate","weekly","top","usage","jsonl","usage report","impact","tokens","files","cost","how","Optimization","cache","code","run","sessions",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":39},"01M6WR919T3NGWMZ5R5XKWX9KN","smart-model-route","Auto-classify prompt complexity via Haiku (with heuristic fallback) and inject model routing hints for Agent tool calls. Wired as a UserPromptSubmit hook — fires on every prompt, routes low tasks to Haiku, standard to Sonnet, complex to Sonnet with thorough reasoning, and critical (security\u002Farch\u002Fmigrations) to Opus. Handles model selection, for example choose model by task complexity.","https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit\u002Fblob\u002Fmain\u002Fpackages\u002Fcatalog\u002Fcatalog\u002Fskills\u002Fadt-smart-model-route\u002FSKILL.md",[],[115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134],"smart model route","route","model route","model","security","model selection","tasks","critical","arch","classify","selection","fallback","complexity","auto","opus","haiku","choose","hook","agent tool","sonnet",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":39},"01M6WR8TMGS9G79DFTX0K1ZA8T","smart-commands","Decision guide for when to proactively use Claude Code slash commands — \u002Fthink, \u002Fmodel, \u002Fcompact, \u002Fclear. Use when choosing whether to invoke a command before or during a task, or when a complexity-classifier hook has flagged a task as high or critical. Pairs with the complexity-classifier UserPromptSubmit hook. Answers when to compact, should I switch models, and whether to use extended thinking. Use to pick the right \u002Fmodel command and switch model.","https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit\u002Fblob\u002Fmain\u002Fpackages\u002Fcatalog\u002Fcatalog\u002Fskills\u002Fadt-smart-commands\u002FSKILL.md",[],[142,143,144,145,28,146,132,122,147,148,149,150,127,151,152,153,154,155,118,105],"smart commands","commands","when","as","for","compact","thinking","switch","classifier","invoke","guide","command","decision","pick",{"skillNo":157,"name":158,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":39},"01M6E0ZGQ78S4SE6X6RCN1PR9A","spec-ship","https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fkit\u002Fspecs\u002Fskills\u002Fspec-ship\u002FSKILL.md",[],[162,163,164],"spec","ship","spec ship",{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":169,"categories":170,"keywords":171,"publishedAt":39},"01M6E0ZD27S87Z954JTHECWG34","spec-new","Create a committed per-feature spec under `docs\u002Fspecs\u002FYYYY-MM-DD-\u003Cslug>\u002F{spec,tasks}.md` with frontmatter (status, created, owner, pr, tags). Promotes an ephemeral `.claude\u002Fplans\u002F\u003Cname>.md` into a persistent, searchable artifact. Use when starting a feature that's larger than a one-shot PR.","https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fkit\u002Fspecs\u002Fskills\u002Fspec-new\u002FSKILL.md",[],[172,162,173,28,174,175,121,176,177,178,179,180,181,182],"spec new","artifact","dd","create","pr","status","docs","feature","tags","name","plans",{"skillNo":184,"name":185,"nameZh":6,"description":186,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":187,"categories":188,"keywords":189,"publishedAt":39},"01M6E0Z9B5YE1G4NM05JPNVWMK","roadmap-refresh","Regenerate `docs\u002Froadmap.md` for a repo from all specs under `docs\u002Fspecs\u002F` + their frontmatter (status, tags, pr). Produces Now\u002FNext\u002FRecently-shipped sections. Run after creating \u002F shipping a spec, or at the start of a new session for orientation.","https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fkit\u002Fspecs\u002Fskills\u002Froadmap-refresh\u002FSKILL.md",[],[190,191,192,193,180,194,29,195,196,197,198,106,176,177,178,162],"roadmap refresh","roadmap","refresh","next","now","repo","new session","start","shipping"]