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.
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.
curl -O https://raw.githubusercontent.com/SonicJs-Org/sonicjs/main/CLAUDE.mdgit clone --depth 1 https://github.com/SonicJs-Org/sonicjsWrote 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.
[](https://agentmods.dev/instructions/sonicjs-org/sonicjs/claude-md)<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.
<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>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.
| Model | Per session | Once 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 |
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 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)
document_types— registered schemas (code/plugin-owned).documents— every content/media/plugin record + every historical version. Queryable scalar fields are exposed as indexed JSONVIRTUALgenerated columns (q_*) on this table —json_extract(data, '$.path').document_references— typed strong/weak edges (FK todocuments); powers "where used" and reference-aware delete.document_facets— indexed rows for multi-valued scalar fields (e.g.tags) — the one case generated columns can't cover.document_permissions— per-document ACL overrides on top of type-level base grants.
Implementation rules (non-negotiable — each line is a bug already shipped)
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.
- 15d ago Changed · -7 lines · -224 tokens per session 205c04cbd32e
- 16d ago Changed · +8 lines · +258 tokens per session b01ff60c3ef0
- 18d ago Changed · +16 lines · +285 tokens per session 6deb987ccfb9
- 1mo ago Changed · +19 tokens per session 3a7da23abcb2
- 2mo ago First seen · 304 lines · 4,697 tokens per session scan C 2e1b5f64751f
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.
sonicjs CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| sonicjs CLAUDE.mdSonicJs-Org/sonicjs | Instructions file | 1.8k | yesterday | MIT | C | 5,035 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |