shape-your-agent by sanity-io/agent-context
npx skills add https://github.com/sanity-io/agent-context --skill shape-your-agent一个可选的、对话式的工作流程,用于为使用 Sanity Agent Context MCP 的 AI 智能体创建系统提示。这适用于那些能够控制其智能体设置中系统提示的用户。
无法访问系统提示? 请完全跳过此技能。指令字段(通过
dial-your-context技能配置)是主要的控制杆,可以独立工作。在我们的评估中,一个像“你是一个有用的智能体。”这样的最小化系统提示,配合良好的指令字段内容,得分可达 80% 以上。
系统提示定义了智能体的行为——它是谁,它如何说话,它拒绝做什么。可以把它看作是智能体的个性和策略手册。
以下内容在其他地方处理——不要重复它们:
| 关注点 | 由谁处理 |
|---|---|
| 内容模式、字段含义 | 指令字段(调整你的上下文) |
| 查询模式、数据关系 | 指令字段(调整你的上下文) |
| GROQ 语法和指导 | MCP 自动提供 |
| 响应格式规则 | MCP 自动提供 |
在系统提示中重复这些内容会产生冲突。MCP 和指令字段是为处理数据问题而专门构建的——让它们各司其职。
系统提示中的每一行都会与 MCP 提供的上下文争夺模型的注意力。一个过度设计的提示实际上可能会降低回答质量。从最小化开始。只有当你有具体场景需要时,才添加规则。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
这是一次对话,而不是一个表单。提出问题,倾听答案,并做出调整。不要像核对清单一样机械地执行步骤——让用户的回答来指导哪些领域需要更深入的探讨。有些用户对语气有强烈的看法,需要在界限上花 5 分钟。另一些用户可能需要帮助思考边缘情况,但已经清楚自己的表达风格。跟随对话的能量。
首先回答以下问题:
这些答案将驱动后续的每一个决策。为沮丧客户服务的支持智能体需要的规则,与为开发人员服务的文档助手是不同的。
为每个维度选择具体的立场:
语气: 专业 / 随意 / 友好 / 技术性
详细程度: 默认提供多少细节?
技术层次: 与受众匹配。
对于每个界限,你需要:规则、触发场景和期望的响应。
拒绝什么:
重定向什么:
防护栏:
当信息未找到时:
删减测试: 对于每条规则,问自己:"我能描述一个会触发此规则的真实用户消息吗?" 如果不能,就删掉这条规则。无法触发的规则是死重。
将你的答案组合成一个提示。使用以下结构:
You are [role] for [company/product].
## Voice
[2-3 concrete tone/style rules]
## Boundaries
[Only rules that passed the cut test]
## When you don't know
[Specific fallback behavior]
就这样。大多数智能体在这里需要 200-400 个词,而不是 1500 个。
You are a customer support agent for Acme Store.
## Voice
- Warm and conversational. Use the customer's first name if provided.
- Keep answers short — lead with the answer, then explain if needed.
- No marketing language. Don't upsell or promote products unprompted.
## Boundaries
- Never process returns, refunds, or order changes. Direct customers to support@acme.com for order issues.
- Don't quote exact shipping times. Say "typically 3-5 business days" and link to the shipping policy page.
- If asked about competitor products, focus on what Acme offers without comparisons.
- Don't share internal inventory numbers. Say whether something is "in stock" or "currently unavailable."
## When you don't know
- Say "I don't have that information" directly. Don't hedge or speculate.
- Suggest related topics you can help with.
- For urgent issues, direct to live support at support@acme.com.
这大约 150 个词。它涵盖了角色、语气、界限和后备行为。其他所有内容——产品数据、模式细节、查询模式——都存在于指令字段和 MCP 中。
针对真实场景测试你的提示:
| 层级 | 控制内容 | 示例 |
|---|---|---|
| 系统提示 | 智能体行为 | "绝不引用确切定价" |
| 指令字段 | 数据指导 | "产品位于 'product' 类型中,具有 'price' 字段" |
| MCP | 查询机制 | GROQ 语法、响应格式 |
| 系统提示 | 传达不确定性 | "说'我没有那个信息'并建议替代方案" |
| 指令字段 | 恢复策略 | "如果产品搜索返回空结果,请尝试 support-article 类型" |
每个层级都有其职责。不要交叉混淆。
每周安装次数
119
代码库
GitHub 星标数
4
首次出现
2026年2月26日
安全审计
安装于
kimi-cli118
gemini-cli118
amp118
cline118
github-copilot118
codex118
An optional, conversational workflow for creating a system prompt for an AI agent that uses the Sanity Agent Context MCP. This is for users who control the system prompt in their agent setup.
Don't have access to the system prompt? Skip this skill entirely. The Instructions field (configured via the
dial-your-contextskill) is the primary lever and works on its own. A minimal system prompt like "You are a helpful agent." combined with good Instructions field content scores 80%+ in our evaluations.
The system prompt defines agent behavior — who it is, how it talks, what it refuses to do. Think of it as the agent's personality and policy manual.
These are handled elsewhere — don't duplicate them:
| Concern | Handled by |
|---|---|
| Content schema, field meanings | Instructions field (Dial Your Context) |
| Query patterns, data relationships | Instructions field (Dial Your Context) |
| GROQ syntax and guidance | MCP auto-provides |
| Response formatting rules | MCP auto-provides |
Duplicating these in the system prompt creates conflicts. The MCP and Instructions field are purpose-built for data concerns — let them do their job.
Every line in your system prompt competes for the model's attention with the context the MCP provides. An over-engineered prompt can actually degrade answer quality. Start minimal. Add rules only when you have a concrete scenario that needs one.
This is a conversation, not a form. Ask questions, listen to the answers, and adapt. Don't run through the steps as a checklist — let the user's responses guide which areas need more depth. Some users will have strong opinions about tone and need 5 minutes on boundaries. Others will need help thinking through edge cases but already know their voice. Follow the energy.
Start by answering these questions:
These answers drive every decision that follows. A support agent for frustrated customers needs different rules than a docs assistant for developers.
Choose concrete positions on each axis:
Tone: Professional / Casual / Friendly / Technical
Verbosity: How much detail by default?
Technical level: Match the audience.
For each boundary, you need: the rule , a trigger scenario , and the desired response.
What to refuse:
What to redirect:
Guardrails:
When information isn't found:
The cut test: For every rule, ask: "Can I describe a real user message that would trigger this?" If not, cut the rule. Untriggerable rules are dead weight.
Assemble your answers into a prompt. Use this structure:
You are [role] for [company/product].
## Voice
[2-3 concrete tone/style rules]
## Boundaries
[Only rules that passed the cut test]
## When you don't know
[Specific fallback behavior]
That's it. Most agents need 200-400 words here, not 1500.
You are a customer support agent for Acme Store.
## Voice
- Warm and conversational. Use the customer's first name if provided.
- Keep answers short — lead with the answer, then explain if needed.
- No marketing language. Don't upsell or promote products unprompted.
## Boundaries
- Never process returns, refunds, or order changes. Direct customers to support@acme.com for order issues.
- Don't quote exact shipping times. Say "typically 3-5 business days" and link to the shipping policy page.
- If asked about competitor products, focus on what Acme offers without comparisons.
- Don't share internal inventory numbers. Say whether something is "in stock" or "currently unavailable."
## When you don't know
- Say "I don't have that information" directly. Don't hedge or speculate.
- Suggest related topics you can help with.
- For urgent issues, direct to live support at support@acme.com.
This is ~150 words. It covers role, voice, boundaries, and fallback behavior. Everything else — product data, schema details, query patterns — lives in the Instructions field and MCP.
Test your prompt against real scenarios:
| Layer | Controls | Example |
|---|---|---|
| System prompt | Agent behavior | "Never quote exact pricing" |
| Instructions field | Data guidance | "Products are in the 'product' type with a 'price' field" |
| MCP | Query mechanics | GROQ syntax, response formatting |
| System prompt | Communicating uncertainty | "Say 'I don't have that information' and suggest alternatives" |
| Instructions field | Recovery tactics | "If product search returns empty, try support-article type" |
Each layer has its job. Don't cross the streams.
Weekly Installs
119
Repository
GitHub Stars
4
First Seen
Feb 26, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
kimi-cli118
gemini-cli118
amp118
cline118
github-copilot118
codex118
AI 代码实施计划编写技能 | 自动化开发任务分解与 TDD 流程规划工具
49,000 周安装
学术深度研究技能:AI驱动的学术文献综述与多源验证工具,生成APA格式报告
343 周安装
VueUse最佳实践指南:组合式函数高效使用、SSR调试与类型推断解决方案
341 周安装
Cloudflare Workflows 完整指南:生产就绪的服务器端工作流解决方案
341 周安装
Cloudflare Browser Rendering 浏览器自动化指南:Puppeteer与Playwright API完整参考
341 周安装
合同审阅助手:AI驱动合同分析,基于谈判手册识别风险与生成修改建议
341 周安装
邮件网关集成指南:Resend、SendGrid、Mailgun、SMTP2Go 多提供商API代码示例
342 周安装