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 | $0.00034 | $0.00469 |
| Sonnet 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 9d 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.
- 9d 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 28d ago), licensed MIT. It adds 67 tokens to every session and 938 once invoked, about $0.0003 per session on Opus 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.
Other skills, from other repositories
luban-dev
A guide for Luban, a game-configuration tool that turns spreadsheets and schemas into C# code and binary data for a TEngine project.
html-to-ugui
A pipeline for turning HTML interface prototypes into Unity UGUI Prefabs, which are reusable Unity interface objects. It uses browser-rendered layout data to preserve positions, images, text, controls, and device-adaptation intentions.
metasounds
Create and modify MetaSound Source assets — add/connect nodes, wire pins, set input defaults, and play procedurally (MetaSoundService). Use when the user asks to create a MetaSound, build or edit a MetaSound graph, add operator/input/output nodes, or generate procedural audio.
tengine-dev
A development guide for TEngine, a framework used to build Unity games. It covers the framework’s modules, user interfaces, events, asset loading, hot updates, configuration, and related tools.
et-unitybridge
UnityBridge workflow for AI operations in Unity Editor. Use when checking UnityBridge connectivity, Unity compile or PlayMode state, running deferred UnityBridge commands, operating assets/scenes/GameObjects/Inspector/Prefabs/GameView/screenshots, running Editor tests, or troubleshooting UnityBridge responses.
adaptive-music
Use when wiring music stems to game state — combat / explore / boss / tension crossfades on a shared bus. Pairs generated stems with a state machine and AudioBus structure. Trigger on "adaptive music", "dynamic music", "music changes when combat starts", "layered music", "vertical music", "wire stems".