SQL Optimization Patterns
ynulihao/AgentSkillOS
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries.
Apply when writing or modifying database schema, queries, migrations, transactions, or tenant-scoped persistence.
$ npx skills add stella/stella --skill conventions-db -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install stella/stella conventions-db --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/stella/stella.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/conventions-db .claude/skills/conventions-db && 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 "conventions-db" agent skill from https://github.com/stella/stella/tree/main/.agents/skills/conventions-db into .claude/skills/conventions-db/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "conventions-db", 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/stella/stella/tree/main/.agents/skills/conventions-dbType 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 stella/stella --skill conventions-db -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install stella/stella conventions-db --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/stella/stella.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/conventions-db .agents/skills/conventions-db && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "conventions-db" agent skill from https://github.com/stella/stella/tree/main/.agents/skills/conventions-db into .agents/skills/conventions-db/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "conventions-db", 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 stella/stella --skill conventions-db -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install stella/stella conventions-db --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/stella/stella.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/conventions-db .cursor/skills/conventions-db && 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 "conventions-db" agent skill from https://github.com/stella/stella/tree/main/.agents/skills/conventions-db into .cursor/skills/conventions-db/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "conventions-db", 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/stella/stella.git --path .agents/skills/conventions-db--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 stella/stella --skill conventions-db -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install stella/stella conventions-db --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/stella/stella.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/conventions-db .gemini/skills/conventions-db && 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 "conventions-db" agent skill from https://github.com/stella/stella/tree/main/.agents/skills/conventions-db into .gemini/skills/conventions-db/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "conventions-db", 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 stella/stella conventions-dbInstalls 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 stella/stella --skill conventions-db -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/stella/stella.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/conventions-db .github/skills/conventions-db && 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 "conventions-db" agent skill from https://github.com/stella/stella/tree/main/.agents/skills/conventions-db into .github/skills/conventions-db/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "conventions-db", 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 stella/stella --skill conventions-db -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install stella/stella conventions-db --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/stella/stella.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/conventions-db .opencode/skills/conventions-db && 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 "conventions-db" agent skill from https://github.com/stella/stella/tree/main/.agents/skills/conventions-db into .opencode/skills/conventions-db/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "conventions-db", 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.
conventions-dbApply when writing or modifying database schema, queries, migrations, transactions, or tenant-scoped persistence.
Conventions DB is an agent skill from stella/stella. Apply when writing or modifying database schema, queries, migrations, transactions, or tenant-scoped persistence.
Its SKILL.md is about 1.4k 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 Database schema design. The repository describes itself as: Open-source legal workspace. The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 269655d. 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:
bunFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
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.
Conventions DB loads about 1.4k tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 700 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 stella/stella at commit 269655d, republished under its Apache-2.0 licence (© stella). 700 words, ~1,366 tokens.
.claude/skills/conventions-db/SKILL.md (or your agent's skills folder).Apply when writing or modifying database schema, queries, migrations, transactions, or tenant-scoped persistence.
apps/api/src/db/schema/; read the owning slice and
related foreign keys before editing.as const value list
and pass it to Drizzle with text({ enum: VALUES }). Add a database CHECK
when invalid values could compromise lifecycle, authorization, audit, or
workflow invariants; Drizzle's enum option is compile-time-only..$type<T>() for branded or structured types. Use a native
PostgreSQL enum only when the value set is genuinely permanent.timestamptz helper from
apps/api/src/db/columns.ts. Never introduce a naive PostgreSQL timestamp or
::timestamp cast without explicitly anchoring its time zone.WHERE, ORDER BY, or JOIN; lead
composite indexes with the tenant-scoping columns. Treat changes to large
tables as lock-sensitive.bun --filter @stll/api db:migrate is the shipped migration path used by CI
and deployment. db:push is a local declarative schema-diff tool; it does
not replace committed migrations and must not be described as the deployment
path.scripts/check-migration-safety.ts, placed in the comment block directly
above the statement:
-- stella-migration-safety: reviewed <rule-id> - <why this is safe>.
An acknowledgement that clears nothing is an error. Every migration sets
lock_timeout and statement_timeout first.migration-concurrent-index.test.ts, or put repairable work in
online-migrations.ts. Keep long backfills outside schema migrations and
checkpoint them durably.bun --filter @stll/api db:push -- --explain reports no schema drift. Do not
repair drift by resetting a shared database.scopedDb supplied by safe handlers so
PostgreSQL RLS and query-level scope reinforce each other. Raw/root database
access needs a demonstrated system-level reason and a deny-by-default RLS
posture.limit and cursor and returns the standard
Page<T> envelope from apps/api/src/lib/pagination.ts. Offset pagination,
totalCount, and unbounded findMany require explicit justification.IN query, or bulk mutation can express the same work.SELECT ... FOR UPDATE, or encode the expected state/version in the mutation WHERE
clause and check the affected-row count.Test behavior that schema inference cannot prove: cross-tenant denial, concurrent transitions, replay/idempotence, migration parity, destructive delete ordering, and cursor stability under inserts. Prefer invariant or integration tests over mocked query-shape tests.
© stella, Apache-2.0. 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/conventions-db of stella/stella.
Open the folder on GitHubat commit 269655d
Conventions DB 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 |
|---|---|---|---|---|---|---|
| Conventions DB this skillstella/stella | 258 | — | ~1.4k | Automated safety check: Pass | Apache-2.0 | |
| SQL Optimization Patternsynulihao/AgentSkillOS | 617 | 11 repos | ~3.3k | Automated safety check: Pass | None | |
| Add Mpk Taskmirage-project/mirage | 2.5k | — | ~4.5k | Automated safety check: Pass | Apache-2.0 | |
| Datamodellmnimbalyst/nimbalyst | 1.9k | — | ~713 | Automated safety check: Pass | MIT | |
| B200 Flash Attention4 Plannermirage-project/mirage | 2.5k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| Experiment Auditwanshuiyin/Auto-claude-code-research-in-sleep | 17k | 1 repos | ~2.7k | Automated safety check: Notes | MIT |
ynulihao/AgentSkillOS
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries.
mirage-project/mirage
Step-by-step guide for adding a new task implementation to Mirage Persistent Kernel (MPK).
nimbalyst/nimbalyst
Create visual data models for database schemas using Nimbalyst's DataModelLM editor.
mirage-project/mirage
A skill your agent uses when the user wants to design or extend a FlashAttention-style forward kernel on B200/Blackwell, involving the two MMAs QKᵀ and PV, online softmax, S/P/O in TMEM, warp roles…
wanshuiyin/Auto-claude-code-research-in-sleep
Audit experiment integrity before claiming results. An agent skill from wanshuiyin/Auto-claude-code-research-in-sleep.
fastrepl/anarlog
Design or review schemas for crates/cloudsync using SQLite Sync constraints, not generic SQLite advice.
stella/stella
Create a concise, evidence-backed implementation plan in the repository planning area when the user explicitly asks for a plan.
stella/stella
Answers data-protection (GDPR) questions grounded in the regulation and supervisory guidance, with a citation for every claim.
stella/stella
Reviews a non-disclosure agreement against the firm's NDA checklist and reports findings with citations.
stella/stella
Collects the facts of an unpaid invoice, then drafts a payment demand letter.
stella/stella
Apply when a performance-guard check (network baseline, bundle baseline, DB query count, loader-prefetch lint, RC bailouts) fails or when touching a hot route/endpoint.
stella/stella
Apply when writing or reviewing React effects in apps/web. An agent skill from stella/stella.
Categories
Apply when writing or modifying database schema, queries, migrations, transactions, or tenant-scoped persistence. Conventions DB is an agent skill from stella/stella. Apply when writing or modifying database schema, queries, migrations, transactions, or tenant-scoped persistence.
Conventions DB fits situations like: tasks that involve Database schema design.
Run `npx skills add stella/stella --skill conventions-db -a claude-code`. Or copy the skill folder (.agents/skills/conventions-db in stella/stella) into .claude/skills/conventions-db in your project. Claude Code loads it when a task matches its description.
Run `npx skills add stella/stella --skill conventions-db -a codex`. Or copy the skill folder (.agents/skills/conventions-db in stella/stella) into .agents/skills/conventions-db 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 stella/stella --skill conventions-db -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/conventions-db, .gemini/skills/conventions-db, .github/skills/conventions-db and .opencode/skills/conventions-db in your project.
Going by SKILL.md and its folder, Conventions DB needs the command-line tools its instructions call (bun).
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.
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.
Conventions DB is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.4k tokens (SKILL.md is roughly 5.5k 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 Conventions DB: SQL Optimization Patterns (ynulihao/AgentSkillOS, 617 stars), Add Mpk Task (mirage-project/mirage, 2.5k stars), Datamodellm (nimbalyst/nimbalyst, 1.9k stars) and B200 Flash Attention4 Planner (mirage-project/mirage, 2.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
stella (a GitHub organization) maintains it in stella/stella, which has 258 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on October 8, 2026.
Source: stella/stella on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.