Commit Graph

44 Commits

Author SHA1 Message Date
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 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
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
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
Jon Eide Johnsen 6c0d28a01f fix: cursor install link 2025-12-18 12:45:31 +01:00
Jon Eide Johnsen f6e506499f feat(readme): add additional mcp install instructions 2025-12-18 12:27:23 +01:00
Charles Brown 77200c0f97 chore: improve file format 2025-12-12 07:55:09 -06:00
Charles Brown e19dd6b84f chore: update readme 2025-12-12 07:49:09 -06:00
Charles Brown 4636e0ac6d feat: create app sdk rules 2025-12-12 07:43:05 -06:00
Jon Eide Johnsen f442faaa5d Merge pull request #3 from sanity-io/feat/readme-update
feat: add quick overview of installation options in readme
2025-12-12 11:19:28 +01:00
Jon Eide Johnsen c403c938a6 feat: add quick overview of installation options in readme 2025-12-12 11:15:26 +01:00
Jon Eide Johnsen f657d6aa9c Merge pull request #5 from sanity-io/readme-typo
fix: typo in readme
2025-12-11 18:47:40 +01:00
Jon Eide Johnsen 223f90fba1 fix: typo in readme 2025-12-11 18:47:11 +01:00
Jon Eide Johnsen af279e40ef Merge pull request #4 from sanity-io/fix/claude-code-install-instructions 2025-12-11 17:53:28 +01:00
Jon Eide Johnsen 0304bcc62f fix: update claude code install instructions 2025-12-11 17:45:42 +01:00
Jon Eide Johnsen 23ef4ff5ab feat: add sanity agent toolkit 2025-12-11 17:32:26 +01:00