inspect
Skill9 starsChanged 41 days agoMITView on GitHub
Diagnose Rill PKM taxonomy health, metadata accuracy, and file integrity. Run weekly. Detects issues and appends mismatched files to knowledge/.refresh-queue for repair by /repair.
18 other projects use a version of this.
Adopted by
Most recently taken up by
- saleh-alhaddad/itqan-engineeringtheir own version, first seen Nov 28, 2026
- sanityops-org/sanityops-frameworktheir own version, first seen Nov 28, 2026
- cyrilichti/agent-workflowstheir own version, first seen Nov 24, 2026
- crywolfe/claude-code-designtheir own version, first seen Nov 22, 2026
- Josephbadigar/sitepeeltheir own version, first seen Nov 16, 2026
- Noah-OS/longhaultheir own version, first seen Nov 15, 2026
Used with
Projects with it also use doctor.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkilldoctor
Diagnose an Amplifier CLI environment through the CLI doctor agent. USE WHEN a user requests CLI runtime, settings or missing-capability inspection. DO NOT USE for project bugs or other hosts.
Also in 4 projects that use this
Other versions18 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 18
- chalk-lab/Mooncake.jl★ 411same name
- Arman-Kudaibergenov/1c-ai-development-kit★ 163same name
- matthewdonsemail-lab/log★ 103same name
- bluzir/claude-code-design★ 102same name
- NakaokaRei/swift-mcp-gui★ 61same name
- howardpen9/cc-inspect★ 17same name
- saleh-alhaddad/itqan-engineering★ 12same name
- HaipingShi/coderail★ 8same name
- Noah-OS/longhaul★ 4same name
- cyrilichti/agent-workflows★ 3same name
8 more not listed
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
- maintainSkill
- morningSkill
- newsletterSkill
- onboardingSkill
- pageSkill
- pluginSkill
- projectSkill
- pulseSkill
- refresh-decisionsSkill
- refresh-projectSkill
- repairSkill
- retrospectiveSkill
- solveSkill
- syncSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. 0 are common, 9 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 16 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 48
Use a sub-agent to Read sample file contents and evaluate on the following 5 axes:
- Distinctive: line 49
tags: Do they match the content?
- Distinctive: line 134
Use a sub-agent to Read sample file contents and perform theme clustering
- Distinctive: line 172
If tags meet the conditions:
- Distinctive: line 173
Check the tags of files with the target tag and identify frequently co-occurring tags
- Very specific: line 215
Do not write to eval/metrics/latest.yaml (deprecated, ADR-059).
- Very specific: line 217
If an existing eval/metrics/YYYY-MM-DD.yaml exists (same-day /eval already ran), preserve the search section and update only the static …
- Very specific: line 221
Use the latest Deep Path results from eval/results/ to deterministically check metadata paths to ground-truth notes (ADR-050 D50-8).
- Very specific: line 238
Write the calculation results to the static section of eval/metrics/YYYY-MM-DD.yaml saved in Phase 1.7 (structural_reachability, …
- Very specific: line 242
Check the following against knowledge/notes/*.md (can be run concurrently with Phase 1 aggregation):
- Very specific: line 245
Source reference check: Verify that the file pointed to by the source field exists
- Very specific: line 250
Use Phase 1-2 aggregation data and Phase 1.5 tag accuracy audit results to append files needing refresh to knowledge/.refresh-queue.
- Distinctive: line 258
Add files judged as MINOR or MAJOR in the Phase 1.5 metadata accuracy sampling audit
- Very specific: line 259
Orphan notes: when Phase 1.7's orphan_rate exceeds its target (default 0.05), append every orphan note to .refresh-queue.
- Very specific: line 263
Read knowledge/.refresh-queue if it exists to get existing entries (empty list if it doesn't exist)
- Distinctive: line 352
If no issues are found, display "Health check complete.
- Distinctive: line 361
When processing a large number of files, use a sub-agent for parallelization to conserve context
- Distinctive: line 365
After displaying the report, execute the following:
“Common” is measured: kept by at least 6 in 10 of the 16 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
/inspect — Note Quality Inspection (weekly. Detect issues and queue them for repair)
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,WebFetch) describe intent, not Claude-specific tool calls. Each harness should map them to its native equivalent — Claude Code uses its built-in tools as named; Codex CLI usesapply_patch/ shell / its own sub-agent mechanism /--searchetc. as appropriate.
Workflow:
/inspect->/repair->/eval(Inspect -> Repair -> Verify)
Diagnoses taxonomy health, metadata accuracy, and file integrity, and reports any issues found. Performs diagnostics + minor queue operations (ADR-046 D46-8). Does not modify file body content. Files where sampling audits detect mismatches are appended to .refresh-queue and repaired by /repair.
Arguments
$ARGUMENTS — None (no arguments required)
Steps
Phase 1: Taxonomy Health
- Retrieve the list of approved tags from the "Topic Tags" table in
taxonomy.md - Retrieve the list of deprecated tags from the "Deprecated Tags" table in
taxonomy.md - Generate an entity ID list: collect filenames (without
.md) fromknowledge/people/andknowledge/orgs/, plus directory names underprojects/(the project id is the directory name; the main file isprojects/{id}/_project.md). ADR-080: project moved fromknowledge/projects/{id}.md(flat) toprojects/{id}/_project.md(per-directory). Skip non-directory entries underprojects/(e.g.projects/CLAUDE.md) - Aggregate frontmatter from all knowledge/notes/*.md files. If the file count is large (100+), use a sub-agent for parallel processing:
- Split the file list into batches of 50
- Each agent uses Grep/Read to collect tags and mentions from frontmatter
- Merge results in the parent context
- Check the following:
- Tag frequency distribution: Count usage for each tag, and compute the median usage count across all tags in use (count >= 1; for an even number of tags, the median is the mean of the two middle values). Derive the split threshold for this run:
split_threshold = max(60, 2.5 x median). Warn about topic tags whose count strictly exceedssplit_thresholdas "split candidates" (a count exactly at the threshold is healthy). (A fixed threshold assumes a fixed vault size and misfires as the pool grows — a median-relative threshold self-scales, so healthy tags in a large vault are not flagged en masse. Record the computedsplit_thresholdfor reuse in Phase 1.5 Split Execution and Phase 2.5.) - Unapproved tags: Detect tags that are neither in the approved nor deprecated lists
- Deprecated tag usage: Detect files still using deprecated tags (migration gaps)
- Entity contamination: Detect files where entity IDs appear in tags (D46-2 gaps)
- Unused tags: Detect approved tags with 0 usage count
- Low-usage tags (5 or fewer): Detect approved tags with 5 or fewer uses. However, low usage does not mean unnecessary. New topics start with 1 use. The criteria for deciding whether to merge are two axes: "time elapsed since creation date" and "semantic overlap with existing tags"
- Tag frequency distribution: Count usage for each tag, and compute the median usage count across all tags in use (count >= 1; for an even number of tags, the median is the mean of the two middle values). Derive the split threshold for this run:
Phase 1.5: Tag Scaling Proposals
Generate taxonomy improvement proposals based on Phase 1 aggregation results.
Metadata Accuracy Sampling Audit
Randomly sample 20 files from the entire knowledge/notes/ pool and use AI to verify whether the frontmatter metadata is correct. Files with mismatches are appended to .refresh-queue and auto-corrected during the next /distill Phase 0.5.
- Randomly select 20 files from knowledge/notes/
- Use a sub-agent to Read sample file contents and evaluate on the following 5 axes:
- tags: Do they match the content? (max 3, topic only, no entity ID contamination)
- mentions: Are people/orgs/projects entity IDs mentioned in the body correctly listed in typed format (
people/id,orgs/id,projects/id)? (check for omissions, excess, and untyped entries. ADR-053) - related: Are related notes actually relevant? Are there more appropriate related notes? (quick check via Glob/Grep)
- type: Does the record / insight / reference classification match the content?
- source: Does the referenced file exist and is it a valid origin for the content? (existence check only; path changes are suggested only)
- Overall judgment for each file:
- PASS: No issues across all axes
- MINOR: Minor mismatches on 1-2 axes
- MAJOR: Mismatches on 3+ axes, or a critical error
- Append files judged as MINOR or MAJOR to
.refresh-queue(metadata will be fully corrected during the next /distill Phase 0.5) - Include mismatch rates and specific mismatches in the report
Agent prompt:
You are a Rill PKM metadata accuracy audit agent.
Verify whether the frontmatter metadata of the following files matches their content on 5 axes.
## Target Files
{list of file paths (20 files)}
## Tag Vocabulary (YAML list format)
{name + desc list}
## Entity Mapping
### People
{id -> name (aliases) one-line format}
### Orgs
{id -> name (aliases) one-line format}
### Projects
{id -> name (status, tags) one-line format. Path is `projects/{id}/_project.md` per ADR-080. Field is `status` 4-state (planning / active / paused / done), not the legacy `stage`}
## Evaluation Criteria
Read each file and verify on the following 5 axes:
### 1. tags
- Max 3, topic only (entity IDs go in mentions)
- Refer to the tag vocabulary desc and check whether the most appropriate tags were chosen for the content
- Judgment: PASS=appropriate / MINOR=room for improvement / MAJOR=inappropriate
### 2. mentions
- Are people, organizations, and projects mentioned in the body correctly listed using entity IDs from the entity mapping?
- Detect omissions (mentioned in body but missing from mentions) and excess (in mentions but not mentioned in body)
- Judgment: PASS=appropriate / MINOR=omissions or excess / MAJOR=significantly inaccurate
### 3. related
- Are the current related notes actually relevant in content?
- Do a quick check via Glob/Grep and suggest better related note candidates if any
- If related is not set, briefly check whether there are notes that clearly should be related
- Judgment: PASS=appropriate / MINOR=room for improvement / MAJOR=unrelated notes included
### 4. type
- Does the record (facts/data) / insight (observations/interpretations) / reference (external citations) classification match the content?
- Check for non-standard types (analysis, decision, etc.) that remain
- Judgment: PASS=appropriate / MAJOR=inappropriate
### 5. source
- Does the file pointed to by the source field exist? (check via Glob)
- Judgment: PASS=exists / MAJOR=does not exist or not set
## Overall Judgment
- PASS: No issues across all axes
- MINOR: Minor mismatches on 1-2 axes
- MAJOR: Mismatches on 3+ axes, or a critical error (type is completely wrong, source is broken, etc.)
## Output Format
For each file:
- filename — overall judgment (PASS/MINOR/MAJOR)
- tags: {judgment} current:[{tags}] -> recommended:[{recommended}] (only on mismatch)
- mentions: {judgment} current:[{mentions}] -> recommended:[{recommended}] (only on mismatch)
- related: {judgment} improvement suggestion: (only on mismatch)
- type: {judgment} current:{type} -> recommended:{recommended} (only on mismatch)
- source: {judgment} (only if broken)
Summary at the end:
- Overall: PASS {n} / MINOR {n} / MAJOR {n} (estimated accuracy: {pass_rate}%)
- Per-axis accuracy: tags {rate}% / mentions {rate}% / related {rate}% / type {rate}% / source {rate}%Split Execution (tags exceeding the split threshold)
If there are split candidates (count > split_threshold from Phase 1), execute splits for at most the top 3 candidates by usage count in a single /inspect run — the rest stay listed as candidates in the report. The cap keeps taxonomy churn incremental and avoids the historical loop where mass splits produced subtags that themselves crossed the threshold as the vault grew. For each executed tag, generate subcategories and add them to taxonomy.md using the following steps:
- Randomly sample up to 20 files that have the target tag
- Use a sub-agent to Read sample file contents and perform theme clustering
- Finalize 2-4 subcategories. For each subcategory:
- Tag name (kebab-case)
- Description (desc)
- Estimated number of matching files from the sample
- Add the new tags to the "Topic Tags" table in taxonomy.md via Edit
- Append all files with the target tag to
.refresh-queue(/repair will execute reassignment to the new subtags) - Include the results in the report
Agent prompt:
You are a Rill PKM taxonomy analysis agent.
All of the following files have the "{tag}" tag assigned.
Read their contents and classify them into 2-4 subcategories by theme.
## Target Files
{list of file paths (up to 20 files)}
## Current Tag Definition
{tag}: {desc}
## Output Format
For each subcategory:
- Proposed tag name (kebab-case)
- Description (one line)
- List of matching sample filenames
- Estimated match rate (percentage within sample)Merge Execution (low-usage tags)
Be cautious about what to merge. Low usage does not mean unnecessary. New topics start with 1 use, so merging too aggressively creates an infinite loop where /distill recreates the same tag.
Conditions for executing a merge (all must be met):
- Usage count of 3 or fewer
- The tag has been in taxonomy.md for 30+ days (give new tags time to grow)
- Semantically overlaps with another approved tag (judge by comparing desc)
If tags meet the conditions:
- Check the tags of files with the target tag and identify frequently co-occurring tags
- Determine the most appropriate merge target tag
- Move to the "Deprecated Tags" table in taxonomy.md (Edit to remove from "Topic Tags" and add to "Deprecated Tags" in
-> {target}format) - Append files with the target tag to
.refresh-queue(/repair will execute reassignment to the target tag) - Include the results in the report
- Low-usage tags that do not meet the conditions are noted as "growing tags" for continued observation
Phase 1.7: Static Metrics Calculation
Calculate static metadata quality metrics using Phase 1 aggregation data (see eval/concept.md).
- mentions_coverage: Proportion of notes in knowledge/notes/ that have 1+ entities in the
mentions:field.mentions: [](empty array) counts as "none" - tag_coverage: Proportion of notes in knowledge/notes/ that have 1+ tags in the
tags:field.tags: [](empty array) counts as "none" - orphan_rate: Proportion of notes with no mentions AND whose filename does not start with any id from knowledge/people/, orgs/, or projects/. These notes are hard to reach via entity-based reverse lookup. Reuse the entity ID list generated in Phase 1 Step 3 for filename prefix matching
- tag_balance: Calculate max_count, median_count, and max_tag from the per-tag usage counts aggregated in Phase 1
Save the calculation results along with the Phase 1.5 sampling_precision results to eval/metrics/YYYY-MM-DD.yaml:
date: YYYY-MM-DD
sources: [gc]
static:
mentions_coverage: 0.XX
tag_coverage: 0.XX
orphan_rate: 0.XX
tag_balance:
max_count: N
median_count: N
max_tag: "tag-name"
total_notes: N
sampling_precision:
good: N
minor: N
major: N
structural_reachability: 0.XX # Phase 1.8 (null if skipped)
avg_path_count: N.N # Phase 1.8 (null if skipped)
avg_noise_per_path: N.N # Phase 1.8 (null if skipped)
search: nullDo not write to eval/metrics/latest.yaml (deprecated, ADR-059). Retrieve the latest metrics with ls eval/metrics/ | sort | tail -1.
If an existing eval/metrics/YYYY-MM-DD.yaml exists (same-day /eval already ran), preserve the search section and update only the static section.
Phase 1.8: Structural Reachability Check (only if Deep Path results exist)
Use the latest Deep Path results from eval/results/ to deterministically check metadata paths to ground-truth notes (ADR-050 D50-8).
- Glob search
eval/results/for the latest*-deep.yaml. If not found, skip Phase 1.8 and display "No Deep Path results found — run/eval --refresh-deep" in the report - Load the Deep Path results and extract found_notes (relevance: high + medium) from all queries as the ground-truth set
- For each query, extract entity IDs and topic keywords from the query text:
- Match against the entity ID list from Phase 1 Step 3
- Match against approved tags from taxonomy.md
- For each ground-truth note, check reachability via the following 3 paths (grep/glob only, no Read needed):
a. mentions path: Does
grep "mentions:.*{type}/{entity-id}" knowledge/notes/{filename}match? b. tags path: Doesgrep "tags:.*{tag}" knowledge/notes/{filename}match? c. filename path: Does the note's filename start with the query's entity ID? - For each path that matches, also record the hit count when grep/glob-ing the entire
knowledge/notes/with that path (noise estimate) - Calculate the following metrics:
- structural_reachability: Proportion of ground-truth notes reachable via 1+ paths (target > 0.85)
- avg_path_count: Average number of reachable paths per ground-truth note (target > 1.5)
- avg_noise_per_path: Average number of note hits per reachable path (target < 30)
- Append unreachable notes (0 paths) to
knowledge/.refresh-queue(only if not already in the queue) - Write the calculation results to the
staticsection ofeval/metrics/YYYY-MM-DD.yamlsaved in Phase 1.7 (structural_reachability,avg_path_count,avg_noise_per_path). If Phase 1.8 was skipped, leave asnull
Phase 2: File Integrity
Check the following against knowledge/notes/*.md (can be run concurrently with Phase 1 aggregation):
- Required frontmatter fields: Detect missing
created,type,source - Source reference check: Verify that the file pointed to by the
sourcefield exists - Mentions reference check: For each value in
mentions({type}/{id}format. ADR-053), verify that the correspondingknowledge/{type}/{id}.mdexists. Also detect bare IDs without type prefixes
Phase 2.5: .refresh-queue Update
Use Phase 1-2 aggregation data and Phase 1.5 tag accuracy audit results to append files needing refresh to knowledge/.refresh-queue.
- Collect file paths matching the following deterministic conditions (no AI judgment needed):
tags: [](empty array)tagshas only 1 tag and that tag was actually split in this run's Phase 1.5 Split Execution (its subtags now exist in taxonomy.md). Candidates left unexecuted by the top-3 cap are not queued — /repair would have no migration target for them yetmentionsfield does not existtypeis not one ofrecord/insight/referencetagscontains a deprecated tag (migration gap)
- Add files judged as MINOR or MAJOR in the Phase 1.5 metadata accuracy sampling audit
- Orphan notes: when Phase 1.7's
orphan_rateexceeds its target (default 0.05), append every orphan note to.refresh-queue. A note is an orphan when both are true:mentionsis empty / absent- The filename's leading slug does not match any entity id from
knowledge/people/,knowledge/orgs/, orprojects/(the entity-id list generated in Phase 1 Step 3; project ids are directory names underprojects/)/repairresolves these by inferring an appropriatementionsentry from the body when possible (otherwise leaves them as flagged for manual triage)
- Read
knowledge/.refresh-queueif it exists to get existing entries (empty list if it doesn't exist) - Append only paths that do not duplicate existing entries (one file path per line)
- Include the number of appended entries in the report (broken down by reason: empty-tags / generic-tag / no-mentions / wrong-type / deprecated-tag / sampling-mismatch / orphan)
Phase 3: Report Output
Display a summary to the console:
## Metadata Quality Metrics
| Metric | Value | Target | Status |
|--------|-------|--------|--------|
| mentions_coverage | 0.XX | > 0.90 | ✓/⚠ |
| tag_coverage | 0.XX | > 0.95 | ✓/⚠ |
| orphan_rate | 0.XX | < 0.05 | ✓/⚠ |
| tag_balance (max) | N ({tag}) | <= split_threshold (= max(60, 2.5 x median)) | ✓/⚠ |
| structural_reachability | 0.XX | > 0.85 | ✓/⚠ |
| avg_path_count | N.N | > 1.5 | ✓/⚠ |
| avg_noise_per_path | N.N | < 30 | ✓/⚠ |
## Taxonomy Health
### Tag Distribution Top 10
1. {tag}: {count} files
...
### Metadata Accuracy Sampling Audit (20 files)
- Overall accuracy: {accuracy}% (PASS {n} / MINOR {n} / MAJOR {n})
- Per-axis accuracy: tags {rate}% / mentions {rate}% / related {rate}% / type {rate}% / source {rate}%
- Mismatched files:
- {file} — MINOR tags:[{current}]->[{recommended}], mentions:omission[{ids}]
- {file} — MAJOR type:{current}->{recommended}, source:broken
### Split Candidates (count > split_threshold)
- {tag}: {count} files
### Split Execution
#### {tag} ({count} files) -> new tags added to taxonomy.md:
1. **{proposed-tag}** — {desc} (estimated {n} files, {rate}%)
2. **{proposed-tag}** — {desc} (estimated {n} files, {rate}%)
-> {n} matching files appended to .refresh-queue
### Unapproved Tags
- {tag} ({count} files) — merge candidate: {suggestion}
### Deprecated Tag Usage (migration gaps)
- {tag}: {count} files
### Entity Contamination
- {count} files have entity IDs mixed into tags
### Unused Tags (0 files)
- {tag}, {tag}, ...
### Low-Usage Tags (5 or fewer)
- {tag}: {count} files (added: {date})
### Merge Execution (3 or fewer + 30+ days old + semantic overlap)
- **{tag}** ({count} files) -> merged into {target-tag} (moved to deprecated table in taxonomy.md, matching files appended to .refresh-queue)
### Growing Tags (under observation)
- {tag}: {count} files (added: {date}, {n} days until merge consideration)
## Structural Reachability (Deep Path based)
### Unreachable Notes (0 paths)
| Query | Note | Cause |
|-------|------|-------|
| Q2 | xxx.md | No match on mentions/tags/filename |
### Single-Path Notes (1 path only, no redundancy)
| Query | Note | Only Path |
|-------|------|-----------|
| Q3 | yyy.md | filename only |
-> Unreachable notes appended to .refresh-queue
## File Integrity
### Missing required fields: {count} files
### Broken source references: {count} files
### Broken mentions references: {count} files
## Refresh Queue
### .refresh-queue appended: {count} files (cumulative: {total} files)If no issues are found, display "Health check complete. No issues found."
Rules
- Do not modify file body content. However, the following are exceptions that are executed automatically:
- Appending to
knowledge/.refresh-queue(queue operation. Permitted by ADR-046 D46-8) - Tag splitting (adding new tags) and merging (moving to deprecated table) in
taxonomy.md(ADR-058)
- Appending to
- For unapproved tags, add a mapping to the closest approved tag in the deprecated tags table of taxonomy.md, and append the affected files to
.refresh-queue - Files with entity contamination are appended to
.refresh-queue(/repair will execute the tags -> mentions migration) - When processing a large number of files, use a sub-agent for parallelization to conserve context
Post-Processing
After displaying the report, execute the following:
rill activity-log add "inspect — tags:{total_tags_count}, issues:{total_issues_count}, queued:{queued_count}"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.

