展示 HN:Athena Flow – 一款用于 Claude Code 的工作流运行时,带有终端用户界面
Athena Flow 是一个工作流运行时,通过其钩子系统封装了 Claude Code。它接收事件流,应用工作流和插件逻辑,将会话状态保存在 SQLite 中,并在一个交互式终端用户界面中呈现所有内容,配有实时事件流。
与其编写一次性的提示或单次脚本来自动化复杂的多步骤任务,不如一次性定义一个工作流——使用提示模板、循环、插件包和结构化的生命周期钩子——并在任何项目上运行它。
我发布的第一个工作流是 e2e-test-builder。它像人类一样导航您的应用,编写带有前置条件、步骤和预期结果的结构化测试用例规范,然后从中生成 Playwright 代码。浏览器层由我构建的一个名为 agent-web-interface 的独立 MCP 服务器处理,它生成语义页面快照,而不是原始 DOM——在与 Playwright MCP 的早期基准测试中,令牌减少了约 19%,任务完成速度提高了约 33%。
这个技术栈包含三个代码库:athena-flow 是运行时(钩子 -> UDS -> 事件管道 -> TUI),agent-web-interface 是用于高效令牌浏览器交互的 MCP 服务器,而 athena-workflow-marketplace 是工作流和插件的存放地,通过引用解析,例如 e2e-test-builder@lespaceman/athena-workflow-marketplace。
工作流是可组合的——一个工作流可以打包插件,并可以通过任何 Git 仓库进行共享。编写您自己的工作流只需一个 workflow.json 文件和一个提示文件。
目前仅支持 Claude Code,但 Codex 支持正在进行中。如果您已经拥有 Claude Code 订阅,则免费使用,无需单独的 API 密钥。采用 MIT 许可证。
文档: [https://athenaflow.in](https://athenaflow.in) GitHub: [https://github.com/lespaceman/athena-flow](https://github.com/lespaceman/athena-flow)
非常希望收到反馈,特别是来自那些基于 Claude Code 钩子构建或考虑在代理运行时之间实现工作流可移植性的人。
查看原文
Athena Flow is a workflow runtime that wraps Claude Code via its hooks system. It receives the event stream, applies workflow and plugin logic, persists session state in SQLite, and renders everything in an interactive terminal UI with a live event feed.<p>Instead of writing throwaway prompts or one-off scripts to automate complex multi-step tasks, you define a workflow once — with prompt templates, loops, plugin bundles, and structured lifecycle hooks — and run it against any project.<p>The first workflow I shipped is e2e-test-builder. It navigates your app like a human, writes structured test case specs with preconditions, steps, and expected outcomes, then generates Playwright code from them. The browser layer is handled by a separate MCP server I built called agent-web-interface, which produces semantic page snapshots instead of raw DOM — ~19% fewer tokens and ~33% faster task completion in early benchmarks against Playwright MCP.<p>The stack is three repos: athena-flow is the runtime (hooks -> UDS -> event pipeline -> TUI), agent-web-interface is the MCP server for token-efficient browser interaction, and athena-workflow-marketplace is where workflows and plugins live, resolved by ref like e2e-test-builder@lespaceman/athena-workflow-marketplace.<p>Workflows are composable — a workflow bundles plugins and can be shared via any Git repo. Writing your own is just a workflow.json and a prompt file.<p>Currently Claude Code only, but Codex support is in progress. Free if you already have a Claude Code subscription, no separate API key needed. MIT licensed.<p>Docs: <a href="https://athenaflow.in" rel="nofollow">https://athenaflow.in</a> GitHub: <a href="https://github.com/lespaceman/athena-flow" rel="nofollow">https://github.com/lespaceman/athena-flow</a><p>Would love feedback, especially from anyone building on Claude Code hooks or thinking about workflow portability across agent runtimes.