skills/data-design/SKILL.md
Design data layer across PostgreSQL, MongoDB, Elasticsearch, and Typesense. Covers schema design, indexing, migrations, query patterns, consistency, and cross-store sync. Triggers: "data design", "database design", "schema design", "data model", "data architecture".
npx skillsauth add OmexIT/claude-skills-pack data-designInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Design the data layer for your feature across one or more data stores: PostgreSQL, MongoDB, Elasticsearch, Typesense. Include schema, indexing strategy, migration plan, query patterns, and cross-store consistency.
When the feature involves multiple data stores, analyze each independently in parallel:
Phase 1: Requirements analysis — identify applicable stores (sequential)
↓
Phase 2: Parallel store design
┌──────────────┬──────────────┬──────────────┬──────────────┐
│ POSTGRES │ MONGO │ ELASTIC │ TYPESENSE │
│ _DESIGNER │ _DESIGNER │ _DESIGNER │ _DESIGNER │
└──────┬───────┴──────┬───────┴──────┬───────┴──────┬───────┘
└──────────────┼──────────────┘──────────────┘
↓
Phase 3: Cross-store sync strategy + consistency model (sequential)
Model routing:
| Agent | Model | Rationale |
|---|---|---|
| POSTGRES_DESIGNER | opus | Schema design + RLS + migration safety requires deep reasoning |
| MONGO_DESIGNER | sonnet | Document modeling and aggregation pipeline design |
| ELASTIC_DESIGNER | sonnet | Index mapping, analyzers, and query design |
| TYPESENSE_DESIGNER | haiku | Simpler schema, collection design |
id UUID PK DEFAULT uuidv7(), created_at TIMESTAMPTZ, updated_at TIMESTAMPTZ.--rollback. Expand-migrate-contract for breaking changes. Never ALTER TABLE ... DROP COLUMN without migration window.EXPLAIN ANALYZE for every new query. CTEs for readability. Window functions over self-joins. Connection pooling (PgBouncer/HikariCP).ENABLE ROW LEVEL SECURITY + FORCE ROW LEVEL SECURITY for multi-tenant tables. Policy per role. SET LOCAL app.tenant_id in every transaction.validationAction: "error" in production, "warn" in dev.$match and $project early to reduce data flow. $lookup sparingly (it's a join — if you need many, reconsider your model). $merge for materialized views._migrations collection. Always test rollback.invalidate events (collection drop/rename).logs-2026.03) for time-series. Index aliases for zero-downtime reindexing.keyword for exact match/aggregation. text with custom analyzer for search. date for timestamps. Disable _source only if you're sure.rollover for size/age-based index management. forcemerge on read-only indices.bool query with must/should/filter (filter doesn't score, use it). function_score for boosting. Aggregations for analytics dashboards.facet: true on filter/aggregation fields. sort: true on sortable fields. optional: true only where needed.query_by ordered by relevance. filter_by for structured filtering. sort_by for custom ordering. per_page and page for pagination./design-doc, /api-design/spec-to-impl (DBA agent), /migration-plan, /verify-impl (DB checks)/search-design (deep-dive on search), /performance-review (query performance)After design completes, save:
produces:
- type: data-design
format: markdown
path: "claudedocs/<feature>-data-design.md"
sections: [entity_store_map, schemas, indexes, migrations, query_patterns, sync_strategy]
handoff: "Write claudedocs/handoff-data-design-<timestamp>.yaml — suggest: spec-to-impl, migration-plan"
tools
Use this skill to verify a completed implementation through live testing — API calls, database state checks, and UI automation with Playwright. Triggers include: "test the implementation", "verify this works", "run API tests", "check the database", "test the UI", "end-to-end verify", "smoke test", "sanity check the implementation", "manually test", or any time an implementation needs post-build validation beyond unit tests. Also triggered automatically by spec-to-impl during the integration review phase. Use this when you want real evidence the system works — not just that tests compile. Can consume a pre-generated e2e/test-plan.yaml from spec-to-impl for fully automated test execution.
development
--- name: ux-review description: Evaluate a UI/UX design or implementation using heuristic analysis, accessibility audit, and cognitive walkthrough. Triggers: "UX review", "usability review", "heuristic evaluation", "accessibility audit", "is this usable". argument-hint: "[feature / screen / URL / mockup]" effort: high --- # UX review ## What I'll do Evaluate a design or implementation for usability, accessibility, and user experience quality using established heuristic frameworks. ## Inputs
development
--- name: user-flow description: Map user journeys through a feature or product, identifying key paths, decision points, friction, error states, and edge cases. Triggers: "user flow", "user journey", "flow diagram", "happy path", "user path". argument-hint: "[feature / user goal]" effort: medium --- # User flow ## What I'll do Map the complete user journey for a feature — from entry point through completion — including happy paths, error states, edge cases, and decision points. > **user-flow
development
Use this skill to produce complete UI/UX design artifacts from a specification document or panel analysis. Triggers include: "design the UI for this spec", "create wireframes", "design this panel", "UX design from spec", "generate component specs", "design tokens", "create the UI design for", "design system for", "wireframe this feature", "design a UI", "create a design system", "design this component", "design the layout", "create a style guide", "design a screen", "UI/UX review", "typography system", "color system", "spacing system", "design this feature", "design the dashboard", "design the onboarding", "create a component library", "design review", "audit the design", "improve the UI", "redesign this", "design system documentation", "create design guidelines", "responsive design", "mobile design", "dark mode design", "design the brand", or any time a spec/panel analysis document needs to be transformed into actionable UI/UX deliverables before implementation. Also triggers for standalone design system creation, component design, design reviews, dark mode/responsive variants, and developer handoff — even before code is involved. Orchestrates a multi-agent design team (UX Lead, UI Designer, Component Architect, Accessibility Reviewer, Design System Engineer, Design Reviewer) in parallel waves. Outputs feed directly into spec-to-impl's FE agent and figma-to-code.