sir-chawakorn/power-ranger-toolkit/database-management

Claude Code and agent skill by sir-chawakorn/power-ranger-toolkit

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Database schema design, migrations, query optimization, and ORM best practices. Use for database setup, performance tuning, and data modeling.

Install

npx vskill@latest install sir-chawakorn/power-ranger-toolkit/database-management

SKILL.md

The same SKILL.md was published earlier as sir-chawakorn/power-ranger-toolkit/database-management.

🗄️ Database Management Skill

Schema Design Patterns

Normalization Levels
LevelDescriptionWhen to Use
1NFNo repeating groupsAlways
2NFNo partial dependenciesTransactional data
3NFNo transitive dependenciesMost applications
DenormalizedRedundant dataRead-heavy workloads
Common Patterns
sql
-- One-to-Many
CREATE TABLE users (id SERIAL PRIMARY KEY, name VARCHAR(100));
CREATE TABLE posts (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(id),
content TEXT
);
-- Many-to-Many (Junction Table)
CREATE TABLE tags (id SERIAL PRIMARY KEY, name VARCHAR(50));
CREATE TABLE post_tags (
post_id INTEGER REFERENCES posts(id),
tag_id INTEGER REFERENCES tags(id),
PRIMARY KEY (post_id, tag_id)
);

Migration Strategies

Prisma
bash
# Create migration
npx prisma migrate dev --name add_users_table
# Apply to production
npx prisma migrate deploy
# Reset database
npx prisma migrate reset
Drizzle
bash
# Generate migration
npx drizzle-kit generate:pg
# Push to database
npx drizzle-kit push:pg
Safe Migration Checklist
  • [ ] Backup database first
  • [ ] Test on staging environment
  • [ ] Plan rollback strategy
  • [ ] Run during low-traffic hours
  • [ ] Monitor after deployment

Query Optimization

Index Strategies
sql
-- Single column index
CREATE INDEX idx_users_email ON users(email);
-- Composite index (order matters!)
CREATE INDEX idx_posts_user_date ON posts(user_id, created_at);
-- Partial index
CREATE INDEX idx_active_users ON users(email) WHERE active = true;
Common N+1 Problem
javascript
// Bad ❌ - N+1 queries
const users = await User.findAll();
for (const user of users) {
user.posts = await Post.findAll({ where: { userId: user.id } });
}
// Good ✅ - Eager loading
const users = await User.findAll({
include: [{ model: Post }]
});

ORM Best Practices

PracticeDescription
Use TransactionsWrap related operations
Connection PoolingReuse connections
Soft DeletesUse deleted_at instead of DELETE
Audit FieldsAlways add created_at, updated_at
Use MigrationsNever modify schema manually

Backup & Recovery

bash
# PostgreSQL backup
pg_dump -U user -d database > backup.sql
# PostgreSQL restore
psql -U user -d database < backup.sql
# MySQL backup
mysqldump -u user -p database > backup.sql

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
33
Repository forks
7
7-day trend score
18

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 1 Apr 2026, 8 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/sir-chawakorn/power-ranger-toolkit/database-management/badge)](https://verified-skill.com/skills/sir-chawakorn/power-ranger-toolkit/database-management)

Something wrong with this skill or its page? Tell us.