[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DBTA1KBSNV22ZBCAAH2HN7":3,"skill-same:01M7DBTA1KBSNV22ZBCAAH2HN7":58},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7DBTA1KBSNV22ZBCAAH2HN7","restore-legacy-sessions",null,"Use when ZCode needs to inspect, plan, or execute restoration of old ACP-era ZCode sessions from ~\u002F.zcode\u002Fv2\u002Fsessions into the new ZCode task\u002Fsession stores. Trigger when the user wants to choose a previous agent, select a workspace to restore, pick a specific historical conversation, dry-run legacy session migration, or reason about tasks-index.sqlite and ~\u002F.zcode\u002Fcli\u002Fdb\u002Fdb.sqlite consistency.","ZCodium-project\u002FZCodium","ZCodium-project","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F331969751?v=4","01M7DBKVDM2CY9G27NC8F39MCG","ZCodium","01M7DBKVEPNTJN0R8FNRV88JEH",253,"MIT","https:\u002F\u002Fgithub.com\u002FZCodium-project\u002FZCodium\u002Fblob\u002Fmain\u002Fapps\u002Fzcode-cli\u002Fpackages\u002Frestore-legacy-sessions-plugin\u002Fskills\u002Frestore-legacy-sessions\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: restore-legacy-sessions\ndescription: Use when ZCode needs to inspect, plan, or execute restoration of old ACP-era ZCode sessions from ~\u002F.zcode\u002Fv2\u002Fsessions into the new ZCode task\u002Fsession stores. Trigger when the user wants to choose a previous agent, select a workspace to restore, pick a specific historical conversation, dry-run legacy session migration, or reason about tasks-index.sqlite and ~\u002F.zcode\u002Fcli\u002Fdb\u002Fdb.sqlite consistency.\n---\n\n# Restore Legacy Sessions\n\n## Overview\n\nUse this skill to guide old ACP-era ZCode session restoration. The first job is selection, not mutation: identify the source agent, the workspace, and the exact conversation before proposing any write to the new stores.\n\n## Stores\n\n- Legacy snapshots: `~\u002F.zcode\u002Fv2\u002Fsessions\u002F{workspaceHash}\u002F{legacyTaskId}.json`\n- Task index: `~\u002F.zcode\u002Fv2\u002Ftasks-index.sqlite`\n- New ZCode session DB: `~\u002F.zcode\u002Fcli\u002Fdb\u002Fdb.sqlite`\n\nUse `restoredTaskId = meta.acpSessionId || meta.taskId`. The legacy snapshot filename and `meta.taskId` are historical IDs; the app task list often uses `meta.acpSessionId` as the real task\u002Fsession ID.\n\nThe scan script defaults to the live legacy source `~\u002F.zcode\u002Fv2\u002Fsessions`; pass `--legacy-dir \u003Cpath>` only when the user explicitly asks to inspect another source directory.\n\nRestored ACP-era conversations are normal ZCode Agent history, so persisted provider fields must be `glm`. Treat the snapshot provider as legacy source context only; do not write task-index `migration_source` or `meta_json.migrationSource` for these restores. The `migrationSource` enum is reserved for the existing Claude Code native import path (`claudeCode`).\n\n## Selection Workflow\n\nResolve script paths relative to this `SKILL.md` directory. When running from another working directory, use the absolute path to the script inside the plugin cache.\n\nList source agents:\n\n```bash\nnode scripts\u002Fscan-legacy-sessions.mjs agents\n```\n\nAfter the user chooses an agent, list workspaces for that agent:\n\n```bash\nnode scripts\u002Fscan-legacy-sessions.mjs workspaces --agent glm\n```\n\nAfter the user chooses a workspace, list conversations:\n\n```bash\nnode scripts\u002Fscan-legacy-sessions.mjs conversations --agent glm --workspace \u002FUsers\u002Fdev\u002Ftest\u002Fz-m\n```\n\nUse `--query \u003Ctext>` to narrow conversations by title, message content, task id, or session id. Use `--json` when feeding the result into `jq` or another script.\n\n## Presenting Choices\n\nAsk for one choice at a time unless the user already supplied enough filters:\n\n1. previous agent\u002Fprovider\n2. workspace to restore\n3. conversation to restore\n\nShow compact numbered options with title, updated time, message count, `restoredTaskId`, and restore state. If there are many options, show the top 20 by `updatedAt` and tell the user how to filter with `--query`.\n\nAfter the user chooses an exact conversation, run a dry run first:\n\n```bash\nnode scripts\u002Frestore-conversation.mjs --snapshot ~\u002F.zcode\u002Fv2\u002Fsessions\u002F\u003CworkspaceHash>\u002F\u003ClegacyTaskId>.json --dry-run\n```\n\nThen apply the restore:\n\n```bash\nnode scripts\u002Frestore-conversation.mjs --snapshot ~\u002F.zcode\u002Fv2\u002Fsessions\u002F\u003CworkspaceHash>\u002F\u003ClegacyTaskId>.json\n```\n\n## Restore States\n\n- `ready`: CLI DB and task-index both already contain the restored task id.\n- `needs-cli-db`: task-index exists, but `~\u002F.zcode\u002Fcli\u002Fdb\u002Fdb.sqlite` has no session row; rebuild the real session from the legacy snapshot.\n- `needs-task-index`: CLI DB exists, but task-index is missing; backfill task-index only.\n- `needs-full-import`: both stores are missing; import session history and then index it.\n\n## Mutation Rules\n\nDo not write data during selection. Before any apply step:\n\n- Create timestamped backups of `tasks-index.sqlite` and `db.sqlite`.\n- Keep writes idempotent; never overwrite a new real session that already contains user continuation messages.\n- Preserve task-index `pinned`, `archived`, `deleted`, and `title_overridden`.\n- Use `workspaceKey = workspaceIdentity?.trim() || workspacePath` for identity\u002Fisolation semantics.\n- Write task-index `provider = \"glm\"` and CLI message `providerID = \"glm\"` regardless of the snapshot provider.\n- Keep `task-index.meta_json.taskId = restoredTaskId`; never leave it as the old snapshot `meta.taskId`.\n- Leave task-index `migration_source` empty for ACP-era restores. If a previous restore wrote `legacy-session`, clear it before validating visibility.\n- Write CLI DB `part` rows for visible text and tool calls. The app detail page renders from `part`; `message.data.content` alone is not enough.\n- Preserve assistant threading by setting `parentID` to the preceding user message id when possible.\n- Do not start old ACP runtimes. Restore from snapshots and new ZCode stores only.\n\nFor app code changes, update a spec under `docs\u002F` before implementation and run `pnpm typecheck` and `pnpm lint`.\n","# Restore Legacy Sessions\n\n## Overview\n\nUse this skill to guide old ACP-era ZCode session restoration. The first job is selection, not mutation: identify the source agent, the workspace, and the exact conversation before proposing any write to the new stores.\n\n## Stores\n\n- Legacy snapshots: `~\u002F.zcode\u002Fv2\u002Fsessions\u002F{workspaceHash}\u002F{legacyTaskId}.json`\n- Task index: `~\u002F.zcode\u002Fv2\u002Ftasks-index.sqlite`\n- New ZCode session DB: `~\u002F.zcode\u002Fcli\u002Fdb\u002Fdb.sqlite`\n\nUse `restoredTaskId = meta.acpSessionId || meta.taskId`. The legacy snapshot filename and `meta.taskId` are historical IDs; the app task list often uses `meta.acpSessionId` as the real task\u002Fsession ID.\n\nThe scan script defaults to the live legacy source `~\u002F.zcode\u002Fv2\u002Fsessions`; pass `--legacy-dir \u003Cpath>` only when the user explicitly asks to inspect another source directory.\n\nRestored ACP-era conversations are normal ZCode Agent history, so persisted provider fields must be `glm`. Treat the snapshot provider as legacy source context only; do not write task-index `migration_source` or `meta_json.migrationSource` for these restores. The `migrationSource` enum is reserved for the existing Claude Code native import path (`claudeCode`).\n\n## Selection Workflow\n\nResolve script paths relative to this `SKILL.md` directory. When running from another working directory, use the absolute path to the script inside the plugin cache.\n\nList source agents:\n\n```bash\nnode scripts\u002Fscan-legacy-sessions.mjs agents\n```\n\nAfter the user chooses an agent, list workspaces for that agent:\n\n```bash\nnode scripts\u002Fscan-legacy-sessions.mjs workspaces --agent glm\n```\n\nAfter the user chooses a workspace, list conversations:\n\n```bash\nnode scripts\u002Fscan-legacy-sessions.mjs conversations --agent glm --workspace \u002FUsers\u002Fdev\u002Ftest\u002Fz-m\n```\n\nUse `--query \u003Ctext>` to narrow conversations by title, message content, task id, or session id. Use `--json` when feeding the result into `jq` or another script.\n\n## Presenting Choices\n\nAsk for one choice at a time unless the user already supplied enough filters:\n\n1. previous agent\u002Fprovider\n2. workspace to restore\n3. conversation to restore\n\nShow compact numbered options with title, updated time, message count, `restoredTaskId`, and restore state. If there are many options, show the top 20 by `updatedAt` and tell the user how to filter with `--query`.\n\nAfter the user chooses an exact conversation, run a dry run first:\n\n```bash\nnode scripts\u002Frestore-conversation.mjs --snapshot ~\u002F.zcode\u002Fv2\u002Fsessions\u002F\u003CworkspaceHash>\u002F\u003ClegacyTaskId>.json --dry-run\n```\n\nThen apply the restore:\n\n```bash\nnode scripts\u002Frestore-conversation.mjs --snapshot ~\u002F.zcode\u002Fv2\u002Fsessions\u002F\u003CworkspaceHash>\u002F\u003ClegacyTaskId>.json\n```\n\n## Restore States\n\n- `ready`: CLI DB and task-index both already contain the restored task id.\n- `needs-cli-db`: task-index exists, but `~\u002F.zcode\u002Fcli\u002Fdb\u002Fdb.sqlite` has no session row; rebuild the real session from the legacy snapshot.\n- `needs-task-index`: CLI DB exists, but task-index is missing; backfill task-index only.\n- `needs-full-import`: both stores are missing; import session history and then index it.\n\n## Mutation Rules\n\nDo not write data during selection. Before any apply step:\n\n- Create timestamped backups of `tasks-index.sqlite` and `db.sqlite`.\n- Keep writes idempotent; never overwrite a new real session that already contains user continuation messages.\n- Preserve task-index `pinned`, `archived`, `deleted`, and `title_overridden`.\n- Use `workspaceKey = workspaceIdentity?.trim() || workspacePath` for identity\u002Fisolation semantics.\n- Write task-index `provider = \"glm\"` and CLI message `providerID = \"glm\"` regardless of the snapshot provider.\n- Keep `task-index.meta_json.taskId = restoredTaskId`; never leave it as the old snapshot `meta.taskId`.\n- Leave task-index `migration_source` empty for ACP-era restores. If a previous restore wrote `legacy-session`, clear it before validating visibility.\n- Write CLI DB `part` rows for visible text and tool calls. The app detail page renders from `part`; `message.data.content` alone is not enough.\n- Preserve assistant threading by setting `parentID` to the preceding user message id when possible.\n- Do not start old ACP runtimes. Restore from snapshots and new ZCode stores only.\n\nFor app code changes, update a spec under `docs\u002F` before implementation and run `pnpm typecheck` and `pnpm lint`.\n",{"name":5,"description":7},"main","cf24e347c4aaf1182ef9fa1f9743a80ab14ff638","apps\u002Fzcode-cli\u002Fpackages\u002Frestore-legacy-sessions-plugin\u002Fskills\u002Frestore-legacy-sessions",20,"https:\u002F\u002Fgithub.com\u002FZCodium-project\u002FZCodium","https:\u002F\u002Fzcodium-project.github.io\u002F","https:\u002F\u002Fgithub.com\u002FZCodium-project","zcodium-project.github.io\u002F","Zcode Open Audit Version.","2026-11-13 18:44:38",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add ZCodium-project\u002FZCodium --skill restore-legacy-sessions",{"tool":40,"command":41},"bunx","bunx skills add ZCodium-project\u002FZCodium --skill restore-legacy-sessions",{"tool":43,"command":44},"pnpm","pnpm dlx skills add ZCodium-project\u002FZCodium --skill restore-legacy-sessions","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FZCodium-project\u002FZCodium\u002Fblob\u002Fmain\u002Fapps\u002Fzcode-cli\u002Fpackages\u002Frestore-legacy-sessions-plugin\u002Fskills\u002Frestore-legacy-sessions\u002FSKILL.md",true,[48,54],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"scripts\u002Frestore-conversation.mjs","SCRIPT","脚本",22137,"https:\u002F\u002Fgithub.com\u002FZCodium-project\u002FZCodium\u002Fblob\u002Fmain\u002Fapps\u002Fzcode-cli\u002Fpackages\u002Frestore-legacy-sessions-plugin\u002Fskills\u002Frestore-legacy-sessions\u002Fscripts\u002Frestore-conversation.mjs",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"scripts\u002Fscan-legacy-sessions.mjs",14471,"https:\u002F\u002Fgithub.com\u002FZCodium-project\u002FZCodium\u002Fblob\u002Fmain\u002Fapps\u002Fzcode-cli\u002Fpackages\u002Frestore-legacy-sessions-plugin\u002Fskills\u002Frestore-legacy-sessions\u002Fscripts\u002Fscan-legacy-sessions.mjs",[59,66,73,80,87,94],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7DBYM2HAMB3K65Q3XET0XWW","plugin-mcp-ping","E2E workspace Plugin skill marker","https:\u002F\u002Fgithub.com\u002FZCodium-project\u002FZCodium\u002Fblob\u002Fmain\u002Fpackages\u002Fdesktop\u002Ftest\u002Fe2e\u002Ffixtures\u002Fplugin-mcp-skill\u002Fe2e-plugin-mcp-ping\u002Fskills\u002Fplugin-mcp-ping\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":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7DBYCTV753XKE9TRBT8CRSX","zcode-configuration-guide","Use when configuring ZCode's extension resources (MCP servers, slash commands, skills, hooks, and plugins) or instruction files such as AGENTS.md in the ZCode client. Explains where each resource is configured at the user and workspace scope, the discovery order, precedence, and merge rules, plus guidance on which location to choose. Use when someone asks how to add an MCP server, command, skill, hook, plugin, or AGENTS.md instructions, where a configuration file lives, why a configuration is not taking effect, or needs routing to a specific diagnostic skill.","https:\u002F\u002Fgithub.com\u002FZCodium-project\u002FZCodium\u002Fblob\u002Fmain\u002Fapps\u002Fzcode-cli\u002Fpackages\u002Fzcode-guide-plugin\u002Fskills\u002Fzcode-configuration-guide\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7DBY4P7GEEPQZ5VSWCF0YS1","diagnosing-skills","Use to diagnose and fix ZCode skill configuration problems in the ZCode client. Applies when a skill is not discovered, is installed but does not trigger automatically, is shadowed by a higher-precedence skill of the same name, is disabled by configuration, has a SKILL.md frontmatter error, fails to load because its description is too long, or disappears because the plugin providing it is disabled. Provides the discovery order, how to inspect skills in the client, common pitfalls, and a step-by-step localization and repair workflow.","https:\u002F\u002Fgithub.com\u002FZCodium-project\u002FZCodium\u002Fblob\u002Fmain\u002Fapps\u002Fzcode-cli\u002Fpackages\u002Fzcode-guide-plugin\u002Fskills\u002Fdiagnosing-skills\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7DBXS9PAV8Z09309HMYMNPC","diagnosing-plugins","Use to diagnose and fix ZCode plugin and marketplace problems in the ZCode client. Applies when a plugin is not listed, adding a marketplace or installing a plugin fails, a plugin is enabled but its skills or commands are missing, a built-in plugin still appears after being disabled, a plugin is not enabled as expected, a plugin.json manifest has a parse error, a plugin name is invalid, a dependency is unresolved or blocked across marketplaces, or a sensitive configuration value cannot be entered in the interface. Provides the plugin lifecycle, manifest schema, how to manage plugins in the client, and a step-by-step localization and repair workflow.","https:\u002F\u002Fgithub.com\u002FZCodium-project\u002FZCodium\u002Fblob\u002Fmain\u002Fapps\u002Fzcode-cli\u002Fpackages\u002Fzcode-guide-plugin\u002Fskills\u002Fdiagnosing-plugins\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7DBXHJ0G1KZDC405HYQBHB6","diagnosing-mcp","Use to diagnose and fix ZCode MCP (Model Context Protocol) server configuration problems in the ZCode client. Applies when an MCP server will not connect, its tools (mcp__server__tool) do not appear, it shows as disabled or failed, connections time out, a command cannot be found, template variables are not expanded, or a server defined in a configuration file has no effect. Provides configuration locations, how to inspect status in Settings, common pitfalls, and a step-by-step localization and repair workflow.","https:\u002F\u002Fgithub.com\u002FZCodium-project\u002FZCodium\u002Fblob\u002Fmain\u002Fapps\u002Fzcode-cli\u002Fpackages\u002Fzcode-guide-plugin\u002Fskills\u002Fdiagnosing-mcp\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M7DBXABP8ZRNM6TFWDJXJH9Z","diagnosing-hooks","Use to diagnose and fix ZCode hook configuration problems in the ZCode client. Applies when a hook does not trigger, an event name is wrong, a matcher does not match a tool name, a script is not executable, template variables are not expanded, a timeout unit is mistaken (seconds versus milliseconds), the command and process field styles are mixed, a hook's JSON output fails validation, a hook blocks the session unexpectedly, or configuration-file hooks are not enabled. Provides configuration sources, the hooks.json schema, how to inspect hooks in the client, and a step-by-step localization and repair workflow.","https:\u002F\u002Fgithub.com\u002FZCodium-project\u002FZCodium\u002Fblob\u002Fmain\u002Fapps\u002Fzcode-cli\u002Fpackages\u002Fzcode-guide-plugin\u002Fskills\u002Fdiagnosing-hooks\u002FSKILL.md",[],[]]