orkid: Skill for Claude Code

.claude/skills/orkcore-fsm/SKILL.md

orkcore-fsm is a skill for Claude Code from tweakoz/orkid. It costs 67 tokens per session (938 once invoked), scanned A, original, MIT.

A reference skill for Orkid’s hierarchical finite state machine, a way to represent modes and the transitions between them, including nested states.

In plain words
What is it for?
It is for answering questions about states, transitions, guards, callbacks, runtime instances, Python bindings, and state-machine diagrams.
Why use it?
It helps developers understand and use state-based behavior without having to trace the entire implementation themselves.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

This is tweakoz/orkid's own configuration. It tells Claude Code how to work on orkid itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything orkid configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/tweakoz/orkid/develop/.claude/skills/orkcore-fsm/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/tweakoz/orkid

Made for: Claude Code.

Wrote 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.

agentmods badge for orkcore-fsm

README.md
[![agentmods](https://agentmods.dev/badge/skills/tweakoz/orkid/orkcore-fsm/github.svg)](https://agentmods.dev/skills/tweakoz/orkid/orkcore-fsm)
Your own site
<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.

agentmods 80×15 button for orkcore-fsm

Your own site · 80×15
<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>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 938 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 9d ago against content hash 511fac0fef86, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

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.

.claude/skills/orkcore-fsm/SKILL.md · 124 lines

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 virtual onEnter/onExit/onUpdate
  • LambdaState — 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;
};

Read the full file on GitHub · 124 lines

Changes

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.

  1. 9d ago First seen · 124 lines · 67 tokens per session scan A 511fac0fef86

Subscribe to this mod's changes

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.

Related

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.

Alex-Rachel/TEngine · 149 tokens

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.

Alex-Rachel/TEngine · 150 tokens

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.

kevinpbuckley/VibeUE · 63 tokens

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.

Alex-Rachel/TEngine · 68 tokens

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.

FlameskyDexive/Legends-Of-Heroes · 61 tokens

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".

SummerEngine/summer-engine-agent · 71 tokens