optimize-agent-prompt
Tune Your Agent
Use this skill to turn a basic agent into a high-quality, conversationally strong, data-aware agent. This is an interactive session — you'll provide exploration data, answer questions about your use case, and get back two artifacts:
- Instructions field content — for your Agent Context Document
- System prompt — for your agent's code
Prerequisites
- A working agent — built using the
create-agent-with-sanity-contextskill or equivalent - An Agent Context Document — created in Sanity Studio with the context plugin
- Exploration data — run the Agent Context Explorer to understand your dataset
npx @sanity/agent-context-explorer \
--mcp-url https://api.sanity.io/vX/agent-context/PROJECT_ID/DATASET/SLUG \
--questions ./questions.json \
--sanity-token $SANITY_API_READ_TOKEN \
--anthropic-api-key $ANTHROPIC_API_KEY
More from sanity-io/agent-context
create-agent-with-sanity-context
Build AI agents with structured access to Sanity content via Agent 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 Studio setup, agent implementation, and advanced patterns. Always use this skill when users mention building a chatbot with Sanity, creating an AI assistant for their content, setting up Agent Context MCP, 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.
412shape-your-agent
Interactive session to craft a system prompt for an AI agent powered by Sanity Agent Context MCP. 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.
337dial-your-context
Interactive session to create Instructions field content for a Sanity Agent Context MCP. 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.
333