sonicjs: Command for Claude Code

.claude/commands/sonicjs-seo-sitemap.md

sonicjs-seo-sitemap is a command for Claude Code from SonicJs-Org/sonicjs. It costs 0 tokens per session (518 once invoked), scanned A, original, MIT.

A command for creating or updating a sitemap for the SonicJS documentation website. A sitemap is a file that lists website pages so search engines can discover and understand them.

In plain words
What is it for?
It is for scanning the Next.js app, collecting its pages, and generating either a dynamic sitemap route or a static sitemap.xml with URLs, dates, update frequency, and priorities.
Why use it?
It avoids maintaining page URLs by hand and helps keep the sitemap aligned with the site's documentation, homepage, and blog content.

Command for Claude Code

Written for Claude Code: installed under .claude/.

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 →

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,700 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/commands/sonicjs-seo-sitemap.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-seo-sitemap

README.md
[![agentmods](https://agentmods.dev/badge/commands/sonicjs-org/sonicjs/sonicjs-seo-sitemap/github.svg)](https://agentmods.dev/commands/sonicjs-org/sonicjs/sonicjs-seo-sitemap)
Your own site
<a href="https://agentmods.dev/commands/sonicjs-org/sonicjs/sonicjs-seo-sitemap"><img src="https://agentmods.dev/badge/commands/sonicjs-org/sonicjs/sonicjs-seo-sitemap/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-seo-sitemap

Your own site · 80×15
<a href="https://agentmods.dev/commands/sonicjs-org/sonicjs/sonicjs-seo-sitemap"><img src="https://agentmods.dev/badge/commands/sonicjs-org/sonicjs/sonicjs-seo-sitemap.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 518 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00518
Opus 5 $0.00000 $0.00259
Sonnet 5 $0.00000 $0.00104
Haiku 4.5 $0.00000 $0.00052

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

Security

Grade A, and why

sonicjs-seo-sitemap 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 10d 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/commands/sonicjs-seo-sitemap.md · 79 lines

What it actually says

Generate/Update Sitemap for SonicJS

Create or update the sitemap.xml for the SonicJS documentation website.

Instructions

  1. Discover all pages in the www/ Next.js app:

    • Scan www/src/app/ for all page.mdx and page.tsx files
    • Include the homepage
    • Include all documentation pages
    • Include blog posts (if any)
  2. Generate sitemap.xml with:

    • Full URLs (https://sonicjs.com/...)
    • Last modified dates (from git or file mtime)
    • Change frequency estimates
    • Priority values (1.0 for homepage, 0.8 for main docs, 0.6 for sub-pages)
  3. Create sitemap route for Next.js:

    • Create www/src/app/sitemap.ts for dynamic sitemap generation
    • Or create static www/public/sitemap.xml

Sitemap Format

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://sonicjs.com/</loc>
    <lastmod>2024-01-15</lastmod>
    <changefreq>weekly</changefreq>
    <priority>1.0</priority>
  </url>
  <!-- More URLs -->
</urlset>

Next.js Dynamic Sitemap (Preferred)

// www/src/app/sitemap.ts
import { MetadataRoute } from 'next'

export default function sitemap(): MetadataRoute.Sitemap {
  const baseUrl = 'https://sonicjs.com'

  // Get all doc pages dynamically
  const docs = [
    { url: '/', priority: 1.0 },
    { url: '/getting-started', priority: 0.9 },
    // ... discover all pages
  ]

  return docs.map(doc => ({
    url: `${baseUrl}${doc.url}`,
    lastModified: new Date(),
    changeFrequency: 'weekly',
    priority: doc.priority,
  }))
}

Also Create robots.txt

# www/public/robots.txt
User-agent: *
Allow: /

Sitemap: https://sonicjs.com/sitemap.xml

Verification

After creating:

  1. Visit /sitemap.xml to verify it loads
  2. Test with Google Search Console
  3. Submit sitemap to search engines
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. 10d ago First seen · 79 lines · 0 tokens per session scan A cfe1e8eb4cf7

Subscribe to this mod's changes

sonicjs-seo-sitemap is a command published in the GitHub repository SonicJs-Org/sonicjs (1,700 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 518 tokens. 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-30.