Borrowing it
Nothing to install: this file belongs to tweakoz/orkid. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/tweakoz/orkid/develop/.claude/skills/orkcore-fsm/SKILL.mdgit clone --depth 1 https://github.com/tweakoz/orkidWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/tweakoz/orkid/orkcore-fsm)<a href="https://agentmods.dev/skills/tweakoz/orkid/orkcore-fsm"><img src="https://agentmods.dev/badge/skills/tweakoz/orkid/orkcore-fsm/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/tweakoz/orkid/orkcore-fsm"><img src="https://agentmods.dev/badge/skills/tweakoz/orkid/orkcore-fsm.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00067 | $0.00938 |
| Opus 5.5 | $0.00027 | $0.00375 |
| Sonnet 5.5 | $0.00013 | $0.00188 |
| Haiku 4.5 | $0.00007 | $0.00094 |
Grade A, and why
orkcore-fsm scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Orkid HFSM (Hierarchical Finite State Machine) Reference
When answering questions about state machines in orkid, consult these files.
Key Files
| Component | Location |
|---|---|
| FSM Header | ork.core/inc/ork/util/fsm.h |
| FSM Implementation | ork.core/src/util/fsm.cpp |
| Python Bindings | ork.core/pyext/pyext_fsm.cpp |
| Tests | ork.core/pyext/tests/test_fsm.py |
| Complex Test | ork.core/pyext/tests/test_fsm2.py |
| Visualization Test | ork.core/pyext/tests/fsmviz_test.py |
Architecture Overview
Two-Part Design
- FsmData — shared, immutable state machine definition (states + transitions)
- FsmInstance — per-entity runtime (current state, event queue, variables)
- One FsmData can be shared by many FsmInstances
State Classes
State— base class with virtualonEnter/onExit/onUpdateLambdaState— concrete state with configurable lambda callbacks (primary Python type)
Hierarchical Support
States have optional _parent pointer forming a tree. Transitions between siblings only exit/enter the leaf states — common ancestors stay active.
Example: transition A1 → A2 (siblings under A):
- Exits: A1 only
- Enters: A2 only
- A stays active (no callbacks)
Key Classes
// Shared definition
struct FsmData {
template<typename T> shared_ptr<T> newState(state_ptr_t parent, string name);
void addTransition(state_ptr_t from, string event, state_ptr_t to);
void addTransition(state_ptr_t from, string event, PredicatedTransition pt);
state_ptr_t findState(string name);
string generateDot(DotConfig config);
};
// Per-entity runtime
struct FsmInstance {
static fsminstance_ptr_t create(fsmdata_ptr_t data);
static void update(fsminstance_ptr_t inst);
void sendEvent(string event);
void changeState(state_ptr_t target);
void setInitialState(state_ptr_t state);
state_ptr_t currentState();
varmap_ptr_t vars(); // Per-instance variables
};
// Multi-instance coordination
struct FsmGroup {
fsminstance_ptr_t createInstance(fsmdata_ptr_t data);
void broadcastEvent(string event);
bool allInState(string state_name);
void waitForAllInState(string state_name);
};
// Guard condition
struct PredicatedTransition {
predicate_callback_t _predicate; // bool(fsminstance_ptr_t)
state_ptr_t _destination;
};
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 124 lines · 67 tokens per session scan A 511fac0fef86
orkcore-fsm is a skill published in the GitHub repository tweakoz/orkid (35 stars, last pushed 2mo ago), licensed MIT. It adds 67 tokens to every session and 938 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.
orkcore-fsm compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| orkcore-fsmtweakoz/orkid | Skill | 35 | 2mo ago | MIT | A | 67 | Claude Code |
| unity-pipelineAlex-Rachel/TEngine | Skill | 2.4k | 16d ago | MIT | A | 97 | Claude Code |
| dart-verify-simdartsim/dart | Skill | 1.2k | yesterday | BSD-2-Clause | A | 32 | Claude Code, Codex |
| metasoundskevinpbuckley/VibeUE | Skill | 812 | 2d ago | MIT | A | 63 | Claude Code, Codex |
| dart-model-upgradedartsim/dart | Skill | 1.2k | yesterday | BSD-2-Clause | A | 42 | Claude Code |
| html-to-uguiAlex-Rachel/TEngine | Skill | 2.4k | 16d ago | MIT | A | 75 | Codex |
| luban-devAlex-Rachel/TEngine | Skill | 2.4k | 16d ago | MIT | A | 62 | Codex |