dial-your-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.
What this skill does
# Dial Your Context
Help a user create the Instructions field content for the Sanity Context MCP server. The goal is a concise set of **pure deltas** — only information the agent can't figure out from the auto-generated schema.
## What you're building
The Sanity Context MCP server already provides the agent with:
- A compressed schema of all document types and fields
- A GROQ query tutorial (~194 lines)
- Response style guidance
- Tool descriptions for GROQ queries, semantic search, etc.
The Instructions field you're crafting gets injected as a `## Custom instructions` section between `## Response style` and `## Tools` in the MCP's instructions blob. It should contain **only what the schema doesn't make obvious**:
- Counter-intuitive field names (e.g., `body` is actually a slug, `hero` is a reference to `mediaAsset`)
- Second-order reference chains the schema doesn't connect (e.g., "to find products with Dolby Atmos, chain `product → productFeature` and match on the feature's `id` field — the schema shows each hop but not the full path")
- Data quality issues the schema can't reveal (e.g., "the `product` type has a `features` array but it's always empty — use `support-product` instead")
- Required filters the agent must always apply (locale, draft status, etc.)
- Known data gaps confirmed by the user (e.g., "the `subtitle` field is unused — ignore it")
- Query patterns for common use cases that aren't obvious from the schema
- Fallback strategies when primary approaches fail
**Never duplicate** what the schema already communicates clearly.
## Prerequisites
You need one of these to run this session:
**Path A — Write access (recommended):** A Sanity write token or the general Sanity MCP (OAuth). This lets you create a draft context doc, write instructions + filter to it during the session, and promote it to production when done. Production is never touched until you're ready.
**Path B — URL params only:** Use `?instructions=` and `?groqFilter=` URL query params on the MCP endpoint to test everything. At the end, provide the final content for the user to enter manually in Sanity Studio. Works with both base and document URLs.
Both paths are safe — neither modifies the production agent during the session.
## Critical rules
1. **Pure deltas only.** If the schema makes it obvious, don't put it in Instructions.
2. **Never generalize from small samples.** Querying 3 docs and concluding "field X is always null" is the #1 failure mode. Every claim must be verified with the user before inclusion.
3. **The user knows their data.** Schema dialogue beats data exploration. Present the schema, ask questions, listen.
4. **Verify every claim with evidence.** For each line in the draft Instructions, show the query + result that supports it. The user confirms or corrects.
5. **Keep it concise and factual.** The compaction step (summarizing findings into Instructions) is where information gets lost or distorted. No creative interpretation. Short declarative sentences.
## Workflow
### Step 1: Connect & Clean Slate
**Goal:** Establish MCP access, set up a safe working environment.
Connect to the user's Sanity Context MCP server. Get the project ID and dataset from the user if not already known. The slug is only needed if they have an existing Sanity Context document.
**Set up your working environment:**
**Path A (write access):** Create a new draft context doc by copying the existing one (if any) to a new slug like `tuning-draft`. All exploration and iteration happens against this draft — the production agent is untouched.
**Path B (no write access):** Use URL query params throughout the session:
- `?instructions=""` — forces a blank slate (ignores existing instructions)
- `?groqFilter=<expression>` — applies a filter without writing to the context doc
Check if the context document already has instructions content:
- If yes, present the existing instructions to the user verbatim
- Ask: "Do you want to keep any of this, or start fresh?"
- Let the user decide — don't assume existing instructions are wrong
- If they have existing instructions from a previous session, you'll verify and refine each finding rather than starting from scratch
Verify you can query the dataset by running a simple GROQ query like `*[0..2]._type` to confirm access.
**Output:** Confirmed MCP access, safe working environment established (draft doc or URL params), any existing instructions surfaced to user.
### Step 2: Schema Dialogue
**Goal:** Understand the dataset through conversation, not just exploration.
Retrieve the schema (the MCP provides this). Present the document types to the user in a clear list:
> Here are the document types in your dataset:
>
> - `article` (14 fields)
> - `author` (8 fields)
> - `category` (5 fields)
> - ...
>
> Which of these are the ones your agent will need to work with?
This is a **conversation**, not a monologue. Ask the user:
1. **Which types matter?** "Which of these will your agent need to query? Any types here that are internal/system types the agent should ignore?"
2. **What's misleading?** "Any field names that don't mean what they sound like? Fields that are unused or deprecated?"
3. **What are the relationships?** "How do these types connect? For example, do articles reference authors? How — direct reference, array of references, something else?"
4. **Any required filters?** "Does the agent need to always filter by locale, published status, or any other field?"
5. **What's the primary content language?** If i18n is involved, clarify the pattern.
**Suggest a filter.** The MCP supports a `groqFilter` — a full GROQ expression that scopes which documents the agent can access. This is high-leverage — it reduces noise significantly and prevents the agent from querying irrelevant types.
The filter is a GROQ expression string, not just a type list. This means you can carve out exactly the document set you want:
- Simple type filter: `_type in ["product", "support-article", "productFeature"]`
- Exclude drafts: `!(_id in path("drafts.**")) && _type in ["product", "article"]`
- Locale filter: `_type in ["product", "article"] && lang == "en-us"`
- Complex: `_type in ["product", "article"] && !(_id in path("drafts.**")) && defined(title)`
Based on the conversation, propose a filter:
> Based on what you've told me, I'd suggest this filter:
>
> ```
> _type in ["article", "author", "category", "tag"]
> ```
>
> This means the agent won't see `siteSettings`, `redirect`, `migration`, etc. Does that sound right?
**Apply the filter immediately.** Once the user agrees:
- **Path A (write access):** Write the `groqFilter` field to the draft context doc
- **Path B (URL params):** Add `?groqFilter=<expression>` to all subsequent MCP calls
All exploration from this point forward should use the agreed filter.
**Output:** A shared understanding of which types matter, known quirks, relationships, and an active filter. There's no point exploring types the production agent won't see.
### Step 3: Expected Questions
**Goal:** Get concrete examples of what the production agent will be asked.
Ask the user:
> What questions will people ask the agent that uses this context? Give me 5-20 examples — the more realistic, the better.
Examples might be:
- "Which speakers support Dolby Atmos?"
- "How do I fix WiFi connection issues?"
- "What's the return policy for refurbished products?"
- "Compare the features of product X and product Y"
These questions drive the exploration in Step 4. They tell you what query patterns actually matter.
For simple datasets, 5 questions is fine. For complex ones, push for 15-20.
**Output:** A numbered list of expected questions.
### Step 4: Explore & Verify
**Goal:** Answer each expected question using the MCP, track what works and what doesn't.
> **Steps 4–6 are iterative, not sequential.** Verify findings with the user as you go. Don't explore 15 questions, draft everything, then discover half your claims don't holRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.