tippinggame/f8framework/f8-features-fsm-workflow

Claude Code and agent skill by tippinggame/f8framework

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when implementing or troubleshooting FSM feature workflows — finite state machines, state transitions, blackboard data, and FSM groups in F8Framework.

Install

npx vskill@latest install tippinggame/f8framework/f8-features-fsm-workflow

SKILL.md

The same SKILL.md was published earlier as tippinggame/f8framework/f8-features-fsm-workflow.

FSM Feature Workflow

⚠️ IMPORTANT: Before using this feature, you MUST formally initialize F8Framework in the launch sequence. Ensure ModuleCenter.Initialize(this); has run first, then create the required module, for example FF8.FSM = ModuleCenter.CreateModule<FSMManager>();.

Use this skill when

  • The task is about state machine construction, transition flow, and update loop.
  • The user asks about FSMState, FSMSwitch, blackboard, or FSM groups.
  • Troubleshooting state transition failures or update loop issues.

Path resolution

  1. Prefer project source at Assets/F8Framework.
  2. If F8Framework is installed as a package, use Packages/F8Framework.
  3. For usage docs, read: Assets/F8Framework/Tests/FSM/README.md

Sources of truth

  • Runtime module: Assets/F8Framework/Runtime/FSM
  • Test docs: Assets/F8Framework/Tests/FSM

Key classes and interfaces

ClassRole
FSMManagerCore module. Access via FF8.FSM. Creates, finds, destroys FSMs.
IFSM<T>FSM interface. Owner type T is the owner object type.
FSMState<T>Abstract state base. Override lifecycle methods.
FSMSwitch<T>Abstract transition condition. Override SwitchFunction().
BlackboardKey-value data store shared across states in a FSM.
FSMBaseNon-generic base class for FSM collections.

API quick reference

Create FSM
csharp
var enterState = new EnterRangeState();
var exitState = new ExitRangeState();
var enterSwitch = new EnterSwitch();
var exitSwitch = new ExitSwitch();
exitState.AddSwitch(exitSwitch, typeof(EnterRangeState));
enterState.AddSwitch(enterSwitch, typeof(ExitRangeState));
IFSM<Transform> fsm = FF8.FSM.CreateFSM<Transform>(
"FSMName", owner, "GroupName", new Blackboard(), exitState, enterState);
fsm.DefaultState = exitState;
fsm.ChangeToDefaultState();
Change state
csharp
fsm.ChangeState<ExitRangeState>();
Blackboard
csharp
fsm.Blackboard.SetValue<float>("health", 100f);
fsm.Blackboard.GetValue<float>("health");
fsm.Blackboard.HasValue("health");
fsm.Blackboard.RemoveValue("health");
fsm.Blackboard.Clear();
// Subscribe to value changes
fsm.Blackboard.RegisterValueChanged<Vector2>(OnValueChanged);
fsm.Blackboard.RegisterValueRemoved(OnValueRemoved);
fsm.Blackboard.UnregisterValueChanged<Vector2>(OnValueChanged);
fsm.Blackboard.UnregisterValueRemoved(OnValueRemoved);
FSM management
csharp
FF8.FSM.GetFSM<Transform>("FSMName");
FF8.FSM.HasFSM<Transform>("FSMName");
FF8.FSM.SetFSMGroup<Transform>("FSMName", "GroupName");
FF8.FSM.GetAllFSMs();
FF8.FSM.HasFSMGroup("GroupName");
FF8.FSM.PeekFSMGroup("GroupName", out var group);
FF8.FSM.RemoveFSMGroup("GroupName");
FF8.FSM.DestoryFSM<Transform>("FSMName");
FF8.FSM.DestoryAllFSM();
State class template
csharp
public class MyState : FSMState<Transform>
{
public override void OnInitialization(IFSM<Transform> fsm) { }
public override void OnStateEnter(IFSM<Transform> fsm) { }
public override void OnStateUpdate(IFSM<Transform> fsm) { }
public override void OnStateLateUpdate(IFSM<Transform> fsm) { }
public override void OnStateFixedUpdate(IFSM<Transform> fsm) { }
public override void OnStateExit(IFSM<Transform> fsm) { }
public override void OnTermination(IFSM<Transform> fsm) { }
}
Switch class template
csharp
public class MySwitch : FSMSwitch<Transform>
{
public override bool SwitchFunction(IFSM<Transform> fsm)
{
// Return true to trigger transition
return someCondition;
}
}

Workflow

  1. Define states by inheriting FSMState<T> with desired owner type.
  2. Define transition conditions by inheriting FSMSwitch<T>.
  3. Wire switches to states with state.AddSwitch(switch, targetStateType).
  4. Create FSM via FF8.FSM.CreateFSM<T>() passing all states.
  5. Set default state and call ChangeToDefaultState().
  6. Use Blackboard for shared data across states.
  7. Use FSM groups for managing related FSMs together.

Common error handling

ErrorCauseSolution
State not changingSwitch condition never returns trueDebug SwitchFunction logic
Null ownerOwner destroyed before FSMDestroy FSM when owner is destroyed
Duplicate FSM nameSame name used for multiple FSMsUse unique names per FSM

Cross-module dependencies

  • None — FSM is self-contained. Can reference any module from within states.

Output checklist

  • States and switches defined.
  • FSM created with correct owner type.
  • Blackboard data flow documented.
  • Validation status and remaining risks.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
870
Repository forks
139
7-day trend score
34

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/tippinggame/f8framework/f8-features-fsm-workflow/badge)](https://verified-skill.com/skills/tippinggame/f8framework/f8-features-fsm-workflow)

Something wrong with this skill or its page? Tell us.