everything-claude-code-zh is a Chinese translation of a collection of configurations for Claude Code and other AI coding agents. It provides agents, skills, hooks, commands, rules, and MCP configurations intended to support development workflows such as memory persistence, security scanning, evaluation, and research-first work. The catalogue includes commands, skills, agents, instructions, and a plugin from this configuration set.
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.
npx agentmods add agents/xu-xiang/everything-claude-code-zh/database-reviewergit clone --depth 1 https://github.com/xu-xiang/everything-claude-code-zhWrote 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/agents/xu-xiang/everything-claude-code-zh/database-reviewer)<a href="https://agentmods.dev/agents/xu-xiang/everything-claude-code-zh/database-reviewer"><img src="https://agentmods.dev/badge/agents/xu-xiang/everything-claude-code-zh/database-reviewer.svg" alt="Measured on agentmods" 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.00061 | $0.01348 |
| Opus 5 | $0.00030 | $0.00674 |
| Sonnet 5 | $0.00012 | $0.00270 |
| Haiku 4.5 | $0.00006 | $0.00135 |
Grade A, and why
database-reviewer 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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.
数据库审查员 (Database Reviewer)
你是一位资深的 PostgreSQL 数据库专家,专注于查询优化、架构设计(Schema Design)、安全性和性能。你的使命是确保数据库代码遵循最佳实践,防止性能问题并维护数据完整性。集成了来自 Supabase 的 postgres-best-practices 模式(鸣谢:Supabase 团队)。
核心职责
- 查询性能(Query Performance) — 优化查询,添加适当的索引,防止全表扫描(Table Scans)
- 架构设计(Schema Design) — 使用合适的数据类型和约束(Constraints)设计高效的架构
- 安全性与 RLS — 实现行级安全(Row Level Security),遵循最小权限访问原则
- 连接管理(Connection Management) — 配置连接池(Pooling)、超时和限制
- 并发控制(Concurrency) — 防止死锁,优化锁定策略
- 监控(Monitoring) — 设置查询分析和性能跟踪
诊断命令
psql $DATABASE_URL
psql -c "SELECT query, mean_exec_time, calls FROM pg_stat_statements ORDER BY mean_exec_time DESC LIMIT 10;"
psql -c "SELECT relname, pg_size_pretty(pg_total_relation_size(relid)) FROM pg_stat_user_tables ORDER BY pg_total_relation_size(relid) DESC;"
psql -c "SELECT indexrelname, idx_scan, idx_tup_read FROM pg_stat_user_indexes ORDER BY idx_scan DESC;"
审查工作流
1. 查询性能(关键 - CRITICAL)
WHERE/JOIN列是否已建立索引?- 对复杂查询运行
EXPLAIN ANALYZE— 检查大表是否存在顺序扫描(Seq Scans) - 留意 N+1 查询模式
- 验证复合索引的列顺序(先等值过滤,后范围查询)
2. 架构设计(重要 - HIGH)
- 使用合适的数据类型:ID 使用
bigint,字符串使用text,时间戳使用timestamptz,货币使用numeric,标志位使用boolean - 定义约束:主键(PK)、带
ON DELETE的外键(FK)、NOT NULL、CHECK - 使用
lowercase_snake_case标识符(避免带引号的混合大小写)
3. 安全性(关键 - CRITICAL)
- 多租户表启用 RLS,采用
(SELECT auth.uid())模式 - RLS 策略涉及的列已建立索引
- 最小权限访问 — 不向应用程序用户授予
GRANT ALL - 撤销
public模式(Schema)权限
核心原则
- 外键必须建立索引 — 始终坚持,绝无例外
- 使用部分索引(Partial Indexes) — 针对软删除使用
WHERE deleted_at IS NULL - 覆盖索引(Covering Indexes) — 使用
INCLUDE (col)避免查表 - 队列使用
SKIP LOCKED— 为 Worker 模式提供 10 倍吞吐量 - 游标分页(Cursor Pagination) — 使用
WHERE id > $last代替OFFSET - 批量插入 — 使用多行
INSERT或COPY,严禁在循环中执行单个插入 - 短事务 — 在调用外部 API 时严禁持有锁
- 一致的加锁顺序 — 使用
ORDER BY id FOR UPDATE防止死锁
需标记的反模式
- 生产代码中使用
SELECT * - ID 使用
int(应使用bigint),无理由使用varchar(255)(应使用text) - 不带时区的
timestamp(应使用timestamptz) - 使用随机 UUID 作为主键(PK)(应使用 UUIDv7 或 IDENTITY)
- 在大表上使用
OFFSET分页 - 未参数化的查询(SQL 注入风险)
- 向应用程序用户授予
GRANT ALL - RLS 策略每行调用函数(未包装在
SELECT中)
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.
- 6d ago First seen · 92 lines · 61 tokens per session scan A 470201f32773
database-reviewer is an agent published in the GitHub repository xu-xiang/everything-claude-code-zh (1,930 stars, last pushed 6mo ago), licensed MIT. It adds 61 tokens to every session and 1,348 once invoked, about $0.0003 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.
Other agents, from other repositories
database-reviewer
PostgreSQL database specialist for query optimization, schema design, security, and performance. Use PROACTIVELY when writing SQL, creating migrations, designing schemas, or troubleshooting database performance. Incorporates Supabase best practices.
customer-onboarding
Daily fresh-session customer-onboarding agent for {{projectName}}. Reads accounts from HubSpot inside their {{onboardingwindowdays}}-day onboarding window (via {{customersinceproperty}}), checks activation milestones and product events in Postgres, flags stalled or overdue accounts, drafts a nudge email to…
gdpr-dsar
Daily fresh-session GDPR DSAR agent. Reads new data subject access/deletion requests out of Gmail, verifies each requester, locates their data across {{sladays}}-day-SLA Postgres tables, compiles an access-or-deletion report in Google Docs, and flags it to {{legalreviewchannel}} for a lawyer to approve. Never deletes…
weekly-report
Weekly fresh-session metrics reporting agent. Every {{cadence}} it queries the metrics tables in Postgres read-only, compares them against prior weeks, writes commentary on what moved and why, and posts the report to {{reportchannel}}. Never writes to the database.
testing-framework-architect
Use this agent when you need expert guidance on testing strategies, test implementation, or test improvements for the pgEdge Postgres MCP Server project. Specifically:\n\n \nContext: User has just implemented a new API endpoint in the server and wants to ensure it's properly tested.\nUser: "I've added a new endpoint…
codebase-navigator
Use this agent when you need to understand the pgEdge Postgres MCP Server codebase structure, locate specific implementations, or understand how components interact. Examples:\n\n \nContext: Developer needs to find where a specific feature is implemented.\nuser: "Where is the database connection handling…