Automate headless CMS operations in Prismic -- query documents, search content, retrieve custom types, and manage repository refs through the Composio Prismic integration.
SKILL.md
Prismic Automation
Manage your Prismic headless CMS directly from Claude Code. Query documents by type, full-text search content, inspect custom types, and work with repository refs for content versioning.
Add the Composio MCP server to your configuration:
https://rube.app/mcp
Connect your Prismic account when prompted. The agent will provide an authentication link.
Most content queries require a ref token. Always start by calling PRISMIC_REPOSITORY_API_GET_REFS or PRISMIC_REPOSITORY_API_GET_INFO to obtain the master ref.
Core Workflows
1. Get Repository Info and Refs
Retrieve comprehensive repository metadata including available refs (content versions), custom types, languages, tags, and bookmarks. This is typically your first API call.
No parameters required -- these endpoints return the full repository configuration. The refs field is critical since refs are required for all content queries.
Example prompt: "Get my Prismic repository info and the current master ref"
2. Query Documents with Predicates
Fetch documents using Prismic's predicate query syntax with full pagination and filtering support.
Tool:PRISMIC_CONTENT_API_QUERY_DOCUMENTS
Key parameters:
ref (required) -- content release reference ID (typically the master ref)
Example prompt: "Fetch Prismic document Xx2KLhEAAJljVWaA"
6. List Custom Types
Discover all custom types (content models) defined in the repository, including their structure definitions.
Tool:PRISMIC_TYPES_API_GET_TYPES
Key parameters:
limit -- max number of types to return per page
page -- page number (1-indexed)
sort -- sort order, e.g., name
Example prompt: "List all custom types in my Prismic repository"
Known Pitfalls
Ref is required for all content queries: You must obtain a valid ref (typically the master ref) from PRISMIC_REPOSITORY_API_GET_REFS or PRISMIC_REPOSITORY_API_GET_INFO before querying any documents. Queries without a ref will fail.
Deep pagination limit: Standard page-based pagination may fail beyond page 50. For deep pagination, use the after parameter with the last document ID from your previous result set.
pageSize cap is 100: Requesting more than 100 documents per page will be rejected. Use pagination to iterate through larger result sets.
Language filtering: The default language filter is * (all languages). If you need documents in a specific locale, always pass lang explicitly (e.g., en-us, fr-fr).
Integration fields require separate ref: When using PRISMIC_CONTENT_API_GET_DOCUMENTS_WITH_INTEGRATION_FIELDS, you need an integrationFieldsRef in addition to the standard content ref.