[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EJDBNFXPZV022F0D6AE7E1":3,"skill-same:01M7EJDBNFXPZV022F0D6AE7E1":43},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M7EJDBNFXPZV022F0D6AE7E1","dita-key-scopes",null,"Reuse the same DITA key name in more than one place without collisions, using DITA 1.3 key scopes (@keyscope). Use when a key resolves to the wrong target because two parts of a map (or two reused submaps) define the same key, when combining guides into one collection, or when asked to scope keys per section\u002Fedition\u002Fbranch.","dogsbay\u002Fdogsbay-xml","dogsbay","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F15303289?v=4","01M7EJCARJ0K8B8ZV0ENKD6ZK2","01M7EJCAS22NW67CK69CDSW2Q5",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdogsbay\u002Fdogsbay-xml\u002Fblob\u002Fmain\u002Fxagent-core\u002Fsrc\u002Fmain\u002Fresources\u002Fskills\u002Fdita-key-scopes\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: dita-key-scopes\ndescription: Reuse the same DITA key name in more than one place without collisions, using DITA 1.3 key scopes (@keyscope). Use when a key resolves to the wrong target because two parts of a map (or two reused submaps) define the same key, when combining guides into one collection, or when asked to scope keys per section\u002Fedition\u002Fbranch.\n---\n\n# DITA 1.3 key scopes (`@keyscope`)\n\nA **key scope** lets the *same bare key name* bind to different definitions in\ndifferent parts of a map. `@keyscope=\"s\"` on a map\u002Ftopicref\u002Ftopicgroup names a scope:\nkeys defined inside it bind locally as `key` and externally as `s.key`. Inner scopes\nshadow outer ones. This is the mechanism for **reusing a sub-publication many times**\n(e.g. several guides in one collection, or a section duplicated per edition) without\ntheir keys clashing. Tools: `list_keys`, `resolve_key` (with a `--scope`), `edit_map`.\n\n## When you need a scope (the symptom)\n\nWithout scopes, a map flattens all keys into one namespace and **first-definition\nwins**. So if two reused submaps each define `start-here` (or `product-name`,\n`intro`…), only one survives and the others are silently shadowed — a key resolves to\nthe wrong topic. That silent collision is the signal to introduce a scope. (Contrast\n[[dita-keys]] `merge_keydefs`, which *removes* a shadowed duplicate you don't want —\nhere you *keep* both, kept apart by scope.)\n\n## Process\n\n1. **Confirm the collision.** `list_keys \u003Cmap>` — if a key you expect in several\n   places appears once (or resolves to the wrong file), the definitions are colliding\n   in one flat namespace. Across the whole project, `project_graph` shows it\n   directly: a `shadowed-key` issue names the losing definition, several `keytarget`\n   edges for one key carry different `via` maps, and `key-resolves-inconsistently`\n   names the deliverables where a key fails ([[dita-project-graph]]).\n2. **Scope each reuse.** Put the colliding subtrees under their own `@keyscope`. For a\n   collection that maprefs several guides, scope each mapref:\n   `edit_map \u003Cmap> set-attr --ref \u003Cselector> --name keyscope --value \u003Cscope>`\n   (the selector is an `@id` or a 1-based child path like `\u002F2\u002F1`). Dry-run first.\n3. **Verify per scope.** Keys now coexist as `scope.key`:\n   - `list_keys \u003Cmap>` shows the fully-qualified names (`userguide.start-here`,\n     `podcaster.start-here`).\n   - `resolve_key \u003Ckey> --scope \u003Cscope>` resolves a bare key *as referenced from that\n     scope* (it walks outward to the root if the scope doesn't define it). Same key\n     name, a different binding per scope.\n\n## What scoping fixes (it propagates)\n\nScoping isn't just `resolve_key`. **Every key consumer becomes scope-aware:**\n`list_keys` (qualified names), `where_used` (finds a scoped key's references),\n`conref_audit` and the publication-set crawl (resolve scoped targets), and the DITA\npreview (renders the scoped binding). So fixing the scope fixes the key *everywhere*\nit's used, not just where it's defined.\n\n## Honest limits (say these)\n\n- In-process resolution is **exact** when you name the scope (`--scope`) or when a\n  bare key is unique to a single scope.\n- Scope a topic *inherits* from where a map **places** it (cross-file) is the engine's\n  job at build time; in-process a bare `keyref` in topic content is read in the root\n  scope (a unique-scope fallback bridges the common case but can't disambiguate a name\n  defined in several scopes).\n- Branch filtering ([[dita-branch-filtering]]) auto-generates a key scope per branch\n  (via `dvrKeyscope*`), so each filtered variant gets a distinct key binding.\n\n## Report\n\nThe collision found (which key, which definitions), the scopes introduced and on which\nmaprefs\u002Fsubtrees, and the per-scope resolution (`scope.key → target`) proving the keys\nnow coexist. For the rest of the key lifecycle (keyify\u002Frename\u002Fmerge\u002Finline) use\n[[dita-keys]].\n","# DITA 1.3 key scopes (`@keyscope`)\n\nA **key scope** lets the *same bare key name* bind to different definitions in\ndifferent parts of a map. `@keyscope=\"s\"` on a map\u002Ftopicref\u002Ftopicgroup names a scope:\nkeys defined inside it bind locally as `key` and externally as `s.key`. Inner scopes\nshadow outer ones. This is the mechanism for **reusing a sub-publication many times**\n(e.g. several guides in one collection, or a section duplicated per edition) without\ntheir keys clashing. Tools: `list_keys`, `resolve_key` (with a `--scope`), `edit_map`.\n\n## When you need a scope (the symptom)\n\nWithout scopes, a map flattens all keys into one namespace and **first-definition\nwins**. So if two reused submaps each define `start-here` (or `product-name`,\n`intro`…), only one survives and the others are silently shadowed — a key resolves to\nthe wrong topic. That silent collision is the signal to introduce a scope. (Contrast\n[[dita-keys]] `merge_keydefs`, which *removes* a shadowed duplicate you don't want —\nhere you *keep* both, kept apart by scope.)\n\n## Process\n\n1. **Confirm the collision.** `list_keys \u003Cmap>` — if a key you expect in several\n   places appears once (or resolves to the wrong file), the definitions are colliding\n   in one flat namespace. Across the whole project, `project_graph` shows it\n   directly: a `shadowed-key` issue names the losing definition, several `keytarget`\n   edges for one key carry different `via` maps, and `key-resolves-inconsistently`\n   names the deliverables where a key fails ([[dita-project-graph]]).\n2. **Scope each reuse.** Put the colliding subtrees under their own `@keyscope`. For a\n   collection that maprefs several guides, scope each mapref:\n   `edit_map \u003Cmap> set-attr --ref \u003Cselector> --name keyscope --value \u003Cscope>`\n   (the selector is an `@id` or a 1-based child path like `\u002F2\u002F1`). Dry-run first.\n3. **Verify per scope.** Keys now coexist as `scope.key`:\n   - `list_keys \u003Cmap>` shows the fully-qualified names (`userguide.start-here`,\n     `podcaster.start-here`).\n   - `resolve_key \u003Ckey> --scope \u003Cscope>` resolves a bare key *as referenced from that\n     scope* (it walks outward to the root if the scope doesn't define it). Same key\n     name, a different binding per scope.\n\n## What scoping fixes (it propagates)\n\nScoping isn't just `resolve_key`. **Every key consumer becomes scope-aware:**\n`list_keys` (qualified names), `where_used` (finds a scoped key's references),\n`conref_audit` and the publication-set crawl (resolve scoped targets), and the DITA\npreview (renders the scoped binding). So fixing the scope fixes the key *everywhere*\nit's used, not just where it's defined.\n\n## Honest limits (say these)\n\n- In-process resolution is **exact** when you name the scope (`--scope`) or when a\n  bare key is unique to a single scope.\n- Scope a topic *inherits* from where a map **places** it (cross-file) is the engine's\n  job at build time; in-process a bare `keyref` in topic content is read in the root\n  scope (a unique-scope fallback bridges the common case but can't disambiguate a name\n  defined in several scopes).\n- Branch filtering ([[dita-branch-filtering]]) auto-generates a key scope per branch\n  (via `dvrKeyscope*`), so each filtered variant gets a distinct key binding.\n\n## Report\n\nThe collision found (which key, which definitions), the scopes introduced and on which\nmaprefs\u002Fsubtrees, and the per-scope resolution (`scope.key → target`) proving the keys\nnow coexist. For the rest of the key lifecycle (keyify\u002Frename\u002Fmerge\u002Finline) use\n[[dita-keys]].\n",{"name":5,"description":7},"main","9d490f436eab257280b114519ea447bad5626d74","xagent-core\u002Fsrc\u002Fmain\u002Fresources\u002Fskills\u002Fdita-key-scopes","https:\u002F\u002Fgithub.com\u002Fdogsbay\u002Fdogsbay-xml","https:\u002F\u002Fgithub.com\u002Fdogsbay","2026-10-20 06:18:01",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add dogsbay\u002Fdogsbay-xml --skill dita-key-scopes",{"tool":35,"command":36},"bunx","bunx skills add dogsbay\u002Fdogsbay-xml --skill dita-key-scopes",{"tool":38,"command":39},"pnpm","pnpm dlx skills add dogsbay\u002Fdogsbay-xml --skill dita-key-scopes","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdogsbay\u002Fdogsbay-xml\u002Fblob\u002Fmain\u002Fxagent-core\u002Fsrc\u002Fmain\u002Fresources\u002Fskills\u002Fdita-key-scopes\u002FSKILL.md",true,[],[44,52,59,65,72,79],{"skillNo":45,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":48,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M7EJF0ZNWMH5EGRNHMGM1BH7","valid-skill","A valid test skill for unit testing.","MIT","https:\u002F\u002Fgithub.com\u002Fdogsbay\u002Fdogsbay-xml\u002Fblob\u002Fmain\u002Fxagent-core\u002Fsrc\u002Ftest\u002Fresources\u002Ffixtures\u002Fskills\u002Fvalid-skill\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M7EJF017TT1WAB2F6QM5Y89W","wrong-name","Name does not match directory.","https:\u002F\u002Fgithub.com\u002Fdogsbay\u002Fdogsbay-xml\u002Fblob\u002Fmain\u002Fxagent-core\u002Fsrc\u002Ftest\u002Fresources\u002Ffixtures\u002Fskills\u002Fname-mismatch\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M7EJEZ301QVMP9V9R7JSY33Y","missing-description","https:\u002F\u002Fgithub.com\u002Fdogsbay\u002Fdogsbay-xml\u002Fblob\u002Fmain\u002Fxagent-core\u002Fsrc\u002Ftest\u002Fresources\u002Ffixtures\u002Fskills\u002Fmissing-description\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M7EJEWK86WC0CTQZ1T9RGZTJ","hidden-skill","A skill hidden from model invocation.","https:\u002F\u002Fgithub.com\u002Fdogsbay\u002Fdogsbay-xml\u002Fblob\u002Fmain\u002Fxagent-core\u002Fsrc\u002Ftest\u002Fresources\u002Ffixtures\u002Fskills\u002Fhidden-skill\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M7EJEQTVC29QF1E3K1KGSTRK","dita-subject-schemes","Author or repair a DITA subjectScheme that governs conditional-processing attribute values (@platform, @audience, @product, @props, @otherprops), then validate content against it. Use when introducing controlled values, governing conditional content, or when validate_conditions reports controlled-value violations.","https:\u002F\u002Fgithub.com\u002Fdogsbay\u002Fdogsbay-xml\u002Fblob\u002Fmain\u002Fxagent-core\u002Fsrc\u002Fmain\u002Fresources\u002Fskills\u002Fdita-subject-schemes\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M7EJEKED7TREFSJB2J5ZW3A6","dita-shortdesc","Write SEO-friendly DITA shortdescs and abstracts — a standalone one-sentence summary that doubles as the link preview and the HTML meta description. Use when asked to add or improve a topic's description\u002Fabstract, write shortdescs, fill missing ones, or make descriptions SEO-friendly.","https:\u002F\u002Fgithub.com\u002Fdogsbay\u002Fdogsbay-xml\u002Fblob\u002Fmain\u002Fxagent-core\u002Fsrc\u002Fmain\u002Fresources\u002Fskills\u002Fdita-shortdesc\u002FSKILL.md",[],[]]