shape-your-agent

sanity-io/agent-context · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/sanity-io/agent-context --skill shape-your-agent
0 commentsdiscussion
summary

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.

skill.md

Shape Your Agent

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-context skill) 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
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.

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:

  1. Who uses this agent? (customers, internal team, developers, general public)
  2. What setting? (support chat, docs site, internal tool, sales assistant)
  3. What problem does it solve? (answer product questions, troubleshoot issues, find content)
  4. 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."

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 the Sanity Studio."

What to redirect:

  • Example: "For billing or account questions, say: 'I can help with product questions, but for billing please contact [email protected].'"

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 [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.

Step 5: Review & Iterate

Test your prompt against real scenarios:

  1. Write 5-10 questions your users would actually ask. Include at least 2 edge cases (something off-topic, something you want refused).
  2. For each boundary rule, write the question that triggers it. Verify the agent handles it correctly.
  3. Try removing rules one at a time. If the agent still behaves correctly without a rule, that rule was unnecessary. Cut it.
  4. 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 "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.

how to use shape-your-agent

How to use shape-your-agent on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add shape-your-agent
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/sanity-io/agent-context --skill shape-your-agent

The skills CLI fetches shape-your-agent from GitHub repository sanity-io/agent-context and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/shape-your-agent

Reload or restart Cursor to activate shape-your-agent. Access the skill through slash commands (e.g., /shape-your-agent) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.647 reviews
  • Lucas Srinivasan· Dec 16, 2024

    Solid pick for teams standardizing on skills: shape-your-agent is focused, and the summary matches what you get after install.

  • Fatima Sethi· Dec 12, 2024

    I recommend shape-your-agent for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Ganesh Mohane· Dec 4, 2024

    Useful defaults in shape-your-agent — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Kiara Yang· Dec 4, 2024

    shape-your-agent is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Naina Sethi· Nov 23, 2024

    shape-your-agent reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Ren Kapoor· Nov 7, 2024

    We added shape-your-agent from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Ishan Abbas· Oct 26, 2024

    shape-your-agent fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Yuki Bansal· Oct 14, 2024

    Registry listing for shape-your-agent matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Layla Okafor· Sep 25, 2024

    We added shape-your-agent from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Ren Jain· Sep 21, 2024

    shape-your-agent fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

showing 1-10 of 47

1 / 5