Agent skill

Add Tauri Command

by openfootmanager in openfootmanager/openfootmanager

Expose new backend behaviour to the frontend over Tauri IPC.

GPL-3.0Auto-check passedWriting & Content

Install Add Tauri Command

skills CLI
$ npx skills add openfootmanager/openfootmanager --skill add-tauri-command -a claude-code

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

GitHub CLI
$ gh skill install openfootmanager/openfootmanager add-tauri-command --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/openfootmanager/openfootmanager.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/add-tauri-command .claude/skills/add-tauri-command && 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
add-tauri-command
GitHub stars
1.1k
Token cost
~1.6k tokens
SKILL.md length
652 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
GPL-3.0

At a glance

Expose new backend behaviour to the frontend over Tauri IPC.

  • Works in 6 steps: Write the command in… → Register it → Wrap it in a service → …
  • Tasks that involve Translation
  • SKILL.md covers 1. Write the command in…, 2. Register it, 3. Wrap it in a service and 4. Update the store, plus 3 more sections
  • Calls cargo and npm

What it does

Add Tauri Command is an agent skill from openfootmanager/openfootmanager. Expose new backend behaviour to the frontend over Tauri IPC. Covers the internal function split so MCP tools can share the logic, atomic mutation via mutateactivegame, translation-key errors, registration in the invoke handler, the typed service wrapper, store update, tests on both sides, and the docs/ARCHITECTURE.md command table.

Its SKILL.md is about 1.6k 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 Writing & Content, covering Translation and MCP servers. It works with Tauri and Model Context Protocol. The repository describes itself as: An open source soccer/football manager game. The licence is GPL-3.0.

When your agent uses it

  • Tasks that involve Translation
  • Tasks that involve MCP servers

Example prompts

  • “/add-tauri-command”

Requirements

  • Pre-approved tools (allowed-tools): Read, Edit, Write, Grep, Glob, Bash(cargo test*), Bash(cargo clippy*), Bash(npm exec --no -- vitest run src/services), Bash(npm exec --no -- tsc --noEmit)

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Write the command in src-tauri/src/commands/
  2. Register it
  3. Wrap it in a service
  4. Update the store
  5. Test both sides
  6. Update the docs

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Edit
    • Write
    • Grep
    • Glob
    • Bash(cargo test*)
    • Bash(cargo clippy*)
    • Bash(npm exec --no -- vitest run src/services)
    • Bash(npm exec --no -- tsc --noEmit)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cargo
    • npm

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

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    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

Add Tauri Command loads about 1.6k tokens when it runs. Until then it costs about 89 tokens; SKILL.md has 652 words of instructions outside code blocks.

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

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 openfootmanager/openfootmanager at commit 4615fc5, republished under its GPL-3.0 licence (© openfootmanager). 652 words, ~1,560 tokens.

Download SKILL.mdSave it as .claude/skills/add-tauri-command/SKILL.md (or your agent's skills folder).
name
add-tauri-command
description
Expose new backend behaviour to the frontend over Tauri IPC. Covers the _internal function split so MCP tools can share the logic, atomic mutation via mutate_active_game, translation-key errors, registration in the invoke handler, the typed service wrapper, store update, tests on both sides, and the docs/ARCHITECTURE.md command table.
allowed-tools
Read, Edit, Write, Grep, Glob, Bash(cargo test*), Bash(cargo clippy*), Bash(npm exec --no -- vitest run src/services), Bash(npm exec --no -- tsc --noEmit)
when_to_use
Adding a new Tauri command, changing an existing command's signature, or wiring a new backend action into the UI.
argument-hint
[command name and what it does]

Adding a Tauri command

Every frontend↔backend interaction goes through invoke(). The layering is strict, and the _internal split is what keeps the MCP server from becoming a second copy of the game.


1. Write the command in src-tauri/src/commands/

One module per area — squad.rs, transfers.rs, contracts.rs, club.rs, time.rs, … Put it where its siblings live rather than starting a new module.

Split it in two. The #[tauri::command] wrapper does IPC plumbing only; the real work lives in a plain *_internal function that takes &StateManager. The wrapper is <= 50 lines including its signature; the root Code quality section defines the other layer and size limits. Commands and MCP adapt the same seam; application code never imports either adapter. For example:

rust
pub fn set_play_style_internal(state: &StateManager, play_style: &str) -> Result<Game, String> {
    mutate_active_game(state, |game| {
        // validate first — see below
        // then mutate
        Ok(())
    })
}

#[tauri::command]
pub fn set_play_style(state: State<Arc<StateManager>>, play_style: String) -> Result<Game, String> {
    set_play_style_internal(&state, &play_style)
}

This is not ceremony. The MCP server (src-tauri/src/mcp_server/tools_impl/) calls the same _internal function, so an agent playing the game and a human clicking a button run identical logic. A command whose body lives inside the #[tauri::command] fn cannot be reached from MCP without duplicating it.

Mutate atomically

Use mutate_active_game from src-tauri/src/commands/util.rs. It borrows the game under the lock, mutates in place, and clones once for the response — the old get_game(clone) → mutate → set_game pattern deep-cloned the whole world twice per command and lost updates when the GUI and an MCP agent acted concurrently.

Validate before you mutate. The closure operates on the live game, so anything changed before an early Err return persists. Check preconditions up front, then mutate.

Errors are translation keys

Return "be.error.noTeamAssigned", not "No team assigned". The frontend resolves these through src/utils/backendI18n.ts. A new error key must be added to every locale file — use /add-ui-string.

2. Register it

Add the command to the tauri::generate_handler![…] list in src-tauri/src/lib.rs. If you created a new module, add pub mod and the pub use re-export in src-tauri/src/commands/mod.rs.

Forgetting registration compiles fine and fails at runtime with an unhelpful IPC error.

3. Wrap it in a service

Components never call invoke(). Add a typed wrapper to the matching src/services/<area>Service.ts:

ts
export async function setPlayStyle(playStyle: PlayStyle): Promise<GameStateData> {
  return invoke<GameStateData>("set_play_style", { playStyle });
}

Argument names are camelCase on the TypeScript side and snake_case in Rust — Tauri converts between them. Getting this wrong produces a runtime "missing required key" error, not a compile error, so mirror an existing wrapper exactly.

Types come from src/store/types.ts or src/store/gameStore.ts. No any.

4. Update the store

Commands that return game state feed gameStore. Follow the existing call sites: call the service, then set store state. Never mutate store state in place.

Show full SKILL.md (256 more words)Show less

5. Test both sides

Backend, in a #[cfg(test)] module in the same file — test the _internal function, which needs no Tauri runtime:

bash
cargo test --manifest-path src-tauri/Cargo.toml --lib      # command tests live in the lib target
cargo test --manifest-path src-tauri/Cargo.toml --workspace

cargo test --bin matches zero tests and exits 0. It is not a check.

Frontend: src/services/<area>Service.test.ts, mocking @tauri-apps/api/core. Existing service tests show the shape. Cover the failure path — a command that returns Err must surface a usable message.

Use /write-tests (programme PR 2) before implementation. Test wrapper equivalence at the public adapter seam: Tauri/service arguments, errors and returned state match the shared function; where an MCP counterpart exists, verify it delegates to that seam too. Do not stop at helper-only tests. Test failure atomicity and read persisted changes through a fresh reader. For an existing MCP counterpart, run --lib --features mcp; UI-only commands need no invented MCP route. Use ofm-test-reviewer for observed fix-removal evidence.

6. Update the docs

docs/ARCHITECTURE.md has command tables (Game Lifecycle, Match, Team Management, Settings). Add your row. An out-of-date table is worse than none.

If the command should also be available to AI agents, continue with /add-mcp-tool.


Checklist

  • Logic in a *_internal(&StateManager, …) function; #[tauri::command] is a thin wrapper
  • Mutations go through mutate_active_game, with validation before mutation
  • Errors are translation keys, added to every locale
  • Registered in generate_handler![…] in src-tauri/src/lib.rs
  • New modules re-exported from commands/mod.rs
  • Typed wrapper in src/services/, camelCase args, no any
  • Store updated without in-place mutation
  • Backend test on the _internal fn (cargo test --lib), written first
  • Frontend service test including the error path
  • docs/ARCHITECTURE.md command table updated
  • cargo clippy --workspace --all-targets and npm exec --no -- tsc --noEmit green

© openfootmanager, GPL-3.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 .claude/skills/add-tauri-command of openfootmanager/openfootmanager.

Open the folder on GitHubat commit 4615fc5

Compare with similar skills

Add Tauri Command 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.

Add Tauri Command compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Tauri Command this skillopenfootmanager/openfootmanager1.1k—~1.6kAutomated safety check: PassGPL-3.0
Ainiee Next TranslationShadowLoveElysia/AiNiee-Next173—~3.3kAutomated safety check: PassAGPL-3.0
Gearcoleco Romhackingdrhelius/Gearcoleco141—~3.9kAutomated safety check: PassGPL-3.0
Managing MCP IndexComfy-Org/workflow_templates1.3k—~1.9kAutomated safety check: NotesMIT
Helmor Debug Operatedohooo/helmor1.3k—~6.6kAutomated safety check: PassApache-2.0
Edt MCP BilingualDitriXNew/EDT-MCP295—~850Automated safety check: PassAGPL-3.0

Similar skills

  • Ainiee Next Translation

    ShadowLoveElysia/AiNiee-Next

    在用户要求翻译小说、文档、字幕或其他文件内容时,按 AiNiee-Next 的输入优先、长文本询问和 MCP 边界执行;进入 AiNiee 工作流后,原文获取与术语预分析也必须走受控读取工具,禁止自行解包解析。

    173 GitHub stars~3.3k tokensUpdated 10 days ago
    Writing & ContentAuto-check passed
  • Gearcoleco Romhacking

    drhelius/Gearcoleco

    Hack, modify, and translate ColecoVision and Super Game Module ROMs using the Gearcoleco emulator MCP server.

    141 GitHub stars~3.9k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Managing MCP Index

    Comfy-Org/workflow_templates

    Builds and maintains templates/index.mcp.json for Comfy Cloud MCP tools.

    1.3k GitHub stars~1.9k tokensUpdated today
    Frontend & DesignAuto-check: notes
  • Operate, reproduce, and debug a running local Helmor desktop development build through the Tauri MCP bridge.

    1.3k GitHub stars~6.6k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Edt MCP Bilingual

    DitriXNew/EDT-MCP

    Correctness checklist for 1C's bilingual (Russian/English) model in EDT-MCP — synonym language-code vs name, object resolution by Name vs synonym vs TYPE token, dialect-aware vs literal code search.

    295 GitHub stars~850 tokensUpdated today
    Writing & ContentAuto-check passed
  • Inspect and run EDT translation workflows through EDT-MCP while preserving declared languages, dictionaries, storage, and programmatic metadata names.

    295 GitHub stars~605 tokensUpdated today
    Writing & ContentAuto-check passed

More from openfootmanager/openfootmanager

  • Add UI String

    openfootmanager/openfootmanager

    Add or change any text a player can see, in every locale the game ships in.

    1.1k GitHub stars~2.6k tokensUpdated yesterday
    Auto-check passed
  • Add Domain Field

    openfootmanager/openfootmanager

    Add a field to a domain type so it survives save/load. An agent skill from openfootmanager/openfootmanager.

    1.1k GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Add MCP Tool

    openfootmanager/openfootmanager

    Add a tool to the MCP server that lets AI agents play OpenFoot Manager.

    1.1k GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • New UI Surface

    openfootmanager/openfootmanager

    Build a new frontend component, panel, dashboard tab, or screen that matches the Matchday design language, works in light and dark, is keyboard and screen-reader accessible, reuses existing…

    1.1k GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Preflight

    openfootmanager/openfootmanager

    Verify a pull request with the frontend scripts, default and MCP backend tests and clippy, formatting, architecture checks and review evidence.

    1.1k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed

Questions about Add Tauri Command

What does Add Tauri Command do?

Expose new backend behaviour to the frontend over Tauri IPC. Add Tauri Command is an agent skill from openfootmanager/openfootmanager. Expose new backend behaviour to the frontend over Tauri IPC.

When should I use Add Tauri Command?

Add Tauri Command fits situations like: tasks that involve Translation; tasks that involve MCP servers.

How do I install Add Tauri Command in Claude Code?

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

How do I install Add Tauri Command in Codex?

Run `npx skills add openfootmanager/openfootmanager --skill add-tauri-command -a codex`. Or copy the skill folder (.claude/skills/add-tauri-command in openfootmanager/openfootmanager) into .agents/skills/add-tauri-command in your project. Codex loads it when a task matches its description.

Can I use Add Tauri Command 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 openfootmanager/openfootmanager --skill add-tauri-command -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-tauri-command, .gemini/skills/add-tauri-command, .github/skills/add-tauri-command and .opencode/skills/add-tauri-command in your project.

What does Add Tauri Command need to run?

Going by SKILL.md and its folder, Add Tauri Command needs the command-line tools its instructions call (cargo and npm). Its frontmatter pre-approves these tools: Read, Edit, Write, Grep, Glob, Bash(cargo test*), Bash(cargo clippy*), Bash(npm exec --no -- vitest run src/services), Bash(npm exec --no -- tsc --noEmit).

Does Add Tauri Command access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Add Tauri Command 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 Add Tauri Command use?

Add Tauri Command is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add Tauri Command use?

About 1.6k tokens (SKILL.md is roughly 6.2k 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 Add Tauri Command?

Skills that share tags, products or a category with Add Tauri Command: Ainiee Next Translation (ShadowLoveElysia/AiNiee-Next, 173 stars), Gearcoleco Romhacking (drhelius/Gearcoleco, 141 stars), Managing MCP Index (Comfy-Org/workflow_templates, 1.3k stars) and Helmor Debug Operate (dohooo/helmor, 1.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Tauri Command?

openfootmanager (a GitHub organization) maintains it in openfootmanager/openfootmanager, which has 1,135 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 7, 2026.

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