dita-conref-audit
Audit and repair conref/keyref reuse across a DITA map - find broken conrefs, dangling keys, and duplicated content that should be conreffed. Use when asked to check reuse, fix broken conrefs, or deduplicate repeated content in DITA.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-20
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- dita-conref-audit
- description
- Audit and repair conref/keyref reuse across a DITA map - find broken conrefs, dangling keys, and duplicated content that should be conreffed. Use when asked to check reuse, fix broken conrefs, or deduplicate repeated content in DITA.
03 SKILL.md 正文
DITA Conref / Keyref Audit
Audit content reuse across the map and repair what is broken.
Process
- Map the reuse graph:
grepforconref=,conkeyref=,keyref=across the map's topics.xpaththe map for<keydef>elements to build the key space.
- Detect problems:
- Broken conrefs: target file missing, or target
idnot present in the target file (verify withxpathon the target). - Dangling keyrefs: keys used in topics but not defined in any keydef (or defined more than once with different targets).
- Reuse candidates: identical or near-identical paragraphs, notes, or steps appearing in 3+ topics (compare grep hits) that should live once in a warehouse topic and be conreffed.
- Broken conrefs: target file missing, or target
- Repair with
edit:- Fix conref paths/ids when the intended target is unambiguous.
- Add missing keydefs to the map when a key's target is obvious from usage; otherwise report.
- For reuse candidates, only restructure when the user asked for
deduplication: create/extend a warehouse topic, move the canonical
content there with a stable
id, and replace duplicates with conrefs.
- Validate every touched file (
xml_validatewithdtd: true) before finishing.
Report
List repairs made, ambiguous cases left for a human (with file:line), and reuse statistics (keys defined/used, conref count, duplicates found).
04 同仓库更多 Skills
valid-skill
A valid test skill for unit testing.
wrong-name
Name does not match directory.
missing-description
暂无简介
hidden-skill
A skill hidden from model invocation.
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.
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/abstract, write shortdescs, fill missing ones, or make descriptions SEO-friendly.