repair
Skill9 starsChanged 42 days agoMITView on GitHub
Batch-update knowledge/notes/ frontmatter (tags, mentions, type) for files queued by /inspect. Reads `knowledge/.refresh-queue` and dispatches parallel sub-agents to repair metadata. Use when the user wants to fix queued metadata issues, typically right after /inspect.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- ohanyan/adultingtheir own version, first seen Nov 16, 2026
- mlflow/mlflowtheir own version, first seen Nov 15, 2026
- jakubtobiasz/second-brain-templatetheir own version, first seen Nov 15, 2026
- tygwan/cc-initializer-windowstheir own version, first seen Oct 20, 2026
- xiaolai/cc-suitetheir own version, first seen Oct 19, 2026
- lifebugz/cc-mermaidtheir own version, first seen Oct 15, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- mlflow/mlflow★ 29ksame name
- xiaolai/cc-suite★ 56same name
- dynos-fit/dynos-work★ 2same name
- ohanyan/adulting★ 1same name
- jakubtobiasz/second-brain-template★ 0same name
- lifebugz/cc-mermaid★ 0same name
- tygwan/cc-initializer★ 0same name
- tygwan/cc-initializer-windows★ 0same name
- yuanhaorannnnnn/agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository27 other files it gives its agents.
- AGENTS.mdAGENTS.md
- templates/AGENTS.mdAGENTS.md
- inbox/CLAUDE.mdCLAUDE.md
- pages/CLAUDE.mdCLAUDE.md
- projects/CLAUDE.mdCLAUDE.md
- tasks/CLAUDE.mdCLAUDE.md
- workspace/CLAUDE.mdCLAUDE.md
- briefingSkill
- clip-tweetSkill
- closeSkill
- distillSkill
- evalSkill
- focusSkill
- inspectSkill
- maintainSkill
- morningSkill
- newsletterSkill
- onboardingSkill
- pageSkill
- pluginSkill
- projectSkill
- pulseSkill
- refresh-decisionsSkill
- refresh-projectSkill
- retrospectiveSkill
- solveSkill
- syncSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 7 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
If empty or does not exist → display "Queue is empty.
- Distinctive: line 26
Verify each file path exists (Glob).
- Very specific: line 37
Read knowledge/people/*.md and compress into one-line mapping format (e.g., alex-chen: Alex Chen (Alex, Chen))
- Very specific: line 38
Read knowledge/orgs/*.md and compress into one-line mapping format
- Very specific: line 39
Read projects/*/_project.md and compress into one-line mapping format (ADR-080: projects moved from knowledge/projects/*.md flat layout to …
- Distinctive: line 89
After all sub-agents complete:
- Very specific: line 96
Entity ID stripping (deterministic post-processing): Run rill strip-entity-tags <file_paths ...> in a shell on success files (ADR-046 …
- Distinctive: line 98
New tag validation: Check tags on success files.
- Very specific: line 100
Queue update: Remove success + skipped files from knowledge/.refresh-queue.
- Distinctive: line 136
Only perform lightweight Grep-based tallying, not the full /inspect measurement (sampling_precision, structural_reachability, etc.):
- Very specific: line 143
Write to eval/metrics/YYYY-MM-DD.yaml (today's date):
- Very specific: line 144
If file exists, update only the 4 items above in the static section (preserve other static items and search section)
- Very specific: line 145
If file does not exist, create new with sources: [repair], the 4 items above only, others set to null
- Distinctive: line 149
Do not modify file body text: Only update frontmatter
- Distinctive: line 151
Creating new tags is prohibited: Only use approved tags from taxonomy.md
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/repair — Note Quality Repair (Run after /inspect. Batch-processes the queue)
Conduct all conversation with the user — and write all generated output — in the language defined by .claude/rules/personal-language.md (or the user's input language if that file is absent). Follow the language rules in full — exceptions and translation quality are defined in the Language Rules of .claude/rules/rill-core.md and the vault's personal-*.md overrides, never restated per skill. The English instructions below are for skill clarity, not for output style.
Tool references in this skill (
sub-agent,shell,Read,Edit,Glob,Grep) describe intent, not Claude-specific tool calls. Each harness should map them to its native equivalent — Claude Code uses its built-in Agent / Bash / Read / Edit tools as named; Codex CLI uses CSV fan-out / shell /apply_patchetc. as appropriate.
Workflow:
/inspect→/repair→/eval(Inspect → Repair → Evaluate)
Reads files from knowledge/.refresh-queue and batch-updates frontmatter metadata (tags, mentions, type). /inspect diagnoses and queues files; /repair performs the repairs.
Arguments
$ARGUMENTS — None (queue-driven, no arguments needed)
Steps
Step 1: Read Queue
- Read
knowledge/.refresh-queue - If empty or does not exist → display "Queue is empty. Run /inspect to diagnose and populate the queue." and exit
- Verify each file path exists (Glob). Exclude and log any paths that no longer exist
- Display the count of valid files
Step 2: Build Shared Context
Build the following once (shared prefix for all agents):
- Read
taxonomy.md - Generate tag vocabulary in YAML list format (name + desc) from the "Topic Tags" table (ADR-046 D46-3)
- Generate deprecated tag → successor mapping from the "Deprecated Tags" table
- Identify mega-tags: Bulk-extract tags from
knowledge/notes/*.mdfrontmatter and tally usage counts (shell one-liner:for f in knowledge/notes/*.md; do awk ... done | sort | uniq -c | sort -rn). Compute the median usage count across tags in use and derivesplit_threshold = max(60, 2.5 x median)— the same formula as /inspect Phase 1, so both skills agree on what counts as a mega-tag as the vault grows. List tag names whose count exceedssplit_threshold. If none, note "No mega-tags" - Read
knowledge/people/*.mdand compress into one-line mapping format (e.g.,alex-chen: Alex Chen (Alex, Chen)) - Read
knowledge/orgs/*.mdand compress into one-line mapping format - Read
projects/*/_project.mdand compress into one-line mapping format (ADR-080: projects moved fromknowledge/projects/*.mdflat layout to top-levelprojects/{slug}/_project.mdper-directory layout) - Generate an entity ID list (comma-separated) from all filenames (without extension) in knowledge/{people,orgs}/ plus directory names under projects/
Important: Do not read the full text of target files in the parent context. Pass only file paths to agents and let agents Read them internally
Step 3: Batch Splitting
- Process all files in the queue (no upper limit)
- Split into batches with a maximum of 30 files per agent (can be increased up to 70 after confirming accuracy in production use)
- Grouping files with the same issue (e.g., same deprecated tag) within a batch is efficient but not required
- Launch up to 4 sub-agents in parallel. If there are more than 4 batches, wait for previous batches to complete before launching the next
Step 4: Launch Parallel Sub-agents
Prompt structure for each sub-agent:
Follow the instructions in .claude/commands/_distill/refresh-agent.md to process the following files.
First Read that template file to confirm the instructions, then Read the target files.
Target files:
{file_paths (newline-separated)}
Shared context:
### Tag vocabulary (YAML list format. Refer to desc when selecting tags. Tags not in this vocabulary are prohibited)
{taxonomy_yaml}
### Deprecated tag → successor mapping (replace deprecated tags with their successors)
{deprecated_tag_mapping}
### Mega-tag list (count > max(60, 2.5 x median). Prefer more specific sub-tags over these)
{mega_tag_list}
### People mapping
{people_mapping}
### Orgs mapping
{orgs_mapping}
### Projects mapping
{projects_mapping}
### Entity ID list
{entity_ids}Launch as background sub-agents (one per batch). On Claude Code, use run_in_background: true with model: "sonnet" — the Sonnet routing was validated 2026-04-19 in the Tier 1 routing eval (3/3 PASS, 53% cost reduction vs Opus). Haiku was tested but failed (1/3 PASS — catastrophic field hallucination on multi-rule cases including invented tags and corrupted source/created fields), so do not downgrade further. On other harnesses, prefer the cheapest model that maintains accuracy on multi-rule frontmatter rewrites.
Step 5: Aggregate Results + Deterministic Post-processing
After all sub-agents complete:
- Aggregate results from each sub-agent:
- success: list of successfully updated files
- skipped: list of skipped files
- failed: list of failed files
- Entity ID stripping (deterministic post-processing): Run
rill strip-entity-tags <file_paths ...>in a shell on success files (ADR-046 D46-2). Safety net for cases where the LLM leaves entity IDs in tags - New tag validation: Check tags on success files. If any tags not in taxonomy.md were assigned, log a warning (do not auto-fix — will be caught by next /inspect run)
- Queue update: Remove success + skipped files from
knowledge/.refresh-queue. Leave failed files in the queue (will be reprocessed on next /repair run). If the queue becomes empty, clear the file contents
Step 6: Report + Completion
Display a summary to the console:
## /repair Results
- Successfully processed: {success_count} files
- Skipped: {skipped_count} files
- Failed: {failed_count} files
- Remaining in queue: {remaining_count} files
### Changes Made
| File | tags | mentions | type |
|------|------|----------|------|
| {name} | {old} → {new} | +{added_ids} | {change} |
...
### Entity ID Stripping
- Removed entity IDs from tags in {count} files
### New Tag Warnings (tags not in taxonomy.md)
- {tag}: {count} files — will be detected and handled in next /inspectCompletion:
rill activity-log add repair "processed:{success}, skipped:{skipped}, failed:{failed}, remaining:{remaining}"Step 7: Metrics Recalculation
Immediately reflect the metadata fixes from /repair in eval/metrics/ (ADR-059). Only perform lightweight Grep-based tallying, not the full /inspect measurement (sampling_precision, structural_reachability, etc.):
mentions_coverage: files in knowledge/notes/ containingmentions:/ total files (excludingmentions: [])tag_coverage: files in knowledge/notes/ containingtags: [/ total files (excludingtags: [])tag_balance: Grep all tag counts and calculate max_count, median_count, max_tagtotal_notes: file count in knowledge/notes/
Write to eval/metrics/YYYY-MM-DD.yaml (today's date):
- If file exists, update only the 4 items above in the
staticsection (preserve other static items and search section) - If file does not exist, create new with
sources: [repair], the 4 items above only, others set to null
Rules
- Do not modify file body text. Only update frontmatter
- Do not change source, created, or related fields
- Creating new tags is prohibited. Only use approved tags from taxonomy.md
- Idempotency: running multiple times on the same file produces the same result
- Error handling: failure on an individual file does not affect other files (leave in queue for next /repair run)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

