How this skill is triggered — by the user, by Claude, or both
Slash command
/agentflow:dispatch [loop] [<target_pane_id>] [<文档路径或内联任务>][loop] [<target_pane_id>] [<文档路径或内联任务>]haikuThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Dispatch design documents or task content to a specified tmux pane for execution. The receiving end will evaluate before executing.
Dispatch design documents or task content to a specified tmux pane for execution. The receiving end will evaluate before executing.
The loop flag is written into the message label, returned to the initiator via report, and used by gate-review to determine behavior.
Check $ARGUMENTS first; otherwise, parse from conversation context:
$ARGUMENTS contains both target_pane_id and document path/content -> execute directly$ARGUMENTS has only target_pane_id -> ask the user for the document path or task content$ARGUMENTS has only document path/content, no target_pane_id -> ask the user which pane to send to$ARGUMENTS is empty -> extract from conversation context; the user may say "send this to 7", where the document path or content comes from the existing conversationSend the design document or task content to the receiving end for execution.
After gate-review identifies issues, send fix instructions to the receiving end. In this case, the dispatch input is the list of problems and fix suggestions output by gate-review.
status from draft to doingAll scripts/ paths are relative to the directory containing this SKILL.md file. They must be resolved to absolute paths before execution:
SKILL_DIR="$(dirname "$(realpath "${BASH_SOURCE[0]}")")" # 或直接使用本文件所在目录的绝对路径
In subsequent commands, replace bare scripts/xxx.sh with "$SKILL_DIR/scripts/xxx.sh".
Use "$SKILL_DIR/scripts/generate_message.sh" to generate the formatted message. Do not manually assemble template content.
You must and only use this script to generate formatted messages. Manually assembling or writing message content is strictly prohibited -- no matter how simple, you must not bypass the script. This ensures consistent message formatting and prevents missing fields.
Parameters to prepare:
tool_name: the current AI tool name (e.g., Claude Code, Cursor, etc.; determine from environment or conversation context)desc: a one-sentence brief description of the task (generated by you)loop: if the user requests loop mode, add the --loop flagMSG_FILE=$(bash "$SKILL_DIR/scripts/generate_message.sh" \
--mode doc \
--doc-path "{文档路径}" \
--tool-name "{tool_name}" \
--desc "{简要描述}" \
[--loop])
First write the inline task content to a temporary file, then append the script-generated footer:
# 1. 将内联任务内容写入临时文件
MSG_FILE=$(mktemp /tmp/dispatch-inline-task.XXXXXX)
echo "{内联任务内容}" > "$MSG_FILE"
# 2. 生成尾部并追加
FOOTER_FILE=$(bash "$SKILL_DIR/scripts/generate_message.sh" \
--mode inline \
--tool-name "{tool_name}" \
--desc "{简要描述}" \
[--loop])
cat "$FOOTER_FILE" >> "$MSG_FILE"
rm "$FOOTER_FILE"
# 1. 将修复指令写入临时文件
MSG_FILE=$(mktemp /tmp/dispatch-fix-task.XXXXXX)
echo "{gate-review 输出的问题列表和修复建议}" > "$MSG_FILE"
# 2. 生成尾部并追加
FOOTER_FILE=$(bash "$SKILL_DIR/scripts/generate_message.sh" \
--mode fix \
--tool-name "{tool_name}" \
--desc "{简要描述}" \
--loop)
cat "$FOOTER_FILE" >> "$MSG_FILE"
rm "$FOOTER_FILE"
Note: Fix dispatch always includes --loop, because fix dispatch is only triggered in loop mode.
Send the generated message file to target_pane_id via the tmux-send skill:
/tmux-send {target_pane_id} {MSG_FILE}
npx claudepluginhub fingergohappy/ai-kit --plugin agentflowGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.