Types State Mocks logo

Types State Mocks

Organization
LedgerHQ
types-state-mocks

Structure a simple Ledger Wallet data layer where one API response maps to one entity slice. Use when creating or reviewing domain/entity schemas, inferred types, initial state, mocks, selectors, slices, domain/api clients, and their tests.

Overview

PublisherLedgerHQ
Repositoryledger-live
Skill nametypes-state-mocks
Stars
622
Forks
491
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 LedgerHQ on GitHub. Read the source before you install it.

Installation

Install the Types State Mocks 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/LedgerHQ/ledger-live/tree/develop/.agents/skills/types-state-mocks
  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/LedgerHQ/ledger-live.git /tmp/ledger-live
mkdir -p .claude/skills
cp -r /tmp/ledger-live/.agents/skills/types-state-mocks .claude/skills/types-state-mocks
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Types State Mocks 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 Types State Mocks 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 Types State Mocks 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.

Types, State, And Mocks

Apply this pattern when one API resource maps to one entity slice. Use data-layer-advanced when one response hydrates several entities.

Source: Types, Initial State & Mocks

Place Files

text
domain/entity/<entity>/src/
├── schema.ts
├── schema.mock.ts
├── schema.test.ts
├── selectors.ts
├── selectors.test.ts
├── slice.ts
└── slice.test.ts

domain/api/<entity>/src/
├── api.ts
└── api.test.ts

Export only the contracts consumers need from each package index.ts.

Keep Ownership Clear

FileResponsibility
schema.tsDefine the runtime schema, infer the TypeScript type, and declare a complete initial state
schema.mock.tsBuild valid entity data with sensible defaults and optional overrides
slice.tsOwn focused entity reducers and actions
selectors.tsRead or derive entity state without importing an app store type
api.tsOwn transport contracts, network calls, and transformations

Follow the package's runtime-schema precedent (Zod or Typia). Do not maintain a separate handwritten type that can drift from the schema.

Validate The Contract

  • Give every entity property an explicit initial value.
  • Make every mock pass the runtime schema.
  • Keep mock-only helpers out of production behavior.
  • Give reducers one clear state transition each.
  • Parse untrusted API data before storing it when the API layer does not already guarantee the contract.
  • Register reducers and API middleware in each app composition root; never import an app store from a domain package.

Test

  • Schema: accept a mock, reject an invalid payload, and cover initial defaults.
  • Mock: return valid data and honor supported overrides.
  • Slice: cover initial state, replacement/reset, and focused updates.
  • Selectors: cover direct and derived values with a minimal local state shape.
  • API: cover success, relevant failures, and transformations with a local test store or existing domain test harness.

Frequently asked questions

What does the Types State Mocks AI skill do?

Structure a simple Ledger Wallet data layer where one API response maps to one entity slice. Use when creating or reviewing domain/entity schemas, inferred types, initial state, mocks, selectors, slices, domain/api clients, and their tests.

Why use Types State Mocks on TypingMind?

Because you install it once and use it with any model. Types State Mocks 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 Types State Mocks in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/LedgerHQ/ledger-live/tree/develop/.agents/skills/types-state-mocks. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Types State Mocks?

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 Types State Mocks?

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

Is the Types State Mocks AI skill free?

Yes. It is published on GitHub by LedgerHQ 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 👇