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 skills/ketor/cto-fleet/team-closenpx skills add ketor/cto-fleet --skill team-closegit clone --depth 1 https://github.com/ketor/cto-fleetWrote 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/skills/ketor/cto-fleet/team-close)<a href="https://agentmods.dev/skills/ketor/cto-fleet/team-close"><img src="https://agentmods.dev/badge/skills/ketor/cto-fleet/team-close.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.00067 | $0.01996 |
| Opus 5 | $0.00034 | $0.00998 |
| Sonnet 5 | $0.00013 | $0.00399 |
| Haiku 4.5 | $0.00007 | $0.00200 |
Grade C, and why
team-close scanned grade C with 2 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.
Asks for rootmediumPrivilege 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}`) Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
cat ~/.claude/teams/*/config.json 2>/dev/null | python3 -c " How it starts
The opening of the file, as written. The whole thing — 187 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 中检测以下标志:
--force:跳过 shutdown_request 协议,直接用 tmux kill-pane 强制关闭所有 agent pane
执行流程
步骤 1:检查当前 team 状态
读取当前 team config,获取所有活跃 teammate 列表:
# 找当前 team name(从 session context 获取,或列出 ~/.claude/teams/ 中最新的)
cat ~/.claude/teams/*/config.json 2>/dev/null | python3 -c "
import json,sys
for line in sys.stdin:
try:
d = json.loads(line)
if 'members' in d:
for m in d['members']:
print(m.get('name','?'), m.get('agentId','?'))
except: pass
"
同时扫描 tmux 中的 agent pane:
tmux list-panes -a -F "#{session_name}:#{window_index}.#{pane_index} #{pane_title}" 2>/dev/null | grep -i "agent\|claude\|teammate" || true
步骤 2:向所有 teammate 发送 shutdown_request
对每个活跃的 teammate,使用 SendMessage 工具发送:
{
"type": "shutdown_request",
"reason": "user requested team-close"
}
等待每个 teammate 回复 shutdown_response(approve: true)。
如果 teammate 5 秒内无响应:标记为"未响应",继续处理其他 teammate。
步骤 3:调用 TeamDelete
所有 teammate 确认关闭(或超时)后,调用 TeamDelete 工具清理当前 team 的配置和任务目录。
步骤 4:强制清理未响应的 tmux pane
如果有未响应的 teammate,或传递了 --force 标志:
# 列出所有 claude agent 相关的 tmux pane 并 kill
tmux list-panes -a -F "#{session_name}:#{window_index}.#{pane_index} #{pane_current_command}" 2>/dev/null \
| grep -i "claude-code\|anthropic" \
| awk '{print $1}' \
| while read pane; do
tmux kill-pane -t "$pane" 2>/dev/null && echo "killed: $pane"
done
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 · 187 lines · 67 tokens per session scan C 1ad8adb9b5a7
team-close is a skill published in the GitHub repository ketor/cto-fleet (5 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 67 tokens to every session and 1,996 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 2 findings (asks for root, reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
insight-error-page
Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…