[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CNZBYHVWD7KNAZZSH80WAP":3,"skill-same:01M7CNZBYHVWD7KNAZZSH80WAP":50},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":43},"01M7CNZBYHVWD7KNAZZSH80WAP","claude-restore-skills",null,"Claude Code hook that restores the text of user-invoked skills after a compaction or resume drops it from context.","syanga\u002Fastack","syanga","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42523849?v=4","01M7CNYD2SW40HXC8R8CTVJPGE","Alan Yang","01M7CNYD3D0B0EYPA4AGXC1VC8",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fclaude-restore-skills\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: claude-restore-skills\ndescription: Claude Code hook that restores the text of user-invoked skills after a compaction or resume drops it from context.\ndisable-model-invocation: true\n---\n\n# Restore user-invoked skills after compaction or resume\n\n`scripts\u002Fhook.py` is a Claude Code `SessionStart` hook for the `resume` and\n`compact` sources. It reads the session transcript and finds each skill the user\ninvoked with a slash command. For each one whose text is no longer in context,\nit adds the skill's current `SKILL.md` text and the invocation's arguments. When\nthe file is gone, it uses the text recorded at invocation. It skips skills the\nmodel invoked through the Skill tool, because the model can invoke those again.\n\nThe hook also skips invocations on branches abandoned by a rewind. When the\nfirst entry after a rewind has a parent missing from the transcript, the hook\ncannot tell the abandoned branch from lost entries. It can then restore that\nbranch's skills.\n\nThe hook splits its output into parts. The comment on `PARTS` in\n`scripts\u002Fhook.py` says why. When the skills do not fit in all parts together,\nthe hook leaves out the oldest skills until the rest fit and lists their files\nand arguments. If the newest skill alone does not fit, the hook cuts it and\npoints to its file.\n\nAfter a compaction, Claude Code sometimes attaches its own copy of a skill, cut\nat 20,000 characters. It attaches that copy after the hook runs, so the skill\narrives twice. On a later resume, the hook skips a skill whose copy in context\nis complete.\n","# Restore user-invoked skills after compaction or resume\n\n`scripts\u002Fhook.py` is a Claude Code `SessionStart` hook for the `resume` and\n`compact` sources. It reads the session transcript and finds each skill the user\ninvoked with a slash command. For each one whose text is no longer in context,\nit adds the skill's current `SKILL.md` text and the invocation's arguments. When\nthe file is gone, it uses the text recorded at invocation. It skips skills the\nmodel invoked through the Skill tool, because the model can invoke those again.\n\nThe hook also skips invocations on branches abandoned by a rewind. When the\nfirst entry after a rewind has a parent missing from the transcript, the hook\ncannot tell the abandoned branch from lost entries. It can then restore that\nbranch's skills.\n\nThe hook splits its output into parts. The comment on `PARTS` in\n`scripts\u002Fhook.py` says why. When the skills do not fit in all parts together,\nthe hook leaves out the oldest skills until the rest fit and lists their files\nand arguments. If the newest skill alone does not fit, the hook cuts it and\npoints to its file.\n\nAfter a compaction, Claude Code sometimes attaches its own copy of a skill, cut\nat 20,000 characters. It attaches that copy after the hook runs, so the skill\narrives twice. On a later resume, the hook skips a skill whose copy in context\nis complete.\n",{"name":5,"description":7,"disable-model-invocation":24},true,"main","ec1ea5dc71f382a2a09360a736d31b7294e5ecc2","skills\u002Fclaude-restore-skills","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack","https:\u002F\u002Fgithub.com\u002Fsyanga","2026-11-14 17:01:29",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":24},[33,36,39],{"tool":34,"command":35},"npx","npx skills add syanga\u002Fastack --skill claude-restore-skills",{"tool":37,"command":38},"bunx","bunx skills add syanga\u002Fastack --skill claude-restore-skills",{"tool":40,"command":41},"pnpm","pnpm dlx skills add syanga\u002Fastack --skill claude-restore-skills","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fclaude-restore-skills\u002FSKILL.md",[44],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"scripts\u002Fhook.py","SCRIPT","脚本",18373,"https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fclaude-restore-skills\u002Fscripts\u002Fhook.py",[51,58,66,74,82,90],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M7CP39S6D7662SFCC9K286T7","replace-with-skill-name","Replace with when this skill should be reached.","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Ftemplates\u002Fskill\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":62,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7CP37YN62Z7VR6P2J7918ZA","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-for-agents\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":70,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7CP353RP2S1M1ZMHFZ0F610","worktree-cleanup","Worktree cleanup. Use for cleanup, resource audits, close this lane, or close out.","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fworktree-cleanup\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fworktree-cleanup\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":78,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7CP32DSVPRTBAFHF1P6NZ1X","wizard","Generate an interactive Bash wizard that walks a human through steps only they can perform. Use when provisioning, credential setup, or a one-off migration needs such steps.","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fwizard\u002FLICENSE-mattpocock","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fwizard\u002FSKILL.md",[],[],{"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":86,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7CP2YE3WABQE9MNY8RQD6MX","why","Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Returns a cited read on decisions and tradeoffs.","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fwhy\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fwhy\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":94,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7CP2VP8JA1HYDE8TJX2Y494","wayfinder","Plan a huge chunk of work (more than one agent session can hold) as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fwayfinder\u002FLICENSE-mattpocock","https:\u002F\u002Fgithub.com\u002Fsyanga\u002Fastack\u002Fblob\u002Fmain\u002Fskills\u002Fwayfinder\u002FSKILL.md",[],[]]