$npx -y skills add adityahimaone/hermes-agent-rtk-caveman --skill documentation-index-maintenanceMaintain and fix inconsistencies in documentation indexes, tables of contents, and structured markdown files
| 1 | # Documentation Index Maintenance Skill |
| 2 | |
| 3 | Maintain and fix inconsistencies in documentation indexes, tables of contents, and structured markdown files. Includes locating files, reading content, making targeted patches, and verifying changes. |
| 4 | |
| 5 | ## When to Use |
| 6 | - Fixing broken links in documentation indexes |
| 7 | - Correcting category/classification errors in skill/table listings |
| 8 | - Updating file references when files are renamed or moved |
| 9 | - Maintaining consistency in structured documentation files |
| 10 | - Any task involving precise edits to markdown tables or lists |
| 11 | |
| 12 | ## Steps |
| 13 | |
| 14 | ### 1. Locate the Target File |
| 15 | Use search strategies to find the documentation file: |
| 16 | ```bash |
| 17 | # Search by filename (exact or partial) |
| 18 | search_files(pattern="index.md", target="files", path="~/Documents/Obsidian") |
| 19 | |
| 20 | # Search by content (when filename unknown) |
| 21 | search_files(pattern="Skills Hermes Index", target="content", path="~/Documents/Obsidian") |
| 22 | |
| 23 | # Search in specific directories |
| 24 | search_files(pattern="*.md", target="files", path="~/Documents/Obsidian/Notes/Skills Hermes") |
| 25 | ``` |
| 26 | |
| 27 | ### 2. Read and Analyze Current Content |
| 28 | Examine the file to understand its structure and identify issues: |
| 29 | ```bash |
| 30 | read_file(path="/path/to/file.md") |
| 31 | ``` |
| 32 | Look for: |
| 33 | - Inconsistent categories or classifications |
| 34 | - Broken or incorrect links |
| 35 | - Missing entries |
| 36 | - Formatting issues in tables or lists |
| 37 | |
| 38 | ### 3. Plan Targeted Fixes |
| 39 | For each inconsistency identified, prepare: |
| 40 | - Exact old string to replace (include sufficient context for uniqueness) |
| 41 | - Correct new string |
| 42 | - Verification method |
| 43 | |
| 44 | ### 4. Apply Patches Using the patch Tool |
| 45 | Make precise, context-aware replacements: |
| 46 | ```bash |
| 47 | patch( |
| 48 | path="/path/to/file.md", |
| 49 | mode="replace", |
| 50 | old_string="exact context including the problematic text", |
| 51 | new_string="same context with corrections", |
| 52 | replace_all=false # Usually false for precision |
| 53 | ) |
| 54 | ``` |
| 55 | |
| 56 | ### 5. Verify Changes |
| 57 | Always verify patches were applied correctly: |
| 58 | ```bash |
| 59 | read_file(path="/path/to/file.md") # Review the changes |
| 60 | # Or for specific verification: |
| 61 | search_files(pattern="corrected text", target="content", path="/path/to/file.md") |
| 62 | ``` |
| 63 | |
| 64 | ## Best Practices |
| 65 | |
| 66 | ### For Precision |
| 67 | - Include sufficient surrounding context in old_string to ensure uniqueness |
| 68 | - Typically 20-50 characters before and after the target text |
| 69 | - Include line breaks or markdown syntax when relevant |
| 70 | - Test uniqueness by checking if the pattern appears only once |
| 71 | |
| 72 | ### Common Pitfalls to Avoid |
| 73 | - Don't use replace_all=true unless you're certain |
| 74 | - Don't make patches that are too broad (might match unintended text) |
| 75 | - Always verify after each patch |
| 76 | - Keep backups of important documentation before major changes |
| 77 | |
| 78 | ### Workflow Tips |
| 79 | - Work on one inconsistency at a time |
| 80 | - Verify each fix before moving to the next |
| 81 | - Group similar fixes together when they're in the same file section |
| 82 | - Document what you fixed for future reference |
| 83 | |
| 84 | ## Example: Fixing a Skill Index Entry |
| 85 | |
| 86 | **Problem**: google-calendar-wfo-integration shows category "N/A" but should be "productivity" |
| 87 | |
| 88 | **Old String** (with context): |
| 89 | ``` |
| 90 | || google-calendar-wfo-integration | N/A | [google-calendar-wfo-integration.md](google-calendar-wfo-integration.md) | |
| 91 | ``` |
| 92 | |
| 93 | **New String**: |
| 94 | ``` |
| 95 | || google-calendar-wfo-integration | productivity | [google-calendar-wfo-integration.md](google-calendar-wfo-integration.md) | |
| 96 | ``` |
| 97 | |
| 98 | **Patch Command**: |
| 99 | ```bash |
| 100 | patch( |
| 101 | path="~/Documents/Obsidian/Notes/Skills Hermes/index.md", |
| 102 | old_string="|| google-calendar-wfo-integration | N/A | [google-calendar-wfo-integration.md](google-calendar-wfo-integration.md) |", |
| 103 | new_string="|| google-calendar-wfo-integration | productivity | [google-calendar-wfo-integration.md](google-calendar-wfo-integration.md) |" |
| 104 | ) |
| 105 | ``` |
| 106 | |
| 107 | ## Verification Checklist |
| 108 | - [ ] File located correctly |
| 109 | - [ ] Current content read and understood |
| 110 | - [ ] All inconsistencies identified |
| 111 | - [ ] Each fix planned with unique context |
| 112 | - [ ] Each patch applied successfully |
| 113 | - [ ] All changes verified |
| 114 | - [ ] No unintended modifications made |
| 115 | |
| 116 | ## Related Skills |
| 117 | - skill-documentation: For creating skill documentation from scratch |
| 118 | - obsidian: For general Obsidian vault operations |
| 119 | - patch: For making precise file edits (this skill builds on it) |