agentleFS
Modular-Earth-LLCModular-Earth-LLC/solutions-architecture-agent/skills/data-model/SKILL.md

data-model

Skill2 starsChanged 9 months agoMITView on GitHub

Design data models including entity-relationship schemas, vector database schemas, knowledge graphs, ontologies, and data governance policies. Use after architecture defines the data layer.

5 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use api-contract and design-system.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • damienlaineSkill

    api-contract

    This skill should be used when the user asks about "API contract", "api-contract.md", "shared interface", "TypeScript interfaces", "request response schemas", "endpoint design", or needs guidance on designing contracts that coordinate backend and frontend agents.

    Also in 3 projects that use this

  • AnthropicSkill

    design-system

    Audit, document, or extend your design system. Use when checking for naming inconsistencies or hardcoded values across components, writing documentation for a component's variants, states, and accessibility notes, or designing a new pattern that fits the existing system.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. 0 are common, 12 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use ultrathink for this skill.

    line 8
  2. Distinctive:

    Every schema must deliver tangible value — design for the actual problem, not hypothetical future requirements.

    line 19
  3. Very specific:

    If missing → suggest running /requirements first, OR accept requirements context directly via $ARGUMENTS

    line 39
  4. Very specific:

    If draft/in_progress → WARN: "Requirements incomplete.

    line 40
  5. Very specific:

    If missing → suggest running /architecture first, OR accept architecture context directly via $ARGUMENTS

    line 42
  6. Very specific:

    If draft/in_progress → WARN: "Architecture incomplete.

    line 43
  7. Very specific:

    If $ARGUMENTS are provided, treat them as data source details or focus areas.

    line 58
  8. Distinctive:

    Document: entity name, fields with types, primary/foreign keys, indexes, constraints, estimated row counts.

    line 82
  9. Distinctive:

    When the architecture includes vector/embedding storage:

    line 86
  10. Distinctive:

    When the architecture includes knowledge graphs:

    line 100
  11. Distinctive:

    When the solution includes document/knowledge ingestion:

    line 108
  12. Distinctive:

    Use WebSearch for latest neurosymbolic AI patterns and hybrid retrieval approaches.

    line 115
  13. Distinctive:

    STANDARD: No line limit. Full KB file.

    line 141
  14. Distinctive:

    COMPREHENSIVE: No line limit. Full KB file with extended analysis.

    line 142
  15. Very specific:

    Every KB file includes standard envelope fields: engagement_id (links to engagement.json), version (MAJOR.MINOR), status …

    line 144
  16. Very specific:

    Update version and last_updated

    line 160
  17. Distinctive:

    Use WebSearch to verify:

    line 164
  18. Distinctive:

    If WebSearch is unavailable, proceed with general best practices and flag technology-specific claims for human verification.

    line 171
  19. Distinctive:

    MANDATORY STOP: Do NOT auto-invoke the next skill.

    line 189

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Use ultrathink for this skill. Engage extended reasoning before responding.

1. ROLE & CONTEXT

You are a Solutions Architect specializing in data modeling and data architecture. Frame outputs as collaborative partnership artifacts.

Adapt to stakeholder context:

  • Enterprise SA (Priya): Full governance, compliance-aware schemas, audit trails
  • Independent Consultant (Marcus): Pragmatic models, MVP-appropriate complexity
  • Technical Founder (Aisha): Educational, explain schema design decisions, scalability implications

Every schema must deliver tangible value — design for the actual problem, not hypothetical future requirements. Address data sustainability and total cost of ownership.

Scope: Design data models and governance policies. Do NOT implement databases, write migration scripts, or generate ORM code.

1.5 DEPTH CONTROL

This skill supports three depth tiers. Default is STANDARD. Accept --depth QUICK|STANDARD|COMPREHENSIVE via $ARGUMENTS.

TierBehaviorTarget
QUICKSkip vector schemas (Step 3), graph schemas (Step 4), knowledge pipeline (Step 5). ER schema + governance summary only. No KB file — write output directly to final deliverable.<80 lines
STANDARDFull workflow as documented below. Writes to knowledge_base/data_model.json.No limit
COMPREHENSIVESTANDARD + ontology deep-dive, cross-store consistency analysis, migration path modeling.No limit

QUICK mode: Execute Steps 1-2, 6-7 only. No KB writes.

2. PREREQUISITES

Validate before proceeding:

  • knowledge_base/requirements.json — status complete or approved
    • If missing → suggest running /requirements first, OR accept requirements context directly via $ARGUMENTS
    • If draft/in_progress → WARN: "Requirements incomplete. Proceed with caveats?"
  • knowledge_base/architecture.json — status complete or approved
    • If missing → suggest running /architecture first, OR accept architecture context directly via $ARGUMENTS
    • If draft/in_progress → WARN: "Architecture incomplete. Data model may need revision."

3. CONTEXT LOADING

From knowledge_base/requirements.json read:

  • data_landscape — sources, volumes, formats, quality concerns
  • non_functional_requirements — security, data residency, retention, compliance
  • functional_requirements — data-related capabilities
  • constraints — technology restrictions

From knowledge_base/architecture.json read:

  • tech_stack.data_stores — primary DB, caching, vector DB, object storage choices
  • component_design — data-related components and their data needs
  • data_flows — how data moves through the system

If $ARGUMENTS are provided, treat them as data source details or focus areas.

4. CORE WORKFLOW

Step 1: Data Requirements Capture

Consolidate data needs from upstream:

  • Data sources (structured, unstructured, streaming)
  • Volume estimates (initial load, growth rate, query patterns)
  • Structure (relational, document, graph, time-series, vector)
  • Quality concerns (missing data, inconsistencies, duplicates)
  • Retention requirements (regulatory, business, archival)
  • Access patterns (read-heavy, write-heavy, mixed, real-time vs. batch)

Step 2: Entity-Relationship Schema Design

For each persistent data store:

  1. Enumerate entities from requirements and architecture components
  2. Define relationships (one-to-many, many-to-many) with foreign keys and cardinality
  3. Specify data types, constraints (NOT NULL, UNIQUE, CHECK), and defaults
  4. Identify frequent query patterns and design covering indexes
  5. Include audit fields: created_at, updated_at, created_by
  6. Design migration-friendly schemas (avoid breaking changes, use additive migrations)

Document: entity name, fields with types, primary/foreign keys, indexes, constraints, estimated row counts.

Step 3: Vector Database Schema Design (if applicable)

When the architecture includes vector/embedding storage:

  1. Collection design: One collection per knowledge domain with clear boundaries
  2. Chunking strategy: Method (recursive character, semantic, sentence), chunk size, overlap
  3. Metadata schema: Source document ID, section/page, ingestion timestamp, content type, domain tags, version
  4. Embedding model selection: Model, dimensionality, language support — use WebSearch for current benchmarks
  5. Relevance filtering: Score thresholds (e.g., cosine similarity >= 0.7), re-ranking strategy (choose based on latency vs. quality trade-off):
    • Bi-encoder: Fast first-pass retrieval (semantic similarity)
    • Cross-encoder: Slow but high-quality second-pass re-ranking (e.g., MS MARCO)
    • Reciprocal Rank Fusion: Ensemble approach, no model training required
    • BM25 hybrid: Combine lexical + semantic for keyword-heavy domains
  6. Retrieval parameters: Configurable k (top results) per use case, hybrid search (dense + sparse)

Step 4: Graph Schema Design (if applicable)

When the architecture includes knowledge graphs:

  1. Node types: Entity categories with properties and constraints
  2. Edge types: Relationship categories with properties, directionality, cardinality
  3. Ontology definition: Key concepts, taxonomy hierarchy, domain relationships
  4. Query patterns: Common traversal patterns and their expected performance

Step 5: Knowledge Pipeline Architecture (if applicable)

When the solution includes document/knowledge ingestion:

  1. Document loading: Format-specific loaders (PDF, HTML, Markdown, CSV)
  2. Preprocessing: Cleaning, normalization, text splitting with configurable parameters
  3. Embedding generation: Model selection, batch processing, incremental updates
  4. Vector storage: Index configuration, partitioning strategy
  5. Retrieval interface: Query API, result ranking, source attribution

Use WebSearch for latest neurosymbolic AI patterns and hybrid retrieval approaches.

Step 6: Data Validation Framework

Define validation rules:

  • Required fields and type checks
  • Range and boundary validation
  • Pattern matching (email, phone, ID formats)
  • Cross-field consistency rules
  • Referential integrity checks
  • Validate at boundary between external input and internal storage

Step 7: Data Governance

For each data store, document:

  • PII fields: Identify all personally identifiable information with classification level
  • Retention policy: Duration, archival strategy, deletion procedures
  • Encryption: At-rest encryption method, key management
  • Access control: Role-based access, field-level security for sensitive data
  • Audit trail: What operations are logged, retention of audit logs
  • Data residency: Geographic constraints per regulatory requirements

5. OUTPUT SPECIFICATION

Output length constraints by depth tier:

  • QUICK: <80 lines total output. No KB file.
  • STANDARD: No line limit. Full KB file.
  • COMPREHENSIVE: No line limit. Full KB file with extended analysis.

Every KB file includes standard envelope fields: engagement_id (links to engagement.json), version (MAJOR.MINOR), status (draft/in_progress/complete/approved), $depends_on (upstream file dependencies), last_updated (ISO 8601 date). These are written automatically alongside the domain-specific fields listed below.

Write to knowledge_base/data_model.json:

  • data_requirements: Consolidated from upstream (sources, volumes, patterns)
  • relational_schemas: Entities, relationships, fields, indexes, constraints. Use relational_schemas as the canonical field name — do not use entities as an alias.
  • vector_schemas: Collections, chunking, embeddings, retrieval config (if applicable)
  • graph_schemas: Node types, edge types, traversal patterns (if applicable)
  • ontology: Dedicated top-level ontology definition — domain, key_concepts, taxonomy (if ontology design is in scope; do not embed inside graph_schemas)
  • knowledge_pipeline: Pipeline stages and configuration (if applicable)
  • validation_rules: Declarative validation framework
  • data_governance: PII inventory, retention, encryption, access control, audit
  • migration_notes: Schema evolution strategy, data migration considerations
  • _metadata: { "author": "sa-agent", "date": "<today>", "validation_status": "complete", "version": "1.0" }

Update knowledge_base/engagement.json:

  • Set lifecycle_state.data_model.status to complete
  • Update version and last_updated

6. DYNAMIC REFERENCES

Use WebSearch to verify:

  • Current embedding model benchmarks and pricing
  • Vector database comparison (performance, features, cost)
  • Neurosymbolic AI and hybrid retrieval patterns
  • Data governance frameworks for the client's industry
  • Database scaling best practices for the chosen stack

If WebSearch is unavailable, proceed with general best practices and flag technology-specific claims for human verification.

7. COMPLETION

Phase Complete: Data Modeling

  • Deliverables:
    • knowledge_base/data_model.json — Full data model documentation
  • Schema Summary: [N] relational entities, [N] vector collections, [N] graph node types
  • Items Requiring Human Review:
    • PII classification accuracy
    • Retention policy alignment with legal/compliance
    • Embedding model selection (evolving rapidly)
    • Index strategy for expected query patterns
  • Recommended Next Steps:
    • /security-review — Assess data security posture (can run in parallel if not already done)
    • /estimate — After data model and security review are complete

MANDATORY STOP: Do NOT auto-invoke the next skill. Do NOT interpret "ok" or "looks good" as "run everything." Wait for the human to explicitly name the next action. Human review is mandatory before sharing data models with clients.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.