redex
Update existing index.toon with changes. Detects new/deleted/modified folders and updates the semantic folder index.
What this skill does
# /redex - Update Existing Index
**WHEN THIS SKILL IS INVOKED, IMMEDIATELY BEGIN EXECUTING THE STEPS BELOW. DO NOT JUST EXPLAIN THE PROCESS - ACTUALLY RUN THE COMMANDS AND PERFORM THE ANALYSIS.**
This skill updates existing `index.toon` files to reflect codebase changes.
## CRITICAL: Execution Instructions
When this skill loads, you MUST:
1. START IMMEDIATELY with Step 1 below (detect changes)
2. EXECUTE each step - run git commands, read files, analyze folders
3. DO NOT just describe what the skill does - DO IT NOW
4. ONLY show documentation if the user explicitly asks for help
If `index.toon` does not exist, tell the user to run `/toondex` first.
## Implementation Steps (Execute Now)
**BEGIN EXECUTION IMMEDIATELY:**
## When to Use
Run `/redex` when:
- Files or folders have been added, deleted, or significantly modified
- You see a suggestion that the index may be outdated
- You want to refresh folder summaries
## What It Does
1. **Detects changes** since last index via git
2. **Identifies what changed**: New folders, deleted folders, modified folders
3. **Re-analyzes** only the changed folders
4. **Presents a diff** showing old vs new summaries
5. **Updates** the affected `index.toon` files
## Process (EXECUTE THESE STEPS NOW)
### Step 1: Detect Changes (DO THIS NOW)
RUN these git commands to find changes since the last `index.toon` commit:
```bash
LAST_REF=$(git log -1 --format="%H" -- index.toon)
git diff --name-only $LAST_REF..HEAD
```
Parse the output to identify changed folders.
### Step 2: Identify What Changed (DO THIS NOW)
Categorize the changes:
- **New folders**: Folders created since last index
- **Deleted folders**: Folders that no longer exist
- **Modified folders**: Folders with file changes
### Step 3: Re-analyze Changed Folders (DO THIS NOW)
For EACH changed folder, IMMEDIATELY:
1. Read 3-5 representative source files from that folder
2. Generate a 1-3 sentence behavioral summary
3. Calculate confidence score (0.0-1.0)
4. Compare with the old summary from existing index.toon
###Step 4: Present Diff (DO THIS NOW)
SHOW the user this diff format:
```
index.toon changes:
MODIFIED:
src/auth:
old: "JWT-based authentication."
new: "Clerk-based authentication. Role middleware." [0.8]
NEW:
src/analytics: "PostHog integration for user tracking." [0.7]
DELETED:
src/legacy (folder no longer exists)
Apply changes? [Y/n]
```
### Step 5: Update Index Files
After user approval:
- Update the relevant `index.toon` files (only those with changes)
- Preserve order for unchanged entries
- Insert new entries at appropriate priority position
## Auto-Detection
The SessionStart hook automatically checks if the index is outdated and may suggest running `/redex` when:
- Change score exceeds threshold (see detect-changes.sh)
- New top-level folders exist (not in index)
- Indexed folders are deleted
- Many files changed in indexed folders
- More than 7 days since last index
When you see: `"PROPOSE_REINDEX: index.toon may be outdated..."`, consider running `/redex`.
## Examples
### Updating After Code Changes
```
User: /redex
Claude: Detecting changes since last index...
Found changes in 3 folders:
- src/components (15 files modified)
- src/api (new folder)
- src/legacy (deleted)
Re-analyzing...
index.toon changes:
MODIFIED:
src/components:
old: "UI components using shadcn."
new: "UI components using shadcn. Added form components with validation." [0.9]
NEW:
src/api: "REST API endpoints. Express routes with middleware." [0.8]
DELETED:
src/legacy
Apply changes? [Y/n]
```
### When No Changes Detected
```
User: /redex
Claude: No significant changes detected since last index. Your index.toon is up to date!
```
## Tips
- Run `/redex` regularly to keep the index current
- The SessionStart hook will remind you when the index is stale
- If you see low confidence scores during update, review those summaries
- New folders are added at the end by default - you can manually reorder them for priority
## See Also
- `/toondex` - Create initial index
- `/toondex --stats` - View usage statistics (requires TOONDEX_DEBUG=1)
For full documentation, see the main toondex skill or `plugins/toondex/skills/toondex/SKILL.md`.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.