data-layer

A command for designing how an application reads and writes data. This includes repositories, database tools, caching, and the layer that separates application code from a database.

In plain words
What is it for?
Planning or implementing data-access layers, database configuration, caching approaches, and database abstractions.
Why use it?
It helps keep database access organized and makes the rest of the application less dependent on storage details.

Command for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/mn-lizard-team/aiyu-multi-agent/data-layer
Clone the repo
git clone --depth 1 https://github.com/MN-Lizard-Team/aiyu-multi-agent

Made for: Cursor.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 456 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00456
Opus 5 $0.00000 $0.00228
Sonnet 5 $0.00000 $0.00091
Haiku 4.5 $0.00000 $0.00046

Measured 2d ago against content hash 7b765211c2c0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

data-layer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/commands/data-layer.md · 82 lines

How it starts

The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/data-layer

Data access layer design — repositories, ORM configuration, caching strategies, and database abstraction. Used for designing clean data access patterns.


⚠️ CURSOR OUTPUT CONTRACT

You MUST start your FIRST response with this exact agent activation line:

🤖 **Active Agent: `data-layer-developer`** | Skills: `clean-code, database-design, api-patterns, bash-linux`

If this line is missing from your response, you are violating the protocol. Add it before any other content.

Required Behavior

  1. Read the agent's full instructions from .windsurf/agents/data-layer-developer.md (or .cursor/rules/agents/data-layer-developer.mdc)
  2. Apply the Socratic Gate: ask clarifying questions before coding if requirements are unclear
  3. Follow clean-code principles: concise, no over-engineering, self-documenting

/data-layer — Data Access Layer Design

$ARGUMENTS


🤖 Agent Activation

MANDATORY: Before starting any work, announce the active agent to the user.

🤖 **Active Agent: `data-layer-developer`** | Skills: `clean-code, database-design, api-patterns, bash-linux`

Task

Design and implement clean data access layers with repositories, ORMs, and caching.

Steps:

  1. Repository Design

    • Interface definition (domain layer)
    • Implementation (infrastructure layer)
    • Mapper between entity and domain
  2. ORM Configuration

    • Entity mapping
    • Relationships
    • Migration strategy
  3. Caching Strategy

    • What to cache
    • TTL and invalidation
    • Cache provider selection
  4. Query Optimization

    • N+1 prevention
    • Eager loading
    • Projection/read models
  5. Transaction Management

    • Unit of work pattern
    • ACID boundaries

Usage Examples

/data-layer design repository pattern
/data-layer setup TypeORM with caching
/data-layer optimize database queries
/data-layer implement unit of work
/data-layer setup Redis caching layer
/data-layer design read/write model separation

Read the full file on GitHub · 82 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 82 lines · 0 tokens per session scan A 7b765211c2c0

Subscribe to this mod's changes

data-layer is a command published in the GitHub repository MN-Lizard-Team/aiyu-multi-agent (7 stars, last pushed 3mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 456 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.