
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.
- Installs
- 1.1K
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/sanity-io/context --skill shape-your-agent- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads shape-your-agent automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Shape Your Agent
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.
Before You Start
What the system prompt is for
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.
What the system prompt is NOT for
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 |
Duplicating these in the system prompt creates conflicts. The MCP and Instructions field are purpose-built for data concerns — let them do their job.
The golden rule: less is more
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.
How to run this session
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.
Step 1: Understand the Use Case
Start by answering these questions:
- Who uses this agent? (customers, internal team, developers, general public)
- What setting? (support chat, docs site, internal tool, sales assistant)
- What problem does it solve? (answer product questions, troubleshoot issues, find content)
- What's the user's typical state? (exploring, stuck, evaluating, frustrated)
These answers drive every decision that follows. A support agent for frustrated customers needs different rules than a docs assistant for developers.
Step 2: Define Behavior
Choose concrete positions on each axis:
Tone: Professional / Casual / Friendly / Technical
- Bad: "Be friendly and professional"
- Good: "Use a warm, first-name tone. No corporate jargon. Write like a knowledgeable coworker, not a press release."
Verbosity: How much detail by default?
- Bad: "Be concise but thorough"
- Good: "Lead with a 1-2 sentence answer. Offer to elaborate. Never open with more than 3 sentences before getting to the point."
Technical level: Match the audience.
- Bad: "Adjust to the user's level"
- Good: "Assume the user knows JavaScript and REST APIs. Don't explain what an API key is. Do explain Sanity-specific concepts like GROQ projections."
Formatting: The MCP doesn't tell the agent how to format answers, so this is the system prompt's job.
- Bad: "Format responses nicely"
- Good: "Use short paragraphs. Use a bulleted list only when comparing three or more items. Link to the source page for every product you mention."
Step 3: Set Boundaries
For each boundary, you need: the rule, a trigger scenario, and the desired response.
What to refuse:
- Example: "If asked to write or modify content in the dataset, explain that you're a read-only assistant and point them to whoever manages the content."
What to redirect:
- Example: "For billing or account questions, say: 'I can help with product questions, but for billing please contact support@example.com.'"
Guardrails:
- Example: "Never mention competitor products by name. If asked to compare, describe our capabilities without naming alternatives."
- Example: "Don't quote specific pricing. Say 'Check our pricing page at [url] for current plans.'"
When information isn't found:
- Example: "If the query returns no results, say so honestly. Suggest 2-3 related topics you can help with. Never fabricate an answer."
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.
Step 4: Draft the Prompt
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.
Example: E-commerce Support Agent
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.
Step 5: Review & Iterate
Test your prompt against real scenarios:
- Write 5-10 questions your users would actually ask. Include at least 2 edge cases (something off-topic, something you want refused).
- For each boundary rule, write the question that triggers it. Verify the agent handles it correctly.
- Try removing rules one at a time. If the agent still behaves correctly without a rule, that rule was unnecessary. Cut it.
- Check for conflicts with the Instructions field. If both the system prompt and Instructions field address the same concern, remove it from the system prompt. The Instructions field wins for data concerns.
Signs your prompt is too long
- The agent ignores some rules (attention dilution)
- Answers feel generic or templated (over-constrained)
- The agent repeats phrasing from the prompt verbatim (parroting)
Signs your prompt is too short
- The agent's tone is inconsistent across conversations
- Users get answers to questions that should be refused
- The agent speculates when it should say "I don't know"
Quick Reference
System prompt checklist
- Role is defined in one sentence
- Tone rules are concrete (not "be professional")
- Every boundary has a trigger scenario
- Fallback behavior is specified
- No overlap with Instructions field content
- Under 500 words (aim for 200-400)
- Tested against 5+ real user questions
The separation principle
| Layer | Controls | Example |
|---|---|---|
| System prompt | Agent behavior | "Never quote exact pricing" |
| Instructions field | Data guidance | "price is stored in cents; divide by 100 for dollars" |
| MCP | Query mechanics | GROQ syntax, tool usage |
| 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.
FAQ
What does the shape-your-agent skill do?
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.
How do I install shape-your-agent?
Run npx skills add https://github.com/sanity-io/context --skill shape-your-agent in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/shape-your-agent/ (personal) or .claude/skills/shape-your-agent/ (project).
Which AI agents can use shape-your-agent?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is shape-your-agent safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains shape-your-agent?
It is published by sanity-io in sanity-io/context. It has 1,083 recorded installs.
More from sanity-io/context
create-agent-with-sanity-context
sanity-io/context
Build AI agents with structured access to Sanity content via Sanity Context. Use when setting up a Sanity-powered chatbot, connecting an AI assistant to Sanity content, or adding client-side tools to an agent. Covers MCP endpoint setup in the Context app (GROQ mode over a dataset, or Knowledge Base mode), agent implementation, Insights, and advanced patterns. Always use this skill when users mention building a chatbot with Sanity, creating an AI assistant for their content, setting up the Sanity Context MCP server, integrating Sanity with Claude/GPT/any LLM, making content searchable by AI, implementing semantic search over Sanity data, or connecting their CMS to an AI agent.
dial-your-context
sanity-io/context
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.
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available