Commit Graph

62 Commits

Author SHA1 Message Date
Knut Melvær 05ea4e4c78 feat: add Angular to integration guides list in SKILL.md 2026-03-02 22:35:47 -08:00
Knut Melvær f77a6fddfd feat: add Angular & Sanity integration guide 2026-03-02 22:35:46 -08:00
Jon Eide Johnsen ddb989101f Merge pull request #25 from sanity-io/fix/image-frontmatter-yaml
fix: quote description in image.md frontmatter
2026-02-24 14:19:58 -08:00
Rune Botten 599f1235d1 fix: quote description in image.md frontmatter to fix YAML parsing
The unquoted colon in "Sanity: Schema" causes gray-matter (js-yaml 3.x)
to interpret it as a nested YAML mapping, breaking the MCP server build.
2026-02-24 14:18:41 -08:00
Jon Eide Johnsen aeb1e6458c Merge pull request #23 from sanity-io/feat/migrate-rules-to-skills
refactor: consolidate agent rules into sanity-best-practices skill
2026-02-24 13:57:12 -08:00
Jon Eide Johnsen 6efa040cf8 Merge pull request #24 from sanity-io/fix/migrate-rules-to-skills-fixes
fix: Migrate rules to skills fixes
2026-02-24 13:38:12 -08:00
James Woods 86193d9060 fix: readme 2026-02-24 12:27:55 +00:00
James Woods 17f7b5b428 fix: deduplicate atomic references into comprehensive guides
Delete 25 atomic reference files that duplicated content already
covered by the comprehensive topic guides (groq.md, schema.md, etc.).
Unique content from atomics (optimizable filters table, defineMigration
example, compound cursor pattern, icon mapping table, stegaClean
alternatives, etc.) was merged into the corresponding guide before
deletion.

Also makes migration.md an index that points to migration-html-import.md
for the HTML deep-dive, keeping the pattern extensible for future
migration guides.

Updates SKILL.md and AGENTS.md to reflect the consolidated structure
(47 → 22 reference files).
2026-02-24 12:03:17 +00:00
James Woods 56a288291a fix: remove AGENTS.md, strip unused frontmatter, delete _sections.md 2026-02-24 11:44:28 +00:00
Jon Eide Johnsen 273c8ca205 refactor: consolidate agent rules into sanity-best-practices skill
Migrate all 21 .mdc agent rules from rules/ into the sanity-best-practices
skill as the single source of truth, following the agentskills.io spec.

- Move comprehensive guides to skills/sanity-best-practices/references/
  (e.g., sanity-nextjs.mdc → references/nextjs.md)
- Rename rules/ → references/ per agentskills.io specification
- Convert .mdc frontmatter to standard .md (add title/tags, drop alwaysApply)
- Update all internal cross-references to new paths
- Rewrite SKILL.md with Quick Reference index (Vercel pattern)
- Add compiled AGENTS.md inside skill with all 26 atomic rules
- Update root AGENTS.md Knowledge Router to point to new locations
- Update README.md with new repository structure
- Delete all 21 old rules/sanity-*.mdc files (clean break)
- All 4 skills pass validation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-23 14:47:12 -08:00
Jon Eide Johnsen 5730cf4ea5 Merge pull request #22 from sanity-io/fix/misc-improvements
fix: comprehensive review fixes from 10-agent swarm review
2026-02-23 13:54:39 -08:00
Jon Eide Johnsen 5e8610a916 fix: address minor review findings and nits
- Add missing author field to cursor plugin marketplace.json
- Restore query-level filter in migration example for performance
- Clarify sameAs vs socialLinks field purposes in EEAT schema
- Add TypeScript types to generateMetadata params in hreflang example
- Revert useCdn to false for SSR getting-started example
- Add NDJSON guardrail back to AGENTS.md boundaries
- Fix npx prefix consistency in typegen watch mode command
- Add schema.org position comment in BreadcrumbList example
- Clarify @graph @context usage and improve JSON-LD security note
- Deduplicate typegen-workflow.md by referencing the canonical rule file

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-23 13:50:42 -08:00
Jon Eide Johnsen f5e274a736 fix: address code review findings
- Fix pitfall numbering (13→16,17→14,15 → sequential 13→14,15→16,17)
- Add missing PortableTextBlock import in PTE components example
- Remove unused SanityDocument import in Astro rule
- Fix monorepo TypeGen paths to use correct relative dirs
- Standardize missed API version in sanity-schema.mdc
- Remove misleading path validation comment per reviewer feedback

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-23 13:46:52 -08:00
Jon Eide Johnsen 85b0402835 Merge pull request #11 from sanity-io/feat/blueprints-rules
feat: blueprints rules
2026-02-23 13:37:16 -08:00
Jon Eide Johnsen 68c5283f7d fix: address DX and TypeScript expert review findings for TypeGen
Fixes from final review pass by DX and TypeScript expert agents:
- Added "unique query names" requirement (common developer footgun)
- Added tsconfig includes requirement for sanity.types.ts
- Fixed AUTHOR_QUERY example: was array query used as single object
- Added .astro, .svelte, .vue to path glob examples
- Updated Astro rule to use defineQuery instead of raw strings
- Updated get-started guide to use defineQuery (was raw string)
- Updated GROQ maintenance workflow to mention automatic generation
- Updated AGENTS.md boundary to mention typegen.enabled option
- Fixed groq-define-query.md to show auto-inference as primary pattern
- Standardized import path to @/sanity.types

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-21 00:47:01 -08:00
Jon Eide Johnsen b5201773e3 fix: update TypeGen docs for GA release
TypeGen is now GA. Key changes:
- Config moved from deprecated sanity-typegen.json to sanity.cli.ts
- Added automatic type generation (typegen.enabled: true)
- Added watch mode for separate frontend repos
- Added overloadClientMethods for automatic client.fetch() typing
- Added --enforce-required-fields flag
- Added Get and FilterByType type utilities
- Added supported file types (.astro, .svelte, .vue)
- Added @sanity-typegen-ignore for skipping individual queries
- Updated project structure to remove deprecated config file

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-21 00:43:10 -08:00
Jon Eide Johnsen b87ebf6b8e chore: harmonize plugin configs and misc polish
- Added metadata.version to Claude plugin marketplace.json
- Added owner.url to Cursor plugin marketplace.json
- Pinned skills-ref dependency to exact 0.1.5 (was ^0.1.5)
- Removed emojis from sanity.md command headers for consistency
- Added actual resource file paths to content-modeling SKILL.md
- Softened absolutist language in AGENTS.md (NDJSON no longer prohibited)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-21 00:37:16 -08:00
Jon Eide Johnsen 2d0daf0dae fix: sanity best practices rule corrections
- Standardized TypeGen output path to sanity.types.ts
- Fixed any typing in Portable Text component to PortableTextBlock[]
- Converted CommonJS require() to ESM import in migration example
- Removed non-standard filter property from migration API example

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-21 00:37:07 -08:00
Jon Eide Johnsen a5bcbed571 feat: add AI crawler management, AI Overviews, BreadcrumbList, and hreflang
- Added AI crawler robots.txt directives (GPTBot, ClaudeBot, etc.)
- Added Google AI Overviews optimization section to AEO
- Added BreadcrumbList schema and @graph combining pattern
- Added hreflang/international SEO to technical SEO
- Added JSON-LD sanitization note for dangerouslySetInnerHTML
- Enriched EEAT author schema with sameAs field
- Improved AEO monitoring section and freshness advice
- Noted that sitemap changeFrequency/priority are ignored by Google
- Added actual resource file paths to SKILL.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-21 00:36:40 -08:00
Jon Eide Johnsen 42ca89c1f2 fix: correct sample size calculation and improve experimentation skill
- Fixed sample size example: was ~3,000/variant, correct is ~7,600
- Corrected p-value definition (common misinterpretation)
- Added Bayesian methods, multi-armed bandits, and sequential testing
- Added SRM checks and novelty/primacy effects to common pitfalls
- Added actual resource file paths to SKILL.md for agent discovery

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-21 00:36:17 -08:00
Jon Eide Johnsen 3c62a9fd3c fix: standardize API version to 2026-02-01 across all rule files
API version examples were inconsistent across files: 2025-11-01 in GROQ,
2024-01-01 in get-started, v2024-08-01 (with v prefix) in Next.js, and
various other dates in framework rules. Standardized all to 2026-02-01
without the v prefix. Also fixed useCdn contradiction (get-started had
false, Next.js rule said true should be default) and added webhook path
validation to prevent cache-busting abuse.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-21 00:36:08 -08:00
Jon Eide Johnsen 28b9ccf05f fix: align MCP tool names and add complete tool inventory
AGENTS.md tool names were inconsistent with actual MCP server tools
(e.g. create_document_from_markdown vs create_documents_from_markdown).
Updated both AGENTS.md and README.md to match the current MCP server
tool list, organized into 5 categories: content operations, schema &
development, media & AI, releases, and project management.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-21 00:35:58 -08:00
Jon Eide Johnsen 8ffe9ffee5 Merge branch 'feat/cursor-plugin' 2026-02-20 12:25:45 -08:00
Jon Eide Johnsen 5dd98c0dbe fix broken plugin anchor links in agents.md
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-20 12:25:39 -08:00
Jon Eide Johnsen 387020096e Merge pull request #21 from sanity-io/feat/cursor-plugin
feat: add cursor plugin
2026-02-20 11:43:50 -08:00
Jon Eide Johnsen 450394fc0f feat: add cursor plugin support
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-20 11:28:39 -08:00
Jon Eide Johnsen a3ad5e1a20 update claude code plugin descriptions
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-20 11:15:09 -08:00
Jonah Snider 0a140e31f9 ci: add GitHub Actions CI for validating skills (#18) 2026-02-13 06:55:08 -08:00
Jon Eide Johnsen 161f1996a4 Merge pull request #13 from sanity-io/fix/claude-plugin-folder-structure
fix: claude plugin folder structure
2026-02-05 18:49:12 -08:00
Jon Eide Johnsen 1475d518c6 docs: update repository structure to reflect refactored plugin layout
Remove sanity-plugin/ folder from tree and show commands, .claude-plugin,
and .mcp.json at root level to match the new flattened structure.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-05 18:47:19 -08:00
James Woods 9db1697618 feat: add back relevant metadata 2026-02-05 18:18:27 +00:00
James Woods e90bf8d868 fix: claude plugin folder structure 2026-02-05 18:10:43 +00:00
Taylor Beseda e3a8036046 Update sanity-blueprints.mdc 2026-01-27 10:55:06 -07:00
Taylor Beseda ed05d8be38 Update rules/sanity-blueprints.mdc
Co-authored-by: Dave Sewell <snocorp@gmail.com>
2026-01-27 09:51:54 -08:00
Taylor Beseda ccd65ee6d6 Update AGENTS.md 2026-01-27 10:51:22 -07:00
Jon Eide Johnsen 8925863e81 Merge pull request #10 from sanity-io/fix/sanity-best-practices-skill-references
fix: best practices skill refrencing rules incorrectly
2026-01-27 17:41:54 +01:00
James Woods 211347bc66 fix: add nextjs best practices skill 2026-01-27 11:36:29 +00:00
Taylor Beseda 1c7dac6604 fix(blueprints): add blueprints to root README 2026-01-26 21:43:48 -07:00
Taylor Beseda 4db06e5b40 fix(blueprints): remove planned resources 2026-01-26 21:42:57 -07:00
Taylor Beseda 3ad9453040 feat: blueprints rules 2026-01-26 19:27:53 -07:00
Jon Eide Johnsen bc8ebc3323 Merge pull request #8 from sanity-io/feat/agent-skills
feat: agent skills
2026-01-24 01:40:01 +01:00
Jon Eide Johnsen 39a599586e Update migration rules to use defineMigration
- schema-deprecation-pattern.md: Replace raw client.patch with
  defineMigration, at, setIfMissing, unset from sanity/migrate
- migration-html-import.md: Add defineMigration wrapper example
  for reproducible HTML imports
2026-01-23 16:36:44 -08:00
Jon Eide Johnsen f6c6935af5 Rename visual editing rule files for consistency
- visual-seo-metadata.md → visual-editing-seo-metadata.md
- visual-stega-clean.md → visual-editing-stega-clean.md
- visual-presentation-tool.md → visual-editing-presentation-tool.md
2026-01-23 16:23:03 -08:00
Jon Eide Johnsen c241acb8d6 Update Core Web Vitals and add Next.js labels
- Add Google source link for Core Web Vitals thresholds
- Update FID to INP (current metric as of 2024)
- Add "(Next.js example)" labels to framework-specific sections
2026-01-23 16:20:55 -08:00
Jon Eide Johnsen 82565fafd0 Address additional PR feedback
- pte-custom-components.md: Use generic <a> with tip about framework Link components
- schema-array-keys.md: Remove unrealistic Math.random() key example
2026-01-23 16:12:26 -08:00
Jon Eide Johnsen 7be4ec5b35 Address PR review feedback
- separation-of-concerns.md: Make naming examples more specific
- groq-define-query.md: Remove redundant Option C (plain defineQuery)
- image-hotspot.md: Remove unrelated alt text from hotspot example
2026-01-23 16:09:26 -08:00
Jon Eide Johnsen d509a358f8 Add Agent Skills following agentskills.io format
Introduces 4 new Agent Skills compatible with Cursor, Claude Code, and other
agents supporting the Agent Skills standard:

- sanity-best-practices: GROQ performance, schema design, Visual Editing,
  images, Portable Text, Studio, TypeGen, localization, migrations (26 rules)
- content-modeling-best-practices: Structured content principles
- seo-aeo-best-practices: SEO/AEO with EEAT principles and structured data
- content-experimentation-best-practices: A/B testing methodology

Also includes:
- Updated README with installation instructions (npx skills add)
- Added skills-ref validation (npm run validate)
- Updated MCP documentation to match official docs
- Removed old procedural skills from sanity-plugin/skills/
2026-01-23 15:39:53 -08:00
Jon Eide Johnsen 0bc47d44f3 Merge pull request #4 from sanity-io/feat/app-sdk-rules
feat: create app sdk rules
2026-01-22 01:38:36 +01:00
Charlie Brown 641708281b Update rules/sanity-app-sdk.mdc
Co-authored-by: Ryan Bonial <4294665+ryanbonial@users.noreply.github.com>
2026-01-14 13:34:34 -06:00
Jon Eide Johnsen 7b0689193e Merge pull request #6 from sanity-io/feat/readme-additional-mcp-instructions
feat(readme): update mcp installation instructions
2025-12-18 16:01:38 +01:00