doc-sync

doc-sync is a command for Claude Code from YuDefine/nuxt-supabase-starter. It costs 20 tokens per session (759 once invoked), scanned A, original, MIT.

A command for updating verification documents so they describe the system as it currently works. It covers documentation about configuration, authentication, database structure, permissions, roles, stores, and deployment.

In plain words
What is it for?
Use it after changes to environment variables, authentication, database schemas, access rules, user roles, application stores, or deployment. It also checks links, examples, and the documentation index.
Why use it?
It reduces the risk that technical documentation becomes out of date after code or configuration changes.

Command for Claude Code

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 commands/yudefine/nuxt-supabase-starter/doc-sync
Clone the repo
git clone --depth 1 https://github.com/YuDefine/nuxt-supabase-starter

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 doc-sync

README.md
[![agentmods](https://agentmods.dev/badge/commands/yudefine/nuxt-supabase-starter/doc-sync.svg)](https://agentmods.dev/commands/yudefine/nuxt-supabase-starter/doc-sync)
Your own site
<a href="https://agentmods.dev/commands/yudefine/nuxt-supabase-starter/doc-sync"><img src="https://agentmods.dev/badge/commands/yudefine/nuxt-supabase-starter/doc-sync.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 759 The whole file, excluding the scripts and references it only reads on demand.
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.00020 $0.00759
Opus 5 $0.00010 $0.00380
Sonnet 5 $0.00004 $0.00152
Haiku 4.5 $0.00002 $0.00076

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

Security

Grade A, and why

doc-sync 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 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.

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.

template/.claude/commands/doc-sync.md · 92 lines

What it actually says

User Input

$ARGUMENTS

Outline

更新 docs/verify/ 目錄下的文件,確保反映系統的當前狀態。

Step 1: 識別需要更新的文件

根據最近的變更,判斷哪些文件需要更新:

變更類型 對應文件
環境變數 ENVIRONMENT_VARIABLES.md
認證流程 AUTH_INTEGRATION.md, OAUTH_SETUP.md
資料庫 schema SUPABASE_MIGRATION_GUIDE.md, MONITORING_TABLES.md
RLS 政策 RLS_PERFORMANCE_OPTIMIZATION.md
使用者角色 USER_ROLES_AUTH.md
Pinia store PINIA_ARCHITECTURE.md
部署流程 REMOTE_DEPLOYMENT.md, CLOUDFLARE_WORKERS_GOTCHAS.md

Step 2: 讀取現有文件

讀取需要更新的文件,了解目前內容。

Step 3: 更新文件

遵循 docs/verify/ 的寫作原則:

✅ 正確寫法
  • 使用現在式:描述「系統目前是什麼」
  • 移除時間標記:不要寫「2025-01-13 更新」
  • 專注於狀態:記錄配置、設定、架構
  • 直接覆寫:狀態改變時直接覆寫舊描述
❌ 錯誤寫法
  • 本次更新:修正了 X 問題
  • 2025-01-13 更新
  • 原本是 A,現在改成 B

Step 4: 驗證文件

確認更新後的文件:

  1. 格式正確(Markdown)
  2. 連結有效
  3. 程式碼範例可執行
  4. 與實際程式碼一致

Step 5: 更新 README

如果新增了文件或變更了結構,更新 docs/verify/README.md 的目錄。

Step 6: 完成報告

✅ 文件同步完成!

## 已更新文件

| 文件 | 變更摘要 |
|------|----------|
| XXX.md | 更新了 YYY 章節 |
| ZZZ.md | 新增了 AAA 說明 |

## 變更預覽

[顯示 git diff 摘要]

建議:執行 `pnpm docs:dev` 預覽文件網站。

文件清單

各 consumer 的 docs/verify/ 結構不同,執行此 command 前先讀 consumer 自己的 docs/verify/README.md 取得當前清單,再依使用者描述的變更類型對照需要更新的檔案。禁止根據此 command 內嵌假設的清單去更新;該清單會隨 consumer 演化而漂移。

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 · 92 lines · 20 tokens per session scan A 89eed1c66735

Subscribe to this mod's changes

doc-sync is a command published in the GitHub repository YuDefine/nuxt-supabase-starter (45 stars, last pushed yesterday), licensed MIT. It adds 20 tokens to every session and 759 once invoked, about $0.0001 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-30.