Golang Database
unxed/f4
Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context…
Guides SQLite schema changes in the Cursor BYOK server, keeping SQLx migrations, the Rust store, API contracts and fixtures aligned.
$ npx skills add leookun/cursor-byok --skill database-schema -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install leookun/cursor-byok database-schema --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/leookun/cursor-byok.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/database-schema .claude/skills/database-schema && rm -rf skills-srcUse ~/.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/
Install the "database-schema" agent skill from https://github.com/leookun/cursor-byok/tree/main/.agents/skills/database-schema into .claude/skills/database-schema/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "database-schema", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/leookun/cursor-byok/tree/main/.agents/skills/database-schemaType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add leookun/cursor-byok --skill database-schema -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install leookun/cursor-byok database-schema --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/leookun/cursor-byok.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/database-schema .agents/skills/database-schema && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "database-schema" agent skill from https://github.com/leookun/cursor-byok/tree/main/.agents/skills/database-schema into .agents/skills/database-schema/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "database-schema", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add leookun/cursor-byok --skill database-schema -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install leookun/cursor-byok database-schema --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/leookun/cursor-byok.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/database-schema .cursor/skills/database-schema && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "database-schema" agent skill from https://github.com/leookun/cursor-byok/tree/main/.agents/skills/database-schema into .cursor/skills/database-schema/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "database-schema", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/leookun/cursor-byok.git --path .agents/skills/database-schema--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add leookun/cursor-byok --skill database-schema -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install leookun/cursor-byok database-schema --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/leookun/cursor-byok.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/database-schema .gemini/skills/database-schema && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "database-schema" agent skill from https://github.com/leookun/cursor-byok/tree/main/.agents/skills/database-schema into .gemini/skills/database-schema/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "database-schema", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install leookun/cursor-byok database-schemaInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add leookun/cursor-byok --skill database-schema -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/leookun/cursor-byok.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/database-schema .github/skills/database-schema && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "database-schema" agent skill from https://github.com/leookun/cursor-byok/tree/main/.agents/skills/database-schema into .github/skills/database-schema/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "database-schema", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add leookun/cursor-byok --skill database-schema -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install leookun/cursor-byok database-schema --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/leookun/cursor-byok.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/database-schema .opencode/skills/database-schema && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "database-schema" agent skill from https://github.com/leookun/cursor-byok/tree/main/.agents/skills/database-schema into .opencode/skills/database-schema/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "database-schema", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
database-schemaGuides SQLite schema changes in the Cursor BYOK server, keeping SQLx migrations, the Rust store, API contracts and fixtures aligned.
A schema change is treated as an end-to-end persistence change, not a lone SQL edit. Before editing, the agent reads the whole table definition, every query that reads or writes it, its Rust types, API projections and fixtures, searching by table and field names rather than inferring the path from one file. Migrations are embedded SQLx files in server/migrations, run from server/src/store/sqlite.rs.
The migration rules are strict. An applied migration is never modified, renamed, reordered or deleted, since SQLx checksums it and startup fails, so each change is a new numbered forward migration with a descriptive name. A fresh database must reach the current schema by applying all migrations in order, with no duplicated columns. History is rewritten only if you explicitly ask for a full reset. No compatibility views, triggers, shadow fields or fallback reads are added, and unrelated changes get separate migrations.
The SQLite design guidance covers choosing nullability from domain meaning, booleans stored as constrained integers, CHECK, UNIQUE and foreign-key constraints only for real invariants with a deliberate ON DELETE choice, indexes only for demonstrated query needs, and transactions for multi-table changes. The excerpt is cut off after that.
7 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 9a8fde2. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
cargonpmFrom the folder's file list and the shell code blocks in SKILL.md.
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.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Cursor BYOK Database Schema loads about 1.3k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 631 words of instructions outside code blocks.
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.
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.
The full file from leookun/cursor-byok at commit 9a8fde2, republished under its MIT licence (© leookun). 631 words, ~1,288 tokens.
.claude/skills/database-schema/SKILL.md (or your agent's skills folder).Treat a schema change as an end-to-end persistence change, not as an isolated SQL edit. Keep the database, Rust store, API contracts, fixtures, and tests aligned.
Use the existing layers and keep responsibilities in their current directories:
server/
├── migrations/ Ordered SQLite/SQLx migrations
├── src/store/ Queries, bindings, row decoding, transactions
├── src/ Domain and API types that consume persisted data
└── tests/ Migration, store, API, and integration coverageBefore editing, inspect the complete table definition, every query that reads or writes it, its Rust types, API projections, and relevant fixtures. Search by the table name and affected field names; do not infer the persistence path from one file.
server/src/store/sqlite.rs runs embedded SQLx migrations from server/migrations.migration ... was previously applied but has been modified.0003_add_request_protocol.sql.NULL for genuinely unknown historical data; use a default only when it is correct for every existing row.INTEGER NOT NULL DEFAULT 0 CHECK (enabled IN (0, 1)).CHECK, UNIQUE, and foreign-key constraints when they express real invariants. Choose ON DELETE behavior deliberately.ALTER TABLE. For an unsupported constraint, type, or destructive column change, create the replacement table with the final schema, copy and transform data, replace the old table, and recreate required indexes and foreign keys in one migration.Trace every changed field through the full path that applies:
.bind(...) order, row decoding, and update statements.List SQL columns explicitly. Keep selected-column order, row decoding, insert columns, and bind order visibly aligned. Avoid SELECT * because schema additions can silently invalidate positional decoding assumptions.
When a value records the effective behavior of a call, persist the value actually consumed at execution time rather than merely the model or provider default. Keep absent, defaulted, and explicitly supplied values distinguishable when that distinction matters.
Add focused coverage proportional to the change:
Run the narrow tests first, then the repository checks affected by the change. At minimum for server schema work, run:
cargo fmt --all -- --check
cargo test --workspaceIf frontend contracts changed, also run from apps/desktop:
npm run checkDo not repair unrelated dirty-worktree changes while validating. Report any pre-existing failure separately from failures caused by the schema change.
© leookun, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/database-schema of leookun/cursor-byok.
Open the folder on GitHubat commit 9a8fde2
Cursor BYOK Database Schema 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Cursor BYOK Database Schema this skillleookun/cursor-byok | 3.2k | — | ~1.3k | Automated safety check: Pass | MIT | |
| Golang Databaseunxed/f4 | 240 | 2 repos | ~2.9k | Automated safety check: Pass | MIT | |
| DB Migrationskurealnum/dotfiles | 290 | — | ~820 | Automated safety check: Pass | None | |
| DB ContextSilvioBaratto/optimizer | 176 | — | ~6.4k | Automated safety check: Notes | Custom licence | |
| SQLsendou-ink/sendou.ink | 297 | — | ~423 | Automated safety check: Pass | AGPL-3.0 | |
| Database MigrationRain-kl/OpenFlare | 288 | — | ~1.3k | Automated safety check: Pass | Apache-2.0 |
unxed/f4
Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context…
kurealnum/dotfiles
A skill your agent uses when generating or regenerating Drizzle migration files, changing database schema tables or columns, resolving migration sequence conflicts after rebase, reviewing migration…
SilvioBaratto/optimizer
Complete knowledge of the optimizer PostgreSQL database: 57 ingestion tables, schema, relationships, live row counts, query patterns, and conventions.
sendou-ink/sendou.ink
Help write, debug, and explore SQLite database queries using Kysely.
Rain-kl/OpenFlare
Wavelet 项目专用:当新增或修改数据库表结构、索引、初始化数据、系统配置 seed、模板 seed、默认管理员、goose SQL 迁移、internal/infra/persistence/migrator、ClickHouse 分析库 DDL 或数据库升级流程时必须使用。本技能指导在 internal/infra/persistence/migrator/goose 下编写…
Cod-e-Codes/marchat
Changes marchat SQL schema and queries across SQLite, PostgreSQL, and MySQL using dialect helpers.
leookun/cursor-byok
Guides changes to the cursor-byok server so provider conversation history stays append-only and each turn's history remains an exact prefix of the next, protecting prefix caches.
leookun/cursor-byok
Sets the rules for building the Cursor BYOK desktop app's React and Tauri frontend, especially its HTTP boundary and component state architecture.
leookun/cursor-byok
Standardizes how a desktop app's UI lets a person choose one or more already-configured AI models, through a single grouped dropdown component.
leookun/cursor-byok
Guides releases of the Cursor BYOK desktop app on GitHub, with strict rules on who may publish and how version tags, updater manifests and signing are handled.
leookun/cursor-byok
Rules for localizing the Cursor BYOK desktop app: the global t() function, complete locale catalogs, system-language selection and the scan-and-check commands.
leookun/cursor-byok
Rules for building dropdowns, popovers, tooltips and menus in the desktop app with @floating-ui/dom, covering portals, positioning, dismissal and ARIA state.
Categories
Guides SQLite schema changes in the Cursor BYOK server, keeping SQLx migrations, the Rust store, API contracts and fixtures aligned. A schema change is treated as an end-to-end persistence change, not a lone SQL edit. Before editing, the agent reads the whole table definition, every query that reads or writes it, its Rust types, API projections and fixtures, searching by table and field names rather than inferring the path from one file.
Cursor BYOK Database Schema fits situations like: adding a table or column to the server database; writing a new SQLx migration; adding indexes, constraints or foreign keys; reviewing a schema change for alignment with store code and fixtures.
Run `npx skills add leookun/cursor-byok --skill database-schema -a claude-code`. Or copy the skill folder (.agents/skills/database-schema in leookun/cursor-byok) into .claude/skills/database-schema in your project. Claude Code loads it when a task matches its description.
Run `npx skills add leookun/cursor-byok --skill database-schema -a codex`. Or copy the skill folder (.agents/skills/database-schema in leookun/cursor-byok) into .agents/skills/database-schema in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add leookun/cursor-byok --skill database-schema -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/database-schema, .gemini/skills/database-schema, .github/skills/database-schema and .opencode/skills/database-schema in your project.
Going by SKILL.md and its folder, Cursor BYOK Database Schema needs the command-line tools its instructions call (cargo and npm). Our summary lists: The cursor-byok repository with its server folder.
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.
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.
Cursor BYOK Database Schema is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.3k tokens (SKILL.md is roughly 5.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Cursor BYOK Database Schema: Golang Database (unxed/f4, 240 stars), DB Migrations (kurealnum/dotfiles, 290 stars), DB Context (SilvioBaratto/optimizer, 176 stars) and SQL (sendou-ink/sendou.ink, 297 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
leookun (a GitHub user) maintains it in leookun/cursor-byok, which has 3,151 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on September 28, 2026.
Source: leookun/cursor-byok on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.