MCP HubMCP Hub
スキル一覧に戻る

migration-patterns

spences10
更新日 3 days ago
54 閲覧
5
5
GitHubで表示
メタdata

について

このスキルは、SQLiteデータベースのマイグレーションパターンを提供し、スキーマ変更の作成とデータベース更新の実行を支援します。マイグレーションファイルの命名規則、冪等性を持つSQLの実践方法、マイグレーションファイルとスキーマ定義の管理について実践的なガイダンスを提供します。新規マイグレーションの作成、既存スキーマの変更、またはSQLiteプロジェクトにおけるデータベース変更の実行時にご利用ください。

クイックインストール

Claude Code

推奨
プラグインコマンド推奨
/plugin add https://github.com/spences10/devhub-crm
Git クローン代替
git clone https://github.com/spences10/devhub-crm.git ~/.claude/skills/migration-patterns

このコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします

ドキュメント

Migration Patterns

Quick Start

-- migrations/001_add_tags.sql
-- Migration: Add Tags Feature
-- Created: 2025-01-15
-- Description: Adds tags table for organizing contacts

CREATE TABLE IF NOT EXISTS tags (
  id TEXT PRIMARY KEY,
  user_id TEXT NOT NULL,
  name TEXT NOT NULL,
  color TEXT NOT NULL,
  created_at INTEGER NOT NULL,
  updated_at INTEGER NOT NULL,
  FOREIGN KEY (user_id) REFERENCES user(id) ON DELETE CASCADE
);

CREATE INDEX IF NOT EXISTS idx_tags_user_id ON tags(user_id);

Core Principles

  • Dual approach: Create migration in migrations/ + update schema.sql
  • Naming: {number}_{description}.sql (e.g., 001_add_tags.sql)
  • Zero-padded numbers: 001, 002, 003 (run alphabetically)
  • IF NOT EXISTS: Always use for idempotency
  • One feature per migration: Keep focused
  • Include indexes: Add in same migration as tables
  • Never modify: Once committed, create new migration instead

Reference Files

<!-- PROGRESSIVE DISCLOSURE GUIDELINES: - Keep this file ~50 lines total (max ~150 lines) - Use 1-2 code blocks only (recommend 1) - Keep description <200 chars for Level 1 efficiency - Move detailed docs to references/ for Level 3 loading - This is Level 2 - quick reference ONLY, not a manual LLM WORKFLOW (when editing this file): 1. Write/edit SKILL.md 2. Format (if formatter available) 3. Run: claude-skills-cli validate <path> 4. If multi-line description warning: run claude-skills-cli doctor <path> 5. Validate again to confirm -->

GitHub リポジトリ

spences10/devhub-crm
パス: .claude/skills/migration-patterns

関連スキル

content-collections

メタ

This skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.

スキルを見る

polymarket

メタ

This skill enables developers to build applications with the Polymarket prediction markets platform, including API integration for trading and market data. It also provides real-time data streaming via WebSocket to monitor live trades and market activity. Use it for implementing trading strategies or creating tools that process live market updates.

スキルを見る

hybrid-cloud-networking

メタ

This skill configures secure hybrid cloud networking between on-premises infrastructure and cloud platforms like AWS, Azure, and GCP. Use it when connecting data centers to the cloud, building hybrid architectures, or implementing secure cross-premises connectivity. It supports key capabilities such as VPNs and dedicated connections like AWS Direct Connect for high-performance, reliable setups.

スキルを見る

llamaindex

メタ

LlamaIndex is a data framework for building RAG-powered LLM applications, specializing in document ingestion, indexing, and querying. It provides key features like vector indices, query engines, and agents, and supports over 300 data connectors. Use it for document Q&A, chatbots, and knowledge retrieval when building data-centric applications.

スキルを見る