claude

database-as-code-kit

Teaching kit: Database Engineering & Administration as-code cho kỷ nguyên agent. Cài vào Claude Code để học + dùng.

0 on GitHubby Daniel (Lê Duy Khương)v0.1.0MITupdated 3 months ago

Not in a marketplace yet, so it loads for one session with --plugin-dir.

Plugin database-as-code-kit in leduykhuong-daniel/OSS-database-as-code-kit. Commands read from the repo's manifest — 1 month ago.

What it installs

Skills (5)

  • agentic-dba-intro

    Mô hình agent-as-DBA — agent quan sát → chẩn đoán → đề xuất → (chờ duyệt) hành động, với guardrail chỉ-đọc-mặc-định và autonomy tier theo rủi ro. Dùng khi muốn agent hỗ trợ vận hành DB (đề xuất index, cảnh báo lag, kiểm backup) mà vẫn giữ an toàn.

  • database-as-code-intro

    Giới thiệu triết lý database-as-code — schema declarative, migration version-controlled, CI kiểm tra. Dùng khi học viên mới bắt đầu, hỏi "vì sao quản database như mã", so sánh sửa tay vs as-code, hoặc cần bức tranh vòng đời database trước khi đi sâu các module sau.

  • db-for-agents-intro

    Thiết kế database phục vụ LLM/agent — vector + pgvector, embedding, vector index (HNSW/IVFFlat), che PII trước khi nhúng, schema-as-context cho Text-to-SQL. Dùng khi dựng DB cho RAG/similarity search hoặc để agent truy vấn an toàn.

  • ddd-to-schema

    Ánh xạ DDD (entity, value object, aggregate, bounded context) sang physical schema PostgreSQL qua ba tầng Domain → Logical → Physical. Dùng khi cần chuyển domain model thành ERD/DDL, quyết surrogate vs natural key, hoặc đặt ranh giới cascade theo aggregate.

  • migration-as-code

    Quản schema evolution bằng migration version-controlled (Alembic cho SQLAlchemy) — mỗi thay đổi có chiều thuận + nghịch, review + test như code. Dùng khi cần tạo/review migration an toàn, đánh giá rủi ro một thay đổi schema, hoặc thiết kế đường rollback.

Slash commands (11)

  • /database-as-code-kit:audit

    Chấm sức khoẻ kit — chạy validate-kit.sh + rà tiêu chí chất lượng (self-contained, không cần tool ngoài).

  • /database-as-code-kit:index-advise

    Agent-as-DBA đọc schema + query pattern → đề xuất index. ADVISORY — chưa đo bằng planner thật.

  • /database-as-code-kit:init

    Khởi tạo dự án database-as-code mới — skeleton domain/schema/migration theo cấu trúc golden-thread.

  • /database-as-code-kit:learn

    Lộ trình học kit — phát hiện tiến độ + gợi ý lesson kế tiếp trong 11 module / 55 lesson.

  • /database-as-code-kit:migrate

    Tạo/áp Alembic migration — version-controlled, có chiều thuận + nghịch, soi rủi ro trước khi áp.

  • /database-as-code-kit:model

    Từ domain (DDD) dựng ERD (DBML/Mermaid) — ánh xạ aggregate → cụm bảng có ranh giới.

  • /database-as-code-kit:normalize-check

    Soi "mùi" vi phạm 1NF trong schema SQL (cột danh sách, nhóm lặp) + giải thích cách tách.

  • /database-as-code-kit:pii-scan

    Quét cột nghi PII trong schema SQL theo tên cột + nhắc 3 nghĩa vụ bảo vệ.

  • /database-as-code-kit:schema

    Sinh physical schema DDL (PostgreSQL) từ ERD / logical model.

  • /database-as-code-kit:twin-bridge

    Bridge schema → semantic layer / knowledge graph / ontology cho agent (Module 11).

  • /database-as-code-kit:validate

    Chạy validate-kit.sh — kiểm frontmatter lesson + golden-thread + plugin manifest + dual-license.

Subagents (5)

  • db-onboarding-coach

    Use this agent when a learner needs guidance starting or navigating the database-as-code-kit curriculum. Typical triggers include a new learner asking "where do I start if I know nothing about databases", an experienced engineer wanting to skip to advanced modules and needing a recommended path, and

  • index-advisor

    Use this agent when you need to analyze query patterns or slow logs and recommend database indexes for a schema. Typical triggers include a developer asking "which indexes should I add for this query", a performance report showing a slow FR-028 branch portfolio query, and a request to review an exis

  • migration-breaking-detector

    Use this agent when a user wants to analyze a migration file (SQL DDL or Alembic script) for breaking changes before it is applied. Typical triggers include a developer asking "is this migration safe to deploy?", a code reviewer flagging a DROP COLUMN or RENAME operation and needing a risk verdict,

  • pii-governance-auditor

    Use this agent when you need to audit a database schema or migration for PII compliance and data governance. Typical triggers include reviewing a schema that contains customer identity columns (national_id, full_name, phone, email, address), validating encryption controls before a production release

  • schema-design-reviewer

    Use this agent when a developer submits DDL, a migration file, or an ERD for review — including pull requests that add or modify table definitions. Typical triggers include a teammate opening a PR with new CREATE TABLE statements, someone pasting DDL and asking "is this schema design correct?", or a

View source on GitHub

Maintain database-as-code-kit?

This page updates itself from your repo. Add the badge to your README, or get it Featured to pin it above the organic results with a followed link to your site.

claude & codex pluginslisted