Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Shared, adapter-backed key/value store addressed by scope and key, with a reactive `state` trigger so other functions can run on every create, update, or delete without polling.
.claude/skills/iii-hq-iii-state/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -33% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -19% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -47% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -39% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 23% | 0% |
The iii-state worker is a server-side key/value store. Values are addressed by a scope (namespace) and a key, shared across every worker connected to the engine, and persisted through a pluggable adapter (kv, redis, or bridge). Callers reach the store through six state::* functions invoked with iii.trigger({ function_id: 'state::...', payload }).
State does not push updates to SDK clients. Reactivity is delivered by a state trigger type that fires state:created, state:updated, or state:deleted after every successful mutation, so downstream functions can react to data changes without polling. The kv adapter (default) supports in_memory or file_based persistence; redis proxies to a Redis backend; bridge forwards operations to a remote iii engine. The function surface is identical across adapters.
scope/key watched and reacted to only when that slot changes.configuration when entries need a registered JSON Schema and validation.state::get, state::list, state::list_groups) never fire triggers; only set/update/delete do.state:deleted with a null old value.iii-stream, not here.state::set — write or replace the value at a scope/key; fires state:created or state:updated.state::get — read one value by scope and key.state::delete — remove a key and fire state:deleted with the prior value.state::update — apply ordered atomic ops (set, merge, increment, decrement, append, remove) to the stored value.state::list — enumerate every value stored in a scope.state::list_groups — enumerate which scopes currently contain data.Bind a state trigger when a function should run automatically after a value changes — without polling state::get. The engine evaluates every registered state trigger after a successful state::set, state::update, or state::delete and invokes matching handlers asynchronously.
Reach for it when:
condition_function_id so the handler only runs when a predicate on the event is truthy.If you only need the new value inside the same function that wrote it, use the mutator's returned old_value / new_value instead of binding a trigger.
iii.registerFunction('orders::on-status-change', handler).typescriptiii.registerTrigger({ type: 'state', function_id: 'orders::on-status-change', config: { scope: 'orders', // optional. Omit to match every scope. key: 'status', // optional. Omit to match every key in the scope. // condition_function_id is also supported. }, })
All config fields are optional; tighter filters reduce how often the handler runs. To watch several specific keys, register one trigger per scope/key pair. Mutations that fire the trigger: state::set, state::update, state::delete.
For the event payload shape, call iii get function info on the trigger type or handler function id.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-18 | pass→pass | 17,619 | 1,737 | -90% | 1 | 1 | 0% | 2,952 | 1,195 | -60% | 0 | 0 | — |
case-01 | fail→pass | 15,890 | 5,824 | -63% | 1 | 1 | 0% | 3,025 | 2,017 | -33% | 0 | 0 | — |
case-02 | fail→fail | 14,806 | 5,043 | -66% | 1 | 1 | 0% | 2,720 | 1,899 | -30% | 0 | 0 | — |
case-03 | fail→pass | 16,700 | 8,755 | -48% | 1 | 1 | 0% | 3,640 | 2,957 | -19% | 0 | 0 | — |
case-04 | fail→pass | 15,235 | 3,290 | -78% | 1 | 1 | 0% | 2,989 | 1,570 | -47% | 0 | 0 | — |
case-05 | fail→pass | 17,151 | 5,122 | -70% | 1 | 1 | 0% | 3,126 | 1,917 | -39% | 0 | 0 | — |
case-06 | fail→pass | 8,815 | 5,054 | -43% | 1 | 1 | 0% | 1,584 | 1,942 | +23% | 0 | 0 | — |
case-12 | fail→pass | 90,346 | 4,074 | -95% | 1 | 1 | 0% | 2,976 | 1,656 | -44% | 0 | 0 | — |
case-07 | fail→pass | 10,940 | 3,033 | -72% | 1 | 1 | 0% | 2,163 | 1,557 | -28% | 0 | 0 | — |
case-08 | pass→pass | 7,586 | 2,351 | -69% | 1 | 1 | 0% | 1,289 | 1,357 | +5% | 0 | 0 | — |
case-09 | fail→pass | 12,073 | 13,352 | +11% | 1 | 1 | 0% | 1,811 | 1,452 | -20% | 0 | 0 | — |
case-10 | fail→pass | 20,489 | 4,593 | -78% | 1 | 1 | 0% | 3,285 | 1,495 | -54% | 0 | 0 | — |
case-11 | pass→pass | 11,835 | 2,617 | -78% | 1 | 1 | 0% | 1,948 | 1,363 | -30% | 0 | 0 | — |
case-13 | fail→pass | 25,349 | 2,106 | -92% | 1 | 1 | 0% | 4,638 | 1,346 | -71% | 0 | 0 | — |
case-14 | fail→pass | 13,625 | 3,605 | -74% | 1 | 1 | 0% | 2,456 | 1,602 | -35% | 0 | 0 | — |
case-15 | fail→pass | 11,508 | 2,797 | -76% | 1 | 1 | 0% | 1,600 | 1,339 | -16% | 0 | 0 | — |
case-16 | pass→pass | 11,603 | 3,738 | -68% | 1 | 1 | 0% | 1,857 | 1,544 | -17% | 0 | 0 | — |
case-17 | fail→pass | 9,102 | 3,419 | -62% | 1 | 1 | 0% | 1,417 | 1,394 | -2% | 0 | 0 | — |
case-19 | fail→pass | 9,851 | 1,515 | -85% | 1 | 1 | 0% | 1,846 | 1,183 | -36% | 0 | 0 | — |
case-20 | pass→pass | 10,074 | 4,080 | -59% | 1 | 1 | 0% | 1,601 | 1,642 | +3% | 0 | 0 | — |
case-21 | pass→pass | 13,943 | 7,094 | -49% | 1 | 1 | 0% | 2,252 | 2,093 | -7% | 0 | 0 | — |
case-22 | fail→pass | 13,671 | 2,251 | -84% | 1 | 1 | 0% | 2,285 | 1,279 | -44% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +68 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.