Designing Loops and Workflows for AI Agents
打开互动全文版(中英对照 + 朗读 + 问答)→来自 Claude Code 团队的 Tharic 解释了如何使用 /loop、/goal 和工作流让 Claude 长时间自主运行,并演示了视频编辑。
Tharic from the Claude Code team explains how to use /loop, /goal, and workflows to make Claude run autonomously for long periods, with a demo of video editing.
大家好。今天我非常激动地邀请到了来自 Claude Code 团队的 Tharic。我们期待已久。所以我请 Tharic 向我们展示如何设计循环和工作流来让 Claude 工作更长时间,以及他个人如何使用 Claude Code 和新的 Claude 标签。欢迎您。
Hey, everyone. Today I'm really excited to welcome Tharic from the Claude Code team. This has been a long time coming. So I'm going to ask Taric to show us how to design loops and workflows to get cloud to work longer and how he personally uses Claude Code and also the new cloud tag. Welcome sir.
嗨 Peter。谢谢邀请。我已经期待了一段时间。
Hey Peter. Yeah. Thanks for having me. I've been excited to join for a while.
好的。在演示之前,也许你可以从高层讲讲你和 Claude Code 团队是如何思考的——从你作为一个人提示智能体,到设计循环之类的东西让智能体自主工作。你们是怎么想的?
Yeah. All right. All right. So maybe before you demo anything, maybe you can talk about at a high level how you and a clock team think about how do you go from you being a person prompting the agents to kind of design loops and some of the stuff to get the agent to kind of work by itself. Like how do you guys think about this?
完全同意。我认为循环是一个相当通用的术语,指的就是让智能体以编排方式长时间工作、获得反馈的不同方式。所以我们有了 /loop、/goal 和工作流。这些都旨在让智能体长时间运行。/goal 帮助智能体记住自己的退出条件,只有在满足条件时才允许退出。/goal 非常适合复杂的任务,你需要确保最终完成,防止提前停止。它给智能体一个信号,让它坚持下去。如果你站在 Claude 的角度思考,有时你遇到复杂情况或不符合用户要求会提前停下来问该不该继续。/goal 是用户的一种方式,表示“我已经做了足够多的规范和说明,我理解问题空间,直接执行并填补空白”。工作流可能是最强大的形式——你可以创建子智能体来并行工作并验证工作。尤其对于非技术性工作,这可以很好地将一个不确定性任务大致分解为确定性任务。这就是我们对这些工具的思考。我知道我马上会做个小演示,但在此之前,在 Claude Code 团队里,
Totally. Yeah. So I think loops are a pretty general term for just different ways of having the agent get feedback or sort of work for long periods of time in an orchestrated way. And so we've got /loop, /goal, and workflows. These are all geared at trying to get the agent to run for long periods of time. /goal helps the agent remind itself what its exit condition is, and only allows it to exit once it's met. /goal is great for complicated tasks where you really need to make sure it's done at the end, and you want to prevent any stopping. It gives the agent a signal to power through. If you step into Claude's shoes, sometimes you might run into a complication and stop early. /goal is one way for the user to indicate that they've done enough specification and they understand the problem space, so just go execute and fill in any gaps. Workflows are perhaps the most powerful form, where you can spin up sub-agents to both do the work in parallel and verify the work. Especially for non-technical work, this can be a great way to take a non-deterministic task and break it down roughly into a deterministic task. That's how we think about some of these. And I know I'm going to do a quick demo, but before that, on the clock team,
你们团队自己是怎么用这些东西的?比如你会用它来让设计匹配,还是让某个数字上升,或者其他用途?
how do you guys use some of this stuff? Like do you do like a go make this match design or like go make this number go up or what do you use? Yeah.
是的,每个人做的都不太一样,取决于他们想干什么。比如 Jared 讲了很多关于用 Rust 重写 Bond 并使用工作流的事,他还会再详细讲。我认为只要有一个确定性的信号,比如延迟,/goal 就是一个很好的工具,可以让智能体以自动研究的方式探索。再说设计这件事,一个思考角度是智能体最开始能多好地理解你的设计。所以你可能要把它变成可验证的规范,比如如果是 Figma 文件,就用 Figma MCP,然后说 /goal 确保渲染的设计匹配 Figma MCP。这比截图容易多了。如果是截图,可能就需要更灵活的工作流——比如有一个评估标准,再加一个验证智能体之类的。所以非常取决于任务。
Yeah. I mean, everyone does different things, right? Based on what they're trying to do. I think like Jared's talked a lot about the bond rewrite in Rust and how he used workflows and he's going to be talking more about that. I think anytime you have a deterministic sort of signal like latency, /goal is a great thing to just sort of have the agent explore things in an auto research way. And yeah, let's say you're talking about design. One way you want to think about this is how well can the agent understand what your design is to begin with. And so you might want to turn it into a spec that it can verify, like if it's a Figma file, you use the Figma MCP and then you're like /goal make sure that the rendered design matches the Figma MCP. That's a lot easier than a screenshot. And so if you're a screenshot, maybe you want to do a workflow where it's more squishy, like there's a rubric that you're evaluating against and you have a verification agent and things like that. So very dependent on the task.
明白了。
Got it.
是的。
Yeah.
所以规划真的很重要,对吧?举个例子,我试过用 /goal 让它直接做一个很棒的游戏,结果完全跑偏了,就因为一行描述。
So basically the planning matters a lot, right? To give a because I tried to give it a go to like just build me an amazing game and then it kind of went off the rails because like you know just like one one line. So
是的,我的意思是细节很重要,你要想清楚自己想要什么,这需要很多工作。
yeah, I mean I think the details of like you know there's a lot to figure out in what you want, you know, there's a lot of work that goes into that. Yeah.
明白了。好的,那我们来具体化一下。你在 Twitter 上分享过一些很棒的用 Claude 做视频的内容,我想你有一个视频工作流想展示给我们,对吧?
Got it. Okay. So let's make this really concrete. Uh you've been sharing really awesome videos on Twitter about like using cloud to make the video and I think you have like a video workflow that you want to share with us, right?
没错。有人问过我这个,我觉得这是一个很好的演示,既展示视频编辑,也展示如何处理非技术性工作。所以在这次通话前 10 分钟,我录了一段快速视频。我在视频里说‘嘿,我在 Peter Yang 的播客上’,然后指向我希望出现覆盖层的地方,最后说‘淡出到黑色’。这就是我做的简单视频。我给 Claude 的提示是:有一个 Peter Yang 播客的仓库,里面有一个示例视频叫 Peter Yang recording。用 Whisper 转录。然后用 Reotion 创建一个 UI,显示逐字高亮的字幕和不同的覆盖层。并且 /goal,直到视频完全渲染才停止。这是一次性的一轮提示。它给我的结果就是:它转录了视频,显然它不知道我的名字是 Tharic,然后它覆盖了文字,创建了字幕和小覆盖层,现在正在淡出到黑色。
Yeah, exactly. So I've had a few people ask about this and I think this is a good sort of demo both for video editing but also just how to think about nontechnical work. So 10 minutes before I got on this call, I recorded a quick video and so this is me just making a video. Basically what I'm saying is like hey it's me I'm on the Peter Yang podcast. I'm going to point to where I want an overlay to show up and then I'm basically saying, 'Hey, fade to black.' So this is a quick video that I put together. And now the prompt I gave it is this: there's a repo for Peter Yang podcast, there's a sample video called Peter Yang recording. Transcribe it using whisper. Then use reotion to create a UI that shows the transcript with each individual word being highlighted and different overlays. And yeah, goal don't stop until the video is fully rendered. So this was just one shot, one prompt. And what it gave me is this. So it's transcribed it. It obviously doesn't know my name is Tharic, right? And it's overlaid the text, it's created the caption and the little overlay, and now it's going to fade to black.
哦,太棒了。所以你是把指令直接说出来的,对吧?
Oh, awesome. Okay. So you basically said out the instructions out loud, right?
我说出来的。没错,就是这样。
I said it out loud. Yeah. Exactly.
当然有很多方法可以做到这一点,但就像现在在这个目录里,我用 Whisper 转录了所有内容,它生成了反应素材。这是我所做的视频编辑工作流程的最基础开始,也是如何在 Claude Code 中做非技术工作的一个好信号。
And of course there are many ways that you can do this but it's like now in this directory, I transcribed everything right using Whisper, it created the reaction stuff. This is like the very basic start to the video editing workflow that I have, which is a good signal for how to do non-technical work in Claude Code.
所以你手动用提示做了这个,但后来你可能把它保存成了一个技能之类的,对吗?
So you kind of did this manually with the prompts stuff but then you probably saved it into a skill or something, right?
是的。所以我现在还没有技能。我认为我首先尝试做的一件事是在把它变成技能之前真正弄清楚我想要什么。那么这里的边缘情况是什么?我注意到我不得不提示它的是更好地弄清楚我的手在哪里,或者我指向哪里。甚至现在我对它出现的位置也不满意。你可以想象我可以发展的一个方向是追踪我的手指或追踪我的脸,然后给智能体提供更多元数据,这样它就可以做有趣的叠加效果。
Yeah. So right now I don't have a skill. I think one of the things I try and do first is really figure out what I want before I turn it into a skill. And so what are the edge cases here? One of the things I noticed that I had to prompt it towards is getting better at figuring out where my hand was, or where I was pointing towards. And even now I'm not thrilled with where this showed up. You could imagine that one direction I could take this in is to track my fingers or track my face and then give the agent more metadata so that it can then do interesting overlays.
本期节目由 Whisper Flow 赞助。Whisper Flow 每周至少为我节省 3 个小时,是迄今为止我最喜欢的 AI 应用之一。用语音向 AI 口述比打字快得多。你只需自然说话,它就能输出干净、可直接发送的文本。Whisper Flow 甚至会去除填充词并为你格式化句子。我用 Whisper Flow 做所有事情,包括起草通讯文章、编写产品规格、在 Slack 上回复等等。它适用于 Mac、Windows、iPhone 和 Android,在所有你喜欢的应用中都能使用。在 whisperflow.com 免费试用,并使用我的代码 peterwisperflow 获得 6 个月免费。那就是 Peter Whisperflow。现在,回到我们的节目。
This episode is brought to you by Whisper Flow. Whisper Flow saves me at least 3 hours a week and is one of my favorite AI apps by far. It's just so much faster to dictate to AI using your voice than to type. You just talk naturally and it outputs clean, ready to send text. Whisper Flow even removes filler words and formats your sentences for you. I use Whisper Flow for everything, including drafting newsletter posts, writing product specs, replying on Slack, and more. It works on Mac, Windows, iPhone, and Android across all of your favorite apps. Try it free at whisperflow.com and use my code peterwisperflow to get 6 months free. That's Peter Whisperflow. Now, back to our episode.
我想你还有另一个标签页,上面有一个计划之类的。那是为了视频技能吗?
I think you had another tab that had like a plan or something. Is that for the video skill?
是的。所以,我想聊聊我是如何走到这一步的。即便完成这个提示,我认为也花了很多规划和学习。当我们谈论计划时,我们常常谈论的是那些一次性的事情:你计划然后执行,仅此而已。但我认为计划更像是一个迭代的过程:探索、调查、找出你不知道的、你想要的。然后最终,这一切会自然而然地简化。所以这里有一个例子。在我们做的同时,我想做这样一件事:我将告诉它,好吧,我想更新这些叠加层的 UI,并且我想用 Peter Yang 的风格。这是他的博客。创建一个 HTML 工件用于探索叠加层和字幕的不同设计变体。对我来说,这是一个例子。这也是规划,因为我正在尝试弄清楚我在这里想要什么。所以这更像是一种探索。我做的一件重要事情是给它一个参考:当我给它你的网站时,它现在可以获取 HTML 并开始做这件事。所以这就像一个计划,在我处理规划时做的其他事情的同时运行。其中之一是:转录是如何工作的?知道这个实际上非常重要,因为它影响了很多边缘情况。这个转录使用了 Whisper,Claude Code 拼凑了这个解释器,说实话非常棒。对我来说重要的是事情可能出错的方式。这是我在计划中提示的:我想让它向我解释 Whisper,并了解边缘情况是什么。其中一点是静音可能变成“感谢观看”,或者一个词可能被分割成两段。它没有说话人识别。所以有很多不同的边缘情况,这些帮助我建立了使用 Whisper 的信心。
Yeah. So, I'd love to talk a little bit about how I got here. Even to do this prompt I think it took a bunch of planning and learning to get here. When we talk about plans we often are talking about things where it's just one shot: you plan and then you do something and that's it. But I think planning is more of this iterative process of exploring, investigating, finding out what you don't know, what you want. And then together in the end that sort of simplifies itself. So here's an example. While we do this, I would love to do something where I'm going to give it: okay, I want to update the UI of these overlays, and I want to use Peter Yang's style. Here's his blog. Create an HTML artifact for exploring different designs for the overlays and captions design variations. Okay, this is an example to me. This is also planning, because what I'm doing is trying to figure out what I want here. And so it's more of an exploration. One of the important things I'm doing is giving it a reference: when I give it your website, it can now fetch the HTML and start doing this. So this is sort of like a plan that will run while I sort of go over the other kinds of things I do when I'm planning. One of them is: how does transcription work? This is actually pretty important to know because it informs a lot of the edge cases. This transcription uses Whisper and Claude Code sort of put this explainer together which is honestly kind of amazing. The important thing for me is the ways things can go wrong. And this is something I prompted in the plan: I want to explain Whisper to me and understand what the edge cases are. One of the things that says silence can become 'thanks for watching', or a word can be split into two chunks. It doesn't have speaker recognition. So there are a bunch of different edge cases here which helped me build a confidence in using Whisper.
嗯,但是拥有这些边缘情况并提前知道大致的限制,真的帮助我避免了这种情况:我在使用 Whisper 时构建了复杂的工作流程,然后才意识到有些地方出了问题,而且我好像没有这些未知的未知。这个案例有点像我在做规划,但实际上是我在发现我的未知。我认为这可以有多种形式:可以是学习,可以是技术规格,可以是模型和探索。我开始觉得“计划”这个词现在可能太宽泛了。
Um but having these edge cases and knowing sort of what the limits are upfront really helped me avoid the case where I build this complicated workflow during Whisper and then I realized there are things going wrong and I sort of didn't have these unknown unknowns. This case is sort of like me doing planning, but really it's me discovering my unknowns. I think that can take a lot of different shapes: it can be learning, it can be technical specs, it can be mock-ups and exploration. I'm starting to feel like the word 'plan' is maybe too broad right now.
这更像是探索和理解你基本上想做什么吗?
Is it more like exploration and understanding like what you're trying to do basically?
是的。我喜欢说“消除你的未知”。每当你有一个任务,就有很多你不知道的东西:要么你不知道事情如何运作,要么你不知道你想要什么,而且这个过程非常迭代。并不是一次全部写下来然后执行。有很多步骤和不同的循环。
Yeah. I like to say 'getting rid of your unknowns'. Whenever you have a task, there's a lot that you don't know either you don't know how things work or what you want, and it's very very iterative. It's not just writing it all down once and then implement it. There are many steps and different passes.
它几乎总是有很多你不知道的东西:要么你不知道事情如何运作,要么你不知道你想要什么,而且非常迭代,所以不仅仅是你一次性写下来然后实施。我认为有很多步骤和不同的循环。
It kind of almost always there's a lot that you don't know either you don't know how things work or what you want, and it's very very iterative, and so it's not just like you write it all down once and then you implement it. I think there's like many steps and different passes.
而且老兄,这真是个漂亮的计划。你有类似 claw 模板之类的东西吗?它还有图片。
And dude, this is like a beautiful plan, man. Like, do you have like is this like the claw template or something? It has images.
这是用了前端设计插件。这里还有更丑的计划。我做过这种反应计划。
This is using the front-end design plugin. There are uglier plans here. I've gotten this like reaction plan.
我认为它的设计并不那么重要,重要的是你确实确保它是你会真正阅读的东西,并理解其中的一部分,但不是全部,但有重要部分在里面。我看到的一个失败模式是人们对计划和解释器仍然有点走马观花。
I think the design of it doesn't matter so much as you really just want to make sure it's something that you really do read, and get a sense of like not all of it, but there's important parts in it. One failure mode I see is that people still sort of glaze over the plans and explainers.
是的,它变得真的因为 AI 可以写所有这些疯狂的 markdown 文件,而且它们通常相当长,然后某个时候我就变懒了。我就会说:“好吧,你就做吧。”
Yeah, it becomes really because like AI can write all these crazy markdown files and they're usually pretty long and then at some point I just get lazy. I'm like, 'Okay, you know, just just do it.'
是的。没错。我认为这就是我们所有人都会遇到的情况。提示框绝对可以变成懒惰按钮,你只会说:“嘿,做就是了。”
Yeah. Exactly. I think that's like the thing that happens to all of us. The prompt box can definitely just be a lazy button, where you're just like, 'Hey, just do the thing.'
嗯,但通常你会为此付出代价,对吧?因为如果你想认真做一件事,每一步都偷懒,最终反而会更耗时,可能成本也更高。所以这就是一个迭代的过程。你先试探一下,然后多学一点,再要求制定另一个计划,最终你才会有可以分享的计划。
Um, but usually you end up paying for that, right? Because if you're trying to do something serious and you're taking the lazy step at each way, it'll end up taking longer, maybe costing longer too. So it's kind of this iterative process. So you ask about the whisper and then you kind of learn a little bit more and then you ask to make another plan and at some point you have a plan that you can share.
没错。是的。
Exactly. Yeah.
是的。所以我在视频识别方面做了很多研究。我深入研究了不同的视频算法,比如视频分割。我想在主体后放置文字,于是进行了探索和学习。最终发现没有足够可靠的东西可以用。但这就是一个迭代过程:弄清楚我想要什么,以及在实现之前什么是可行的。所以这个覆盖层可能快完成了,我们很快就能看到。
Yeah. So I did a lot of research for video recognition stuff. I did a lot of research into how different video algorithms worked. Like I did one on video segmentation. I wanted to put text behind a subject and so I explored and learned more about it. I ended up finding that there wasn't something reliable enough for me to use. But there's just a lot of this iterative process of finding out what I want, you know, and what is possible before I can do it. So it looks like this overlay is maybe almost done. We'll see it soon.
那团队方面呢?你让团队其他成员审查 HTML 了吗?是用 Markdown 吗?
And how about on the team? So have you got the rest of the team to review HTML? Is that a markdown?
是的,当然。每个人都不一样,但 HTML 制品——我们推出了制品功能。目前仅限团队版和企业版,但希望很快会推出 Maxin Pro 版。现在我们公司内部就是用这种方式共享东西的:让 Claude 制作一个制品,可以是计划、PR、状态报告、事故报告等等。没错,我们就是这么做的。
Yeah, for sure. Everyone is different, but HTML artifacts — I mean we launched artifacts. Currently it's only on teams and enterprise, but hopefully coming to Maxin Pro. And that's how we share things now at the company. We ask Claude to make an artifact and this can be a plan, a PR, a status report, an incident report, things like that. Yeah, it's definitely how we do it.
好了,看看它生成了什么。
All right, let's see what it generated here.
好,开始吧。假设我们打开覆盖层样式 HTML。好了,这是它生成的一些选项。可能更偏向 Stack Overflow 或 Substack 的风格,而不是你的品牌。
Yeah, let's do it. So let's say open overlay style HTML. Okay. So here are some of the options it made. It's probably more indexed on the Stack Overflow or the Substack brand versus your brand.
是的。因为我没有品牌。
Yeah. Because I don't have a brand.
不,我觉得你有。你用了红白配色。我们可以在此基础上迭代。但这些设计之间差异很大。我喜欢的一种规划方式就是做这种探索,尤其因为我不是设计师。所以只有看到才知道好不好。
Yeah, I think you do. You've got the red and white. We can probably iterate on it there. But this is one of those things where there's quite a lot of difference between these designs. One of the ways I like to plan is to do this exploration, especially because I'm not a designer. So I only know it when I see it.
明白。总结一下关于计划的讨论,我写产品规格已经十年了,通常包括要解决的问题、解决方案、目标等等。但我觉得现在这些内容有一部分是由智能体阅读的。我觉得规格的不同部分需要改变,也许产品规格和技术规格应该合二为一。你们团队是怎么做的?有没有一部分给人看,一部分给智能体看?你是怎么想的?
Got it. Just to wrap up the plan conversation, I've been writing product specs for like 10 years and they usually have what's the problem we're solving, what's the solution, what's the goal, so on and so forth. But I feel like part of this stuff is read by agents now. And I feel like the different sections of your spec need to change, or maybe the product spec and technical spec is one thing. How do you guys do it on the team? Do you have one section for the humans to read and one section for the agents to read? Or how do you think about it?
好问题。我觉得它们紧密相连。规格甚至可以随着规划演进。我在这里展示的一点是,当运行某些东西时,模型可能会发现实现过程中模型或你未预料到的问题。所以我不认为规格只在开始时做。你先有人类需求,然后智能体进行一些技术探索。它返回结果,你可能做一些原型和解释说明,试图理解你的未知因素。你完善它,再交给智能体。它可能开始实现。我要求它在过程中记录实现备注,以便发现我们未预期的事情。有了这些,我们实际上可以根据情况重新制定规格。所以这更像是一个反复迭代的过程,而不是一次性地将规格交给实现。
Good question. I think it is very tied together. A spec can evolve even towards planning. One thing I think I'm showing here is that sometimes when you run something, the model can find things it didn't anticipate or you didn't anticipate when implementing. So I don't think of specing just happening at the start. You start with the human request, then the agent does some technical exploration. It comes back, maybe you do some mockups, some explainers trying to understand your unknowns. You refine that. You give it to the agent again. It might start implementing. I ask it to keep implementation notes as it goes so that it finds out things we weren't expecting. Once we have that, we can actually respec if we need to, depending on how things go. So it's much less like one handoff of spec to implementation and more this back and forth process.
是的。因为现在构建成本很低。所以你可以让它先构建最简单的版本,可能会有很多 bug 和问题,然后不断迭代,对吧?
Yeah. Because I guess it's pretty cheap to build now. So you can just maybe ask it to build the simplest version of this, and there's probably a lot of bugs and issues, and you can keep iterating, right?
对,没错。或者说原型版本。我就是这样看待这些覆盖层的。它们是设计的原型。如果我们喜欢,就可以做更贵的版本,用 React 而非 HTML。那意味着你必须重新渲染视频并进行所有代码修改。所以关键是尽可能用最小的步骤来验证概念,进一步验证规格。
Yeah, exactly. Or the prototype version. That's how I think about these overlays. These are prototypes of the design. If we like it, then we can do the more expensive version, which is instead of HTML, we can do it in React. That means you have to rerender the video and do all the code changes. So it's about the smallest step you can take to prove out the concept, to prove out the spec more.
而且我喜欢它的实现方式。下次你开始新部分时,它可以直接引用 HTML,对吧?就像一份活文档。
And I love how it takes implementation. So the next time you start a new section, it can just refer to the HTML, right? It's like a living document.
对,没错。
Yeah. Exactly.
你现在的工作有多大比例是通过 Slack 上的 Claude 完成的,而不是在终端或云应用中?
What percent of your work now is done through Claude on Slack versus in the terminal or the cloud app?
对于我来说,趋势是很多并行工作都在 Slack 上的 Claude 中进行,所以任何多云计算通常都在 Slack 上的 Claude 里进行,除非有理由需要在本地运行。我们花了很多时间来确保我们的环境可以远程运行。所以多云计算都在 Slack 上的 Claude 里:初步探索、PR 规格、试图理解某些东西。然后当我进入一个专注的任务时,就在 Claude Code 中进行,更多是反复迭代。我就是这样用的,但我觉得公司里每个人都有不同的方法和组合。
I think the way for me it's trending is that there's a lot of parallel stuff happening in Claude on Slack, so any multi-clouding is often happening in Claude on Slack unless there's a reason why it needs to happen locally. One of the things we spent a lot of time on is making sure our environment can run remotely. So multi-clouding is happening in Claude on Slack: initial explorations, PR specs, trying to understand something. Then once I get into one thing I'm focusing on, that's happening in Claude Code, and it's more back and forth iterative. So that's how I'm using it, but I think everyone at the company has different approaches and mixes.
你说那个的时候,你说的 multicloud 是什么意思?
And when you say that, what do you mean by multicloud?
哦,是的,它的意思就像是我同时有多个任务,特别是当我试图引入其他人的时候。例如,我有一个 PR 想要合并,我会做的一件事就是让它盯着 PR、修复测试,然后标记一个审阅者。审阅者会在同一个 Slack 频道里被标记,我们就能在那里说话。但一般来说,multicloud 就像是任何后台工作。以前我在 Claude Code 里会有五朵不同的“云”,但现在主要是有一个活跃的 Claude Code 会话和一堆 Cloud Tag 会话。
Oh yeah, it means like if I have multiple tasks happening at once, especially if I'm trying to involve someone else. For example, if I have a PR that I'm trying to get merged, one thing I'll do is ask it to babysit the PR, fix tests, and then tag a reviewer. The reviewer will get tagged in the same Slack channel and we'll be able to talk there. But generally, multicloud is like any background work. Before, I had like five different clouds in my Claude Code, but now it's mostly one active Claude Code session and a bunch of Cloud Tag sessions.
哦,有意思。好的。那么你通过 Slack 私信以及共享团队频道跟 Cloud Tag 交流,我猜?
Oh interesting. Okay. And so you talk to Cloud Tag both through DMs on Slack and also in shared team channels I'm guessing?
是的,主要在 Slack 里。既在我的私有 Thariq Claude Slack 频道(我在那里做大部分工作),也有团队频道比如反馈、特定项目的工程频道。这是我们看到的一个常见模式。
Yeah, primarily in Slack. Both in my private Thariq Claude Slack channel where I do most of my work, and then we have team channels like feedback, project-specific engineering channels as well. That's a common pattern we see.
是的,这说得通。我觉得目前这些编码应用主要是单人体验——你通过不同的线程与智能体对话。如果你想想,Cloud 应用实际上看起来很像 Slack,有一堆线程,就像 Slack 有一堆频道。所以我认为,Slack 现在就成了多人 Cloud 体验,对吧?因为每个人都已经在那里了。
Yeah, I guess that makes sense. I think these coding apps right now are primarily single player experiences—you're kind of talking to the agents through different threads. And if you think about it, the Cloud app actually looks similar to Slack with a bunch of threads, just like Slack has a bunch of channels. So I guess the idea is that Slack is now the multiplayer Cloud experience, right? Because everyone's already there.
是的。我认为这就是起点。最终,我想 Cloud 会成为一个主动的智能体,在你所在的地方与你相遇。Slack 是 Anthropic 现在的所在地,这是一种非常自然的探索方式。而且它在编码方面出奇地好——有些人几乎完全在 Cloud Tag 里做编码。
Yeah. I think this is where it's starting. Ultimately, I think Cloud will be a proactive agent that meets you where you are. Slack is where Anthropic is right now, and it's a very natural way to explore. And it's surprisingly good at coding—some people do almost all their coding in Cloud Tag.
但好吧,也许这是个愚蠢的问题。在 Cloud Tag 里如何轻松触发 scales 之类的?在 Claude Code 里很容易,但如果我在 Cloud Tag 里,我只要标记 Cloud 然后斜杠 scale 吗?
But okay, maybe this is a dumb question. How do you easily trigger scales and stuff in Cloud Tag? In Claude Code it's easy, but if I'm in Cloud Tag, do I just tag Cloud and slash the scale or how does it work?
是的,你直接告诉它用 scale 就行。我们还在围绕这个做用户体验迭代。
Yeah, you can just tell it to use the scale. There's still UX iteration we're working on around all of this.
你是否觉得未来智能体就像另一个员工?你给过我一个关于人机交互的演讲,我觉得未来就像入职一个员工——你可以通过 Slack 跟它说话,给它打电话等等。
Do you feel like the future is that the agent is just like another employee? You gave me a talk on human-agent interaction, and I feel like the future is just onboarding an agent as an employee—you can talk to it through Slack, give it a phone call, etc.
是的,这是个好问题。我认为这些比喻有时有帮助,但也有限制。我们谈身份时,一个特点是 Cloud Tag 里每个智能体、每个频道都有自己的记忆。那是一种选择。你也可以想象多个你标记的 Cloud,每个有不同 Slack 身份。想到一个有持久性和记忆的智能体是有帮助的,但它们在某些方面也与同事不同。它们是主动的,有记忆,有身份。这是 Claude Code 的进化,我想看看模型会把我们带向哪里,而不是把它放进一个盒子里。
Yeah, it's a good question. I think these metaphors can sometimes be helpful but also limiting. One of the things when we talk about identity is that in Cloud Tag, every agent, every channel has its own memory. That's one choice. You could also imagine multiple Clouds you tag, each with a different Slack identity. It's helpful to think of an agent that has persistence and memory, but they're also different from coworkers in some ways. They're proactive, have memory, have identity. It's an evolution of Claude Code, and I think we want to see where the models will take us rather than putting it in a box.
是的,这点很好。它的记忆力肯定比任何人类好得多。
Yeah, that's a good point. It definitely has a lot better memory than any human.
有时更好有时更差。它是不均衡的,你知道吧?
Better and worse sometimes. It's spiky, you know?
是的,有道理。
Yeah, makes sense.
让我给你看看我的 Claude 设置。我建了一个播客制作技能。它接受我做的采访的转录——我采访了你的同事 Jess——然后生成一堆东西:缩略图、剪辑等。我只要粘贴转录,它就开始生成标题党风格的 YouTube 缩略图。我给例子让它保持正轨。但这个技能在尝试做很多事情,所以我好奇你有没有反馈。
Let me show you my Claude setup. I built this podcast production skill. It takes a transcript of an interview I did—I interviewed your colleague Jess—and it generates a bunch of stuff: thumbnails, clips, etc. I just paste a transcript and it starts generating clickbaity YouTube thumbnails. I give it examples to keep it on track. But this skill is trying to do a lot of things, so I'm curious if you have any feedback.
这很酷。我能看看它产出什么吗,比如剪辑?
This is cool. Can I see what it produces, like the clips?
哦,它产出什么?是的,有些是纯文本——比如新闻稿、要点可以直接复制到 YouTube。然后我还有一个技能叫视频贴子技能,和你的类似。它用 YouTube 视频,提取内容,然后给出剪辑的点子。
Oh, what it produces? Yeah, some of it is pure text—like a news post, takeaways to copy into YouTube. Then I have another skill called the video post skill, similar to yours. It takes a YouTube video, extracts it, and gives me ideas for clips.
它能直接做剪辑吗?
Does it do the clips as well?
是的,它真的会做。我说“做两个”,它就用一堆随机工具——可能是 ffmpeg 之类——然后做出带字幕的视频。
Yes, it actually does. I say "do two" and it uses a bunch of random stuff—probably ffmpeg and such—and it makes a video with captions.
是的,太棒了。所以,它还不完美。
Yeah, that's awesome. So yeah, it's not perfect though.
是的。我的意思是,这很好。它有多符合你的需求?更好的样子是怎样的?我希望它能加入 B 卷和叠加画面,就像你展示给我的那样,而且我希望它能足够聪明,从网上拉取像是 Claude 标志之类的东西。
Yeah. I mean, this is great. How well does it match what you want? What would it look like to be better? I wish it could add B-rolls and overlays like you showed me, and I wish it was smart enough to pull in things like the Claude logo from online.
是的。
Yeah.
那么,我应该直接让 Claude Code 做所有这些东西吗?
So, should I just tell Claude Code to do all this stuff?
我认为你可以。是的。
I think you can. Yeah.
你是在一个持久的仓库里工作,还是在一个有很多脚本的工作区里?有时候一个技能可以是如何创建那个工作区的指令,对吧?
Are you working in one persistent repo or a workspace with a lot of scripts? Sometimes a skill can be instructions on how to create that workspace, right?
我所有的技能都在用户级别,有一个个人 OS 文件夹存放所有输出之类的东西。
I have all my skills at the user level, and there's this personal OS folder that has all the output and stuff.
你用过像 Gemini 或 OpenAI 这样的图像生成 API 来做缩略图吗?
Do you ever use an image gen API like Gemini or OpenAI for thumbnails?
我发现它在改变我的脸时效果很差。比如,如果我有一张微笑的照片,需要改成惊讶的表情,它会让我看起来超级丑。但在改变背景或文字方面,它表现不错。
I found it really bad at changing my face. For example, if I have a smiling photo and I need it to make a shocked face, it makes me look super ugly. But it's pretty good at changing the background or text.
真有意思。但 Claude 擅长使用其他工具,所以你可以给它 Gemini 或 OpenAI 的 API,让它查看生成的脸部并交互式调整。
That's funny. But Claude is good at using other tools, so you could give it the Gemini or OpenAI APIs and ask it to look at the generated faces and tweak them interactively.
对,我基本上是把一堆技能串起来:准备这个,然后做缩略图,等等等等。
Yeah, I basically chain a bunch of skills together: prepare this thing, then use a thumbnail, and so on.
我现在会用技能了,但对动态工作流一无所知。你会如何用工作流来做类似生成多个短视频的事情?
I know how to use skills now, but I have no clue about dynamic workflows. How would you use a workflow for something like generating multiple shorts?
工作流非常适合这种场景。主智能体决定为片段的哪五个部分创建短视频,然后工作流为每个部分派生子智能体。你给它一个评分标准,说明好的片段是什么样的,每个子智能体就据此验证。这样每个片段获得最大算力,而不是在一个上下文中分散精力到多个片段上。
Workflows are great for that. The main agent decides which five areas of the clip to create a short for, then the workflow spins off a sub-agent for each one. You give it a rubric for what a good clip looks like, and each sub-agent verifies against it. That way each clip gets maximum compute, rather than splitting effort across multiple clips in one context.
那么要创建一个工作流,我直接告诉它做个工作流就行?比如‘在这里创建 10 个片段,使用工作流,这是评分标准’?
And to create a workflow, do I just tell it to make a workflow? Like, 'Create 10 clips here, use a workflow, here's my rubric'?
是的。你还可以把技能和工作流打包在一起。工作流就是一个 JS 文件,你把它保存到技能中,就可以重复使用了。
Yes. You can also package a skill with the workflow. The workflow is just a JS file, and you save it into the skill to make it reusable.
问个傻问题:这种工作流方法相对于只用技能的主要优势在于它可以派生子智能体并保持上下文干净吗?
Dumb question: the main advantage of this workflow approach over just using a skill is that it can spawn sub-agents and keep context clean?
对,上下文是一方面。另一方面是懒惰和验证。有了评分标准和独立的验证智能体,你可以避免自我引用偏差——模型在验证自己的输出时会更加宽容。所以你需要一个独立的智能体做工作,另一个进行验证。
Yes, context is one thing. Another is laziness and verification. With a rubric and a separate verification agent, you avoid self-referential bias—the model is more lenient when verifying its own outputs. So you want a separate agent doing the work and another verifying.
所以是三个独立的实例:一个协调,一个执行工作,一个验证。它们有不同的上下文窗口,偏差更小。
So three separate instances: one coordinating, one doing the work, one verifying. They have different context windows and less bias.
完全正确。而且它们都会使用更多算力,不太可能提前停止。思考更深入。
Exactly. And they all use more compute, less likely to stop early. They think more.
太棒了。问个宏观问题:你主要是在终端还是桌面应用中使用 Claude?
Awesome. High-level question: do you mostly use Claude in the terminal or the desktop app?
我混合使用终端和桌面。取决于我最需要测试什么——我们称之为‘ant fooding’(为蚂蚁投食,指多尝试)。
I mix terminal and desktop. Depending on what I need to test most—we call it 'ant fooding'.
有没有保持自己上下文窗口整洁的技巧?我有时感觉精疲力竭,同时进行五个线程。比连续开会还糟糕。
Any tips for keeping your own context window clean? I feel exhausted sometimes with five threads going at once. It's worse than back-to-back meetings.
好问题。我今年的目标是效率更高但工作更少。我觉得我们大家都应该在这方面推动自己。
Good question. My goal this year is to be more productive but work less. I think we should all push ourselves on that.
我觉得我们努力做到的一件事是让自己专注于一个项目。我发现最耗费时间的是当我在多任务处理或者懒散地输入提示词时浪费了时间。多任务处理有一个最佳平衡点,取决于你是谁、在做什么,但对我而言,我倾向于只专注于一个任务。
I think one thing we try and do is to have one project that I'm really focusing on. I find that the thing that costs me the most time is when I'm multitasking or when I do a lazy prompt and then I've wasted that time. There's an optimal amount of multitasking depending on who you are and what you're doing, but for me, I tend to have one task where I'm really focusing the most.
好的。那也许 AI 智能体来处理其余的事情,但为什么不呢?
Okay. So maybe like the AI agents take care of the rest or something, but like why not?
是的。甚至为你自己设定优先级,你明白我的意思吗?我觉得那会是一个很好的角度。
Yeah. Or even prioritization for yourself, you know what I mean? I think that can be a good angle.
有道理。
Makes sense.
而且我确实有担忧。比如我担心当智能体非常努力地持续工作时,就像……
And I do have concerns. Like I worry that when the agents work pretty hard and keep going, and like…
嗯。
Yeah.
也许这是我的问题:我实际上并没有仔细阅读它生成的所有内容。所以我担心整个仓库会在某个时候变成垃圾……你有什么定期清理这些东西的例程或工作吗?
Maybe this is my problem: I don't actually read everything that it produces carefully. So then I worry that the whole repo will just turn to slop at some point if I don't… Like do you have any routines or jobs that clean this stuff up periodically?
嗯。显然我们有像 Boris 推出的 Simplify 这样的工具,可以简化仓库。我认为这也取决于你用它做什么。比如当你用它来生成输出,比如视频输出时,代码质量也许没那么重要,而且智能体非常执着,它们会搞定问题。但我发现组织整理更多是为了我自己,让我对工作区感觉更好。如果我只关心输出,你总是可以要求它简化或整理。
Yeah. So obviously we have things like Simplify which Boris put out that sort of simplifies the repo. I think it depends on what you're using it for as well. Like when you're using it for outputs, like video outputs, those are pretty… maybe the quality of the code matters less, and the agents are very persistent and they'll figure it out. But I find organization is often more for me than the agent, to make me feel better about the workspace. If I'm only caring about the outputs, you can always just ask it to simplify or organize.
好的,明白了。那你会尽量保持上下文窗口干净吗?比如尽量不开启一堆 MCP,或者 Claude MD 非常长……你会优化这个吗?
Okay, got it. And do you try to minimize and keep the context window clean? Like do you try not to have a bunch of MCPs on, or Claude MD has a super long… do you try to optimize that?
是的,我认为随着模型变得更智能,我们注意到的一件事是将 Claude Code 系统提示词缩减了 80%。原因是模型越智能,需要的指导、约束和示例就越少。我们过去很多系统提示词都是这样的:“这是批处理工具,这里有五个示例,绝不要在这些情况下使用。”现在模型已经足够对齐,它们知道……示例几乎成了约束。如果移除示例,它反而能更自由地格式。约束也会限制它,因为当你说了“绝不”时,你真正的意思是“大部分时间不要这样做”。如果换成给出理由,效果会更好。所以总的来说,你要精简上下文。我觉得现在的 Claude MD 可能太长了,你可能需要不断缩短它。很多技能也可能太长了。MCP 则取决于具体的 MCP。有些可能会占用大量上下文,但 MCP 团队已经通过工具搜索等方式进行了优化。但毫无疑问,Claude 经常需要更大的运行空间。
Yeah, I think that one of the things we've noticed especially as the models have gotten smarter is that we cut down the Claude Code system prompt by 80%. The reason is that as the models have gotten smarter, they need less direction, fewer constraints, and fewer examples. A lot of our system prompt would be like 'here is the batch tool, here are five examples, never do it in these cases.' And the models are now aligned enough that they know… the examples are almost constraining it. If you remove the examples, it can be more free format. Constraints can also constrain it because when you say 'never' you really mean 'most of the time don't do this.' If you give it the reason instead, that can be more effective. So all this to say, you want to trim your context. I feel like Claude MDs are probably too long right now and you probably want to shorten them more and more. Probably a lot of skills are too long. MCPs depend on the MCP. Some can take up a lot of context, but the MCP team has put work into making it better with tool search. But definitely, Claude needs more room to run oftentimes.
那么你会不会,比如写推文时,不再说“确保不超过 280 个字符、不要这样做”,而是给它更像原则的指导?那你如何提示它呢?是不是更像……
Then do you, instead of saying, for example, writing a Twitter post, instead of saying 'make sure it's 280 characters or less and do not do this,' do you give it more like principles to follow? How do you prompt it then? Is it more like…
是的,我认为写推文是一个很好的例子,你可以给它提供一些关于你自己的上下文。比如说“我工作在 Claude Code 上,我在 Anthropic,这是我们遵循的一些原则。”显然 280 个字符仍然是一个好的约束,因为确实需要做到。但你甚至可以只说“这是一条推文”,它就会大致明白。或者你可以说“保持在 280 字符以内”。但假设有一个版本更适合写成包含两条推文的推文串。给它“我想写一个推文串,我倾向于只写一条”的感觉,会给我们更多的自由和灵活性,从而找到好东西。
Yeah, I think a Twitter post is a good example where you might give it context on yourself. So you say 'I work on Claude Code, I'm at Anthropic, these are some of the principles we follow.' Obviously 280 characters is still a good constraint because it does need to happen. But you can even just say 'it's a tweet' and it will sort of know. Or you might say 'keep it under 280 characters.' But let's say maybe a version better as a tweet thread with two tweets. Giving it the sense of 'I want to write a tweet thread, I'd prefer it to be one tweet' gives us more freedom and flexibility. To find something good.
好的。明白了。
Okay. Got it.
然后让我问这个。Boris 一直在说编码已经是一个被解决的问题,对吧?我觉得现在变得更技术化有点……我想我的问题是,对于像我这样想真正学习如何与智能体合作、真正理解它们工作原理的人,你实际上如何变得更技术化?这不是关于语法之类的,对吧?仅仅是多用吗?
And then let me ask this. So Boris has been saying that coding is like a solved problem, right? And I feel like becoming more technical these days is a little bit… I guess my question is for someone like me who wants to actually learn how to work with agents more, to actually learn what they're doing. How do you actually become more technical? It's not about the syntax or anything, right? Is it just using it more?
是的,我认为第一步是激励自己去学习新东西。这真的很难。我自己也这样:如果你不需要学什么就能完成工作,那可能就不会去学。但我认为这非常重要。
Yeah, I mean I think the first step is motivating yourself to learn things. I think that is honestly really hard. I find myself doing this as well: if you don't need to learn something to get the job done, maybe you won't. But I think it is really important.
我认为学习更多技术知识的目标是了解自己的未知领域,对吧?有些事情即使精通技术、知道 TypeScript 的语法也并没有多大用处,你懂吧?但我觉得懂技术、知道比如不同后端服务之间的权衡是什么、不同的视频加密库有哪些以及它们如何工作、本地和远程视频加密或转录库有什么区别,这些都非常有用。所以我经常试图了解系统的约束,比如什么是可能的、现在是如何实现的、它可以做到多好、如果我们换一种方式会怎样。而 Claude 经常可以帮你集思广益并教会你这些,只要你推动它,对吧?但你真的需要推动它。我认为这是教育中最困难的事情,每个人都说尝试学习感觉很好,但真正学习其实是更多的工作,而且它应该感觉像工作。我印象中 Karpathy 经常说:教育应该感觉像工作多于乐趣。就是这样。
I think the goal of learning to be more technical is to know my unknown unknowns, right? And so there are some things that being technical and knowing the syntax of TypeScript is not really very helpful, you know? But I think being technical and knowing things like what are the trade-offs of different backend services, what are the different video encryption libraries and how do they work, what's the difference between a local or remote video encryption or transcription library, these are all pretty helpful, right? So I think oftentimes I'm trying to learn the constraints of the system, like what is possible, how is it doing it right now, how good could it be, what if we did something else. And Claude can often brainstorm and teach you this if you push it, right? But you really have to push it. I think this is like the hardest thing about education and what everyone says is that it feels good to try and learn something, but actually learning something is more work, and it should feel like work. I think Karpathy says this a lot: education should feel like work more than fun. So yeah.
是的,这其实挺好的。因为实际上更容易的做法是不断让 Claude 去做,然后看输出,实际上什么也没学到。你让它去搞定,它就搞定了。但你竟然真的生成这些详细的 HTML 报告并阅读它们,我认为这可能是特例。我觉得大多数人都不会这么做。
Yeah, that's actually good. Because it's actually easier to just keep prompting Claude to do it and then look at the output and not actually learn anything. You just let it figure out and then it figures out. But the fact that you actually generate these detailed HTML reports and read them, I think it's probably the exception, dude. I think most people don't do this.
是的,我是说,我正在努力推动这件事。但我觉得这才是学习的方式。我认为你的问题是如何从做出好的短片到做出真正最好的短片,即最高制作质量的短片?你懂我的意思吗?如果这是目标,那么你可能需要学习更多关于视频制作、编辑以及技术概念的知识,并朝那个方向努力。我认为我们都希望推动自己变得更好、更快,而不仅仅是更快。所以,
Yeah, I mean, I think it's something I'm trying to push. Yeah. But I think this is how you can learn. I think the question for you is how do you go from making good shorts to making the really best shorts, highest production quality shorts out there? You know what I mean? And I think if that's the goal, then you need to probably learn more about both video production and editing and the technical concepts, and push yourself that way. And I think we all want to push ourselves towards being better and faster, and not just faster. So,
那么,好吧。也许我会给 Claude 添加一些自定义指令。比如说,嘿,确保你为所有事情生成 HTML 报告,这样我就可以阅读报告了。
So, okay. So, maybe I'll add some custom instructions to my Claude. Be like, hey, make sure you generate HTML reports for everything so I can read that.
是的。是的。是的。嗯,我是说,我认为这也是你想要推动自己的事情,去弄清楚什么时候你确实想了解某个东西是如何工作的。
Yeah. Yeah. Yeah. Well, I mean, you know, I think it's something you want to push yourself to as well, to figure out when do you want to understand how something is working.
明白了。太棒了,老兄。感谢你为我们所有人带来了 Claude Code 这份礼物,而且,嗯,真的很期待接下来会发生什么。我不知道你可能不能分享任何东西,但你知道,真的很期待。
Got it. Awesome, man. Thank you for giving the gift of Claude Code to all of us, and yeah, really excited for what's next, dude. I don't know if you probably can't share anything, but you know, really excited for what's next.
接下来很多东西都离不开 Claude Code,你知道,它会越来越好。但我觉得这一点怎么强调都不为过:它在很大程度上改变了 Anthropic 内部的工作方式,所以我很期待其他人都能加入或试用它。
A lot of what's next is Claude Code, you know, and it'll keep getting better. But I think it's just something that it's hard for us to understate how much it's sort of changed work at Anthropic here, and so excited for everyone else to get on board or to try it out.
如果你有一个非常能干的员工,你不会去微观管理他们,对吧?你只需要在 Slack 上艾特他们说,嘿,这件事我搞不定。然后希望他们就能搞定。
If you have a really capable employee, you're not going to micromanage them, right? You just put, hey, tag them on Slack and I can't do this. Then hopefully it's done.
或者你想要和其他人反复沟通、协作。
Or you want to talk iteratively with other people and collaborate.
你应该把它建立到我可以路过 Claude 的工位,随便问几个问题然后它就回答的程度。
You should build it to a point where I can walk by Claude's desk and just ask some questions and respond.
对,就像一个机器人。我是说那可以成为你的一个黑客项目。你知道吗,我感觉我已经能做到了。
Yeah, like a robot. I mean that could be a hack project for you. You know, I feel like I could already do that.
酷。好了,那么,聊得很愉快,而且,嗯,我想大家知道在哪里能在网上找到你,所以我们就不用再说这个了。
Cool. All right, well really great chatting, and yeah, I think people know where to find you online, so I don't think we have to talk about that.
是的,听起来不错。听起来不错。是的。太棒了。谢谢你,Peter。
Yeah, sounds good. Sounds good. Yeah. Amazing. Thanks, Peter.