简介
Goose Recipes 是 Block 公司 Goose agent 的可复用 YAML 工作流定义。每个 recipe 把 prompt、可用工具、参数打成一个文件,用 goose run --recipe 一条命令跑。适合团队把重复的 agent 任务(代码审查、依赖审计、发布说明)标准化。兼容 Goose CLI 和 Goose Desktop。装机时间 2 分钟。
Recipe 长什么样
recipe.yaml 文件定义:
title: Code Review Agent
description: Reviews changes since main branch
prompt: |
Review all changes since main. Flag bugs, security issues,
and style violations. Format findings by severity.
extensions:
- name: developer
- name: github
parameters:
- key: branch
description: Branch to compare against
default: main跑 recipe
# 行内 prompt
goose run --text "Add unit tests for foo.py"
# 用 recipe 文件
goose run --recipe code-review.yaml --params branch=main
# 直接用官方 cookbook
goose run --recipe https://raw.githubusercontent.com/block/goose/main/cookbook/code-review.yaml为什么用 recipe 而不是裸 prompt
| 不用 recipe | 用 recipe |
|---|---|
| 每次重打 prompt | 按名字跑 |
| 工具清单每次都不一样 | 工具清单固定在文件里 |
| 没法共享 | 提交 YAML,分享 URL |
| 没参数 | --params key=value |
FAQ
Q: Goose Recipes 免费吗? A: 免费。Goose 本身 Apache-2.0 开源,Recipes 只是 YAML 文件,你只为执行时消耗的 LLM token 付费。
Q: 跟 slash 命令有啥区别? A: slash 命令每次现打 prompt,是交互式的。Recipe 是带参数和固定扩展清单的入库文件,专门用来跨机器、跨同事复现执行。
Q: 哪里能找到现成的 recipe?
A: Block 在 github.com/block/goose 仓库的 /cookbook 目录维护官方合集。每个 recipe 都带 title 和 description,用 --recipe URL 直接跑。