motiv-buy: Instructions file for Claude Code

CLAUDE.md

motiv-buy CLAUDE.md is an instructions file for Claude Code from nmime/motiv-buy. It costs 3,028 tokens per session, scanned A, original, MIT.

Project instructions that define coding rules and a checklist for the motiv-buy application, including how to handle types, money calculations, imports, repeated code, and translated text.

In plain words
What is it for?
Use them as guidance when adding or changing motiv-buy code, especially code involving money, types, shared libraries, user-facing text, or existing functions.
Why use it?
An AI coding assistant may otherwise produce code that violates the project's conventions or fails its build checks. These instructions state which patterns to avoid and what to verify before coding.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is nmime/motiv-buy's own configuration. It tells Claude Code how to work on motiv-buy itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything motiv-buy configures →

Reuse

Borrowing it

Nothing to install: this file belongs to nmime/motiv-buy. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/nmime/motiv-buy/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/nmime/motiv-buy

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for motiv-buy CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/nmime/motiv-buy/claude-md.svg)](https://agentmods.dev/instructions/nmime/motiv-buy/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/nmime/motiv-buy/claude-md"><img src="https://agentmods.dev/badge/instructions/nmime/motiv-buy/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,028 This file is loaded in full into every session.
When invoked 3,028 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.03028 $0.03028
Opus 5 $0.01514 $0.01514
Sonnet 5 $0.00606 $0.00606
Haiku 4.5 $0.00303 $0.00303

Measured 2d ago against content hash 8f46fc954f3f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

motiv-buy CLAUDE.md 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.

CLAUDE.md · 485 lines

How it starts

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

Development Guidelines & Code Standards

TL;DR - CRITICAL RULES

AI AGENT INSTRUCTION: These 7 rules are NON-NEGOTIABLE. Violations will fail the build.

# Rule Instead Use
1 NEVER any type unknown + type guards
2 NEVER as assertions Type guards (except as const)
3 NEVER +,-,*,/ for money add(), subtract(), multiply(), divide()
4 NEVER switch/if-else-if Record<K,V> object lookup
5 NEVER import *-main in libs Only *-shared in libs
6 NEVER hardcode strings ctx.t('key') from locales
7 NEVER duplicate functions Search first, reuse existing

BEFORE YOU CODE - MANDATORY CHECKLIST

[ ] SEARCHED for existing similar functions in codebase
[ ] CHECKED locale files exist for any user-facing text
[ ] VERIFIED imports don't use @app/feature-*-main from libs/
[ ] CONFIRMED using Decimal.js for any money calculations

CRITICAL RULES - VIOLATIONS FAIL BUILD

RULE 1: NO any TYPE

// FORBIDDEN
function process(data: any) { }

// REQUIRED
function process(data: unknown) {
  if (isValidData(data)) { /* safe */ }
}

RULE 2: NO as TYPE ASSERTIONS

// FORBIDDEN
const user = data as User;

// REQUIRED
if (isUser(data)) {
  const user = data; // Type-safe
}

Exception: as const is allowed.


RULE 3: NO NATIVE ARITHMETIC FOR MONEY

// FORBIDDEN
const total = price + tax;

// REQUIRED
import { add, subtract, multiply, divide } from '@app/common-shared/util';
const total = add(price, tax);
Native Decimal.js
a + b add(a, b)
a - b subtract(a, b)
a * b multiply(a, b)
a / b divide(a, b)
parseFloat(x) decimal(x)
.toFixed(8) toDbString(x, 8)
.toFixed(2) toDisplayString(x, 2)

RULE 4: NO SWITCH/IF-ELSE-IF

// FORBIDDEN
switch (status) {
  case 'pending': return handlePending();
  case 'done': return handleDone();
}

// FORBIDDEN
if (status === 'pending') { } else if (status === 'done') { }

// REQUIRED
const HANDLERS: Record<Status, Handler> = {
  pending: handlePending,
  done: handleDone,
};
const handler = HANDLERS[status];

Read the full file on GitHub · 485 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 · 485 lines · 3,028 tokens per session scan A 8f46fc954f3f

Subscribe to this mod's changes

motiv-buy CLAUDE.md is an instructions file published in the GitHub repository nmime/motiv-buy (0 stars, last pushed 7mo ago), licensed MIT. It adds 3,028 tokens to every session, about $0.0151 per session on Opus 5. 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-09-04.

Related

Other instructions, from other repositories

CopilotTraining typescript.instructions.md

Instructions for MSBart2/CopilotTraining, covering typescript development standards, type definitions, type safety, generics and union types.

MSBart2/CopilotTraining · 476 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens