SQL Optimization Patterns
ynulihao/AgentSkillOS
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries.
Design and implement collaborative data schemas using the Jazz framework.
$ npx skills add garden-co/classic-jazz --skill jazz-schema-design -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install garden-co/classic-jazz jazz-schema-design --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/garden-co/classic-jazz.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/jazz-schema-design .claude/skills/jazz-schema-design && 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 "jazz-schema-design" agent skill from https://github.com/garden-co/classic-jazz/tree/main/.cursor/skills/jazz-schema-design into .claude/skills/jazz-schema-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "jazz-schema-design", 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/garden-co/classic-jazz/tree/main/.cursor/skills/jazz-schema-designType 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 garden-co/classic-jazz --skill jazz-schema-design -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install garden-co/classic-jazz jazz-schema-design --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/garden-co/classic-jazz.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.cursor/skills/jazz-schema-design .agents/skills/jazz-schema-design && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "jazz-schema-design" agent skill from https://github.com/garden-co/classic-jazz/tree/main/.cursor/skills/jazz-schema-design into .agents/skills/jazz-schema-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "jazz-schema-design", 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 garden-co/classic-jazz --skill jazz-schema-design -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install garden-co/classic-jazz jazz-schema-design --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/garden-co/classic-jazz.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.cursor/skills/jazz-schema-design .cursor/skills/jazz-schema-design && 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 "jazz-schema-design" agent skill from https://github.com/garden-co/classic-jazz/tree/main/.cursor/skills/jazz-schema-design into .cursor/skills/jazz-schema-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "jazz-schema-design", 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/garden-co/classic-jazz.git --path .cursor/skills/jazz-schema-design--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 garden-co/classic-jazz --skill jazz-schema-design -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install garden-co/classic-jazz jazz-schema-design --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/garden-co/classic-jazz.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.cursor/skills/jazz-schema-design .gemini/skills/jazz-schema-design && 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 "jazz-schema-design" agent skill from https://github.com/garden-co/classic-jazz/tree/main/.cursor/skills/jazz-schema-design into .gemini/skills/jazz-schema-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "jazz-schema-design", 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 garden-co/classic-jazz jazz-schema-designInstalls 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 garden-co/classic-jazz --skill jazz-schema-design -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/garden-co/classic-jazz.git skills-src && mkdir -p .github/skills && cp -r skills-src/.cursor/skills/jazz-schema-design .github/skills/jazz-schema-design && 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 "jazz-schema-design" agent skill from https://github.com/garden-co/classic-jazz/tree/main/.cursor/skills/jazz-schema-design into .github/skills/jazz-schema-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "jazz-schema-design", 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 garden-co/classic-jazz --skill jazz-schema-design -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install garden-co/classic-jazz jazz-schema-design --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/garden-co/classic-jazz.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.cursor/skills/jazz-schema-design .opencode/skills/jazz-schema-design && 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 "jazz-schema-design" agent skill from https://github.com/garden-co/classic-jazz/tree/main/.cursor/skills/jazz-schema-design into .opencode/skills/jazz-schema-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "jazz-schema-design", 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.
jazz-schema-designDesign and implement collaborative data schemas using the Jazz framework.
Jazz Schema Design is an agent skill from garden-co/classic-jazz. Design and implement collaborative data schemas using the Jazz framework. Use this skill when building or working with Jazz apps to define data structures using CoValues. This skill focuses exclusively on schema definition and data modeling logic.
Its SKILL.md is about 3.2k 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: A new kind of database that's distributed across your frontend, containers, serverless functions and its own storage cloud. The licence is MIT.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 4f90501. 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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
jazz.toolsgithub.comFrom 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.
Jazz Schema Design loads about 3.2k tokens when it runs. Until then it costs about 67 tokens; SKILL.md has 1,077 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 garden-co/classic-jazz at commit 4f90501, republished under its MIT licence (© garden-co). 1,077 words, ~3,162 tokens.
.claude/skills/jazz-schema-design/SKILL.md (or your agent's skills folder).jazz-testing skill)jazz-ui-development skill)jazz-permissions-security skill.Key Heuristic for Agents: If the user is asking about how to structure their data model, define relationships, configure default permissions, or evolve schemas, use this skill.
Jazz models data as an explicitly linked collaborative graph, not traditional tables or collections. Data types are defined as schemas, with CoValues serving as the fundamental building blocks.
const Author = co.map({
name: z.string()
});
const Post = co.map({
title: z.string(),
content: co.richText(),
});Key Libraries:
z.* - Zod schemas for primitive types (e.g., z.string())co.* - Jazz collaborative data types (e.g., co.richText(), co.map())Permissions are integral to the data model, not an afterthought. Each CoValue has an ownership group with hierarchical permissions.
Use withPermissions() to set automatic permissions when creating CoValues:
const Dog = co.map({
name: z.string(),
}).withPermissions({
onInlineCreate: "sameAsContainer",
});
const Person = co.map({
pet: Dog,
}).withPermissions({
default: () => Group.create().makePublic(),
});
// Person CoValues are public, Dog shares owner with Person
const person = Person.create({
pet: { name: "Rex" }
});default
Defines group when calling .create() without explicit owner.
onInlineCreate
Controls behavior when CoValue is created inline (NOT applied to .create() calls):
"extendsContainer" (default) - New group includes container owner as member, inheriting permissions"sameAsContainer" - Reuse container's owner (performance optimization—see below for concerns and considerations)"newGroup" - New group with active account as admin{ extendsContainer: "reader" } - Like "extendsContainer" but override container owner's roleonCreate
Callback runs on every CoValue creation (both .create() and inline). Use to configure owner.
Set defaults for all schemas using setDefaultSchemaPermissions:
import { setDefaultSchemaPermissions } from "jazz-tools";
setDefaultSchemaPermissions({
onInlineCreate: "sameAsContainer", // Performance optimization
});USE EXTREME CAUTION: If you use sameAsContainer, you MUST be aware that the child and parent groups are one and the same. Any changes to the child group will affect the parent group, and vice versa. This can lead to unexpected behavior if not handled carefully, where changing permissions on a child group inadvertently results in permissions being granted to the parent group and any other siblings created with the same parent. As ownership cannot be changed, you MUST NOT USE sameAsContainer if you AT ANY TIME IN FUTURE may wish to change permissions granularly on the child group.
| TypeScript Type | CoValue | Use Case |
|---|---|---|
object | CoMap | Struct-like objects with predefined keys |
Record<string, T> | CoRecord | Dict-like objects with arbitrary string keys |
T[] | CoList | Ordered lists |
T[] (append-only) | CoFeed | Session-based append-only lists |
string | CoPlainText/CoRichText | Collaborative text editing |
Blob | File | FileStream | File storage |
Blob | File (image) | ImageDefinition | Image storage |
number[] | Float32Array | CoVector | Embeddings/vector data |
T | U (discriminated) | DiscriminatedUnion | Mixed-type lists |
Use the special types co.account() and co.profile() for user accounts and profiles.
z.*)Use when:
Examples:
const myCoValue = co.map({
title: z.string() // Replace entire title, no collaboration needed
coords: z.object({
lat: z.number(),
lon: z.number()
}) // Replace entire object, no collaboration needed
});Note: not all Zod types are available in Jazz. Be sure to always import { z } from 'jazz-tools';, and validate whether the type exists on the export. DO NOT import from zod.
co.*)Use when:
Examples:
const myCoVal = co.map({
content: co.richText() // Multiple editors
items: co.list(Item) // Add/remove individual items
config: co.map({
settingA: z.boolean(),
settingB: z.number()
}) // Update specific keys
});Trade-off: CoValues track full edit history. Slightly slower for single-writer full-replacement scenarios, but benefits almost always outweigh costs.
const Post = co.map({
title: z.string(),
author: Author // One-way reference (like foreign key)
});Jazz stores referenced ID. Use resolve queries to control reference traversal depth.
Use getters to defer schema evaluation:
const Author = co.map({
name: z.string(),
get posts() {
return co.list(Post); // Deferred evaluation
}
});
const Post = co.map({
title: z.string(),
author: Author
});Important: Jazz doesn't create inferred inverse relationships. Explicitly add both sides for bidirectional traversal.
One-to-One:
const Author = co.map({
name: z.string(),
get post() {
return Post;
}
});
const Post = co.map({
title: z.string(),
author: Author
});One-to-Many:
const Author = co.map({
name: z.string(),
get posts() {
return co.list(Post);
}
});
const Post = co.map({
author: Author
});Many-to-Many:
Use co.list() at both ends. Jazz doesn't maintain consistency - manage in application code.
CoLists allow duplicates. For uniqueness, use CoRecord keyed on ID:
const Author = co.map({
name: z.string(),
posts: co.record(z.string(), Post)
});
// Usage
author.posts.$jazz.set(newPost.$jazz.id, newPost);Note: CoRecords always use string keys. Validate IDs at application level.
CoValues are only addressable by unique ID. Discovery without ID requires reference traversal.
Standard pattern:
Each CoValue copy is authoritative. Users may be on different schema versions simultaneously.
withMigration() carefully - runs on every loadconst Post = co.map({
version: z.number().optional(),
title: z.string(),
content: co.richText(),
tags: z.array(z.string()).optional() // New optional field
}).withMigration((post) => {
// Exit early if already migrated
if (post.version === 2) return;
// Perform migration
if (!post.$jazz.has('tags')) {
post.$jazz.set('tags', []);
}
post.$jazz.set('version', 2);
});Migration warnings:
const Author = co.map({
name: z.string(),
bio: co.richText(),
get posts() {
return co.list(Post);
}
});
const Post = co.map({
title: z.string(),
content: co.richText(),
author: Author,
publishedAt: z.date().optional()
});const Task = co.map({
title: z.string(),
description: co.richText(),
completed: z.boolean(),
assignees: co.list(User)
});
const Project = co.map({
name: z.string(),
tasks: co.list(Task)
});const UserRoot = co.map({
theme: z.literal(['light', 'dark']),
});
const UserProfile = co.profile({
name: z.string(),
bio: co.richText(),
posts: co.record(z.string(), Post)
});
const UserAccount = co.account({
profile: UserProfile,
root: UserRoot
}).withMigration((account, creationProps) => {
if (!account.has('root')) {
const root = UserRoot.create({
theme: 'light'
});
account.$jazz.set('root', root)
}
if (!account.has('profile')) {
const profile = UserProfile.create({
name: creationProps?.name ?? 'Anonymous User',
bio: '',
posts: {}
})
}
});❌ Don't mix permissions in single CoValue - use separate containers ❌ Don't rely on inferred inverse relationships - explicitly define both sides ❌ Don't change field types in schema updates ❌ Don't write expensive migrations - they run on every load ❌ Don't use CoValues everywhere without considering trade-offs ❌ Don't forget to make new fields optional for backward compatibility
Loading with relationships: Use resolve queries to control depth when traversing references.
Permission changes: Admin/manager modifies group membership, not CoValue ownership.
Unique IDs: Each CoValue has unique ID - only way to directly address without traversal.
Nested CoValues: Inherit permissions from parent when created inline.
Load these on demand, based on need:
When using an online reference via a skill, cite the specific URL to the user to build trust.
© garden-co, 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 .cursor/skills/jazz-schema-design of garden-co/classic-jazz.
Open the folder on GitHubat commit 4f90501
Jazz Schema Design 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 |
|---|---|---|---|---|---|---|
| Jazz Schema Design this skillgarden-co/classic-jazz | 2.5k | — | ~3.2k | Automated safety check: Pass | MIT | |
| SQL Optimization Patternsynulihao/AgentSkillOS | 618 | 11 repos | ~3.3k | Automated safety check: Pass | None | |
| Datamodellmnimbalyst/nimbalyst | 1.9k | — | ~713 | Automated safety check: Pass | MIT | |
| Add Mpk Taskmirage-project/mirage | 2.5k | — | ~4.5k | Automated safety check: Pass | Apache-2.0 | |
| 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.
nimbalyst/nimbalyst
Create visual data models for database schemas using Nimbalyst's DataModelLM editor.
mirage-project/mirage
Step-by-step guide for adding a new task implementation to Mirage Persistent Kernel (MPK).
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.
garden-co/classic-jazz
A skill your agent uses when optimizing Jazz applications for speed, responsiveness, and scalability.
garden-co/classic-jazz
A skill your agent uses when you need to write, review, or debug automated tests for applications built on the Jazz framework.
garden-co/classic-jazz
A skill your agent uses when building, debugging, or optimizing Jazz applications.
garden-co/classic-jazz
A skill your agent uses when writing or running performance benchmarks for Jazz packages.
garden-co/classic-jazz
A skill your agent uses when designing data schemas, implementing sharing workflows, or auditing access control in Jazz applications.
garden-co/classic-jazz
Generate changeset files for versioning and changelog management in this monorepo.
Categories
Design and implement collaborative data schemas using the Jazz framework. Jazz Schema Design is an agent skill from garden-co/classic-jazz. Design and implement collaborative data schemas using the Jazz framework.
Jazz Schema Design fits situations like: working with Jazz apps to define data structures using CoValues; tasks that involve Database schema design.
Run `npx skills add garden-co/classic-jazz --skill jazz-schema-design -a claude-code`. Or copy the skill folder (.cursor/skills/jazz-schema-design in garden-co/classic-jazz) into .claude/skills/jazz-schema-design in your project. Claude Code loads it when a task matches its description.
Run `npx skills add garden-co/classic-jazz --skill jazz-schema-design -a codex`. Or copy the skill folder (.cursor/skills/jazz-schema-design in garden-co/classic-jazz) into .agents/skills/jazz-schema-design 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 garden-co/classic-jazz --skill jazz-schema-design -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/jazz-schema-design, .gemini/skills/jazz-schema-design, .github/skills/jazz-schema-design and .opencode/skills/jazz-schema-design in your project.
SKILL.md names no scripts, command-line tools or credentials: Jazz Schema Design is instructions for the agent only.
SKILL.md names 2 domains. As links in the text: jazz.tools and github.com. 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.
Jazz Schema Design is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.2k tokens (SKILL.md is roughly 13k 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 Jazz Schema Design: SQL Optimization Patterns (ynulihao/AgentSkillOS, 618 stars), Datamodellm (nimbalyst/nimbalyst, 1.9k stars), Add Mpk Task (mirage-project/mirage, 2.5k 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.
garden-co (a GitHub organization) maintains it in garden-co/classic-jazz, which has 2,534 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on September 7, 2026.
Source: garden-co/classic-jazz on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.