How-toMulti-source

用一条提示词让 Claude 通过你自己的 API 账号干活

Why we picked it

这是 Lenny Rachitsky 分享的一条即用型提示词,能让 Claude 用你自己付费的 API Key 干活,把起草外包给模型、让 Agent 只做审核。比起让 Agent 全权生成,这种分工能省订阅额度,还带失败回退和密钥安全处理,适合经常写重复性稿件的开发者。

Lenny Rachitsky 分享一条可直接粘贴的提示词,让 Claude Code(或其它 Agent)通过用户自己的 Anthropic API 账号执行任务,例如撰写播客嘉宾准备资料。流程包括:通过安全密钥输入框索取 API Key 和 Workspace ID,不在聊天中明文输入或显示。

Body

技术实现上,提示词要求编写一个调用 Anthropic Messages API(api.anthropic.com/v1/messages)的辅助脚本,使用 x-api-key 和 anthropic-version 请求头,如有 Workspace ID 则附加 anthropic-workspace-id 请求头。随后通过 GET /v1/models 列出可用模型供用户选择,发送测试消息验证连通性,失败时给出具体错误(如余额不足)并指向 console.anthropic.com 处理。

工作流设计为分工模式:指定的 Claude 模型负责生成初稿,Agent 本身负责审核和事实核查;只保留返回内容中的 text 类型块,过滤 thinking 块;API 调用失败时回退为 Agent 自行起草。配置保存到长期记忆中,后续同类任务无需重新设置。

Original · AI Will

完整提示词: 我希望你通过我自己的 Anthropic API 账号,使用 Claude 模型完成指定任务:[例如撰写播客嘉宾准备资料]。 通过安全的密钥输入框向我索取 Anthropic API Key,绝不要在聊天中输入或显示。如果 API Key 属于特定 Anthropic Workspace,也通过相同的安全方式索取 Workspace ID。 只在你的计算机上保存 API Key,绝不打印或暴露。编写一个调用 Anthropic Messages API 的辅助脚本。 API 地址: api.anthropic.com/v1/messages 请求时使用 x-api-key 和 anthropic-version 请求头。如果我提供了 Workspace ID,还需要添加 anthropic-workspace-id 请求头。 查询我的 API Key 可以使用哪些模型。 通过 GET /v1/models 获取可用模型列表,并展示给我,让我选择需要使用的模型。 发送一条简短的测试消息,确认 API 调用正常。 如果调用失败,告诉我具体错误,例如 API 余额不足,以便我前往 Anthropic 控制台处理账单问题。 控制台: console.anthropic.com 测试成功后,更新你的 Skill 和所有相关日常任务流程。 让指定的 [模型] 负责生成初稿,再由你负责审核和事实核查。 注意,部分模型会在正式文本前返回 thinking 内容,只保留 text 类型的内容块。 如果 API 调用失败,就由你自行完成初稿,并告诉我失败原因。 将这套配置保存到你的长期记忆或持久配置中,确保以后执行类似任务时能够继续使用,不需要每次重新设置。 x.com/lennysan/statu… Lenny Rachitsky @lennysan Here's the prompt: I want you to use Anthropic's Claude models through my own Anthropic API account for [task, e.g. drafting my podcast guest briefs]. 1. Ask me for my Anthropic API key with a secure secret field (never in chat). If my key belongs to a specific Anthropic workspace, ask for that workspace ID the same way. 2. Store it only on your computer and never print it. Write a small helper script that calls the Anthropic Messages API ( api.anthropic.com/v1/messages ) with the x-api-key and anthropic-version headers, plus the anthropic-workspace-id header if I gave you one. 3. List the models my key can use (GET /v1/models) and show them to me so I can pick one. 4. Send a short test message and confirm it works. If it fails, tell me the exact error (e.g. credit balance too low) so I can fix billing at console.anthropic.com . 5. Once it works, update your skill and any routines so [model] writes the first draft and you review and fact-check it. Some models return a thinking block before the text, so keep only the text blocks. If a call fails, fall back to drafting yourself and tell me why. 6. Save this setup to your memory so it sticks. 🔗 View Quoted Tweet

Industry Coordinates & Source Verification

This report is categorized under AITOP's "How-to" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include Claude, Anthropic, prompt engineering, API.

Source attribution: curated from AI Will (@FinanceYF5). Cross-source corroboration: 11 independent sources have covered this development (including shao__meng, TestingCatalog, Yuchen Jin), confirming industry-wide signal strength.