Awesome-claude-skills-cn Prismic Automation
通过 Composio Prismic 集成自动化无头 CMS 操作——查询文档、搜索内容、获取自定义类型并管理仓库引用。
git clone https://github.com/Athe1st3154/awesome-claude-skills-cn
T=$(mktemp -d) && git clone --depth=1 https://github.com/Athe1st3154/awesome-claude-skills-cn "$T" && mkdir -p ~/.claude/skills && cp -r "$T/composio-skills/prismic-automation" ~/.claude/skills/athe1st3154-awesome-claude-skills-cn-prismic-automation && rm -rf "$T"
composio-skills/prismic-automation/SKILL.mdPrismic 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.
Toolkit docs: composio.dev/toolkits/prismic
设置
- 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
token. Always start by callingref
orPRISMIC_REPOSITORY_API_GET_REFS
to obtain the master ref.PRISMIC_REPOSITORY_API_GET_INFO
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.
Tools:
PRISMIC_REPOSITORY_API_GET_INFO, PRISMIC_REPOSITORY_API_GET_REFS
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:
(required) -- content release reference ID (typically the master ref)ref
-- predicate query, e.g.,q[[at(document.type, "page")]]
(min 1) andpage
(1-100) -- paginationpageSize
-- language code, e.g.,lang
(defaulten-us
for all)*
-- sort order, e.g.,orderings[my.article.date desc]
-- comma-separated fields to fetch, reducing response sizefetch
-- resolve linked document fields inlinefetchLinks
Example prompt: "Query all published blog posts in Prismic, sorted by date descending, in English"
3. Fetch Documents by Type
Retrieve all documents of a specific custom type with automatic master ref resolution.
Tool:
PRISMIC_GET_DOCUMENTS_BY_TYPE
Key parameters:
(required) -- custom type API ID, e.g.,type
,blog_post
,articlepage
(default 1) andpage
(1-100, default 20)pageSize
-- language code filterlang
-- sort order, e.g.,orderings[my.article.date desc]
-- cursor-based pagination for deep pagination beyond page 50after
Example prompt: "Get all blog_post documents in Prismic, 20 per page"
4. Full-Text Search
Search across all text fields in documents for specified terms. Case-insensitive, matches on root words.
Tool:
PRISMIC_CONTENT_API_GET_DOCUMENTS_WITH_FULLTEXT_SEARCH
Key parameters:
(required) -- full-text predicate, e.g.,q[[fulltext(document, "machine learning")]]
,page
,pageSize
,lang
-- same pagination/filtering as other queriesorderings
Example prompt: "Search all Prismic documents for 'machine learning'"
5. Get a Single Document by ID
Retrieve a specific document by its unique identifier.
Tool:
PRISMIC_GET_DOCUMENT_BY_ID
Key parameters:
(required) -- unique document identifierdocument_id
(required) -- content ref from repositoryref
-- optional language filterlang
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:
-- max number of types to return per pagelimit
-- page number (1-indexed)page
-- sort order, e.g.,sortname
Example prompt: "List all custom types in my Prismic repository"
已知陷阱
- Ref is required for all content queries: You must obtain a valid
(typically the master ref) fromref
orPRISMIC_REPOSITORY_API_GET_REFS
before querying any documents. Queries without a ref will fail.PRISMIC_REPOSITORY_API_GET_INFO - Predicate syntax requires double brackets: Prismic queries use double square brackets:
. For multiple predicates, combine them:[[at(document.type, "page")]]
.[[at(document.type, "blog")][at(document.tags, ["featured"])]] - Deep pagination limit: Standard page-based pagination may fail beyond page 50. For deep pagination, use the
parameter with the last document ID from your previous result set.after - 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*
explicitly (e.g.,lang
,en-us
).fr-fr - Integration fields require separate ref: When using
, you need anPRISMIC_CONTENT_API_GET_DOCUMENTS_WITH_INTEGRATION_FIELDS
in addition to the standard contentintegrationFieldsRef
.ref
快速参考
| Tool Slug | Description |
|---|---|
| Get repository metadata, refs, types, languages |
| List all refs (master + releases) |
| List all custom types / content models |
| Query documents with predicates and pagination |
| Fetch documents filtered by custom type |
| Retrieve a single document by ID |
| Full-text search across all documents |
| Filter documents with multiple predicate conditions |
| Fetch documents with integration fields data |
| Fetch documents sorted by specified fields |
由 Composio 提供支持