Delegate independent tasks to specialized agents working concurrently with isolated context.
.claude/skills/database-migrations/SKILL.md
スコット・アンブラーの『Refactoring Databases』に基づく、安全で可逆的なデータベースマイグレーション管理スキル。 Drizzle Kitを使用したスキーマ変更の計画、マイグレーション生成、本番適用、 ロールバック戦略、および移行期間(Transition Period)を含む包括的なワークフローを提供します。 📖 参照書籍: - 『Designing Data-Intensive Applications』(Martin Kleppmann): データモデリング 📚 リソース参照: - `resources/Level1_basics.md`: レベル1の基礎...
SKILL.md
Full skill instructions
Database Migrations
概要
スコット・アンブラーの『Refactoring Databases』に基づく、安全で可逆的なデータベースマイグレーション管理スキル。 Drizzle Kitを使用したスキーマ変更の計画、マイグレーション生成、本番適用、 ロールバック戦略、および移行期間(Transition Period)を含む包括的なワークフローを提供します。
詳細な手順や背景は resources/Level1_basics.md と resources/Level2_intermediate.md を参照してください。
ワークフロー
Phase 1: 目的と前提の整理
目的: タスクの目的と前提条件を明確にする
アクション:
resources/Level1_basics.mdとresources/Level2_intermediate.mdを確認- 必要な resources/scripts/templates を特定
Phase 2: スキル適用
目的: スキルの指針に従って具体的な作業を進める
アクション:
- 関連リソースやテンプレートを参照しながら作業を実施
- 重要な判断点をメモとして残す
Phase 3: 検証と記録
目的: 成果物の検証と実行記録の保存
アクション:
scripts/validate-skill.mjsでスキル構造を確認- 成果物が目的に合致するか確認
scripts/log_usage.mjsを実行して記録を残す
ベストプラクティス
すべきこと
- スキーマを変更する時
- マイグレーションを生成・適用する時
- 破壊的変更に移行期間を設ける時
- 本番環境にデプロイする時
- 問題発生時にロールバックする時
避けるべきこと
- アンチパターンや注意点を確認せずに進めることを避ける
コマンドリファレンス
リソース読み取り
cat .claude/skills/database-migrations/resources/Level1_basics.md
cat .claude/skills/database-migrations/resources/Level2_intermediate.md
cat .claude/skills/database-migrations/resources/Level3_advanced.md
cat .claude/skills/database-migrations/resources/Level4_expert.md
cat .claude/skills/database-migrations/resources/drizzle-kit-commands.md
cat .claude/skills/database-migrations/resources/legacy-skill.md
cat .claude/skills/database-migrations/resources/migration-strategies.md
cat .claude/skills/database-migrations/resources/rollback-procedures.md
cat .claude/skills/database-migrations/resources/schema-change-patterns.md
cat .claude/skills/database-migrations/resources/transition-period-patterns.md
cat .claude/skills/database-migrations/resources/zero-downtime-patterns.md
スクリプト実行
node .claude/skills/database-migrations/scripts/check-migration-safety.mjs --help
node .claude/skills/database-migrations/scripts/generate-rollback.mjs --help
node .claude/skills/database-migrations/scripts/log_usage.mjs --help
node .claude/skills/database-migrations/scripts/validate-skill.mjs --help
テンプレート参照
cat .claude/skills/database-migrations/templates/migration-checklist.md
cat .claude/skills/database-migrations/templates/migration-plan-template.md
変更履歴
| Version | Date | Changes |
|---|---|---|
| 1.1.0 | 2025-12-24 | Spec alignment and required artifacts added |
More Other skills
brand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
internal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).
Fundamental design principles for writing maintainable, testable Python code.
responsive-design
Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.
Generate Playwright tests from scenarios using interactive browser exploration and validation.
Automated website exploration and test case generation using Playwright.
Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.
gdpr-data-handling
GDPR-compliant data handling with consent management, data subject rights, and privacy controls.
Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.
refactor-plan
Detailed multi-file refactor planning with safety checks and rollback guidance.
