schema-design
Database schema design discipline — initialization strata, stratum boundaries, SQL design and comments, privileges, writers, seeds, and schema validation.
Skill by iamthenop
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/iamthenop-schema-design
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, backend, data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/schema-design
What's inside
- Skill name
schema-design- Description
- Database schema design discipline — initialization strata, stratum boundaries, SQL design and comments, privileges, writers, seeds, and schema validation. Use when drafting or reviewing schema changes, initialization SQL, database privileges, seed data, or schema tests.
- License
- MIT
- Compatibility
- Requires PostgreSQL and Bazel build system.
- Metadata
- skill-type: deliverable · infurnet-compat: postgresql,bazel · skill-dependency: code-comments,workorder-drafting,prose-discipline
- Instructions
- 159 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (12)
- SKILL.md
- 0000-init-template.sql · assets/
- 0001-audit-template.sql · assets/
- 0002-notify-template.sql · assets/
- 0020-service-accounts-template.sql · assets/
- 0100-views-and-grants-template.sql · assets/
- 0200-writers-template.sql · assets/
- 0900-seeds-template.sql · assets/
- 0901-dev-seeds-template.sql · assets/
- normalization.md · references/
- strata.md · references/
- validate-strata.py · scripts/
SKILL.md (first lines)
# Schema design The committed SQL under the database directories declared in the repository's bindings defines the current database shape: ```text db/<database>/init/ ``` These files are not a historical migration stream. Schema changes are commissioned through workorders that name allowed files, objects and behaviour being changed, affected strata, required tests, and any destructive or foundational authority (see `workorder-drafting`). Repository access, nearby SQL, passing tests, or an apparent defect do not grant design authority. ## Initialization rules * Initialization files run in filename order. * An earlier file must not depend on an object created by a later file. * Each object belongs to one stratum. Do not duplicate objects or use conditional SQL to hide incorrect placement. * Moving an object requires removing it from its former stratum. * Preserve existing behaviour unless a change is explicitly authorized. * Do not introduce a new stratum without approval. ## Database strata Each database uses the numbered stratum pattern; the strata in force per database are declared in the repository's bindings. See `## Assets` for the template and boundary detail for each stratum. ## Stratum boundaries See [`references/strata.md`](references/strata.md) for per-stratum boundary detail, permitted and prohibited object classes, dependency direction, placement litmus tests, and selection examples for ambiguous cases. ## SQL design Prefer schema that explains itself through clear object and column names, direct relationships, explicit constraints, small functions and triggers, and simple transaction boundaries. Do not compensate for unclear SQL with extensive comments. Use foreign keys, constraints, indexes, and triggers to enforce rules. Do not rely on comments or application behaviour for database integrity. Do not add an index unless it protects a demonstrated access path, constraint, or concurrency requirement. Do not add compatibility objects or transitional schema unless explicitly authorized. ## SQL comments The comment-content rules in `code-comments` apply to SQL in full — descriptive not authoritative, no history or authorization in source, one home per kind of information. SQL-specific additions: * Every `CREATE TABLE` and `CREATE VIEW` has a short descriptive comment immediately above it: a table comment states what one row represents; a view comment states what the view exposes. * Non-obvious functions and triggers briefly describe the invariant or observation, the event on which they act, and any transaction, locking, deferral, or concurrency behaviour needed to understand them. * Do not comment obvious SQL. If SQL requires a long narrative, simplify the SQL. ## Privileges and writers Application roles receive only the privileges required by their documented service boundary. Prefer the pattern: base tables deny direct mutation; a purpose-built writer owns mutation; the runtime role receives `EXECUTE` only. See [`references/strata.md`](references/strata.md) for the full least-privilege model, `SECURITY DEFINER` hardening requirements, grant-scope rules, and privilege verification expectations. ## Seed rules Seed records must be explicitly approved. Do not invent principals or identities, service accounts, grants, policies, vocabulary entries, tasks, or sample records. Generated identifiers are not stable constants unless explicitly designed and approved; baseline and development data remain in their separate strata. ## Validation * Run tests through the build system. * Schema tests verify the actual database catalogue — columns, types, constraints, foreign-key actions, indexes, triggers, function security, privileges, and initialization boundaries. * Do not suppress SQL errors, skip failing strata, weaken existing invariant tests, or claim a constraint was tested when another trigger or privilege caused the failure. ## Multiple databases Every declared database follows the same stratum rules. Do not create empty strata in one database merely to mirror another. Databases remain separate authorities; do not change more than one without explicit authorization for each. ## Refuse and escalate See [`references/strata.md`](references/strata.md) for the full stop condition list. Do not infer the resolution. Report the conflict and await instruction. ## Scripts * [`scripts/validate-strata.py`](scripts/validate-strata.py) — structural validator for initialization strata. Checks filename ordering, canonical stratum numbers, naming consistency, and conservative boundary rules. Does not require a database connection.
From iamthenop/infurnet-skills, MIT.
More from iamthenop/infurnet-skills
- 0.563score
purrification
iamthenop
Apply sparse feline phonetic slips to creative dialogue or monologues, using cross-language IPA similarity and salience-based spacing.
SkillAFreshness: AClaude Code +9 - 0.529score
java-standard
iamthenop
Java implementation rules for source layout, test placement, and documentation.
SkillBFreshness: BClaude Code +9 - 0.529score
api-docs
iamthenop
Author and structure API and interface documentation for HTTP APIs, internal RPC surfaces, and inbound webhooks.
SkillBFreshness: BClaude Code +9 - 0.529score
plan-review
iamthenop
Review an agent's proposed work plan before execution begins.
SkillBFreshness: BClaude Code +9 - 0.529score
project-bindings
iamthenop
Author and maintain the repository bindings file — the single mutable declaration of project-specific values that standards dereference.
SkillBFreshness: BClaude Code +9 - 0.529score
code-comments
iamthenop
Decide whether a source comment belongs, what it may contain, and where displaced information goes instead.
SkillBFreshness: BClaude Code +9 - 0.529score
deploy-standard
iamthenop
Container build, distribution, and release promotion discipline.
SkillBFreshness: BClaude Code +9 - 0.529score
doc-comment-tags
iamthenop
Write structured documentation comments using the custom architectural tag system (@layer, @owner, @boundary, @authority, @privacy, @temporary, and related…
SkillBFreshness: BClaude Code +9 - 0.529score
brand-designer
iamthenop
Author and structure brand identity documentation — brand books, style guides, logo/color/type systems, voice and slogans, and platform-specific…
SkillBFreshness: BClaude Code +9 - 0.526score
builder
iamthenop
Assigned Builder profile.
SkillBFreshness: BClaude Code +9 - 0.526score
designer
iamthenop
Assigned Designer profile.
SkillBFreshness: BClaude Code +9 - 0.526score
prose-discipline
iamthenop
Always-required standard wherever prose is used.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 5
- Last commit (this folder)
- Sep 12, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/iamthenop/infurnet-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from iamthenop
- 0.563score
purrification
iamthenop
Apply sparse feline phonetic slips to creative dialogue or monologues, using cross-language IPA similarity and salience-based spacing.
SkillAFreshness: AClaude Code +9 - 0.529score
code-comments
iamthenop
Decide whether a source comment belongs, what it may contain, and where displaced information goes instead.
SkillBFreshness: BClaude Code +9 - 0.529score
deploy-standard
iamthenop
Container build, distribution, and release promotion discipline.
SkillBFreshness: BClaude Code +9 - 0.529score
brand-designer
iamthenop
Author and structure brand identity documentation — brand books, style guides, logo/color/type systems, voice and slogans, and platform-specific…
SkillBFreshness: BClaude Code +9 - 0.529score
api-docs
iamthenop
Author and structure API and interface documentation for HTTP APIs, internal RPC surfaces, and inbound webhooks.
SkillBFreshness: BClaude Code +9 - 0.529score
doc-comment-tags
iamthenop
Write structured documentation comments using the custom architectural tag system (@layer, @owner, @boundary, @authority, @privacy, @temporary, and related…
SkillBFreshness: BClaude Code +9
Cite this page
schema-design skill. Agent Mart. https://agentmart.dev/skills/iamthenop-schema-design (last updated 2026-10-24)