Agent skill

State

by iii-hq in iii-hq/workers

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.

Apache-2.0Auto-check passedDatabases

Install State

skills CLI
$ npx skills add iii-hq/workers --skill state -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install iii-hq/workers state --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/iii-hq/workers.git skills-src && mkdir -p .claude/skills && cp -r skills-src/state/skills .claude/skills/state && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
state
GitHub stars
113
Token cost
~1.1k tokens
SKILL.md length
540 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
Apache-2.0

At a glance

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.

  • Works in 2 steps: Register a handler:… → Register the trigger
  • So other functions can run on every create
  • SKILL.md covers When to Use, Boundaries, Functions and Reactive triggers
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

State is an agent skill from iii-hq/workers. 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.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering NoSQL databases. It works with Redis. The licence is Apache-2.0.

When your agent uses it

  • So other functions can run on every create
  • Delete without polling

Example prompts

  • “/state”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Register a handler: iii.registerFunction('orders::on-status-change', handler).
  2. Register the trigger

What it can do on your machine

Read from SKILL.md and the folder at commit 1ff0459. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

State loads about 1.1k tokens when it runs. Until then it costs about 46 tokens; SKILL.md has 540 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from iii-hq/workers at commit 1ff0459, republished under its Apache-2.0 licence (© iii-hq). 540 words, ~1,150 tokens.

Download SKILL.mdSave it as .claude/skills/state/SKILL.md (or your agent's skills folder).
name
state
description
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.
tags
state, key-value, storage, triggers, reactive

state

The 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 or redis). Callers reach the core store through six state::* functions invoked with iii.trigger({ function_id: 'state::...', payload }). The worker also exposes state::list_keys and the internal state::ui-content function. Install it with iii trigger compose::add worker=state; it replaces the engine's legacy built-in state service, which must be removed from the engine config first.

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 file_based persistence (the default) or a volatile in_memory mode; redis proxies to a Redis backend. The function surface is identical across adapters.

When to Use

  • Two or more functions need shared state without standing up a separate database.
  • A counter or per-entity document needs atomic partial updates instead of read-modify-write.
  • A write in one function should trigger side effects elsewhere (cache invalidation, audit logs, notifications, projections).
  • You want a specific scope/key watched and reacted to only when that slot changes.

Boundaries

  • Schema-free by design — every value is opaque JSON. Use the configuration worker when entries need a registered JSON Schema and validation.
  • Reads (state::get, state::list, state::list_groups) never fire triggers; only set/update/delete do.
  • Trigger delivery is asynchronous and does not roll back the write on handler failure; a delete of a missing key still emits state:deleted with a null old value.
  • Stream-shaped, broadcast-to-subscribers data belongs in the engine's stream surface, not here.
  • The store lives in the worker process: the kv in_memory backend is lost when the worker stops. The default file_based backend (and redis) survives restarts.
Show full SKILL.md (238 more words)Show less

Functions

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

Reactive triggers

Bind a state trigger when a function should run automatically after a value changes — without polling state::get. The worker evaluates every registered state trigger after a successful state::set, state::update, or state::delete and invokes matching handlers asynchronously.

Reach for it when:

  • A write in one worker should drive side effects in another (audit logs, cache invalidation, notifications, projections).
  • You want optional gating via condition_function_id so the handler only runs when a predicate on the event is truthy (only an explicit false blocks).

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.

How to bind
  1. Register a handler: iii.registerFunction('orders::on-status-change', handler).
  2. Register the trigger:
typescript
iii.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.

The handler receives the event payload { type: "state", event_type, scope, key, old_value, new_value }, where event_type is one of state:created, state:updated, or state:deleted.

© iii-hq, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in state/skills of iii-hq/workers.

Open the folder on GitHubat commit 1ff0459

Compare with similar skills

State next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

State compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
State this skilliii-hq/workers113—~1.1kAutomated safety check: PassApache-2.0
Funboost Funweb Opsydf0509/funboost893—~2.7kAutomated safety check: PassNone
Ak Add Capabilitiesyaalalabs/agent-kernel192—~13kAutomated safety check: PassApache-2.0
Rhctlsaidake/rhctl106—~4kAutomated safety check: NotesApache-2.0
Database Domain Specialistmodu-ai/moai-adk1.2k—~2.8kAutomated safety check: PassApache-2.0
Ak Dev New Multimodal Storageyaalalabs/agent-kernel192—~4.3kAutomated safety check: PassApache-2.0

Similar skills

  • Funboost Funweb Ops

    ydf0509/funboost

    当需要使用 funboost 的 Web 管理界面进行队列运维时使用。触发场景:启动管理后台、查看消费状态、查看消费者配置、失败重投、查看结果、定时任务管理。关键词:funweb, Web 管理, 运维, startfunboostwebmanager, 队列监控, 消费曲线。

    893 GitHub stars~2.7k tokensUpdated 1 mo ago
    DatabasesAuto-check passed
  • Ak Add Capabilities

    yaalalabs/agent-kernel

    Add capabilities to an existing Agent Kernel project. An agent skill from yaalalabs/agent-kernel.

    192 GitHub stars~13k tokensUpdated today
    DatabasesAuto-check passed
  • Rhctl

    saidake/rhctl

    Run and author rhctl CLI workflows and remote environment scripts under scripts/ (PostgreSQL, JetStream, Docker, Redis, MongoDB, AWS LocalStack, execute/upload/patch).

    106 GitHub stars~4k tokensUpdated 3 days ago
    DatabasesAuto-check: notes
  • Database guidance for PostgreSQL, MongoDB, Redis and Oracle plus Neon, Supabase and Firestore: schema design, indexing, query tuning and cloud database choice.

    1.2k GitHub stars~2.8k tokensUpdated today
    DatabasesAuto-check passed
  • Ak Dev New Multimodal Storage

    yaalalabs/agent-kernel

    Step-by-step guide for adding a new multimodal attachment storage backend to Agent Kernel.

    192 GitHub stars~4.3k tokensUpdated today
    DatabasesAuto-check passed
  • Upstash Redis Kv

    intellectronica/agent-skills

    Read and write to Upstash Redis-compatible key-value store via REST API.

    295 GitHub stars~2.8k tokensUpdated 5 mo ago
    DatabasesAuto-check: warnings

More from iii-hq/workers

All 19 skills in this repo
  • Cron

    iii-hq/workers

    Schedule any registered function on a 6- or 7-field cron expression with the standalone cron worker.

    113 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Email

    iii-hq/workers

    Send and read email from the iii engine — SMTP send, IMAP read, and real-time IDLE push as a subscribable trigger type.

    113 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • HTTP

    iii-hq/workers

    Expose registered functions as HTTP endpoints with the standalone http worker.

    113 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Kanban

    iii-hq/workers

    File-backed kanban board: create, read, move and comment on tickets by key or uuid, assign agent profiles, and wake on comments through the kanban:comment trigger instead of polling.

    113 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Pubsub

    iii-hq/workers

    DEPRECATED (will be removed in an upcoming release; migration guide https://iii.dev/docs/upgrading/migrate-from-streams).

    113 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Release Sync

    iii-hq/workers

    Organize worker release tags into Linear release waves — one team document plus one release/<date label per same-day batch of worker releases, with shipped MOT issues labeled and linked.

    113 GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about State

What does State do?

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. State is an agent skill from iii-hq/workers. 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.

When should I use State?

State fits situations like: so other functions can run on every create; delete without polling.

How do I install State in Claude Code?

Run `npx skills add iii-hq/workers --skill state -a claude-code`. Or copy the skill folder (state/skills in iii-hq/workers) into .claude/skills/state in your project. Claude Code loads it when a task matches its description.

How do I install State in Codex?

Run `npx skills add iii-hq/workers --skill state -a codex`. Or copy the skill folder (state/skills in iii-hq/workers) into .agents/skills/state in your project. Codex loads it when a task matches its description.

Can I use State in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add iii-hq/workers --skill state -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/state, .gemini/skills/state, .github/skills/state and .opencode/skills/state in your project.

What does State need to run?

SKILL.md names no scripts, command-line tools or credentials: State is instructions for the agent only.

Does State access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is State safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does State use?

State is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does State use?

About 1.1k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to State?

Skills that share tags, products or a category with State: Funboost Funweb Ops (ydf0509/funboost, 893 stars), Ak Add Capabilities (yaalalabs/agent-kernel, 192 stars), Rhctl (saidake/rhctl, 106 stars) and Database Domain Specialist (modu-ai/moai-adk, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains State?

iii-hq (a GitHub organization) maintains it in iii-hq/workers, which has 113 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 9, 2026.

Source: iii-hq/workers on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.