sonicjs CLAUDE.md

sonicjs CLAUDE.md is an instructions file for coding agents from SonicJs-Org/sonicjs. It costs 4,697 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

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/sonicjs-org/sonicjs/claude-md
Clone the repo
git clone --depth 1 https://github.com/SonicJs-Org/sonicjs

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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,697 This file is loaded in full into every session.
When invoked 4,697 The same file — it is already loaded in full.
Security scan C 1 finding. 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.04697 $0.04697
Opus 5 $0.02348 $0.02348
Sonnet 5 $0.00939 $0.00939
Haiku 4.5 $0.00470 $0.00470

Measured 4d ago against content hash 2e1b5f64751f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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 · 304 lines

How it starts

The opening of the file, as written. The whole thing — 304 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 D1D48).

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 · 304 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. 4d 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,692 stars, last pushed yesterday), licensed MIT. It adds 4,697 tokens to every session, about $0.0235 per session on Opus 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

Other instructions, from other repositories