Prismic Automation
它能做什么
这个工具让你可以直接管理你的 Prismic 网站。你可以搜索特定内容、进行全文搜索、查看内容类型,还可以处理网站的版本。
适用场景
- ✓当你想在 Prismic 中查找特定内容时。
- ✓当你需要找到所有博客文章时。
- ✓当你想查看你在 Prismic 中定义的所有内容类型时。
技能链接
https://github.com/ComposioHQ/awesome-claude-skills/blob/master/composio-skills/prismic-automation/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“在 Prismic 中搜索所有已发布的博客文章,按日期排序,语言为英文。”
每周 5 个新技能,1 分钟读完。
工作原理
使用这个工具前,你需要先连接你的 Prismic 账号。之后,你就可以要求它搜索内容、进行全文搜索,或列出你的内容类型。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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.
Toolkit docs: composio.dev/toolkits/prismic
Setup
- 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
reftoken. Always start by callingPRISMIC_REPOSITORY_API_GET_REFSorPRISMIC_REPOSITORY_API_GET_INFOto 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.
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:
ref(required) -- content release reference ID (typically the master ref)q-- predicate query, e.g.,[[at(document.type, "page")]]page(min 1) andpageSize(1-100) -- paginationlang-- language code, e.g.,en-us(default*for all)orderings-- sort order, e.g.,[my.article.date desc]fetch-- comma-separated fields to fetch, reducing response sizefetchLinks-- resolve linked document fields inline
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:
type(required) -- custom type API ID, e.g.,blog_post,article,pagepage(default 1) andpageSize(1-100, default 20)lang-- language code filterorderings-- sort order, e.g.,[my.article.date desc]after-- cursor-based pagination for deep pagination beyond page 50
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:
q(required) -- full-text predicate, e.g.,[[fulltext(document, "machine learning")]]page,pageSize,lang,orderings-- same pagination/filtering as other queries
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:
document_id(required) -- unique document identifierref(required) -- content ref from repositorylang-- optional language filter
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 pagepage-- 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) fromPRISMIC_REPOSITORY_API_GET_REFSorPRISMIC_REPOSITORY_API_GET_INFObefore querying any documents. Queries without a ref will fail. - Predicate syntax requires double brackets: Prismic queries use double square brackets:
[[at(document.type, "page")]]. For multiple predicates, combine them:[[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
afterparameter with the last document ID from your previous result set.
…
常见问题
我需要连接我的 Prismic 账号吗?
需要。你要连接 Prismic 账号,工具才能访问你的内容。请按照身份验证的说明操作。
怎么搜索特定内容?
你可以按内容类型搜索,使用全文搜索,或者按特定 ID 搜索。例如:“搜索所有 page 类型的文档”。
什么是“ref”?
“ref”相当于内容的某个版本或保存的时间点。获取内容通常需要用到“ref”,你可以通过请求仓库信息来获得它。
详情
作者的原始描述
Automate headless CMS operations in Prismic -- query documents, search content, retrieve custom types, and manage repository refs through the Composio Prismic integration.
热度
- GitHub 星标
- 77k
- 排名
- #2346
- 许可证
- —
- 更新时间
- 2026/9/18
评论
- …
同一仓库的更多技能
artifacts-builder
77k帮助你的智能体构建复杂的用户界面。它借助现代技术,创建功能丰富的交互式网页。
brand-guidelines
77k帮助你的智能体把官方品牌色和字体应用到各类材料中。适合需要体现公司视觉形象的场景,保持视觉统一。
canvas-design
77k让你的智能体创作 .png 和 .pdf 格式的原创视觉作品。当用户需要海报、艺术作品或其他静态设计时使用。
changelog-generator
77k帮助你的智能体根据代码提交记录撰写面向用户的更新说明。它能把技术内容转换成通俗易懂的文字。