Best use case
mruler is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
mruler - Meta-Ruler Skill Governance
Teams using mruler should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/mruler/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How mruler Compares
| Feature / Agent | mruler | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
mruler - Meta-Ruler Skill Governance
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# mruler - Meta-Ruler Skill Governance
**Trit: 0 (ERGODIC - Coordinator)**
Ensures ALL skills are used maximally, correctly, and precisely at all times.
## Purpose
The mruler is the governance layer that:
1. **Monitors** skill loading and invocation
2. **Enforces** GF(3) conservation across skill triads
3. **Validates** skill composition correctness
4. **Maximizes** skill utilization efficiency
## Laws Enforced
```
LAW 1: TRIADIC LOADING
On EVERY interaction, load exactly 3 skills with Σ trits = 0
LAW 2: GF(3) CONSERVATION
Every skill composition must satisfy: Σ trits ≡ 0 (mod 3)
LAW 3: MAXIMUM UTILIZATION
Prefer skills that haven't been used recently
Track skill invocation frequency
LAW 4: CORRECT INVOCATION
Match skill to task domain
Verify skill prerequisites are met
LAW 5: PRECISE EXECUTION
Skills must complete with verifiable output
Output must satisfy skill's contract
```
## Skill Registry
```clojure
(def SKILL-REGISTRY
{:generators {:trit +1 :count 61 :examples ["gay-mcp" "parallel-fanout" "world-hopping"]}
:coordinators {:trit 0 :count 61 :examples ["asi-integrated" "triad-interleave" "unworld"]}
:validators {:trit -1 :count 61 :examples ["bisimulation-game" "spi-parallel-verify" "three-match"]}})
;; 183 total skills, balanced 61-61-61
```
## Governance Protocol
### On Session Start
```bash
# Pull fresh skills
npx ai-agent-skills install plurigrid/asi --agent amp
# Verify skill count
ls ~/.agents/skills/ | wc -l # Should be 183+
```
### On Every Interaction
```python
def mruler_enforce(interaction):
# 1. Select triadic skills based on task
skills = select_triad(interaction, unused_first=True)
# 2. Verify GF(3) balance
assert sum(s.trit for s in skills) % 3 == 0
# 3. Load skills
for skill in skills:
load_skill(skill)
log_invocation(skill)
# 4. Execute with validation
results = [skill.execute(interaction) for skill in skills]
# 5. Verify outputs
for skill, result in zip(skills, results):
assert skill.validate_output(result)
return merge_results(results)
```
## Skill Utilization Tracking
```sql
CREATE TABLE skill_invocations (
invocation_id VARCHAR PRIMARY KEY,
skill_name VARCHAR NOT NULL,
trit INT CHECK (trit IN (-1, 0, 1)),
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
thread_id VARCHAR,
success BOOLEAN,
duration_ms INT
);
CREATE VIEW skill_utilization AS
SELECT
skill_name,
trit,
COUNT(*) as invocations,
AVG(duration_ms) as avg_duration,
SUM(CASE WHEN success THEN 1 ELSE 0 END)::FLOAT / COUNT(*) as success_rate
FROM skill_invocations
GROUP BY skill_name, trit
ORDER BY invocations DESC;
CREATE VIEW underutilized_skills AS
SELECT skill_name, trit
FROM all_skills
WHERE skill_name NOT IN (
SELECT DISTINCT skill_name
FROM skill_invocations
WHERE timestamp > NOW() - INTERVAL '7 days'
);
```
## Correctness Validation
### Domain Matching
```clojure
(def SKILL-DOMAINS
{"aptos-agent" #{:blockchain :transfer :stake}
"gay-mcp" #{:color :deterministic :gf3}
"parallel-fanout" #{:parallel :triadic :fanout}
"bisimulation-game" #{:verification :equivalence :dispersal}
"world-hopping" #{:navigation :worlds :triangle-inequality}})
(defn validate-domain-match [skill task]
(let [task-keywords (extract-keywords task)
skill-domain (get SKILL-DOMAINS (:name skill) #{})]
(> (count (clojure.set/intersection task-keywords skill-domain)) 0)))
```
### Output Contracts
```clojure
(defn validate-output [skill result]
(case (:name skill)
"gay-mcp" (and (contains? result :hex) (contains? result :trit))
"parallel-fanout" (and (= 3 (count (:children result)))
(zero? (reduce + (map :trit (:children result)))))
"bisimulation-game" (boolean? (:equivalent? result))
true)) ; Default: accept any output
```
## Maximum Utilization Algorithm
```clojure
(defn select-triad [task loaded-skills invocation-history]
(let [domain (classify-domain task)
candidates (filter #(matches-domain? % domain) all-skills)
;; Prefer underutilized skills
scored (map (fn [s]
{:skill s
:score (- (get invocation-history (:name s) 0))})
candidates)
sorted (sort-by :score > scored)
;; Select balanced triad
plus-skill (first (filter #(= +1 (:trit (:skill %))) sorted))
minus-skill (first (filter #(= -1 (:trit (:skill %))) sorted))
ergodic-skill (first (filter #(= 0 (:trit (:skill %))) sorted))]
[(:skill plus-skill) (:skill ergodic-skill) (:skill minus-skill)]))
```
## Integration with AGENTS.md
Add to your AGENTS.md:
```markdown
## mruler Governance
**Rule M1: Triadic Skill Loading**
- Load exactly 3 skills per interaction
- Trits must sum to 0
**Rule M2: Skill Rotation**
- Prefer skills not used in last 10 interactions
- Track utilization in DuckDB
**Rule M3: Output Validation**
- Every skill output must be validated
- Failed validations trigger retry with alternate skill
**Rule M4: Maximum Awareness**
- All 183 skills are available
- Cross-domain composition encouraged
- Interstellar hops (stream × world × skill) preferred
```
## Commands
```bash
# Check skill utilization
just mruler-utilization
# Find underutilized skills
just mruler-underutilized
# Validate last N invocations
just mruler-validate 10
# Force rotation to unused skills
just mruler-rotate
# Full governance report
just mruler-report
```
## Justfile Recipes
```just
# mruler skill governance
mruler-utilization:
duckdb ~/.topos/ducklake.duckdb "SELECT * FROM skill_utilization ORDER BY invocations DESC LIMIT 20;"
mruler-underutilized:
duckdb ~/.topos/ducklake.duckdb "SELECT * FROM underutilized_skills;"
mruler-validate COUNT="10":
bb scripts/mruler_validate.bb {{COUNT}}
mruler-rotate:
bb scripts/mruler_rotate.bb
mruler-report:
@echo "╔═══════════════════════════════════════════════════════════════╗"
@echo "║ MRULER GOVERNANCE REPORT ║"
@echo "╚═══════════════════════════════════════════════════════════════╝"
@just mruler-utilization
@echo ""
@just mruler-underutilized
```
## GF(3) Verification
Every mruler action verifies:
```
Σ (loaded_skills.trit) ≡ 0 (mod 3)
Σ (invoked_skills.trit) ≡ 0 (mod 3)
Σ (output_trits) ≡ 0 (mod 3)
```
If any check fails, mruler auto-corrects by adding balancing skill.
## See Also
- `maximum-awareness` - Composition primitives
- `parallel-fanout` - Triadic dispatch
- `triad-interleave` - Stream interleaving
- `asi-integrated` - Skill lattice
- `spi-parallel-verify` - Parallelism verification
## Scientific Skill Interleaving
This skill connects to the K-Dense-AI/claude-scientific-skills ecosystem:
### Graph Theory
- **networkx** [○] via bicomodule
- Universal graph hub
### Bibliography References
- `general`: 734 citations in bib.duckdb
## Cat# Integration
This skill maps to **Cat# = Comod(P)** as a bicomodule in the equipment structure:
```
Trit: 0 (ERGODIC)
Home: Prof
Poly Op: ⊗
Kan Role: Adj
Color: #26D826
```
### GF(3) Naturality
The skill participates in triads satisfying:
```
(-1) + (0) + (+1) ≡ 0 (mod 3)
```
This ensures compositional coherence in the Cat# equipment structure.Related Skills
zx-calculus
Coecke's ZX-calculus for quantum circuit reasoning via string diagrams with Z-spiders (green) and X-spiders (red)
zulip-cogen
Zulip Cogen Skill 🐸⚡
zls-integration
zls-integration skill
zig
zig skill
zig-syrup-bci
Multimodal BCI pipeline in Zig: DSI-24 EEG, fNIRS mBLL, eye tracking IVT, LSL sync, EDF read/write, GF(3) conservation
zig-programming
zig-programming skill
zeroth-bot
Zeroth Bot - 3D-printed open-source humanoid robot platform for sim-to-real and RL research. Affordable entry point for humanoid robotics.
xlsx
Comprehensive spreadsheet creation, editing, and analysis with support
wycheproof
Google's Wycheproof test vectors for cryptographic implementation testing.
Writing Hookify Rules
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
worldmat-tidar
worldmat-tidar
worlding
Gay.jl world_ pattern: persistent composable state builders with GF(3) conservation, Möbius invertibility, and Narya verification