team-schema

team-schema is a skill for Claude Code from ketor/cto-fleet. It costs 135 tokens per session (8,440 once invoked), scanned A, original, Apache-2.0.

A database-design workflow for reviewing or changing the structure of stored data, including tables, collections, indexes, and migrations.

In plain words
What is it for?
Use it to design, migrate, audit, or optimize a PostgreSQL, MySQL, SQLite, MongoDB, or automatically detected database.
Why use it?
It helps catch compatibility, performance, and safety problems before database changes are applied.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; names the AskUserQuestion tool.

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 skills/ketor/cto-fleet/team-schema
Any agent
npx skills add ketor/cto-fleet --skill team-schema
Clone the repo
git clone --depth 1 https://github.com/ketor/cto-fleet

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 team-schema

README.md
[![agentmods](https://agentmods.dev/badge/skills/ketor/cto-fleet/team-schema.svg)](https://agentmods.dev/skills/ketor/cto-fleet/team-schema)
Your own site
<a href="https://agentmods.dev/skills/ketor/cto-fleet/team-schema"><img src="https://agentmods.dev/badge/skills/ketor/cto-fleet/team-schema.svg" alt="Measured on agentmods" height="20"></a>
Per session 135 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,440 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 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.1 $0.00135 $0.08440
Opus 5 $0.00068 $0.04220
Sonnet 5 $0.00027 $0.01688
Haiku 4.5 $0.00014 $0.00844

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

Security

Grade A, and why

team-schema scanned grade A 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 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.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- 目录路径:`/tmp/{team-name}/`(team lead 在 TeamCreate 后执行 `mkdir -p /tmp/{team-name} && chmod 700 /tmp/{team-name}`)

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

team-schema/SKILL.md · 590 lines

How it starts

The opening of the file, as written. The whole thing — 590 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Preamble (run first)

_UPD=$(~/.claude/skills/cto-fleet/bin/cto-fleet-update-check 2>/dev/null || true)
[ -n "$_UPD" ] && echo "$_UPD" || true

If output shows UPGRADE_AVAILABLE <old> <new>: read ~/.claude/skills/cto-fleet/cto-fleet-upgrade/SKILL.md and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If JUST_UPGRADED <from> <to>: tell user "Running cto-fleet v{to} (just updated!)" and continue.

参数解析:从 $ARGUMENTS 中检测以下标志:

  • --auto:完全自主模式(不询问用户任何问题,全程自动决策)
  • --once:单轮确认模式(将所有需要确认的问题合并为一轮提问,确认后全程自动执行)
  • --lang=zh|en:输出语言(默认 zh 中文)
  • --db=postgres|mysql|sqlite|mongo|auto:数据库类型(默认 auto 自动检测)
  • --action=design|migrate|audit|optimize:操作类型(默认根据需求描述自动推断)
    • design:新 Schema 设计或现有 Schema 改进
    • migrate:生成迁移脚本
    • audit:Schema 健康审计(规范性、性能、安全)
    • optimize:索引和查询性能优化

解析后将标志从需求描述中移除。

模式 用户确认范围 条件节点处理
标准模式(默认) 扫描结果确认、设计方案确认、迁移脚本确认 正常询问用户
单轮确认模式--once 仅迁移脚本确认(因为数据库变更有高风险) 自动决策 + 收尾汇总
完全自主模式--auto 不询问用户 全部自动决策,收尾汇总所有决策

单轮确认模式下条件节点自动决策规则:

  • 扫描数据不完整 → team lead 自行判断可用数据范围,在迁移脚本确认时告知用户
  • designer-1/designer-2 设计分歧 → team lead 综合两方设计裁决,在方案确认时附带分歧摘要和裁决理由
  • 兼容性审查发现破坏性变更 → reviewer 标记风险等级,在迁移脚本确认时重点展示
  • 分歧度 > 50%不可跳过,必须暂停问用户(熔断机制)
  • 迁移脚本验证失败超 3 轮不可跳过,必须暂停问用户(熔断机制)

完全自主模式下:所有节点(包括扫描确认、设计确认、迁移脚本确认等)均自动决策,不询问用户。收尾时汇总所有自动决策。唯一例外:验证失败超 3 轮仍自动停止(但不询问用户,而是 team lead 自行裁决是否继续)。

使用 TeamCreate 创建 team(名称格式 team-schema-{YYYYMMDD-HHmmss},如 team-schema-20260308-143022,避免多次调用冲突),你作为 team lead 按以下流程协调。

文件交接规范(File-Based Handoff)

所有 agent 间传递详细报告时,必须采用文件交接模式(防止上下文溢出触发 20MB 限制):

  1. 写入文件:将完整报告写入团队工作目录:
    • 目录路径:/tmp/{team-name}/(team lead 在 TeamCreate 后执行 mkdir -p /tmp/{team-name} && chmod 700 /tmp/{team-name}
    • 单个文件 ≤ 2000 行;超大报告拆分为 summary + details 文件
  2. 发送引用:通过 SendMessage 仅发送(≤500 字符):
    • 文件路径(1 行)
    • 关键摘要(含核心指标/发现/评分)
  3. 按需读取:接收方使用 Read 按需读取文件,发送方不内联完整内容
  4. 路径转发:team lead 转发报告时只转发文件路径 + 摘要,不 Read 后再 SendMessage
  5. 遵从校验:team lead 收到超 1000 字符且不含 /tmp/team- 路径前缀的消息时,要求 agent 以文件交接模式重发

Read the full file on GitHub · 590 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. 6d ago First seen · 590 lines · 0 tokens per session scan A d1b62e458ddc

Subscribe to this mod's changes

team-schema is a skill published in the GitHub repository ketor/cto-fleet (5 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 135 tokens to every session and 8,440 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

schema-exploration

Lists tables, describes columns and data types, identifies foreign key relationships, and maps entity relationships in a database. Use when the user asks about database schema, table structure, column types, what tables exist, ERD, foreign keys, or how entities relate.

langchain-ai/deepagents · 57 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

supabase

Supabase / PostgREST Row-Level-Security playbook — pull the anon (or leaked servicerole) key out of the frontend JS, map tables from the auto-generated OpenAPI spec, test anonymous RLS READ disclosures (PII/secret leaks), and anonymous RLS WRITE abuse (insert/update/delete — e.g. forging…

PentesterFlow/agent · 120 tokens

nornicdb-cypher-queries

Pick fast, predictable Cypher query shapes in NornicDB — point lookups, batch retrieval, pagination, search, traversal, batched UNWIND/MERGE writes, cleanup, multi-tenant isolation. Use when writing or reviewing Cypher whose latency or throughput matters; maps user intent to the executor's hot-path query templates.

orneryd/NornicDB · 79 tokens

dsql

Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, diagnose cluster performance, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL and PostgreSQL-to-DSQL schema conversion, foreign key…

awslabs/agent-plugins · 229 tokens

volcengine-rds-postgresql

使用火山引擎 RDS PostgreSQL,帮助用户完成 RDS PostgreSQL 相关的实例管理、数据库操作、账号管理和运维任务,可直接调用 uv run ./scripts/callrdspostgresql.py 脚本获取实时结果。.

bytedance/agentkit-samples · 63 tokens