skills/shape-your-agent/SKILL.md
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.
npx skillsauth add sanity-io/agent-context shape-your-agentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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:
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 [email protected] 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 [email protected].
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.
tools
Interactive session to create Instructions field content for the Sanity Context MCP server. Use this skill whenever users mention tuning agent context, improving agent responses to Sanity data, configuring MCP instructions, setting up content filters, or when their agent gives wrong results from Sanity queries. Also trigger when users say their agent is confused about schema relationships, needs data-specific guidance, or wants to optimize which content the agent can access.
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------