Gdd State logo

Gdd State

Community
hegemonart
gdd-state

Query, recover, or roll back the Phase 57 SQLite state backbone. Use when you need to inspect the decisions/blockers/plans tables with a raw SELECT, rebuild a corrupt state.sqlite from the markdown STATE.md, or revert to the markdown-only source of truth by removing state.sqlite. Activates for requests involving querying the SQLite state database, recovering from SQLite corruption, or reverting the migration (demigrate).

Overview

Publisherhegemonart
Repositoryget-design-done
Skill namegdd-state
Stars
3
Forks
1
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by hegemonart on GitHub. Read the source before you install it.

Installation

Install the Gdd State AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/hegemonart/get-design-done/tree/main/scripts/skill-templates/state
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hegemonart/get-design-done.git /tmp/get-design-done
mkdir -p .claude/skills
cp -r /tmp/get-design-done/scripts/skill-templates/state .claude/skills/gdd-state
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Gdd State in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Gdd State on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Gdd State is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

{{command_prefix}}state

The Phase 57 SQLite state backbone is opt-in (--migrate-state) and fully reversible. Markdown .design/STATE.md is always the human-editable SoT; SQLite is a faster query layer derived from it. This skill exposes three subcommands for operating on that layer.

Subcommands

SubcommandWhat it does
{{command_prefix}}state query "<sql>"Run a read-only SELECT against .design/state.sqlite.
{{command_prefix}}state recoverRotate the current sqlite to a .bak and rebuild from markdown.
{{command_prefix}}state demigrateRemove .design/state.sqlite; markdown becomes the SoT again.

query

Execute a read-only SELECT against the state database.

The engine opens the file with readonly:true so all writes are rejected at the engine level. A first-token denylist (Set membership, no regex) additionally blocks DROP, DELETE, UPDATE, INSERT, ALTER, ATTACH, CREATE, PRAGMA, VACUUM, ANALYZE, REINDEX, and REPLACE before the connection is opened.

bash
node -e '
  const qs = require("./scripts/lib/state/query-surface.cjs");
  const result = qs.query(process.argv[1], { projectRoot: process.cwd() });
  console.log(JSON.stringify(result, null, 2));
' "<sql>"

Outputs { rows: [...], backend: "sqlite" } on success, or { degraded: true, message: "..." } when SQLite is not active.

Degrades gracefully (no throw) when BACKEND==='markdown' or when .design/state.sqlite has not been created yet (run --migrate-state first).


recover

Rotate the current (possibly corrupt) .design/state.sqlite to .bak.0, then rebuild a fresh database from the markdown .design/STATE.md using migrate-to-sqlite.cjs in force mode. Runs PRAGMA integrity_check on the result and reports the outcome.

bash
node -e '
  const qs = require("./scripts/lib/state/query-surface.cjs");
  const result = qs.recover({ projectRoot: process.cwd() });
  console.log(JSON.stringify(result, null, 2));
'

Outputs { recovered: true, integrity: true, message: "..." } on success.

Backup rotation keeps at most 10 files (.bak.0 through .bak.9). The oldest backup is overwritten when the cap is reached.


demigrate

Remove .design/state.sqlite so the markdown STATE.md becomes the SoT again. Idempotent: if the file does not exist, returns a clear no-op message without error. A backup is taken in .bak.0 before removal.

bash
node -e '
  const qs = require("./scripts/lib/state/query-surface.cjs");
  const result = qs.demigrate({ projectRoot: process.cwd() });
  console.log(JSON.stringify(result, null, 2));
'

Outputs { demigrated: true, message: "..." } when the file was removed, or { demigrated: false, message: "..." } when it was already absent (no-op).

To re-enable SQLite after a demigrate, run --migrate-state again.


Key design decisions

  • Markdown is always the SoT. SQLite is opt-in via --migrate-state and reversible via demigrate. The markdown file is never silently overwritten.
  • Read-only queries only. The query subcommand enforces SELECT-only via both the engine (readonly:true) and a defense-in-depth denylist. No writes are possible through this skill.
  • Backup rotation cap. rotateBak shifts .bak.0..8 up by one index and caps at .bak.9 (10 files total). The oldest backup is overwritten automatically.
  • Graceful degradation. All subcommands return a clear { degraded, message } object (no throw) when better-sqlite3 is not installed or when GDD_STATE_BACKEND=markdown is set.

STATE COMPLETE

Frequently asked questions

What does the Gdd State AI skill do?

Query, recover, or roll back the Phase 57 SQLite state backbone. Use when you need to inspect the decisions/blockers/plans tables with a raw SELECT, rebuild a corrupt state.sqlite from the markdown STATE.md, or revert to the markdown-only source of truth by removing state.sqlite. Activates for requests involving querying the SQLite state database, recovering from SQLite corruption, or reverting the migration (demigrate).

Why use Gdd State on TypingMind?

Because you install it once and use it with any model. Gdd State is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Gdd State in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/hegemonart/get-design-done/tree/main/scripts/skill-templates/state. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Gdd State?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Gdd State?

As many as you like. As long as a model supports skills, you can use Gdd State with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Gdd State AI skill free?

Yes. It is published on GitHub by hegemonart under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇