claude-omo-agentflow: Skill for Claude Code

.claude/skills/switch-agentflow/SKILL.md

switch-agentflow is a skill for Claude Code from wangjialiang678/claude-omo-agentflow. It costs 115 tokens per session (2,456 once invoked), scanned B, original, MIT.

Instructions for deploying and switching Agentflow, a project or global mode that changes how an agent operates.

In plain words
What is it for?
They check deployment status, install the required setup, and turn project-level or global modes on, off, or report their status.
Why use it?
They make the scope of the change clear so enabling it for one project does not unintentionally affect every project.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

This is wangjialiang678/claude-omo-agentflow's own configuration. It tells Claude Code how to work on claude-omo-agentflow 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 claude-omo-agentflow configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/michael/.claude/hooks.

Reuse

Borrowing it

Nothing to install: this file belongs to wangjialiang678/claude-omo-agentflow. 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/wangjialiang678/claude-omo-agentflow/main/.claude/skills/switch-agentflow/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/wangjialiang678/claude-omo-agentflow

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 switch-agentflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/wangjialiang678/claude-omo-agentflow/switch-agentflow/github.svg)](https://agentmods.dev/skills/wangjialiang678/claude-omo-agentflow/switch-agentflow)
Your own site
<a href="https://agentmods.dev/skills/wangjialiang678/claude-omo-agentflow/switch-agentflow"><img src="https://agentmods.dev/badge/skills/wangjialiang678/claude-omo-agentflow/switch-agentflow/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 switch-agentflow

Your own site · 80×15
<a href="https://agentmods.dev/skills/wangjialiang678/claude-omo-agentflow/switch-agentflow"><img src="https://agentmods.dev/badge/skills/wangjialiang678/claude-omo-agentflow/switch-agentflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 115 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,456 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00115 $0.02456
Opus 5 $0.00057 $0.01228
Sonnet 5 $0.00023 $0.00491
Haiku 4.5 $0.00012 $0.00246

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

Security

Grade B, and why

switch-agentflow scanned grade B 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 8d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

echo "project:$(test -f .claude/agentflow/state/mode.txt && cat .claude/agentflow/state/mode.txt || echo 'NOT_DEPLOYED')" && echo "global:$(test -f "$HOME/.claude/agentflow/state/mode.txt" && cat "$HOME/.claude/agentflow
.claude/skills/switch-agentflow/SKILL.md · 274 lines

How it starts

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

掌天瓶部署与模式管理

Step 0: 检测部署状态

用 Bash 检查两个位置(一条命令):

echo "project:$(test -f .claude/agentflow/state/mode.txt && cat .claude/agentflow/state/mode.txt || echo 'NOT_DEPLOYED')" && echo "global:$(test -f "$HOME/.claude/agentflow/state/mode.txt" && cat "$HOME/.claude/agentflow/state/mode.txt" || echo 'NOT_DEPLOYED')"

根据结果分流:

项目级 全局级 → 行为
已部署 已部署 双范围模式 → 切换/状态时询问操作哪个范围
已部署 未部署 仅项目 → 直接操作项目 mode.txt
未部署 已部署 仅全局 → 直接操作全局 mode.txt
未部署 未部署 未部署 → 进入部署流程(Step 1)

模式切换(已部署时)

单范围

  • 启用:写入 on 到对应 mode.txt
  • 关闭:写入 off 到对应 mode.txt
  • 状态:读取并报告

双范围

用 AskUserQuestion 询问:

掌天瓶在项目和全局都已部署。要操作哪个?
A. 当前项目
B. 全局(影响所有项目)
C. 两个都切换

状态查询

无论哪种情况,status 命令应显示所有已部署范围的状态:

掌天瓶状态:
- 项目级:on(.claude/agentflow/state/mode.txt)
- 全局级:off(~/.claude/agentflow/state/mode.txt)

部署流程(未部署时)

Step 1: 询问部署范围

用 AskUserQuestion 询问:

掌天瓶尚未部署。请选择部署范围:

A. 当前项目(推荐)
   - 仅对本项目生效
   - hooks 使用相对路径,可移植

B. 全局
   - 对所有项目生效
   - hooks 使用绝对路径(machine-specific)

C. 两者都部署
   - 各自独立的 mode.txt 控制

记录用户选择,后续步骤根据范围调整目标路径。

Step 2: 环境检查

用 Bash 执行:

# 1. jq 是否安装(必需)
command -v jq >/dev/null 2>&1 && echo "jq: OK" || echo "jq: MISSING — brew install jq"

# 2. 目标目录写权限
test -w "${TARGET_DIR}" && echo "write: OK" || echo "write: NO_PERMISSION"

其中 TARGET_DIR

  • 项目级 = 当前工作目录
  • 全局级 = $HOME

如果 jq 缺失,告知用户安装方法并等待确认后继续。 如果权限不足,报告并停止。

Step 3: 确认源码路径

自动检测:检查当前项目是否就是 agentflow 源码仓库:

# 检查标志文件
test -f AI-DEPLOY.md && test -f .claude/agentflow/agents.md && echo "IS_SOURCE_REPO" || echo "NOT_SOURCE_REPO"
  • 如果是源码仓库

    • 项目级部署:无需复制,文件已在位,只需初始化状态文件和配置 settings.json
    • 全局级部署:从当前项目复制到 $HOME/.claude/
  • 如果不是源码仓库

    • 用 AskUserQuestion 询问源码路径
    • 如果用户没有,引导克隆:git clone https://github.com/wangjialiang678/claude-omo-agentflow.git

Step 4: 复制文件

读取源码仓库中的 AI-DEPLOY.md,按其 Step 3-5 的文件清单执行复制。

关键区别

项目级 全局级
目标根目录 当前工作目录 $HOME
.claude/ 位置 <project>/.claude/ $HOME/.claude/
复制方式 cp $SOURCE/.claude/xxx .claude/xxx cp $SOURCE/.claude/xxx $HOME/.claude/xxx

Read the full file on GitHub · 274 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. 8d ago First seen · 274 lines · 115 tokens per session scan B 613a3a4cd127

Subscribe to this mod's changes

switch-agentflow is a skill published in the GitHub repository wangjialiang678/claude-omo-agentflow (2 stars, last pushed 6mo ago), licensed MIT. It adds 115 tokens to every session and 2,456 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

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…

microsoft/ai-agents-for-beginners · 200 tokens

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…

vercel/next.js · 95 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens