/asi:catcolab-petri-netsfrom asi
Models concurrent and distributed systems using Petri nets with places, transitions, and token flow. Useful for process algebra, workflow modeling, and chemical reaction networks.
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.
Trit: +1 (PLUS - generator) Color: Magenta (#FF00FF)
Petri nets in CatColab model concurrent and distributed systems:
Petri nets are the categorical foundation for process algebra, workflow modeling, and chemical reaction networks.
A Petri net is a bipartite graph:
┌─────────────────────────────────────────────────────┐
│ PETRI NET │
├─────────────────────────────────────────────────────┤
│ Places (States): │
│ (P1) Ready (P2) Running (P3) Done │
│ │
│ Transitions (Events): │
│ [T1] Start [T2] Finish │
│ │
│ Arcs (Token Flow): │
│ P1 → T1 → P2 → T2 → P3 │
│ │
│ Diagram: │
│ (P1)●──►[T1]──►(P2)──►[T2]──►(P3) │
│ ●=token │
└─────────────────────────────────────────────────────┘
Petri nets are the free symmetric monoidal category on a signature:
Objects: P₁, P₂, ..., Pₙ (places)
Morphisms: Generated by transitions
Tensor: P₁ ⊗ P₂ (concurrent resources)
Composition: Sequential firing
Example:
T: P₁ ⊗ P₂ → P₃ ⊗ P₄
"Transition T consumes tokens from P₁, P₂
and produces tokens in P₃, P₄"
// Petri net double theory
pub fn th_petri_net() -> DiscreteDblTheory {
let mut cat = FpCategory::new();
// Object type
cat.add_ob_generator(name("Place"));
// Morphism type (transitions as structured morphisms)
cat.add_mor_generator(name("Transition"), name("Place"), name("Place"));
// Monoidal structure (parallel composition)
// P ⊗ Q represents "P and Q concurrently"
cat.into()
}
{
"type": "ObDecl",
"name": "Idle",
"theory_type": "Place",
"description": "process waiting for input"
}
{
"type": "MorDecl",
"name": "activate",
"inputs": ["Idle", "Resource"],
"outputs": ["Active"],
"theory_type": "Transition",
"description": "process starts when resource available"
}
Places: Buffer (capacity N), Produced, Consumed
Transitions:
produce: Empty → Buffer + Produced
consume: Buffer → Consumed
Tokens: Buffer starts empty, count items produced/consumed
Places: Thinking(i), Eating(i), Fork(i) for i=1..5
Transitions:
pickup(i): Thinking(i) ⊗ Fork(i) ⊗ Fork(i+1) → Eating(i)
putdown(i): Eating(i) → Thinking(i) ⊗ Fork(i) ⊗ Fork(i+1)
Deadlock possible when all pick up left fork simultaneously
Places: A, B, C (species concentrations as token counts)
Transitions:
react: A ⊗ B → C
Stochastic: Rate = k·[A]·[B] (mass action)
Petri nets and stock-flow diagrams are equivalent:
Petri Net ≅ Stock-Flow
Place ↔ Stock
Transition ↔ Flow
Token count ↔ Population
Firing rate ↔ Mass-action rate
using AlgebraicPetri
using Catlab
# Define SIR as Petri net
sir_petri = @acset LabelledPetriNet begin
S = 3 # places: S, I, R
T = 2 # transitions: infect, recover
tname = [:infect, :recover]
sname = [:S, :I, :R]
is = [1, 2] # infect inputs: S, I
os = [2, 2] # infect outputs: I, I
it = [1, 1] # transition indices
ot = [1, 1]
end
# Compose Petri nets
combined = sir_petri ⊕ vaccination_petri
catcolab-regulatory-networks (-1) ⊗ topos-catcolab (0) ⊗ catcolab-petri-nets (+1) = 0 ✓
crn-topology (-1) ⊗ catcolab-stock-flow (0) ⊗ catcolab-petri-nets (+1) = 0 ✓
# Create Petri net
just catcolab-new petri-net "producer-consumer"
# Analyze reachability
just catcolab-analyze producer-consumer --reachability
# Check for deadlock
just catcolab-analyze producer-consumer --deadlock
# Export to PNML
just catcolab-export producer-consumer --format=pnml
# Simulate token dynamics
just catcolab-simulate producer-consumer --stochastic
Skill Name: catcolab-petri-nets Type: Concurrent Systems / Process Algebra Trit: +1 (PLUS) GF(3): Balances the CatColab skill ecosystem
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