Skip to content

feat: add sanity-ui skill#5

Draft
nkgentile wants to merge 1 commit intomainfrom
feature/add-sanity-ui-skill
Draft

feat: add sanity-ui skill#5
nkgentile wants to merge 1 commit intomainfrom
feature/add-sanity-ui-skill

Conversation

@nkgentile
Copy link
Copy Markdown
Contributor

Description

Adds a sanity-ui skill to the Sanity Agent Toolkit, providing AI agents with guidance for building React interfaces using Sanity's official design system (@sanity/ui).

Changes introduced:

  • New skill at sanity-plugin/skills/sanity-ui/SKILL.md - Concise, procedure-focused workflow guide for building UIs with Sanity UI
  • New rule at rules/sanity-ui.mdc - Comprehensive reference covering design system fundamentals, component selection, and Sanity-specific patterns
  • Updated AGENTS.md knowledge router to include Sanity UI triggers
  • Updated README.md to document the new skill and rule

Why these changes?

  • Enables agents to help developers build custom Studio plugins, tools, and Studio UI components using Sanity's design system
  • Provides clear guidance on when ThemeProvider is needed (standalone apps) vs. auto-provided (Studio context)
  • Follows established repository patterns: concise skills for workflows, comprehensive rules for reference
  • Avoids duplicating official API docs (links to https://www.sanity.io/ui instead), focusing on Sanity-specific integration patterns

What to review

Reviewer should:

  1. Review sanity-plugin/skills/sanity-ui/SKILL.md:

    • Verify the 5-step procedure is clear and actionable
    • Confirm ThemeProvider guidance is accurate (Studio vs standalone context)
    • Check that examples demonstrate both Studio plugin and standalone app patterns
  2. Review rules/sanity-ui.mdc:

    • Verify design system fundamentals (spacing scale, tones, responsive patterns) are accurate
    • Confirm component quick reference is helpful without duplicating official docs
    • Check that Sanity-specific patterns (document panels, custom inputs, etc.) are correct
    • Ensure it points to official docs for detailed API reference
  3. Review AGENTS.md and README.md:

    • Verify routing keywords are appropriate for triggering the skill
    • Confirm documentation accurately describes the skill's purpose

Affected areas:

  • Claude Code plugin skills (adds new sanity-ui skill)
  • Context rules (adds new sanity-ui.mdc rule)
  • Knowledge routing (updates trigger keywords)

Testing

Manual testing performed:

  • Verified file structure matches existing skill patterns (e.g., sanity-groq, sanity-scaffold)
  • Confirmed line count is appropriate (~138 lines for skill, ~519 lines for rule)
  • Reviewed ThemeProvider guidance against actual Studio codebase at ~/Developer/sanity
  • Validated that skill references point correctly to rule file via sanity://rules/sanity-ui.mdc
  • Confirmed examples use correct imports and API patterns from @sanity/ui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant