ai CLAUDE.md

A set of project instructions for Contentrain’s open-source monorepo, a single repository containing several related packages. It covers the project layout, documentation sources, content rules, and required AI-agent practices.

In plain words
What is it for?
Use it when an agent needs to understand the Contentrain packages, documentation, AI rules, skills, or generated Claude Code plugin files.
Why use it?
It gives coding agents shared context and rules so work across the repository follows the project’s structure and conventions.

Instructions file

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 instructions/contentrain/ai/claude-md
Clone the repo
git clone --depth 1 https://github.com/Contentrain/ai
Per session 2,934 This file is loaded in full into every session.
When invoked 2,934 The same file — it is already loaded in full.
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.02934 $0.02934
Opus 5 $0.01467 $0.01467
Sonnet 5 $0.00587 $0.00587
Haiku 4.5 $0.00293 $0.00293

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

Security

Grade A, and why

ai 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 · 213 lines

How it starts

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

CLAUDE.md — contentrain-ai

Project Overview

MIT-licensed monorepo for Contentrain's open-source packages: MCP tools, CLI, TypeScript types, AI rules, and universal query SDK.

Vision: "AI-generated content governance infrastructure"

Monorepo Structure

contentrain-ai/
├── packages/
│   ├── mcp/          — 21 MCP tools, stdio + HTTP transports, Local / GitHub / GitLab providers (simple-git + zod + MCP SDK)
│   ├── cli/          — citty + tsdown (init/serve/validate/normalize/connect)
│   ├── types/        — Shared TypeScript types (@contentrain/types)
│   ├── rules/        — AI agent quality rules & conventions
│   ├── skills/       — AI agent workflow procedures & framework guides
│   └── sdk/
│       └── js/       — Universal query SDK (@contentrain/query)
├── plugins/
│   └── contentrain/  — Claude Code plugin payload. GENERATED by `pnpm plugin:build`
│                       from packages/skills (curated 7-skill subset + framework
│                       guides). Never edit by hand; CI fails on a stale diff.
│                       Versioned by changesets as the private workspace package
│                       @contentrain/claude-plugin — its package.json version is
│                       the single source of truth and build propagates it into
│                       plugin.json and marketplace.json. See RELEASING.md
├── docs/
│   └──              — Reserved for the public VitePress docs site

Documentation Sources

The old docs/internal/* spec set is no longer active.

Use these references instead:

Contentrain Rules & Skills (MANDATORY)

When working with Contentrain content operations (models, content, normalize, validate), you MUST follow the rules and skills in this repo:

Essential Rules (always-loaded)

  • packages/rules/essential/contentrain-essentials.md — compact guardrails for every conversation

Read the full file on GitHub · 213 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 · 213 lines · 2,934 tokens per session scan A 6e91b7b28180

Subscribe to this mod's changes

ai CLAUDE.md is an instructions file published in the GitHub repository Contentrain/ai (4 stars, last pushed 2d ago), licensed MIT. It adds 2,934 tokens to every session, about $0.0147 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-08-31.