Agent skill

Add Domain Field

by openfootmanager in openfootmanager/openfootmanager

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

GPL-3.0Auto-check passedDatabases

Install Add Domain Field

skills CLI
$ npx skills add openfootmanager/openfootmanager --skill add-domain-field -a claude-code

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

GitHub CLI
$ gh skill install openfootmanager/openfootmanager add-domain-field --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-domain-field .claude/skills/add-domain-field && 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-domain-field
GitHub stars
1.1k
Token cost
~1.7k tokens
SKILL.md length
834 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
GPL-3.0

At a glance

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

  • Works in 6 steps: The domain type → The repository — five edit sites → The migration → …
  • Tasks that involve SQL
  • SKILL.md covers 1. The domain type, 2. The repository — five edit…, 3. The migration and 4. Prove it round-trips, plus 3 more sections
  • Calls cargo

What it does

Add Domain Field is an agent skill from openfootmanager/openfootmanager. Add a field to a domain type so it survives save/load. Covers serde(default) for backward compatibility, the five positional edit sites in the db repositories, the SQL migration and MIGRATIONCOUNT bump, the round-trip test, and the frontend type plus translated label.

Its SKILL.md is about 1.7k 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 SQL. It works with SQL and Tauri. 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 SQL

Example prompts

  • “/add-domain-field”

Requirements

  • Pre-approved tools (allowed-tools): Read, Edit, Write, Grep, Glob, Bash(cargo test*), Bash(cargo clippy*), Bash(cargo fmt*)

Workflow steps

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

  1. The domain type
  2. The repository — five edit sites
  3. The migration
  4. Prove it round-trips
  5. The rest of the backend
  6. The frontend

What it can do on your machine

Read from SKILL.md and the folder at commit a87841b. 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(cargo fmt*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cargo

    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

Add Domain Field loads about 1.7k tokens when it runs. Until then it costs about 72 tokens; SKILL.md has 834 words of instructions outside code blocks.

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

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 a87841b, republished under its GPL-3.0 licence (© openfootmanager). 834 words, ~1,720 tokens.

Download SKILL.mdSave it as .claude/skills/add-domain-field/SKILL.md (or your agent's skills folder).
name
add-domain-field
description
Add a field to a domain type so it survives save/load. Covers serde(default) for backward compatibility, the five positional edit sites in the db repositories, the SQL migration and MIGRATION_COUNT bump, the round-trip test, and the frontend type plus translated label.
allowed-tools
Read, Edit, Write, Grep, Glob, Bash(cargo test*), Bash(cargo clippy*), Bash(cargo fmt*)
when_to_use
Adding a field to Team, Player, Staff, Manager, League, or any other type in the domain crate; or when a new field works in memory but is empty after saving…
argument-hint
[type and field, e.g. Team.youth_budget]

Adding a domain field

The trap: #[serde(default)] makes old saves load, but it does nothing for SQLite. The repositories in src-tauri/crates/db/src/repositories/ use hand-written positional SQL, so a field that isn't in the column lists is silently dropped on every save/load round trip — with no error, no warning, and a passing test suite.

Start with /write-tests: name the GWT scenarios and write the test cases first. Include a non-default SQL round-trip via a fresh reader and an old-save fixture with the new serialized field absent. Typed-field tests may need the field declaration and minimal constructor/struct-literal updates to compile; add only that scaffolding before observing RED. A compile error is not behavioural evidence. Observe the old-save incompatibility before adding its serde default, and the SQL round-trip failure before persistence and migration support. If existing serde behaviour already supplies the intended default, label that passing test characterization; do not invent a failure. Then complete all six steps below, including the required serde default before committing.


1. The domain type

src-tauri/crates/domain/src/ — team.rs, player.rs, staff.rs, manager.rs, league.rs, …

rust
pub struct Team {
    // …
    #[serde(default)]
    pub youth_budget: i64,
}

Use #[serde(default = "default_youth_budget")] with a function when zero, empty, or None is the wrong value for an old save. Think about what a save written before this feature existed should look like once loaded — that is what the default has to produce.

Domain types may hold data, constructors, Default and pure value semantics. Outcome-deciding game rules and I/O belong in ofm_core; follow the root Code quality layering rules.

2. The repository — five edit sites

Take Team as the worked example; team_repo.rs is the reference for the rest. Open src-tauri/crates/db/src/repositories/team_repo.rs and edit all five:

  1. save_team's INSERT OR REPLACE INTO teams (…) column list — add the column.

  2. Its VALUES (?1, ?2, …, ?N) run — add one more placeholder. The count must match the column list exactly or the insert fails at runtime.

  3. The params![…] list — add the value, in the same position as the column.

  4. row_to_team's positional mapping — row.get(N)?. Appending at the end is safest; inserting in the middle shifts every index after it, and nothing will tell you if you miss one.

  5. Both SELECT column lists — load_all_teams and load_team. Two separate strings that must stay in sync. For a column added by a migration, wrap it as COALESCE(youth_budget, <default>) so rows written before the migration read back as the default — the existing JSON columns (media_json, player_roles_json, …) show the pattern.

    <default> must be the same value your serde default produces. These are two independent fallbacks for the same field: serde covers a save loaded from JSON, COALESCE covers a row written before the migration. If step 1 used #[serde(default = "default_youth_budget")] returning 500_000, then COALESCE(youth_budget, 0) makes the same save load differently depending on which path it came through. Either match the two, or give the column a non-null SQL DEFAULT in the migration and drop the COALESCE.

Other repositories in that directory (player_repo.rs, staff_repo.rs, competition_repo.rs, …) follow the same five-site shape.

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

3. The migration

  • Add src-tauri/crates/db/src/sql/vNNN_<short_description>.sql, numbered after the current highest file.
  • Register it in src-tauri/crates/db/src/migrations.rs (all_migrations()).
  • Bump MIGRATION_COUNT at the top of that file — the migration tests assert on it.

Migrations are append-only and must be idempotent; migrations.rs has a test that re-applies them (test_migrations_are_idempotent). Use ALTER TABLE … ADD COLUMN … DEFAULT …; never rewrite or renumber an existing migration, because shipped saves have already run it.

4. Prove it round-trips

This is the step that catches the dropped-column bug, so write it before the repository edits.

In src-tauri/crates/db/, extend the nearest existing round-trip test: build a value with the new field set to something non-default, save it, load it through a fresh reader, assert the field survived. Separately deserialize an old-save fixture without the field and assert its intended default. Run the named regression with only the fix removed in a disposable copy. A test that uses the default value passes even when the column is missing entirely.

bash
cargo test --manifest-path src-tauri/Cargo.toml -p db
cargo test --manifest-path src-tauri/Cargo.toml --workspace

5. The rest of the backend

  • Game logic for the field goes in ofm_core, not domain.
  • If the field should reach the match engine, do not import domain into engine. Add the field to the engine's own mirror type and extend the conversion in ofm_core/turn/.
  • If an AI agent should be able to read or set it, see /add-mcp-tool.

6. The frontend

  • Add the field to the matching TypeScript type (src/store/types.ts or the relevant service types). Optional (?) if old saves may not have it.
  • Any label, unit, or tooltip for it is a user-facing string → /add-ui-string, every locale.

Checklist

  • Field added to the domain type with #[serde(default)] or an explicit default fn
  • Default value is correct for a save written before the field existed
  • Repository INSERT column list updated
  • VALUES (?1…?N) placeholder count updated to match
  • params![…] updated, same order
  • row_to_* positional row.get(N)? updated
  • Both SELECT lists updated, with COALESCE for the migrated column
  • sql/vNNN_*.sql added and registered in migrations.rs
  • MIGRATION_COUNT bumped
  • Non-default SQL round-trip and absent-field old-save default test, written first and seen failing
  • cargo test --workspace and cargo clippy --workspace --all-targets green
  • Frontend type updated; any new label translated into every locale

© 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-domain-field of openfootmanager/openfootmanager.

Open the folder on GitHubat commit a87841b

Compare with similar skills

Add Domain Field 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 Domain Field compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Domain Field this skillopenfootmanager/openfootmanager1.1k—~1.7kAutomated safety check: PassGPL-3.0
Database Opsbkywksj/knowledge-base330—~1.9kAutomated safety check: PassCustom licence
Rust SQL Testshencangsheng/easydb_app590—~1.2kAutomated safety check: PassMIT
New SettingRain-kl/OpenFlare289—~1.7kAutomated safety check: PassApache-2.0
Formatting Insight AxesPostHog/posthog40k—~2.1kAutomated safety check: PassCustom licence
Evolving The Data ModelTriliumNext/Trilium38k—~2.1kAutomated safety check: PassAGPL-3.0

Similar skills

  • Database Ops

    bkywksj/knowledge-base

    Tauri 本地数据库操作技能,使用 rusqlite 进行 SQLite 数据库操作. An agent skill from bkywksj/knowledge-base.

    330 GitHub stars~1.9k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Rust SQL Test

    shencangsheng/easydb_app

    Enforces unit test requirements for the Rust data-processing modules in src-tauri/src/sql/ (generator.rs, parse.rs) and src-tauri/src/reader/ (excel.rs and other readers).

    590 GitHub stars~1.2k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • New Setting

    Rain-kl/OpenFlare

    Wavelet 项目专用:当新增或修改启动时设置、数据库系统设置、业务设置、公共可见配置、/admin/system 参数配置、/admin/settings 图形化设置界面,或前端公共配置消费逻辑时必须使用。本技能指导设置类型判定、SystemConfig 字段与 visibility、goose SQL 初始化/升级、热更新读取、公共配置暴露、shadcn 图形组件和验证流程。

    289 GitHub stars~1.7k tokensUpdated 3 days ago
    DatabasesAuto-check passed
  • Official

    Pick the right y-axis unit when creating or updating an insight via posthog:insight-create or posthog:insight-update — both TrendsQuery (trendsFilter.aggregationAxisFormat) and SQL insights…

    40k GitHub stars~2.1k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Evolving The Data Model

    TriliumNext/Trilium

    A skill your agent uses when adding a DB migration or a new column/field to a Becca entity in Trilium ("add a migration", "new column on notes/attributes", "ALTER TABLE", "add a field to…

    38k GitHub stars~2.1k tokensUpdated today
    DatabasesAuto-check passed
  • Safe SQL Execution

    supabase/supabase

    Official

    A skill your agent uses whenever code will build, return, fetch, or execute SQL that runs against a user's real Postgres database — even when the request reads like an ordinary feature or bug fix…

    111k GitHub stars~4.2k tokensUpdated yesterday
    DatabasesAuto-check passed

More from openfootmanager/openfootmanager

All 8 skills in this repo
  • 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 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
  • Add Tauri Command

    openfootmanager/openfootmanager

    Expose new backend behaviour to the frontend over Tauri IPC.

    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
  • Write Tests

    openfootmanager/openfootmanager

    Write scenario-driven tests for an OpenFoot Manager feature, bug fix or story, or characterize weakly covered behaviour before a refactor.

    1.1k GitHub stars~2.2k tokensUpdated yesterday
    Auto-check: notes

Works with

Questions about Add Domain Field

What does Add Domain Field do?

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

When should I use Add Domain Field?

Add Domain Field fits situations like: tasks that involve SQL.

How do I install Add Domain Field in Claude Code?

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

How do I install Add Domain Field in Codex?

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

Can I use Add Domain Field 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-domain-field -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-domain-field, .gemini/skills/add-domain-field, .github/skills/add-domain-field and .opencode/skills/add-domain-field in your project.

What does Add Domain Field need to run?

Going by SKILL.md and its folder, Add Domain Field needs the command-line tools its instructions call (cargo). Its frontmatter pre-approves these tools: Read, Edit, Write, Grep, Glob, Bash(cargo test*), Bash(cargo clippy*), Bash(cargo fmt*).

Does Add Domain Field 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 Add Domain Field 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 Domain Field use?

Add Domain Field 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 Domain Field use?

About 1.7k tokens (SKILL.md is roughly 6.9k 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 Domain Field?

Skills that share tags, products or a category with Add Domain Field: Database Ops (bkywksj/knowledge-base, 330 stars), Rust SQL Test (shencangsheng/easydb_app, 590 stars), New Setting (Rain-kl/OpenFlare, 289 stars) and Formatting Insight Axes (PostHog/posthog, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Domain Field?

openfootmanager (a GitHub organization) maintains it in openfootmanager/openfootmanager, which has 1,135 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 9, 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.