sonicjs: Instructions file for Claude Code

CLAUDE.md

sonicjs CLAUDE.md is an instructions file for Claude Code from SonicJs-Org/sonicjs. It costs 5,035 tokens per session, scanned C, original, MIT.

A development guide for SonicJS, a Cloudflare-based content management system built with TypeScript. It describes the technology stack, workspace boundaries, and the project’s move toward one shared document model for stored content.

In plain words
What is it for?
Use it when developing SonicJS features, working in the specified workspace, using its database and authentication systems, or adding functionality to the document layer.
Why use it?
It prevents contributors from editing the wrong checkout or adding new feature-specific database tables that conflict with the project’s architecture.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions subagents.

This is SonicJs-Org/sonicjs's own configuration. It tells Claude Code how to work on sonicjs 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 sonicjs configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/lane/Dev/refs/sonicjs/.

About the project

SonicJS is a TypeScript-first headless content-management system that exposes content through REST APIs and an administrative interface, running on Cloudflare Workers or other SQLite-compatible environments. It is for developers building applications that manage and publish structured content, with storage through technologies such as D1 and R2. Catalogue add-ons help coding agents create and work with SonicJS projects and content.

SonicJs-Org/sonicjs · 1,788 stars · on GitHub · sonicjs.com

Reuse

Borrowing it

Nothing to install: this file belongs to SonicJs-Org/sonicjs. 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/SonicJs-Org/sonicjs/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/SonicJs-Org/sonicjs

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 sonicjs CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sonicjs-org/sonicjs/claude-md/github.svg)](https://agentmods.dev/instructions/sonicjs-org/sonicjs/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/sonicjs-org/sonicjs/claude-md"><img src="https://agentmods.dev/badge/instructions/sonicjs-org/sonicjs/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sonicjs CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/sonicjs-org/sonicjs/claude-md"><img src="https://agentmods.dev/badge/instructions/sonicjs-org/sonicjs/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,035 This file is loaded in full into every session.
When invoked 5,035 The same file — it is already loaded in full.
Security scan C 1 finding. 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.05035 $0.05035
Opus 5.5 $0.02014 $0.02014
Sonnet 5.5 $0.01007 $0.01007
Haiku 4.5 $0.00504 $0.00504

Measured 15d ago against content hash 205c04cbd32e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

sonicjs CLAUDE.md scanned grade C with 1 finding 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 15d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf node_modules package-lock.json && npm install
CLAUDE.md · 321 lines

How it starts

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

SonicJS AI Development Guidelines

Cloudflare-native headless CMS built with Hono.js + TypeScript on Cloudflare Workers / D1.

Core Technology Stack

  • Framework: Hono.js
  • Runtime: Cloudflare Workers
  • Database: Cloudflare D1 (SQLite) with Drizzle ORM (legacy only — document layer is raw SQL)
  • Validation: Zod
  • Testing: Vitest (unit + real-SQLite) + Playwright (E2E)
  • Frontend: HTMX + HTML tagged templates (admin UI)
  • Auth: Better Auth (session + RBAC) — c.get('user') === { userId, email, role }
  • Deployment: Wrangler

Workspace boundary (Conductor)

  • Work in .conductor/hong-kong-v3/. Never read or write /Users/lane/Dev/refs/sonicjs/ (sibling main checkout).
  • Target branch: origin/v3. PRs: gh pr create --base v3. Diff: git diff origin/v3....

Architecture direction: Document Model (authoritative)

The project is migrating from per-feature tables (content, media, testimonials, email_log, …) to a unified document repository. All new features build on the document model. Do not add new feature tables.

Full design + remediation runbook: docs/ai/plans/document-model-poc-plan.md (Appendix A = original design; §1–§7 = current implementation status, defect IDs D1–D48).

The 5 document tables (migration 0002_documents.sql)

  1. document_types — registered schemas (code/plugin-owned).
  2. documents — every content/media/plugin record + every historical version. Queryable scalar fields are exposed as indexed JSON VIRTUAL generated columns (q_*) on this table — json_extract(data, '$.path').
  3. document_references — typed strong/weak edges (FK to documents); powers "where used" and reference-aware delete.
  4. document_facets — indexed rows for multi-valued scalar fields (e.g. tags) — the one case generated columns can't cover.
  5. document_permissions — per-document ACL overrides on top of type-level base grants.

Implementation rules (non-negotiable — each line is a bug already shipped)

Read the full file on GitHub · 321 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. 15d ago Changed · -7 lines · -224 tokens per session 205c04cbd32e
  2. 16d ago Changed · +8 lines · +258 tokens per session b01ff60c3ef0
  3. 18d ago Changed · +16 lines · +285 tokens per session 6deb987ccfb9
  4. 1mo ago Changed · +19 tokens per session 3a7da23abcb2
  5. 2mo ago First seen · 304 lines · 4,697 tokens per session scan C 2e1b5f64751f

Subscribe to this mod's changes

sonicjs CLAUDE.md is an instructions file published in the GitHub repository SonicJs-Org/sonicjs (1,788 stars, last pushed yesterday), licensed MIT. It adds 5,035 tokens to every session, about $0.0201 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

sonicjs CLAUDE.md compared with instructions from other repositories

sonicjs CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sonicjs CLAUDE.mdSonicJs-Org/sonicjsInstructions file1.8kyesterdayMITC5,035Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode