← 返回 Skills 市场
deadlining

fast-claude-code

作者 DeadLining · GitHub ↗ · v1.0.5 · MIT-0
darwinlinux ⚠ suspicious
347
总下载
1
收藏
0
当前安装
5
版本数
在 OpenClaw 中安装
/install fast-claude-code
功能描述
Claude Code 任务完成回调 Runtime。支持 Single / Interactive / Team 三种模式, ⚠️ 任务在后台 tmux 会话中运行,完成后通过 System Event 自动通知,无需轮询。 Use when: 需要运行 Claude Code 任务并在完成时获得通知。 NOT...
使用说明 (SKILL.md)

Fast Claude Code ⚡

Claude Code 任务完成自动通知 Runtime。任务在后台 tmux 会话中运行,完成后通过 System Event 自动回调。

⚠️ IMPORTANT: Entry Point

必须使用 bin/fast-claude-code.sh 作为入口!

  • ✅ 正确:bin/fast-claude-code.sh team --project "/path" --template "xxx" --task "xxx"
  • ❌ 错误:直接调用 bin/send-task.shmodes/team.sh
  • ❌ 错误:直接使用 tmux 命令

所有操作都通过 fast-claude-code.sh 分发,它会:

  1. 启动正确的 tmux 会话
  2. 安装完成检测机制
  3. 等待回调通知

Use When

  • 需要运行 Claude Code 任务并获得完成通知
  • 需要多 Agent 协作完成复杂任务(Team 模式)
  • 需要长时间运行的 Claude Code 会话(Interactive 模式)

NOT For

  • 简单的文件读写(直接用 read/write 工具)
  • 单次简单命令执行

Quick Start

# Single 模式 - 一次性任务
bin/fast-claude-code.sh single --task "任务描述" --project "/path/to/project"

# Interactive 模式 - 多轮对话
# - 开启
bin/fast-claude-code.sh interactive --project "/path" --label "session-name" --task "任务描述"
# - 后续(使用 send-task,不要直接用 tmux)
bin/fast-claude-code.sh send-task --session "session-name" --task "任务描述"

# Team 模式 - 多 Agent 协作
bin/fast-claude-code.sh team --project "/path" --template "模板" --task "任务描述"

Modes

Mode Use For Required Params
single 单文件重构、简单代码审查、一次性分析 --task, --project
interactive 长时运行任务、需要多轮对话、需要人工干预 --project, --label
team 复杂代码审查、架构决策、性能分析、多 Agent 协作 --project, --template, --task

Mode Decision Guide

用户任务需要 Claude Code?
├─ 是 → 任务类型?
│   ├─ 一次性(单文件/简单操作)→ Single
│   ├─ 需要多轮对话/长时间 → Interactive
│   └─ 需要多 Agent 协作/复杂分析 → Team
└─ 否 → 不使用此 skill

Team Templates

Template Use For Keywords
parallel-review 代码审查、安全检查、性能测试 审查、安全、性能、测试
competing-hypotheses 问题诊断、调试、找原因 调试、问题、原因、为什么
fullstack-feature 全栈功能开发 开发、实现、功能、全栈
architecture-decision 架构决策、技术选型 架构、选择、对比、决策
bottleneck-analysis 性能瓶颈分析 慢、性能、瓶颈、优化
inventory-classification 批量分类、批量分析 分析、分类、评估
simple-dialog 简单对话、单 Agent 问答 对话、问答、讨论

Parameters

Parameter Mode Description
--task Single/Team 任务描述
--project All 项目路径(必须)
--label Interactive 会话标识符
--template Team 模板名称
--permission-mode All auto(默认)或 plan
--session send-task 会话名
--callback All 回调类型(默认 openclaw)
--session-key All OpenClaw gateway session key(必须),指定回调投递的目标会话

⚠️ 必须从 session_status 获取 session-key!

执行前先运行 session_status 获取实际返回的 session key(例如 agent:main:main),不要硬编码 "current" 或其他猜测值,否则回调可能无法正确投递。

步骤:

  1. 调用 session_status 工具
  2. 从返回结果中复制实际的 Session: xxx
  3. 使用该值作为 --session-key 参数

Settings

Timeout(Team 模式)

复杂度 超时 场景
简单 默认 1h 单文件、单模块
中等 默认 1h 少量文件、标准任务
复杂 7200(2h) 多模块、跨功能
超复杂 10800(3h) 全项目、架构级
TEAM_TIMEOUT=7200 bin/fast-claude-code.sh team --project "/path" --template "xxx" --task "xxx"

环境变量

  • TEAM_TIMEOUT:Team 模式超时时间(秒)
  • CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1:Team 模式必须设置

Examples

# 重构单个文件
bin/fast-claude-code.sh single --task "重构 auth.js 的 JWT 逻辑" --project "/my/project"

# 安全审查(多视角)
bin/fast-claude-code.sh team --project "/my/project" --template "parallel-review" --task "审查安全性"

# 架构决策
bin/fast-claude-code.sh team --project "/my/project" --template "architecture-decision" --task "选择 PostgreSQL 还是 MongoDB"

# 复杂功能开发(设置超时)
TEAM_TIMEOUT=7200 bin/fast-claude-code.sh team --project "/my/project" --template "fullstack-feature" --task "实现用户认证系统"

# Interactive 发送后续任务
bin/fast-claude-code.sh send-task --session "session-name" --task "后续任务"

# Interactive 结束会话
bin/fast-claude-code.sh send-task --session "session-name" --task "exit session"

How It Works

Single 模式

  1. 在 tmux 中启动 Claude Code
  2. 执行单次任务
  3. 任务完成后通过 callback 通知

Interactive 模式

  1. 创建持久 tmux 会话
  2. 可通过 send-task 发送后续任务
  3. 每次任务完成都触发 callback

Team 模式

  1. 安装 Stop hook 监听完成事件
  2. 在 tmux 中启动 Team 模式
  3. 主 agent spawn 子 agents 协作
  4. 检测 CC_CALLBACK_DONE marker 确认真正完成
  5. 回调通知并清理资源

Notes

  • 任务在后台 tmux 会话中运行,完成后自动回调
  • Team 模式需要 CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
  • Interactive 模式下可用 send-task 发送后续任务
  • ⚠️ 建议不要在一个项目下并行执行多个 Team 任务

Callback

任务完成后自动回调,格式:

请总结以下 Claude Code 任务的执行结果,并回复用户:

=== 任务信息 ===
模式: model-name
状态: done
任务标识: session-id

=== 用户请求 ===
\x3CUSERINPUT>

=== 执行结果 ===
\x3COUTPUT>
安全使用建议
What to check before installing/using: - Review callback targets: examine what callback backend you'll use (openclaw, webhook, ntfy). webhook mode will POST JSON to any URL you supply or CC_WEBHOOK_URL—do not point this to untrusted endpoints. Prefer the platform's internal gateway (openclaw) if you want to avoid sending data to external servers. - Understand file writes and reads: team mode installs .claude/hooks/on-stop.sh and edits .claude/settings.json in your project. The on-stop hook enumerates files (up to a limit) and sends that list to the callback. If your repository contains sensitive files, run this only in a safe/test copy or inspect the hook first. - Avoid auto mode on sensitive projects: the scripts encourage --permission-mode auto / --dangerously-skip-permissions and even auto-accept permission prompts via tmux. This lets Claude run tools without interactive confirmation—do not use 'auto' in sensitive or production repositories. - Verify jq availability: team mode expects jq and will error out if missing even though metadata calls it 'optional'. Install jq or avoid team mode. - Obtain and protect session keys: you must supply a session-key to route callbacks. Treat that key as sensitive and do not hardcode it in public scripts. - Run in isolated environment first: test the skill in a disposable clone/container to observe exactly what it writes and sends before using it on real code. - Inspect the included hook (on-stop.sh) and callback scripts yourself: they are bundled with the skill and will be run on your filesystem—ensure you are comfortable with their logic and destinations. If you can't confirm the callback endpoints and are not prepared to run with the permission-bypass behavior, treat this skill as risky.
功能分析
Type: OpenClaw Skill Name: fast-claude-code Version: 1.0.5 The skill bundle automates Claude Code tasks using tmux and background monitoring, but it employs several high-risk patterns. Most notably, it uses the `--dangerously-skip-permissions` flag in `modes/single.sh`, `modes/interactive.sh`, and `modes/team.sh`, which allows the underlying AI agent to execute arbitrary shell commands without user confirmation. Furthermore, `modes/team.sh` dynamically modifies the local `.claude/settings.json` to install a custom shell hook (`.claude/hooks/on-stop.sh`) that executes upon task completion. While these behaviors are technically aligned with the stated goal of 'Fast' background automation, the combination of unmediated tool execution, modification of local configuration files, and the use of external callbacks (webhooks, ntfy) creates a significant security risk and a broad attack surface for potential prompt injection.
能力评估
Purpose & Capability
Name/description align with the implementation: scripts start Claude in tmux, monitor for a completion marker, and trigger callbacks. Required binaries (bash, claude, tmux) match the stated purpose. Minor inconsistency: SKILL.md metadata lists jq as optional but team.sh exits if jq is not present (team mode effectively requires jq).
Instruction Scope
The runtime instructions and scripts do more than just 'start Claude and notify': team mode writes .claude/hooks/on-stop.sh into the project, updates .claude/settings.json, captures tmux output, enumerates (and reports) up to 20 files from the project tree, and then triggers callbacks. Interactive modes force a persistent protocol that tells Claude to always emit CC_CALLBACK_DONE after every response. The scripts also attempt to auto-accept dangerous permission prompts by sending keystrokes into the tmux session. These behaviors expand the skill's access (file system, modifying repo metadata/hooks, automated permission bypass) beyond a minimal 'run-and-notify' surface and are worthy of caution.
Install Mechanism
No external download/install mechanism is used (instruction-only with bundled scripts). That reduces supply-chain risk. The skill does write files into the user's project directory at runtime (hooks and settings in .claude), which is expected for the feature but remains a write-to-disk action the user should be aware of.
Credentials
The skill does not declare required env vars, but it expects/uses several external endpoints and values: a required --session-key argument (OpenClaw gateway session key) and optional CC_WEBHOOK_URL / NTFY server for callbacks. Callbacks (openclaw/webhook/ntfy) cause data to be sent off-host; webhook.sh will POST JSON to whatever WEBHOOK_URL is provided (via arg or CC_WEBHOOK_URL). The on-stop hook aggregates and sends a project file listing (and could be extended to include content) to the configured callback—this is proportionate for a 'callback' tool but introduces exfiltration risk if the callback endpoint is untrusted. Also the code encourages setting CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 and uses --dangerously-skip-permissions (auto mode), which escalates what Claude is allowed to do. Finally, the jq dependency is treated inconsistently (optional in metadata, required by team.sh).
Persistence & Privilege
The skill does not request always:true and does not modify other skills or global agent settings. However, it writes and later removes hooks and settings within the project's .claude directory and creates persistent tmux sessions. It also attempts to auto-accept permission prompts, which increases the blast radius if used in 'auto' mode. The ability to create hooks that run on Claude stop and to enumerate project files is a persistent capability within the project scope—expected for the feature but privilege-worthy to acknowledge.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install fast-claude-code
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /fast-claude-code 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.5
- No changes detected in this version; documentation and functionality remain the same as previous release. - All usage instructions, parameters, and mode guidelines are unchanged. - There are no updates to features or requirements in v1.0.5.
v1.0.4
- No functional or documentation changes in this release. - Version bumped to 1.0.4; no file or content updates detected.
v1.0.3
fast-claude-code 1.0.3 适配OpenClaw最新版本
v1.0.1
fast-claude-code v1.0.1 - Migrated task runtime to run in background tmux sessions; automatic completion notifications now use System Event instead of polling. - Updated SKILL.md for new entry point requirements: all usage must go through bin/fast-claude-code.sh. - Enhanced dependency checks: tmux is now a required binary. - Task send functionality is now handled by modes/send-task.sh; direct mode scripts should not be called by users. - Removed bin/send-task.sh and README.md to reduce confusion and enforce correct usage. - Callback and completion handling logic and documentation refactored for clarity.
v1.0.0
Initial release of fast-claude-code. - Provides a runtime for Claude Code task completion callbacks, supporting Single, Interactive, and Team modes. - Automatically notifies when tasks are complete—no polling required. - Single mode for one-off tasks, Interactive mode for dialog/multi-step tasks, Team mode for multi-agent collaboration. - Includes detailed mode selection guidance, invocation examples, and return formats. - Supports dynamic template selection and timeout settings for Team mode. - Callback delivers all task results, with structured message format for easy integration. (Pending by DeadLining)
元数据
Slug fast-claude-code
版本 1.0.5
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 5
常见问题

fast-claude-code 是什么?

Claude Code 任务完成回调 Runtime。支持 Single / Interactive / Team 三种模式, ⚠️ 任务在后台 tmux 会话中运行,完成后通过 System Event 自动通知,无需轮询。 Use when: 需要运行 Claude Code 任务并在完成时获得通知。 NOT... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 347 次。

如何安装 fast-claude-code?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install fast-claude-code」即可一键安装,无需额外配置。

fast-claude-code 是免费的吗?

是的,fast-claude-code 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

fast-claude-code 支持哪些平台?

fast-claude-code 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(darwin, linux)。

谁开发了 fast-claude-code?

由 DeadLining(@deadlining)开发并维护,当前版本 v1.0.5。

💬 留言讨论