{"id":"e7f79e8f-ec63-4c2a-9063-65fe90944d17","shortId":"Bv9F7t","kind":"skill","title":"chatcrystal-task-writeback","tagline":"Write reusable ChatCrystal task memories after substantive work completes. Use when implementation or debugging produced a durable fix, pitfall, pattern, or decision worth preserving, and when the environment can either persist it through `write_task_memory` or emit a structured ","description":"# ChatCrystal Task Writeback\n\nUse this skill after meaningful work completes. Let ChatCrystal Core decide whether a memory should be skipped, merged, or created.\n\n## Workflow\n\n1. Trigger only after substantive work completes and the result produced reusable knowledge.\n2. Good candidates include:\n   - a durable fix\n   - a meaningful pitfall\n   - a reusable pattern\n   - an explicit engineering decision\n\n## Quality Gate Preflight\n\nBefore calling `write_task_memory`, verify the candidate is an experience asset, not a work log.\n\nDo not call `write_task_memory` when:\n\n- The summary only says what changed, without why it mattered.\n- There is no clear problem, decision, pitfall, resolution, or reusable pattern.\n- The task produced no durable lesson for future work.\n\nRequired field shape by `memory.outcome_type`:\n\n- `fix`: include `root_cause` or `resolution`.\n- `pitfall`: include `pitfalls` plus `resolution` or `reusable_patterns`.\n- `decision`: include `decisions`.\n- `pattern`: include `reusable_patterns`.\n\nWrite `memory.summary` as a durable experience conclusion, not as \"I did X\".\nAutomatic writeback must include `source_run_key`; without it, emit a structured candidate for later save instead of silently writing manual memory.\n\n3. If `write_task_memory` is available and the runtime has a stable run or session key, call it with:\n   - `mode: \"auto\"`\n   - `source_run_key`: the stable run or session key\n   - `task.goal`, `task.task_kind`, `task.project_dir`, `task.cwd`, `task.branch`\n   - `task.source_agent` when known\n   - `memory.summary`: concise and durable, not chatty\n   - `memory.outcome_type`: one of `pitfall`, `fix`, `pattern`, `decision`\n   - `memory.root_cause`, `memory.resolution`, `memory.error_signatures`, `memory.files_touched`, `memory.tags` when relevant\n4. Use `mode: \"manual\"` only for an explicit manual save flow, never as a silent fallback for automatic writeback.\n5. Default to project-scoped knowledge. Only use global scope for clearly cross-project knowledge and only in an explicit manual save flow.\n6. Report the persistence result accurately:\n   - `created`\n   - `merged`\n   - `skipped`\n\n## Example MCP Input\n\nUse this shape when calling `write_task_memory` after a completed task with a stable run key:\n\n```json\n{\n  \"mode\": \"auto\",\n  \"source_run_key\": \"agent-session-or-run-id\",\n  \"scope\": \"project\",\n  \"task\": {\n    \"goal\": \"Fix MCP recall schema validation\",\n    \"task_kind\": \"debug\",\n    \"project_dir\": \"/path/to/project\",\n    \"cwd\": \"/path/to/project\",\n    \"branch\": \"fix/mcp-recall-schema\",\n    \"files_touched\": [\n      \"server/src/services/memory/schemas.ts\",\n      \"server/src/cli/mcp/server.ts\"\n    ],\n    \"error_signatures\": [\n      \"invalid_type\",\n      \"recall_for_task schema mismatch\"\n    ],\n    \"source_agent\": \"codex\"\n  },\n  \"memory\": {\n    \"summary\": \"MCP tool schemas must stay aligned with memory service request shapes; mismatches surface as validation failures before tool execution.\",\n    \"outcome_type\": \"fix\",\n    \"root_cause\": \"The MCP tool input shape diverged from the service schema.\",\n    \"resolution\": \"Reused the shared request shape in the MCP server registration.\",\n    \"files_touched\": [\n      \"server/src/services/memory/schemas.ts\",\n      \"server/src/cli/mcp/server.ts\"\n    ],\n    \"tags\": [\n      \"mcp\",\n      \"memory-loop\",\n      \"schema\"\n    ]\n  }\n}\n```\n\n## Full Mode\n\nFull mode requires ChatCrystal Core plus MCP access to `write_task_memory`.\n\n- Do not reimplement skip or merge logic in the skill.\n- Trust Core to decide whether the memory should be skipped, merged, or created.\n- If the tool reports `skipped`, keep the task result but do not force persistence.\n\n## Degraded Mode\n\nIf ChatCrystal Core or the MCP tool is unavailable, or if no stable run key exists for automatic writeback:\n\n- Do not claim that the memory was saved.\n- Emit a structured memory candidate in the response for later save.\n- Keep the candidate aligned with the `write_task_memory.memory` payload shape so it can be reused later.\n- Do not instruct the runtime to auto-install ChatCrystal Core as part of the skill flow.","tags":["chatcrystal","task","writeback","zengliangyi","agent-skills","ai-memory","ai-tools","claude-code","codex","cursor","electron","knowledge-graph"],"capabilities":["skill","source-zengliangyi","skill-chatcrystal-task-writeback","topic-agent-skills","topic-ai-memory","topic-ai-tools","topic-claude-code","topic-codex","topic-cursor","topic-electron","topic-knowledge-graph","topic-knowledge-management","topic-llm","topic-mcp","topic-mcp-server"],"categories":["ChatCrystal"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/ZengLiangYi/ChatCrystal/chatcrystal-task-writeback","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add ZengLiangYi/ChatCrystal","source_repo":"https://github.com/ZengLiangYi/ChatCrystal","install_from":"skills.sh"}},"qualityScore":"0.460","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 20 github stars · SKILL.md body (4,087 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:05:39.807Z","embedding":null,"createdAt":"2026-04-24T07:02:28.179Z","updatedAt":"2026-05-18T19:05:39.807Z","lastSeenAt":"2026-05-18T19:05:39.807Z","tsv":"'/path/to/project':381,383 '1':69 '2':82 '3':216 '4':282 '5':301 '6':326 'access':468 'accur':331 'agent':255,362,400 'agent-session-or-run-id':361 'align':409,553 'asset':113 'auto':237,357,572 'auto-instal':571 'automat':194,299,529 'avail':222 'branch':384 'call':103,120,233,342 'candid':84,109,206,543,552 'caus':164,273,427 'chang':130 'chatcryst':2,7,45,56,464,513,574 'chatcrystal-task-writeback':1 'chatti':263 'claim':533 'clear':138,313 'codex':401 'complet':13,54,75,348 'concis':259 'conclus':188 'core':57,465,484,514,575 'creat':67,332,495 'cross':315 'cross-project':314 'cwd':382 'debug':18,378 'decid':58,486 'decis':26,98,140,175,177,271 'default':302 'degrad':510 'dir':251,380 'diverg':433 'durabl':21,87,150,186,261 'either':34 'emit':42,203,539 'engin':97 'environ':32 'error':390 'exampl':335 'execut':422 'exist':527 'experi':112,187 'explicit':96,289,322 'failur':419 'fallback':297 'field':156 'file':386,449 'fix':22,88,161,269,371,425 'fix/mcp-recall-schema':385 'flow':292,325,581 'forc':508 'full':459,461 'futur':153 'gate':100 'global':310 'goal':370 'good':83 'id':366 'implement':16 'includ':85,162,168,176,179,197 'input':337,431 'instal':573 'instead':210 'instruct':567 'invalid':392 'json':355 'keep':501,550 'key':200,232,240,246,354,360,526 'kind':249,377 'knowledg':81,307,317 'known':257 'later':208,548,564 'lesson':151 'let':55 'log':117 'logic':479 'loop':457 'manual':214,285,290,323 'matter':134 'mcp':336,372,404,429,446,454,467,517 'meaning':52,90 'memori':9,40,61,106,123,215,220,345,402,411,456,472,489,536,542 'memory-loop':455 'memory.error':275 'memory.files':277 'memory.outcome':159,264 'memory.resolution':274 'memory.root':272 'memory.summary':183,258 'memory.tags':279 'merg':65,333,478,493 'mismatch':398,415 'mode':236,284,356,460,462,511 'must':196,407 'never':293 'one':266 'outcom':423 'part':577 'pattern':24,94,145,174,178,181,270 'payload':557 'persist':35,329,509 'pitfal':23,91,141,167,169,268 'plus':170,466 'preflight':101 'preserv':28 'problem':139 'produc':19,79,148 'project':305,316,368,379 'project-scop':304 'qualiti':99 'recal':373,394 'registr':448 'reimplement':475 'relev':281 'report':327,499 'request':413,442 'requir':155,463 'resolut':142,166,171,438 'respons':546 'result':78,330,504 'reus':439,563 'reusabl':6,80,93,144,173,180 'root':163,426 'run':199,229,239,243,353,359,365,525 'runtim':225,569 'save':209,291,324,538,549 'say':128 'schema':374,397,406,437,458 'scope':306,311,367 'server':447 'server/src/cli/mcp/server.ts':389,452 'server/src/services/memory/schemas.ts':388,451 'servic':412,436 'session':231,245,363 'shape':157,340,414,432,443,558 'share':441 'signatur':276,391 'silent':212,296 'skill':50,482,580 'skill-chatcrystal-task-writeback' 'skip':64,334,476,492,500 'sourc':198,238,358,399 'source-zengliangyi' 'stabl':228,242,352,524 'stay':408 'structur':44,205,541 'substant':11,73 'summari':126,403 'surfac':416 'tag':453 'task':3,8,39,46,105,122,147,219,344,349,369,376,396,471,503 'task.branch':253 'task.cwd':252 'task.goal':247 'task.project':250 'task.source':254 'task.task':248 'tool':405,421,430,498,518 'topic-agent-skills' 'topic-ai-memory' 'topic-ai-tools' 'topic-claude-code' 'topic-codex' 'topic-cursor' 'topic-electron' 'topic-knowledge-graph' 'topic-knowledge-management' 'topic-llm' 'topic-mcp' 'topic-mcp-server' 'touch':278,387,450 'trigger':70 'trust':483 'type':160,265,393,424 'unavail':520 'use':14,48,283,309,338 'valid':375,418 'verifi':107 'whether':59,487 'without':131,201 'work':12,53,74,116,154 'workflow':68 'worth':27 'write':5,38,104,121,182,213,218,343,470 'write_task_memory.memory':556 'writeback':4,47,195,300,530 'x':193","prices":[{"id":"d3d433cd-dc30-4fb3-a750-34c20a7bad5f","listingId":"e7f79e8f-ec63-4c2a-9063-65fe90944d17","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"ZengLiangYi","category":"ChatCrystal","install_from":"skills.sh"},"createdAt":"2026-04-24T07:02:28.179Z"}],"sources":[{"listingId":"e7f79e8f-ec63-4c2a-9063-65fe90944d17","source":"github","sourceId":"ZengLiangYi/ChatCrystal/chatcrystal-task-writeback","sourceUrl":"https://github.com/ZengLiangYi/ChatCrystal/tree/main/skills/chatcrystal-task-writeback","isPrimary":false,"firstSeenAt":"2026-04-24T07:02:28.179Z","lastSeenAt":"2026-05-18T19:05:39.807Z"}],"details":{"listingId":"e7f79e8f-ec63-4c2a-9063-65fe90944d17","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"ZengLiangYi","slug":"chatcrystal-task-writeback","github":{"repo":"ZengLiangYi/ChatCrystal","stars":20,"topics":["agent-skills","ai-memory","ai-tools","claude-code","codex","cursor","electron","knowledge-graph","knowledge-management","llm","mcp","mcp-server","ollama","semantic-search"],"license":"mit","html_url":"https://github.com/ZengLiangYi/ChatCrystal","pushed_at":"2026-05-15T08:12:43Z","description":"Crystallize knowledge from AI conversations. Import from Claude Code / Cursor / Codex CLI,   summarize with LLM, search by semantics.","skill_md_sha":"dd783feee692a1113931f84567c5580d947ea9ca","skill_md_path":"skills/chatcrystal-task-writeback/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/ZengLiangYi/ChatCrystal/tree/main/skills/chatcrystal-task-writeback"},"layout":"multi","source":"github","category":"ChatCrystal","frontmatter":{"name":"chatcrystal-task-writeback","description":"Write reusable ChatCrystal task memories after substantive work completes. Use when implementation or debugging produced a durable fix, pitfall, pattern, or decision worth preserving, and when the environment can either persist it through `write_task_memory` or emit a structured memory candidate for later save."},"skills_sh_url":"https://skills.sh/ZengLiangYi/ChatCrystal/chatcrystal-task-writeback"},"updatedAt":"2026-05-18T19:05:39.807Z"}}