Agent skill

DB Benchmark

by sendou-ink in sendou-ink/sendou.ink

Add or update repository READ function benchmark cases in the DB benchmark script.

AGPL-3.0Auto-check passed

Install DB Benchmark

skills CLI
$ npx skills add sendou-ink/sendou.ink --skill db-benchmark -a claude-code

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

GitHub CLI
$ gh skill install sendou-ink/sendou.ink db-benchmark --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/sendou-ink/sendou.ink.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/db-benchmark .claude/skills/db-benchmark && 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
db-benchmark
GitHub stars
297
Token cost
~1.1k tokens
SKILL.md length
378 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Add or update repository READ function benchmark cases in the DB benchmark script.

  • Works in 5 steps: Add a field to the Fixtures interface.… → Add a resolve() helper at the bottom of… → Pick the heaviest row, not any row — the… → …
  • A new repository read function is added
  • SKILL.md covers Files, Adding a case, Adding a fixture and Verifying
  • Calls pnpm

What it does

DB Benchmark is an agent skill from sendou-ink/sendou.ink. Add or update repository READ function benchmark cases in the DB benchmark script. Use when a new repository read function is added, when benchmark cases are missing or outdated, or when working on scripts/benchmark-db.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with SQLite. The repository describes itself as: Competitive Splatoon Platform. The licence is AGPL-3.0.

When your agent uses it

  • A new repository read function is added
  • Benchmark cases are missing
  • Working on scripts/benchmark-db

Example prompts

  • “/db-benchmark”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Add a field to the Fixtures interface. Every field is T | null — null means "table empty, skip dependent cases". Bundle related values…
  2. Add a resolve() helper at the bottom of the file and call it from resolveFixtures().
  3. Pick the heaviest row, not any row — the standard pattern is a groupBy + count + orderBy count desc + limit 1 query
  4. Never throw on empty tables — always resolve to null (executeTakeFirst() + ?? null).
  5. Verify table/column names against app/db/tables.ts.

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm

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

  • Network

    No URLs in SKILL.md. Its commands use pnpm, 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

DB Benchmark loads about 1.1k tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 378 words of instructions outside code blocks.

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

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 sendou-ink/sendou.ink at commit 63d970e, republished under its AGPL-3.0 licence (© sendou-ink). 378 words, ~1,052 tokens.

Download SKILL.mdSave it as .claude/skills/db-benchmark/SKILL.md (or your agent's skills folder).
name
db-benchmark
description
Add or update repository READ function benchmark cases in the DB benchmark script. Use when a new repository read function is added, when benchmark cases are missing or outdated, or when working on scripts/benchmark-db.

DB Benchmark Cases

The DB benchmark (pnpm bench:db) times repository READ functions against db-prod.sqlite3 to find the slowest queries. Every exported READ function in a *Repository.server.ts file should have a case registered — when adding a new read function to a repository, add a matching benchmark case.

Files

FilePurpose
scripts/benchmark-db.tsHarness: CLI, timing loop, stats, output. Rarely needs changes.
scripts/benchmark-db/cases.tsCase registry, grouped by repository file. New cases go here.
scripts/benchmark-db/fixtures.tsResolves worst-case arguments (heavy rows) from the DB. New argument kinds go here.
scripts/seed-chat.tsFills the production copy with chat data, which it ships without (pnpm run bench:db:seed-chat). Run once before the chat cases mean anything.

Adding a case

Cases live in buildCases() in scripts/benchmark-db/cases.ts, grouped under a // <RepositoryName> comment in file order. Three registration helpers:

ts
// Function needs a fixture (skipped automatically if the fixture is null)
add("UserRepository.findLeanById", fx.heavyUser, (user) =>
	UserRepository.findLeanById(user.id),
);

// Function takes no arguments
addStatic("BadgeRepository.all", () => BadgeRepository.all());

// Function needs two fixtures
add(
	"SavedCalendarEventRepository.isSaved",
	both(fx.heavyUser, fx.heavyTournamentId),
	([user, tournamentId]) =>
		SavedCalendarEventRepository.isSaved({ userId: user.id, tournamentId }),
);

Rules:

  • READ functions only. Never register inserts, updates, deletes, upserts or transactional helpers — the benchmark runs against real data in db-prod.sqlite3.
  • Case name is FileBasename.functionName. For multiple variants of one function, suffix with a label: BuildRepository.abilityPointAverages.all / .byWeapon. The two SkillRepository files are disambiguated as MmrSkillRepository (mmr) — sendouq-match's has no reads.
  • Arguments should be worst-case, not minimal: heaviest user, largest tournament, showPrivate/withMembers/include* options enabled, short search query (SEARCH_QUERY). The point is surfacing slow queries.
  • Functions calling actorId()/actorIdOrNull() work: the harness runs all cases inside userAsyncLocalStorage with the heavy user as actor.
Show full SKILL.md (161 more words)Show less

Adding a fixture

If no existing fixture fits the new function's arguments, add one to scripts/benchmark-db/fixtures.ts:

  1. Add a field to the Fixtures interface. Every field is T | null — null means "table empty, skip dependent cases". Bundle related values into one object (e.g. heavyOrg) so a case depends on a single field.
  2. Add a resolve<Name>() helper at the bottom of the file and call it from resolveFixtures().
  3. Pick the heaviest row, not any row — the standard pattern is a groupBy + count + orderBy count desc + limit 1 query:
ts
async function resolveHeavyBuildUserId() {
	const row = await db
		.selectFrom("Build")
		.select(({ fn }) => ["ownerId", fn.countAll<number>().as("count")])
		.groupBy("ownerId")
		.orderBy("count", "desc")
		.limit(1)
		.executeTakeFirst();

	return row?.ownerId ?? null;
}
  1. Never throw on empty tables — always resolve to null (executeTakeFirst() + ?? null).
  2. Verify table/column names against app/db/tables.ts.

Verifying

bash
pnpm run typecheck:scripts
pnpm exec biome check --error-on-warnings --write scripts/benchmark-db.ts scripts/benchmark-db
DB_PATH=db-prod.sqlite3 pnpm exec vite-node scripts/benchmark-db.ts -- --filter <caseName> --iterations 3

The filtered run must show the new case with plausible timings — not in the "Skipped" list (fixture resolved null: check the fixture query against real data) and not in the "errored" list (the case threw: check argument shapes). Note pnpm bench:db --filter x also works but runs the full fixture resolution either way.

© sendou-ink, AGPL-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/db-benchmark of sendou-ink/sendou.ink.

Open the folder on GitHubat commit 63d970e

Compare with similar skills

DB Benchmark 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.

DB Benchmark compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
DB Benchmark this skillsendou-ink/sendou.ink297—~1.1kAutomated safety check: PassAGPL-3.0
MCP Server BuildershareAI-lab/learn-claude-code78k5 repos~1.2kAutomated safety check: PassMIT
Copilot Session Failure Analysisdotnet/maui23k—~3.4kAutomated safety check: PassMIT
RTK Rust Design Patternsrtk-ai/rtk83k—~1.9kAutomated safety check: PassApache-2.0
OpenWork Desktop CDP Driverdifferent-ai/openwork24k—~465Automated safety check: PassCustom licence
OpenRig Upgrade Proceduremvschwarz/openrig5.9k1 repos~2.9kAutomated safety check: PassApache-2.0

Similar skills

  • MCP Server Builder

    shareAI-lab/learn-claude-code

    Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.

    78k GitHub starsUsed in 5 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • Mines local Copilot CLI session logs for dotnet/maui to rank costly or failing runs, tag recurring failure modes, propose repo edits and emit guard evals.

    23k GitHub stars~3.4k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Describes seven Rust design patterns for the RTK CLI filter modules, with when to use each, RTK examples, and notes on when a pattern is overkill.

    83k GitHub stars~1.9k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • OpenWork Desktop CDP Driver

    different-ai/openwork

    Drives a running OpenWork desktop window over CDP from the shell to evaluate JS, take screenshots, start sessions and send prompts for hand checks.

    24k GitHub stars~465 tokensUpdated today
    Testing & QAAuto-check passed
  • OpenRig Upgrade Procedure

    mvschwarz/openrig

    Walks an agent through upgrading the OpenRig CLI and daemon one observed step at a time, keeping live seats alive and reconciling managed plugin files.

    5.9k GitHub starsUsed in 1 repo~2.9k tokens
    DevOps & CloudAuto-check passed
  • Add Memory Kind

    EverMind-AI/EverOS

    Walks through adding a new persisted memory kind to EverOS: choose storage among Markdown, SQLite and LanceDB, pick a Markdown strategy, then wire schemas, repos and writers.

    13k GitHub stars~2.6k tokensUpdated yesterday
    DatabasesAuto-check passed

More from sendou-ink/sendou.ink

  • E2E

    sendou-ink/sendou.ink

    Run, debug, and manage Playwright e2e tests. An agent skill from sendou-ink/sendou.ink.

    297 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check: notes
  • Scanner Misread

    sendou-ink/sendou.ink

    Turn a user-submitted scanner "Game data" zip (scanner--game-N.zip, a match card's download for reporting a misread) into 1-3 new failing fixtures (frame + expected.json) under…

    297 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Explain Diff HTML

    sendou-ink/sendou.ink

    A skill your agent uses when the user asks for a rich explanation of a code change, diff, branch, or PR.

    297 GitHub starsUsed in 1 repo~787 tokens
    Auto-check passed
  • SQL

    sendou-ink/sendou.ink

    Help write, debug, and explore SQLite database queries using Kysely.

    297 GitHub stars~423 tokensUpdated yesterday
    Auto-check passed
  • Sendou Code Review

    sendou-ink/sendou.ink

    Multi-agent code review that checks the current diff from multiple angles (spec compliance, bugs from two lenses, conventions/modernization, abstraction reuse, security, DB query performance, test…

    297 GitHub stars~5.2k tokensUpdated yesterday
    Auto-check passed
  • Search Params

    sendou-ink/sendou.ink

    Work with URL search param state via the unified app/modules/search-params system.

    297 GitHub stars~154 tokensUpdated yesterday
    Auto-check passed

Works with

Questions about DB Benchmark

What does DB Benchmark do?

Add or update repository READ function benchmark cases in the DB benchmark script. ink. Add or update repository READ function benchmark cases in the DB benchmark script.

When should I use DB Benchmark?

DB Benchmark fits situations like: A new repository read function is added; benchmark cases are missing; working on scripts/benchmark-db.

How do I install DB Benchmark in Claude Code?

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

How do I install DB Benchmark in Codex?

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

Can I use DB Benchmark 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 sendou-ink/sendou.ink --skill db-benchmark -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/db-benchmark, .gemini/skills/db-benchmark, .github/skills/db-benchmark and .opencode/skills/db-benchmark in your project.

What does DB Benchmark need to run?

Going by SKILL.md and its folder, DB Benchmark needs the command-line tools its instructions call (pnpm).

Does DB Benchmark 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 DB Benchmark 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 DB Benchmark use?

DB Benchmark is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does DB Benchmark use?

About 1.1k tokens (SKILL.md is roughly 4.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 DB Benchmark?

Skills that share tags, products or a category with DB Benchmark: MCP Server Builder (shareAI-lab/learn-claude-code, 78k stars), Copilot Session Failure Analysis (dotnet/maui, 23k stars), RTK Rust Design Patterns (rtk-ai/rtk, 83k stars) and OpenWork Desktop CDP Driver (different-ai/openwork, 24k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains DB Benchmark?

sendou-ink (a GitHub organization) maintains it in sendou-ink/sendou.ink, which has 297 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 7, 2026.

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