database-table-creator — Claude Code skill for database tables
This skill guides an end-to-end table addition, from a SQL migration to Kotlin repository tests. Use it when a project needs a new table or entity.
npx skills add c0x12c/ai-toolkit --skill database-table-creator -a claude-codeWhat database-table-creator does
The workflow covers a SQL migration, an Exposed table object, a Kotlin entity, a repository interface and implementation, factory bean registration, and tests. It has you run the migration with ./gradlew :app:module-repository:flywayMigrate, then test with ./gradlew test.
Schema rules call for TEXT rather than VARCHAR, forbid foreign key constraints, and require queries to exclude soft-deleted records. Tables need timestamp fields, partial indexes, and an updated_at trigger; Kotlin table objects extend UUIDTable, while entities implement Entity<Instant>. Repository writes go through db.primary and reads through db.replica.
Deletion is soft-only: records are marked through deletedAt, so a hard-delete implementation would conflict with the skill's rules. Kotlin templates and examples are referenced in kotlin-templates.md and examples.md.
What it helps with
- create a SQL migration for a new table
- map an Exposed table to a Kotlin entity
- add a repository that supports soft deletion
- register a factory bean
- test repository behavior
Example prompts for the agent
- Add an
orderstable and build its migration, Kotlin code, and tests. - Create a
Customerentity with a repository that follows the project's soft-delete rules. - Set up the Exposed table, factory bean, and repository tests for a new table.
How to install database-table-creator
1Skills CLI (Vercel)
npx skills add c0x12c/ai-toolkit --skill database-table-creator -a claude-code2Manually: put the files in place
~/.claude/skills/database-table-creator/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/database-table-creator/
1Skills CLI (Vercel)
npx skills add c0x12c/ai-toolkit --skill database-table-creator -a codex2Manually: put the files in place
.agents/skills/database-table-creator/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add c0x12c/ai-toolkit --skill database-table-creator -a cursor2Manually: put the files in place
.cursor/skills/database-table-creator/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install c0x12c/ai-toolkit database-table-creator2Manually: put the files in place
.github/skills/database-table-creator/SKILL.md1Skills CLI (Vercel)
npx skills add c0x12c/ai-toolkit --skill database-table-creator -a gemini-cli2Platform CLI
gemini skills install https://github.com/c0x12c/ai-toolkit --path toolkit/skills/database-table-creatorManually: put the files in place
.devin/skills/database-table-creator/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add c0x12c/ai-toolkit --skill database-table-creator -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about database-table-creator
How do I install database-table-creator in Claude Code?
Run npx skills add c0x12c/ai-toolkit --skill database-table-creator -a claude-code. The skill file is located at ~/.claude/skills/database-table-creator/SKILL.md.
What does database-table-creator do?
It guides creation of a SQL migration and matching Kotlin code: an Exposed table, entity, repository, dependency registration, and tests.
How does the skill handle deleted records?
It requires soft deletion: mark records through deletedAt and filter them out of queries. Hard deletion conflicts with its rules.