[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EV5D7PXTKG4RMNM7384S8M":3,"skill-same:01M7EV5D7PXTKG4RMNM7384S8M":53},{"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":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7EV5D7PXTKG4RMNM7384S8M","check-labels-and-refs",null,"Scan LaTeX files for label\u002Freference consistency, orphan labels\u002Frefs, and non-pinpoint cross-references","tdupu\u002Fagent-skills-public","tdupu","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F3440403?v=4","01M7EV32X9J0EFE5T4P8TKQTCQ","Taylor Dupuy","01M7EV32XZ1Z4MDBYAFRCJD3BP",0,"GPL-3.0","https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public\u002Fblob\u002Fmain\u002Fskills\u002Fcheck-labels-and-refs\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: check-labels-and-refs\ndescription: Scan LaTeX files for label\u002Freference consistency, orphan labels\u002Frefs, and non-pinpoint cross-references\nstatus: PRELIMINARY (DRY-RUN ONLY)\n---\n\n# Check LaTeX Labels and References\n\nScans LaTeX documents for `\\label{}`, `\\ref{}`, `\\eqref{}`, `\\autoref{}` patterns to identify:\n- **Orphan labels**: Labels defined but never referenced\n- **Orphan refs**: References to undefined labels\n- **Non-pinpoint refs**: Bare text references (e.g., \"see Section 2\" instead of `\\ref{sec:foo}`)\n\nHandles `\\input` and `\\include` closure up to depth 2.\n\n## Usage\n\n```bash\ncheck-labels-and-refs \u003Ctex-file-path> [output-dir]\n```\n\n### Arguments\n- `\u003Ctex-file-path>` — Root LaTeX file to scan (required)\n- `[output-dir]` — Output directory for JSON report (optional, defaults to \u003Ccity-root>\u002Ftmp-for-review\u002F)\n\n### Output\n\nProduces `check-labels-and-refs-report.json` with structure:\n\n```json\n{\n  \"file\": \"\u003Cpath-to-root-file>\",\n  \"sha\": \"\u003Cgit-sha-of-file>\",\n  \"scan_depth\": 2,\n  \"verdict\": \"PASS|FAIL\",\n  \"labels\": {\n    \"\u003Clabel-name>\": {\n      \"location\": \"\u003Cfile>:\u003Cline>\",\n      \"referenced_from\": [\"\u003Cfile>:\u003Cline>\", ...]\n    }\n  },\n  \"references\": {\n    \"\u003Clabel-name>\": {\n      \"locations\": [\"\u003Cfile>:\u003Cline>\", ...],\n      \"label_found\": true|false,\n      \"reference_type\": \"ref|eqref|autoref\"\n    }\n  },\n  \"orphan_labels\": [\"\u003Clabel-name>\", ...],\n  \"orphan_refs\": [\"\u003Clabel-name>\", ...],\n  \"non_pinpoint_refs\": [\n    {\n      \"file\": \"\u003Cfile>\",\n      \"line\": \u003Cline-number>,\n      \"context\": \"\u003Cquoted-text>\",\n      \"pattern\": \"bare-section|bare-theorem|bare-equation\"\n    }\n  ],\n  \"counts\": {\n    \"total_labels\": \u003Cint>,\n    \"total_refs\": \u003Cint>,\n    \"orphan_label_count\": \u003Cint>,\n    \"orphan_ref_count\": \u003Cint>,\n    \"non_pinpoint_count\": \u003Cint>\n  }\n}\n```\n\n## Implementation\n\nThe skill uses bash\u002Fgrep to scan LaTeX files. For each `.tex` file:\n\n1. **Collect labels**: Extract all `\\label{\u003Cname>}` patterns\n2. **Collect references**: Extract all `\\ref{\u003Cname>}`, `\\eqref{\u003Cname>}`, `\\autoref{\u003Cname>}` patterns\n3. **Cross-reference**: Match refs to labels\n4. **Detect orphans**: Find labels with no refs and refs with no labels\n5. **Detect non-pinpoint**: Grep for bare-text patterns like \"Section \\d+\", \"Theorem \\d+\", \"Equation \\d+\"\n6. **Handle closure**: Recursively scan `\\input{\u003Cfile>}` and `\\include{\u003Cfile>}` up to depth 2\n\n## Limitations\n\n- **Depth cap**: Only scans `\\input`\u002F`\\include` to depth 2. References to depth-3+ files are silently ignored. Report header documents this cap.\n- **Comments**: Does not skip LaTeX comments (`%...`), so commented-out `\\label{}`\u002F`\\ref{}` may be incorrectly counted.\n- **\\cite{}**: Does NOT scan citation patterns (`\\cite{}`). That is the domain of check-citations skill.\n- **Macros**: Does not expand LaTeX macros, so references inside macro expansions may be missed.\n- **Non-ASCII**: Assumes UTF-8 encoding.\n\n## Notes\n\n- Non-pinpoint detection ships with examples only in v0. FP-converge refines enumeration.\n- Verdict = FAIL if any-of: orphan_label_count > 0, orphan_ref_count > 0, non_pinpoint_count > 0.\n- Cross-ref-parity-depth-2 is union of three detectors: orphan-label + orphan-ref + non-pinpoint.\n\n---\n\n## Examples\n\n### Example 1: Hyperboloid.tex Test\n\n```bash\nROOT=$HOME\u002Fgt\u002F.gc\u002Fworktrees\u002Fhecke\u002Fpolecats\u002Fgc.run-operator\u002Fworktrees\u002Fhe-d4l\ncheck-labels-and-refs $ROOT\u002Flatex\u002Fnotes\u002Fhyperboloid.tex \u003Ccity-root>\u002Ftmp-for-review\u002Fhe-ja26\u002F\n# Produces: \u003Ccity-root>\u002Ftmp-for-review\u002Fhe-ja26\u002Fcheck-labels-and-refs-report.json\n```\n\nExpected checks:\n- Scans hyperboloid.tex + \\input closure\n- Reports orphan labels (labels without refs)\n- Reports orphan refs (refs to undefined labels)\n- Flags non-pinpoint patterns\n- Verdict: PASS (no orphans or non-pinpoint issues) or FAIL (issues found)\n","# Check LaTeX Labels and References\n\nScans LaTeX documents for `\\label{}`, `\\ref{}`, `\\eqref{}`, `\\autoref{}` patterns to identify:\n- **Orphan labels**: Labels defined but never referenced\n- **Orphan refs**: References to undefined labels\n- **Non-pinpoint refs**: Bare text references (e.g., \"see Section 2\" instead of `\\ref{sec:foo}`)\n\nHandles `\\input` and `\\include` closure up to depth 2.\n\n## Usage\n\n```bash\ncheck-labels-and-refs \u003Ctex-file-path> [output-dir]\n```\n\n### Arguments\n- `\u003Ctex-file-path>` — Root LaTeX file to scan (required)\n- `[output-dir]` — Output directory for JSON report (optional, defaults to \u003Ccity-root>\u002Ftmp-for-review\u002F)\n\n### Output\n\nProduces `check-labels-and-refs-report.json` with structure:\n\n```json\n{\n  \"file\": \"\u003Cpath-to-root-file>\",\n  \"sha\": \"\u003Cgit-sha-of-file>\",\n  \"scan_depth\": 2,\n  \"verdict\": \"PASS|FAIL\",\n  \"labels\": {\n    \"\u003Clabel-name>\": {\n      \"location\": \"\u003Cfile>:\u003Cline>\",\n      \"referenced_from\": [\"\u003Cfile>:\u003Cline>\", ...]\n    }\n  },\n  \"references\": {\n    \"\u003Clabel-name>\": {\n      \"locations\": [\"\u003Cfile>:\u003Cline>\", ...],\n      \"label_found\": true|false,\n      \"reference_type\": \"ref|eqref|autoref\"\n    }\n  },\n  \"orphan_labels\": [\"\u003Clabel-name>\", ...],\n  \"orphan_refs\": [\"\u003Clabel-name>\", ...],\n  \"non_pinpoint_refs\": [\n    {\n      \"file\": \"\u003Cfile>\",\n      \"line\": \u003Cline-number>,\n      \"context\": \"\u003Cquoted-text>\",\n      \"pattern\": \"bare-section|bare-theorem|bare-equation\"\n    }\n  ],\n  \"counts\": {\n    \"total_labels\": \u003Cint>,\n    \"total_refs\": \u003Cint>,\n    \"orphan_label_count\": \u003Cint>,\n    \"orphan_ref_count\": \u003Cint>,\n    \"non_pinpoint_count\": \u003Cint>\n  }\n}\n```\n\n## Implementation\n\nThe skill uses bash\u002Fgrep to scan LaTeX files. For each `.tex` file:\n\n1. **Collect labels**: Extract all `\\label{\u003Cname>}` patterns\n2. **Collect references**: Extract all `\\ref{\u003Cname>}`, `\\eqref{\u003Cname>}`, `\\autoref{\u003Cname>}` patterns\n3. **Cross-reference**: Match refs to labels\n4. **Detect orphans**: Find labels with no refs and refs with no labels\n5. **Detect non-pinpoint**: Grep for bare-text patterns like \"Section \\d+\", \"Theorem \\d+\", \"Equation \\d+\"\n6. **Handle closure**: Recursively scan `\\input{\u003Cfile>}` and `\\include{\u003Cfile>}` up to depth 2\n\n## Limitations\n\n- **Depth cap**: Only scans `\\input`\u002F`\\include` to depth 2. References to depth-3+ files are silently ignored. Report header documents this cap.\n- **Comments**: Does not skip LaTeX comments (`%...`), so commented-out `\\label{}`\u002F`\\ref{}` may be incorrectly counted.\n- **\\cite{}**: Does NOT scan citation patterns (`\\cite{}`). That is the domain of check-citations skill.\n- **Macros**: Does not expand LaTeX macros, so references inside macro expansions may be missed.\n- **Non-ASCII**: Assumes UTF-8 encoding.\n\n## Notes\n\n- Non-pinpoint detection ships with examples only in v0. FP-converge refines enumeration.\n- Verdict = FAIL if any-of: orphan_label_count > 0, orphan_ref_count > 0, non_pinpoint_count > 0.\n- Cross-ref-parity-depth-2 is union of three detectors: orphan-label + orphan-ref + non-pinpoint.\n\n---\n\n## Examples\n\n### Example 1: Hyperboloid.tex Test\n\n```bash\nROOT=$HOME\u002Fgt\u002F.gc\u002Fworktrees\u002Fhecke\u002Fpolecats\u002Fgc.run-operator\u002Fworktrees\u002Fhe-d4l\ncheck-labels-and-refs $ROOT\u002Flatex\u002Fnotes\u002Fhyperboloid.tex \u003Ccity-root>\u002Ftmp-for-review\u002Fhe-ja26\u002F\n# Produces: \u003Ccity-root>\u002Ftmp-for-review\u002Fhe-ja26\u002Fcheck-labels-and-refs-report.json\n```\n\nExpected checks:\n- Scans hyperboloid.tex + \\input closure\n- Reports orphan labels (labels without refs)\n- Reports orphan refs (refs to undefined labels)\n- Flags non-pinpoint patterns\n- Verdict: PASS (no orphans or non-pinpoint issues) or FAIL (issues found)\n",{"name":5,"status":24,"description":7},"PRELIMINARY (DRY-RUN ONLY)","main","8d13efb5e66306aeae6e3b948bc463e7e2db1b65","skills\u002Fcheck-labels-and-refs","https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public","https:\u002F\u002Fgithub.com\u002Ftdupu","https:\u002F\u002Ftdupu.github.io\u002Findex.html","Associate Professor, Department of Mathematics and Statistics, University of Vermont --- last updated Fall 2019","2026-11-13 09:07:19",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add tdupu\u002Fagent-skills-public --skill check-labels-and-refs",{"tool":39,"command":40},"bunx","bunx skills add tdupu\u002Fagent-skills-public --skill check-labels-and-refs",{"tool":42,"command":43},"pnpm","pnpm dlx skills add tdupu\u002Fagent-skills-public --skill check-labels-and-refs","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public\u002Fblob\u002Fmain\u002Fskills\u002Fcheck-labels-and-refs\u002FSKILL.md",true,[47],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"check-labels-and-refs.sh","SCRIPT","脚本",5355,"https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public\u002Fblob\u002Fmain\u002Fskills\u002Fcheck-labels-and-refs\u002Fcheck-labels-and-refs.sh",[54,61,68,75,82,89],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M7EW4PT586KKE7VRCAD80Z9K","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public\u002Fblob\u002Fmain\u002Fsuperpowers\u002Fskills\u002Fwriting-skills\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7EW4HV5V74AF3PTV8N4T0PS","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public\u002Fblob\u002Fmain\u002Fsuperpowers\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7EW4DNKGP5CR1RAJP2J9PHA","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public\u002Fblob\u002Fmain\u002Fsuperpowers\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7EW4BA2QP88VBFVXDVJM7XQ","using-superpowers","Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions","https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public\u002Fblob\u002Fmain\u002Fsuperpowers\u002Fskills\u002Fusing-superpowers\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":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7EW47F2JG5FBESDJNP3PKMV","using-git-worktrees","Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback","https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public\u002Fblob\u002Fmain\u002Fsuperpowers\u002Fskills\u002Fusing-git-worktrees\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7EW44N8556Y556NX9HJT4KP","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002Ftdupu\u002Fagent-skills-public\u002Fblob\u002Fmain\u002Fsuperpowers\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[]]