agentleFS
SentryKnown publishergetsentry/abacus/AGENTS.md

abacus

AGENTS.md77 starsChanged 9 months agoApache-2.0View on GitHub

Use pnpm: pnpm install, pnpm dev, pnpm cli <cmd> AI commits MUST include: Use your actual model name (e.g., Claude Sonnet 4, Claude Opus 4.5). Routes require session validation except /sign-in, /api/auth/, /api/cron/, /api/webhooks/*. Use db-migrate skill for schema changes. See .claude/skills/db-migrate/SKILL.md Normalize at write-time via normalizeModelName(): sonnet-4, opus-4.5 (T), haiku-3.5 (HT) Use write-tests skill. See .claude/skills/write-tests/SKILL.md Use ui-design skill. See .claude/skills/ui-design/SKILL.md Use write-tip skill. See .claude/skills/write-tip/SKILL.md Use write-docs skill. See .claude/skills/write-docs/SKILL.md

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

7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

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

    Use pnpm: pnpm install, pnpm dev, pnpm cli <cmd>

    line 5
  2. Very specific:

    Use your actual model name (e.g., Claude Sonnet 4, Claude Opus 4.5).

    line 13
  3. Very specific:

    Use <AppLink> for internal links (preserves ?days=N)

    line 38
  4. Very specific:

    Use useTimeRange() hook to access/update time range

    line 39
  5. Very specific:

    Use db-migrate skill for schema changes.

    line 43
  6. Distinctive:

    No gamification (no progress bars, XP, "level up")

    line 61
  7. Very specific:

    Use write-tests skill. See .claude/skills/write-tests/SKILL.md

    line 70

≈ “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

Agent Instructions

Package Manager

Use pnpm: pnpm install, pnpm dev, pnpm cli <cmd>

Commit Attribution

AI commits MUST include:

Co-Authored-By: <model-name> <noreply@anthropic.com>

Use your actual model name (e.g., Claude Sonnet 4, Claude Opus 4.5).

API Routes

Routes require session validation except /sign-in, /api/auth/*, /api/cron/*, /api/webhooks/*.

import { NextResponse } from 'next/server';
import { wrapRouteHandlerWithSentry } from '@sentry/nextjs';
import { getSession } from '@/lib/auth';

async function handler(request: Request) {
  const session = await getSession();
  if (!session) return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
  // handler logic
}

export const GET = wrapRouteHandlerWithSentry(handler, {
  method: 'GET',
  parameterizedRoute: '/api/your-route',
});

Navigation

  • Use <AppLink> for internal links (preserves ?days=N)
  • Use useTimeRange() hook to access/update time range

Database

Use db-migrate skill for schema changes. See .claude/skills/db-migrate/SKILL.md

CLI

CommandDescription
pnpm cli statsDB statistics
pnpm cli sync --days 7Sync recent usage
pnpm cli backfill anthropic --from YYYY-MM-DD --to YYYY-MM-DDBackfill provider data
pnpm cli mappings:syncSync API key mappings

Model Names

Normalize at write-time via normalizeModelName(): sonnet-4, opus-4.5 (T), haiku-3.5 (HT)

Adoption Stages

  • Positive framing only (no "Struggling"/"At Risk")
  • No gamification (no progress bars, XP, "level up")
  • Stages: Exploring → Building Momentum → In the Flow → Power User
  • Based on intensity (avg tokens/day), not frequency
  • Inactive = 30+ days (hide by default)
  • Thresholds: Power User 3M+, In Flow 1M+, Building Momentum 250K+
  • See src/lib/adoption.ts

Testing

Use write-tests skill. See .claude/skills/write-tests/SKILL.md

pnpm test              # Run all tests
pnpm test:watch        # Watch mode

Frontend & UI

Use ui-design skill. See .claude/skills/ui-design/SKILL.md

Tips & Guides

Use write-tip skill. See .claude/skills/write-tip/SKILL.md

Documentation

Use write-docs skill. See .claude/skills/write-docs/SKILL.md

Code ChangeUpdate Docs
CLI commandsdocs/src/content/docs/cli/*.mdx
Environment variablesdocs/src/content/docs/getting-started/environment-variables.mdx
Provider setup/behaviordocs/src/content/docs/providers/*.mdx
Vercel configdocs/src/content/docs/deployment/vercel.mdx
Project structuredocs/src/content/docs/development/architecture.mdx

Download now (ZIP)

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository5 other files it gives its agents.

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.