shared-types
Use when a Rust backend and a TypeScript or JavaScript frontend exchange data, before you add or change a request, response, query, event, message, or error…
Skill by futex-ai
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/futex-ai-shared-types
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: frontend, backend, data, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/shared-types
What's inside
- Skill name
shared-types- Description
- Use when a Rust backend and a TypeScript or JavaScript frontend exchange data, before you add or change a request, response, query, event, message, or error type that the frontend reads, before you write a TypeScript type, interface, or data transfer object for backend data, when you add an endpoint or a message, when you change serde attributes on a boundary type, and when generated TypeScript does not match the Rust type.
- License
- MIT
- Instructions
- 73 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- generators.md · references/
SKILL.md (first lines)
# Shared types These rules apply when a repository has a Rust backend and a TypeScript or JavaScript frontend that exchange data. The repository's `AGENTS.md` names the generator, the regenerate command, the generated directory, and the wire form of large numbers and dates. [references/generators.md](references/generators.md) holds the setup and the commands for each generator. ## One source - Rust owns every type that crosses the boundary: request and response bodies, query parameters, events, messages, and error payloads. - The frontend never hand-writes a type, interface, or data transfer object for backend data. It imports the generated type. - The generator reads the serde attributes, so the wire format and the TypeScript type come from one definition. Keep the attributes on the Rust type. - A type that the generator cannot express is a design problem on the Rust side. Change the Rust type. Do not patch the TypeScript. - Boundary types live in one crate, the `-interface` or `-api` crate that the `rust` skill describes, so that one command generates all of them. ## Generators - For an HTTP API, derive the OpenAPI document from the Rust types with `utoipa`, and generate the TypeScript types from that document with `openapi-typescript`. The frontend gets the paths and the schemas, and the document doubles as the API reference. - For every other boundary, for example RPC, WebSocket messages, or types that a desktop shell shares, export the TypeScript types with `ts-rs`. - A repository can name a different generator in `AGENTS.md` when it has a reason, for example a WebAssembly boundary. The rule does not change: Rust is the source, and the frontend consumes generated output. ## Shapes - Prefer shapes that the generator expresses exactly: structs, internally tagged enums for discriminated unions, string-keyed maps, and `Option` for a value that can be null or absent. - Do not use `serde_json::Value` or other untyped JSON in a boundary type. See the `rust` skill. - Decide the wire form of 64-bit integers, decimals, and dates once per repository, and record it in `AGENTS.md`. A string is the usual choice when JavaScript number precision is not enough. ## Output - One command regenerates every generated file. `AGENTS.md` names it under `## Commands`. - Generated files live in one directory that `AGENTS.md` names, and each file starts with the generator's header. Never hand-edit a generated file. Run the command instead. - Commit the generated files. The frontend then builds without a Rust toolchain, and the review diff shows every contract change. - The repository gate regenerates the files and fails on a diff, once the user approves that check for the repository. A new check is a gate decision; see the always-on safety rules. - The frontend type check in the gate covers the generated files. Do not snapshot generated text in a test. - A JavaScript frontend references the generated types from JSDoc comments. ## Existing hand-written types - Hand-written types for backend data that exist before this rule are legacy to migrate, not precedent for new code. - Generate every new boundary type from the start. - When you change a hand-written type, move that type to the generated set in the same change, and point its importers at the generated file. - Track the rest of the migration in a plan; see the `plans` skill.
From futex-ai/skills, MIT.
More from futex-ai/skills
- 0.592score
writing-skills
futex-ai
Use when you create or edit a skill, write or change a skill description, or when an agent skipped a rule, did not load a skill, or loaded the wrong one.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
deterministic-tests
futex-ai
Use when a test fails and then passes on a rerun, when a test is flaky or timing-dependent, when a test would assert elapsed time, a timeout, or performance…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
git-commit
futex-ai
Use before you commit and directly after, when you write a commit message or a pull request title and description, when you squash, when the diff against…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
implementation-review
futex-ai
Use after you push a branch and the work needs a review, before you run a review or apply its findings, when a plan's review TODO is reached, when the user…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
rust
futex-ai
Use before you write or change Rust code, add a crate or a dependency to a Cargo workspace, write or move a Rust test, define or map an error type, or add a…
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
git-merge
futex-ai
Use before you merge or rebase a branch, when origin/main has moved ahead of your branch, when you resolve merge conflicts, directly after you commit a merge…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
mockups
futex-ai
Use before you create or change a mockup under docs/mockups, a screen component, a user flow, or a Mokly entry, component, or configuration, when a plan has a…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
product-ui
futex-ai
Use before you implement or change a screen, a component, a view, or a mockup, when you write or edit user-facing text such as a status, helper, label, or…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
decisions-and-findings
futex-ai
Use before you send a message that asks the user for a decision, presents review findings or review items, or gives a final report, when the user asks for…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
documentation
futex-ai
Use before you edit a README.md, a crate README, anything under docs/, an architecture doc, or a protocol doc, when a behaviour change could leave a doc…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
typescript
futex-ai
Use before you write or change TypeScript or JavaScript, add an npm dependency, set up a new package, or write a frontend file, a Node script, or a test file…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
databases
futex-ai
Use before you add, edit, or name a database migration or a seed migration, when you touch a schema, Diesel code, a migration lock, or a crate named…
SkillAFreshness: A★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 19, 2026 (9 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/futex-ai/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from futex-ai
- 0.592score
writing-skills
futex-ai
Use when you create or edit a skill, write or change a skill description, or when an agent skipped a rule, did not load a skill, or loaded the wrong one.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
deterministic-tests
futex-ai
Use when a test fails and then passes on a rerun, when a test is flaky or timing-dependent, when a test would assert elapsed time, a timeout, or performance…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
git-commit
futex-ai
Use before you commit and directly after, when you write a commit message or a pull request title and description, when you squash, when the diff against…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
rust
futex-ai
Use before you write or change Rust code, add a crate or a dependency to a Cargo workspace, write or move a Rust test, define or map an error type, or add a…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
implementation-review
futex-ai
Use after you push a branch and the work needs a review, before you run a review or apply its findings, when a plan's review TODO is reached, when the user…
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
git-merge
futex-ai
Use before you merge or rebase a branch, when origin/main has moved ahead of your branch, when you resolve merge conflicts, directly after you commit a merge…
SkillAFreshness: A★ 1Claude Code +9
Cite this page
shared-types skill. Agent Mart. https://agentmart.dev/skills/futex-ai-shared-types (last updated 2026-10-24)