npx skills add ...
npx skills add sanity-io/agent-context --skill shape-your-agent
npx skills add sanity-io/agent-context --skill shape-your-agent
Interactive session to craft a system prompt for an AI agent powered by the Sanity Context MCP server. Use this skill when users want to define agent personality, set tone/voice, establish boundaries and guardrails, configure refusal behaviors, or control how their agent communicates. Trigger when users mention their agent sounds wrong, needs to refuse certain requests, has the wrong tone, or they want to set communication rules and policies.
An optional, conversational workflow for creating a system prompt for an AI agent that uses the Sanity Context MCP server. 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:
That's it. Most agents need 200-400 words here, not 1500.
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.