leeovery/portal/tree/main/.claude/skills/workflow-gates-rows
workflow-gates-rows
一个 Claude Code 插件,使用配对的 sent.json 记录和按对话保存的 rows.json,在转录中绘制 workflow-gates mod 发送的回答所在的行。
关于这个 mod
workflow-gates-rows 是一个独立的 Claude Code 插件,用来渲染 workflow-gates mod 提交的回答所在的转录行,并在旁边显示它回答的问题(例如:"Approve this task? → yes · Commit and continue to next task")。它之所以独立存在,是因为 Claude Code 会跳过插件自己为该插件提交的提示行注册的渲染 hooks。它会将每一行与 mod 写入对话目录的 sent.json 记录配对;无法配对的行只显示回答。只有绘制方式发生变化——模型看到的仍是 Claude Code 原本的提示框架,ctrl+o 可以显示完整消息。绘制出的行按消息 id 存储在 ~/.config/workflows/conversations/{session-id}/rows.json(或 WORKFLOWS_CONFIG_DIR 下),所以无论工作目录如何变化,回看和恢复的对话都能保持一致的渲染结果。Claude Code 删除转录后,这个目录也会被删除;但 session-end hook 从未观察到结束的工作阶段除外(例如安装插件的工作阶段或发生崩溃的工作阶段)。未运行 workflows,或没有 home directory / WORKFLOWS_CONFIG_DIR 的对话不会创建目录,并使用 Claude Code 的默认渲染。
安装
请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。
claude plugin marketplace add leeovery/portal claude plugin install workflow-gates-rows
原文 / README
workflow-gates-rows
A Claude Code mod that draws the transcript row of an answer the
workflow-gates mod sent as the question and the answer —
Approve this task? → yes · Commit and continue to next task — in place of
Claude Code's framing of a plugin's prompt. It is a plugin of its own because
Claude Code skips a plugin's own render hooks on the row of a prompt that
plugin submitted. It pairs a row with the record the mod leaves in the
conversation's own folder as sent.json as it sends; a row it cannot pair
shows the answer alone. It changes only the drawing: the model reads Claude
Code's framing, and ctrl+o shows the message in full.
Each line it draws is kept in that folder,
~/.config/workflows/conversations/{session-id}/rows.json (under
WORKFLOWS_CONFIG_DIR where that is set, beside the workflows' system
config), under the row's message id, so scrolling back and a resumed
conversation draw the row the same way, wherever the session's working
directory has moved. The folder goes once Claude Code has deleted the
conversation's transcript, and the lines with it, with one exception: a
conversation whose end the session-end hook never saw — the session that first
installed the hook, or one that crashed — keeps its folder. The mod names the
folder the way the workflows' engine does. A conversation that
does not run the workflows has no folder, nor does one in a process that names
neither a home directory nor WORKFLOWS_CONFIG_DIR: there the mod writes
nothing and draws the row as Claude Code does.
其他同名作品
- workflow-gates-rowsleeovery · ★ 2
