agentleFS
prismaprisma/skills/AGENTS.md

skills

AGENTS.md77 starsChanged 3 months agoMITView on GitHub

A collection of skills for AI coding agents working with Prisma ORM, Prisma Postgres and Prisma Compute. Skills are packaged instructions and rules that extend agent capabilities for database development, app deployment, query optimization, and best practices. references/{prefix}-{rule}.md prisma {Incorrect code example} prisma {Correct code example} Skills are loaded on-demand — only the skill name and description are loaded at startup. The full SKILL.md loads into context only when the agent decides the skill is relevant. To minimize context usage:

We split this AGENTS.md into the rules it gives an agent

12 rules. About 0 are common, 10 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    SKILL.md: Always uppercase, always this exact filename

    line 24
  2. Distinctive:

    Categories: Use consistent prefixes matching the skill's category table

    line 26
  3. Distinctive:

    Use realistic, production-like code examples

    line 130
  4. Distinctive:

    Use TypeScript for Prisma Client examples

    line 132
  5. Distinctive:

    Use Prisma Schema Language for schema examples

    line 133
  6. Distinctive:

    Always use the latest Prisma syntax and features

    line 138
  7. Distinctive:

    Consider both PostgreSQL and MySQL where behavior differs

    line 140
  8. Distinctive:

    Start a new agent session and trigger the skill

    line 161
  9. Distinctive:

    Verify the agent applies rules correctly

    line 163
  10. Very specific:

    Every other skill uses its own semantic version, starting at "1.0.0".

    line 168
  11. Distinctive:

    Never lower a published version.

    line 169
  12. Distinctive:

    Document these installation methods for users:

    line 177

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “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
AGENTS.md

AGENTS.md

This file provides guidance to AI coding agents (Claude Code, OpenCode, Cursor, Copilot, etc.) when working with code in this repository.

Repository Overview

A collection of skills for AI coding agents working with Prisma ORM, Prisma Postgres and Prisma Compute. Skills are packaged instructions and rules that extend agent capabilities for database development, app deployment, query optimization, and best practices.

Creating a New Skill

Directory Structure

skills/
  {skill-name}/           # kebab-case directory name
    SKILL.md              # Required: skill definition with frontmatter
    references/           # Optional: individual reference files
      {category}-{rule}.md # Individual references

Naming Conventions

  • Skill directory: kebab-case, prefixed with prisma- (e.g., prisma-schema-best-practices)
  • SKILL.md: Always uppercase, always this exact filename
  • Reference files: {category}-{rule-name}.md in kebab-case (e.g., relations-explicit-names.md)
  • Categories: Use consistent prefixes matching the skill's category table

SKILL.md Format

---
name: prisma-{skill-name}
description: {One sentence describing when to use this skill. Include trigger phrases.}
license: MIT
metadata:
  author: prisma
  version: "1.0.0"
---

# Prisma {Skill Title}

{Brief description of what the skill covers.}

## When to Apply

{Bullet list of scenarios when this skill should be used}

## Rule Categories by Priority

| Priority | Category | Impact | Prefix |
|----------|----------|--------|--------|
| 1 | {Category} | CRITICAL | `{prefix}-` |
| 2 | {Category} | HIGH | `{prefix}-` |
...

## Quick Reference

### 1. {Category} (CRITICAL)

- `{prefix}-{rule}` - Brief description
- `{prefix}-{rule}` - Brief description

### 2. {Category} (HIGH)
...

## How to Use (Optional)

If the skill includes references, read individual reference files for detailed explanations and code examples:

references/{prefix}-{rule}.md


Each reference file contains:
- Brief explanation of why it matters
- Incorrect code example with explanation
- Correct code example with explanation
- Additional context and references

Individual Reference File Format

# {category}-{rule-name}

{One sentence summary of the rule.}

## Priority

{CRITICAL | HIGH | MEDIUM | LOW}

## Why It Matters

{2-3 sentences explaining the impact of this rule.}

## Bad

```prisma
{Incorrect code example}

{Brief explanation of why this is problematic}

Good

{Correct code example}

{Brief explanation of why this is better}

References


## Best Practices for Context Efficiency

Skills are loaded on-demand — only the skill name and description are loaded at startup. The full `SKILL.md` loads into context only when the agent decides the skill is relevant. To minimize context usage:

- **Keep SKILL.md under 500 lines** — put detailed explanations in reference files
- **Write specific descriptions** — helps the agent know exactly when to activate the skill
- **Use progressive disclosure** — reference files get read only when needed
- **Include trigger phrases** — explicit phrases like "review my schema" in the description

## Reference File Guidelines

### Code Examples

- Use realistic, production-like code examples
- Show the minimum code needed to illustrate the point
- Use TypeScript for Prisma Client examples
- Use Prisma Schema Language for schema examples
- Include proper syntax highlighting (```prisma, ```typescript)

### Prisma-Specific Conventions

- Always use the latest Prisma syntax and features
- Reference official Prisma documentation
- Consider both PostgreSQL and MySQL where behavior differs
- Note when a rule is database-specific

### Priority Levels

- **CRITICAL**: Can cause data loss, security issues, or severe performance problems
- **HIGH**: Significant impact on maintainability, performance, or developer experience
- **MEDIUM**: Improves code quality but not essential
- **LOW**: Nice-to-have optimizations or style preferences

## Testing Skills Locally

To test a skill before committing:

1. Install the skill locally:
   ```bash
   cp -r skills/prisma-{skill-name} ~/.claude/skills/
   # or for OpenCode
   cp -r skills/prisma-{skill-name} ~/.config/opencode/skill/
  1. Start a new agent session and trigger the skill
  2. Verify the agent applies rules correctly

Skill Versions

  • A skill scoped to one Prisma ORM release sets metadata.version to the release its examples were verified against, for example "7.9.1" for prisma-cli.
  • Every other skill uses its own semantic version, starting at "1.0.0".
  • Never lower a published version. Skill installers compare versions to find updates. When a skill becomes a compatibility redirect, bump its major version.

Marketplace Distribution

Publishers must include the Postgres references and the ORM setup handoff, including the Prisma 6/7 references in prisma-orm-setup for existing applications. Verify that v0 can load these and the package-owned prisma-8 skill before releasing updated Marketplace content. A GitHub update alone does not prove that v0 refreshed its registered skill or can resolve sibling skills.

End-User Installation

Document these installation methods for users:

Via skills CLI:

npx skills add prisma/skills

Manual (Claude Code):

cp -r skills/prisma-{skill-name} ~/.claude/skills/

Manual (OpenCode):

cp -r skills/prisma-{skill-name} ~/.config/opencode/skill/

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.

Reviews can't be read right now.

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.