diff --git a/_build-log.md b/_build-log.md index 3360a30..f085800 100644 --- a/_build-log.md +++ b/_build-log.md @@ -24,6 +24,15 @@ --- +## Skill: update-skill-index +**Date:** 2026-04-02 +**Skill:** update-skill-index +**Purpose:** Keeps `_skill-index.md` accurate by reconciling it against skills on disk. Adds missing entries, garbage-collects orphaned entries, refreshes stale triggers. Built via skill-creator with 3 evals (add, garbage-collect, no-op). With-skill pass rate: 100%; baseline: 83%. Key differentiator: skill enforces a proposed-diff step before writing. +**Triggers:** "update the skill index," "sync the skill index," "refresh the skill index," "clean up the skill index," "garbage collect the index" +**Files created:** skills/update-skill-index/SKILL.md + +--- + ## Video 4 — First Skill **Date:** 2026-04-02 **Skill:** pro-dev-justification diff --git a/_skill-index.md b/_skill-index.md index 10793db..0ae46d0 100644 --- a/_skill-index.md +++ b/_skill-index.md @@ -21,6 +21,7 @@ description: Master index of all skills in your robot assistant system. Your ass | "run the assembler for video [N]," "assembler for video [N]," "build video [N]" | **robot-assistant-assembler** | | "create a skill," "make a new skill," "build a skill," "improve this skill," "test this skill," "optimize skill description" | **skill-creator** | | "write a business case for a pro dev expense," "professional development business case," "justify a pro dev expense," "pro dev justification" | **pro-dev-justification** | +| "update the skill index," "sync the skill index," "refresh the skill index," "clean up the skill index," "garbage collect the index" | **update-skill-index** | --- @@ -74,6 +75,12 @@ description: Master index of all skills in your robot assistant system. Your ass **File:** `skills/pro-dev-justification/SKILL.md` **Dependencies:** None +### Update Skill Index +**Purpose:** Synchronizes `_skill-index.md` with the skills that actually exist on disk. Adds missing entries, removes orphaned entries (garbage collection), and refreshes stale trigger phrases. +**Triggers:** "update the skill index," "sync the skill index," "refresh the skill index," "clean up the skill index," "garbage collect the index" +**File:** `skills/update-skill-index/SKILL.md` +**Dependencies:** None + --- ## Adding New Skills diff --git a/update-skill-index/SKILL.md b/update-skill-index/SKILL.md new file mode 100644 index 0000000..e173607 --- /dev/null +++ b/update-skill-index/SKILL.md @@ -0,0 +1,95 @@ +--- +name: update-skill-index +description: Synchronizes _skill-index.md with the skills that actually exist on disk. Use this whenever skills have been added, removed, renamed, or merged — or just periodically to keep the index clean. Removes index entries that no longer have a corresponding SKILL.md (garbage collection), adds entries for skills that exist on disk but aren't indexed, and refreshes stale trigger phrases. Trigger on: "update the skill index", "sync the skill index", "refresh the skill index", "clean up the skill index", "garbage collect the index", "reconcile the skill index", "the index is out of date". +--- + +# Update Skill Index + +Keeps `_skill-index.md` accurate by reconciling it against what's actually in the `skills/` directory. + +## When to run + +- After adding, removing, or merging a skill +- Periodically as a maintenance step +- Any time the index might be stale + +--- + +## Steps + +### 1. Discover skills on disk + +Glob `skills/*/SKILL.md`. For each file found: +- Read the frontmatter to extract `name` and any trigger phrases listed +- Note the folder name (used as the canonical skill identifier) +- Skip `_skill-index.md`, `_build-log.md`, and the `skill-creator` directory (it's a tool, not a user-facing skill) + +### 2. Read the current index + +Read `skills/_skill-index.md`. Parse: +- The Quick Trigger Reference table (header row + one row per skill) +- The Skills section (one subsection per skill with purpose, triggers, file path, dependencies) + +### 3. Reconcile + +Produce three lists: + +**To add:** Skill folders that have a `SKILL.md` but no entry in the index. + +**To remove (garbage collect):** Index entries whose listed file path (`skills//SKILL.md`) doesn't exist on disk. These are orphans — skills that were deleted or merged. Flag them clearly so the user understands what's being removed. + +**To update:** Skills present in both, but where the trigger phrases in the index don't match what's in the SKILL.md. Only flag these if there's a meaningful difference — don't nitpick minor wording. + +### 4. Present the diff before touching anything + +Show a clear summary: + +``` +Proposed changes to _skill-index.md: + +ADD (2): + + email-draft — "draft an email", "write an email for me" + + invoice-gen — "generate an invoice", "make an invoice" + +REMOVE (1): + - meeting-notes — no SKILL.md found at skills/meeting-notes/SKILL.md + +UPDATE (1): + ~ pro-dev-justification — trigger phrases updated to match SKILL.md + +No changes? Index is already up to date. +``` + +Ask: "Want me to apply these changes?" + +### 5. Apply changes + +On approval: + +**Additions:** For each new skill, write a new entry in the Skills section (name, purpose pulled from the SKILL.md description, trigger phrases, file path, dependencies if any). Add a row to the Quick Trigger Reference table. + +**Removals:** Delete the index entry and the corresponding table row. If a skill was merged into another, note that in a comment or the build log — don't just silently delete. + +**Updates:** Replace stale trigger phrases in both the table and the skill's subsection. + +Preserve the existing structure and formatting of the index. Don't reorder sections or change the prose around skills that weren't touched. + +### 6. Commit and push + +After writing the updated index: + +```bash +cd skills/ && git add _skill-index.md && git commit -m "update skill index: [brief summary of changes]" && git push +``` + +Keep the commit message specific: e.g., "update skill index: add email-draft, remove meeting-notes". + +--- + +## What not to change + +- The index footer ("Started with the Robot Assistant Field Guide Starter Kit...") +- Section headers or prose that aren't related to the reconciled skills +- Skills that are in both the index and on disk and whose triggers haven't changed + +The goal is a minimal, accurate update — not a rewrite.