rune
CLAUDE.md0 starsChanged 7 months agoMITView on GitHub
Registry manager for AI coding agent skills, agents, and rules. Syncs markdown files from git-based registries into .claude/skills/, .claude/agents/, and .claude/rules/. Tracks drift via content-hash lockfile and pedigree frontmatter. CI uses nomograph/pipeline/rust-cli@v2.4.6 with cargo-deny for advisories and license audit. audit_allow_failure: false. Lib + binary crate. lib.rs re-exports all modules for testing. - ArtifactType -- enum: Skill, Agent, Rule. Each has section name, default directory, and display name. Agents use .claude/agents/ (Anthropic's directory name; their docs say "subagents"). - Manifest --…
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 55
All errors use anyhow::Result with .context() or bail!().
- Very specific: line 60
import/upstream/diff/update are skill-only (use pedigree metadata).
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
rune
Registry manager for AI coding agent skills, agents, and rules. Syncs
markdown files from git-based registries into .claude/skills/,
.claude/agents/, and .claude/rules/. Tracks drift via content-hash
lockfile and pedigree frontmatter.
Build
cargo build --release # binary at target/release/rune
cargo test # 22 unit + 40 integration tests
cargo clippy -- -D warnings # lint (also enforced at crate level)CI uses nomograph/pipeline/rust-cli@v2.4.6 with cargo-deny for
advisories and license audit. audit_allow_failure: false.
Architecture
Lib + binary crate. lib.rs re-exports all modules for testing.
| Module | Responsibility |
main.rs | CLI (clap derive), command dispatch, --type flag parsing |
commands/mod.rs | SkillStatus enum, resolve_registry helpers |
commands/check.rs | Drift checking for all three types |
commands/sync.rs | Sync engine, AGENTS.md generation, agent symlink |
commands/crud.rs | add, push, remove (type-aware) |
commands/info.rs | ls, status, doctor, clean, audit |
commands/upstream.rs | browse, import, upstream, diff, update (skill-only) |
registry.rs | Git/archive registry operations, hashing, file locking |
pedigree.rs | YAML frontmatter parsing/writing, URL slug extraction |
manifest.rs | ArtifactType enum, per-project rune.toml, path overrides |
config.rs | Global config, registry definitions, artifact resolution |
setup.rs | One-time setup: config creation, Claude Code hook install |
lockfile.rs | Per-project rune.lock: content hashes for drift detection |
color.rs | Terminal color support (ANSI, respects TTY) |
Key types
ArtifactType-- enum: Skill, Agent, Rule. Each has section name, default directory, and display name. Agents use.claude/agents/(Anthropic's directory name; their docs say "subagents").Manifest-- per-project.claude/rune.toml. Sections:[skills],[agents],[rules], optional[paths]for overrides.Lockfile-- per-project.claude/rune.lock. Matching sections.Pedigree-- YAML frontmatter tracking origin, import date, upstream commit, modification status. Skill-only concept.Config-- global~/.config/rune/config.toml. Registry definitions.SkillStatus-- drift check result: Current, Drifted, Missing, etc.
Conventions
- All errors use
anyhow::Resultwith.context()orbail!(). #![deny(warnings, clippy::all)]enforced in both lib.rs and main.rs.- Names validated against path traversal via
validate_name(). - Registry pulls use file locking (
fs2) for concurrent safety. - Registries cached in
~/.cache/rune/registries/. - import/upstream/diff/update are skill-only (use pedigree metadata).
- Global state (offline, dry_run) via
AtomicBoolstatics in registry.rs. - Types kept as
SkillEntryandLockedSkillfor serde backward compat.
Testing
62 tests: 11 unit (pedigree), 11 duplicated in bin, 40 integration.
Integration tests cover: manifest/lockfile roundtrips for all types, typed and legacy registry layouts, artifact path resolution, find_type collision warnings, path overrides, and all original skill-focused tests.
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.

