/asi:crdtfrom asi
Provides conflict-free replicated data types (CRDTs): LWW Register, G-Counter, PN-Counter, OR-Set, and Text CRDT with merge semantics and property verification. For collaborative editing and distributed state.
Ships in asi. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Status: ✅ Production Ready Framework: Jules Hedges' Compositional Game Theory Language: Ruby (HedgesOpenGames module) Trit: ±1 (covariant/contravariant) Integration: Amp, Codex, Music-Topos CRDT
"all is bidirectional" — @bmorphism, Play/Coplay gist
"Automerge is a local-first sync engine for multiplayer apps that works offline, prevents conflicts, and runs fast." — Automerge
Plurigrid Connection: CRDTs embody the principle of autopoietic ergodicity — self-sustaining distributed systems that explore all accessible states and converge automatically. This aligns with bmorphism's vision of:
Key References:
Related to bmorphism's work on:
The CRDT Skill provides conflict-free replicated data types with bidirectional lens optics for compositional game theory. It implements core CRDT types with full merge semantics and property verification.
LWW Register (Last-Write-Wins)
G-Counter (Grow-only Counter)
PN-Counter (Positive-Negative Counter)
OR-Set (Observed-Remove Set)
Text CRDT (Character-based)
All CRDTs verify these mathematical properties:
# Forward pass (play)
result = skill.play(
crdt_name: "state",
operations: [{op: :set, value: 100}],
strategy: :sequential
)
# Backward pass (coplay)
ack = skill.coplay(
transfer_id: result[:transfer_id],
acknowledged: true,
consistency_verified: true
)
Compose with other games:
skill = CRDTSkill.new
# Create CRDT
skill.create("counter", :pn_counter, "replica-1")
# Mutate
skill.mutate("counter", :increment, 5)
skill.mutate("counter", :decrement, 2)
# Query
result = skill.query("counter")
# => { value: 3, ... }
# Merge two CRDTs
skill.merge("counter1", "counter2")
# Verify properties
skill.verify_idempotence(crdt1, crdt2)
skill.verify_commutativity("counter1", "counter2")
skill.verify_associativity("c1", "c2", "c3")
# Forward: Client sends operations
result = skill.play(
crdt_name: "shared_state",
operations: [
{op: :add, value: "alice"},
{op: :add, value: "bob"}
]
)
# => { success: true, transfer_id: "...", operations_count: 2 }
# Backward: Server acknowledges with consistency verification
ack = skill.coplay(
transfer_id: result[:transfer_id],
acknowledged: true,
consistency_verified: true
)
# => { success: true, utility: 1.0, properties: {...} }
stats = skill.statistics
# => {
# total_crdts: 12,
# total_merges: 5,
# total_operations: 47,
# merge_success_rate: 100.0,
# avg_merge_time: 0.05,
# operations_by_type: {...}
# }
skill = CRDTSkill.new
# Create and use
skill.create("views", :g_counter, "server-1")
skill.mutate("views", :increment, 1)
skill.mutate("views", :increment, 1)
result = skill.query("views")
# => { value: 2, ... }
# Replica 1: Add items
skill.create("tags-1", :or_set, "replica-1")
skill.mutate("tags-1", :add, "music")
skill.mutate("tags-1", :add, "harmony")
# Replica 2: Add different items
skill.create("tags-2", :or_set, "replica-2")
skill.mutate("tags-2", :add, "color")
skill.mutate("tags-2", :add, "perception")
# Merge
result = skill.merge("tags-1", "tags-2")
# All tags now present in merged set
# Verify CRDT properties
is_idempotent = skill.verify_idempotence(
skill.crdt_store["tags-1"],
skill.crdt_store["tags-2"]
)
# Client side: play operations
play_result = skill.play(
crdt_name: "shared_counter",
operations: [
{op: :increment, value: 10},
{op: :increment, value: 5}
],
strategy: :sequential
)
# Server side: coplay acknowledgment
coplay_result = skill.coplay(
transfer_id: play_result[:transfer_id],
acknowledged: play_result[:success],
consistency_verified: true
)
puts "Utility score: #{coplay_result[:utility]}"
# => Utility score: 1.0 (perfect)
# Share learned preferences
skill.create("preferences", :or_set, "agent-a")
["red", "green", "blue"].each { |color| skill.mutate("preferences", :add, color) }
# Transfer to remote agent
transfer = skill.play(
crdt_name: "preferences",
operations: [
{op: :create},
{op: :add, value: "red"},
{op: :add, value: "green"},
{op: :add, value: "blue"}
]
)
# Remote agent receives and acknowledges
ack = skill.coplay(
transfer_id: transfer[:transfer_id],
acknowledged: true,
consistency_verified: true
)
ColorHarmonyState:
Distributed Learning:
# In Amp buffer
require 'crdt_skill'
skill = CRDTSkill.new
# Collaborate on code comments
skill.create("comments", :or_set, "editor-1")
skill.mutate("comments", :add, "TODO: optimize performance")
skill.play(crdt_name: "comments", operations: [...])
// In Codex self-improvement loop
use skills::crdt_skill;
let mut skill = CRDTSkill::new();
// Track improvements
skill.create("improvements", :or_set, "codex-1");
skill.mutate("improvements", :add, "optimization_v2");
// Share with team
skill.play(crdt_name: "improvements", operations: [...])?;
# Run all tests
ruby lib/crdt_skill.rb
# Expected output
# ✓ Test 1: Create and Query
# ✓ Test 2: GCounter increment
# ✓ Test 3: ORSet merge
# ✓ Test 4: Idempotence verified
# ✓ Test 5: Play/Coplay semantics
# ✓ All tests passed!
# ✓ CRDT Skill Ready for Production
| Operation | Complexity | Notes |
|---|---|---|
| Create | O(1) | Instant |
| Mutate | O(1) | Typically <1ms |
| Query | O(1) | Instant lookup |
| Merge | O(n) | Linear in elements |
| Verify | O(n²) | Polynomial for verification |
merge(merge(A, B), B) = merge(A, B)
Merging duplicate states produces same result.
merge(A, B) = merge(B, A)
Order of merges doesn't matter.
merge(merge(A, B), C) = merge(A, merge(B, C))
Grouping of merges doesn't matter.
| Feature | CRDT | Traditional DB |
|---|---|---|
| Network partitions | ✓ Handles | ✗ Requires coordination |
| Latency | ✓ Low | ✗ Network round-trips |
| Consistency | Eventual | Strong |
| Conflict resolution | Automatic | Manual |
| Scalability | ✓ P2P friendly | ✓ Centralized scaling |
Performance Optimization
Extended CRDT Types
Advanced Semantics
Observability
Status: ✅ PRODUCTION READY Installation Date: 2025-12-21 All Tests Passing: Yes Ready for Deployment: Yes
This skill connects to the K-Dense-AI/claude-scientific-skills ecosystem:
distributed-systems: 3 citations in bib.duckdbThis 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
The skill participates in triads satisfying:
(-1) + (0) + (+1) ≡ 0 (mod 3)
This ensures compositional coherence in the Cat# equipment structure.
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (plurigrid/asi) — no native marketplace selected
npx claudepluginhub p/plurigrid-asi-plugins-asi1,393 skills in this plugin
/abductive-replHypothesis-Test Loops via REPL for Exploratory Abductive Inference/academic-researchSearch academic papers across arXiv, PubMed, Semantic Scholar, bioRxiv, medRxiv, Google Scholar, and more. Get BibTeX citations, download PDFs, analyze citation networks. Use for literature reviews, finding papers, and academic research./accept-no-substitutesThis skill should be used when agents generate placeholder tokens like "pseudo-", "mock-", "temporary", "TODO", "demo-", or similar incompleteness markers. Detects substitution patterns in agent OUTPUT and triggers mandatory user interview instead of accepting incomplete work. Activates automatically on any output containing forbidden tokens.Other plugins' skills for the same job