Community寫作與編輯github.com

ComposioHQ/Prismic-Automation

透過 Composio Prismic 整合,自動化 Prismic 的無頭 CMS 操作——查詢文件、搜尋內容、擷取自訂類型及管理儲存庫參考。

Prismic-Automation 是什麼?

此技能讓 AI 助手(如 Claude Code)能夠直接與 Prismic 無頭 CMS 互動,實現文件查詢、全文搜尋、自訂類型管理與儲存庫參考(ref)操作。它包裝了 Prismic 的 Content、Repository 與 Types API,提供直觀的 MCP 工具呼叫。支援關鍵工作流程,包括使用謂詞查詢文件、按類型擷取文件、基於游標的深度分頁,以及語言過濾。使用者需先設定 Composio MCP 伺服器並驗證 Prismic 帳戶。內容查詢一律需要一個有效的 `ref`(通常從 `PRISMIC_REPOSITORY_API_GET_REFS` 擷取)。這項技能對於開發者與編輯者自動化 Prismic 儲存庫的內容操作、突出版本管理、自訂類型發現和效率分頁尤其有用。

相容平台✓Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/ComposioHQ/awesome-codex-skills/tree/main/composio-skills/prismic-automation

Installed? Explore more 寫作與編輯 skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Prismic 自動化

直接從 Claude Code 管理您的 Prismic 無頭 CMS。依照類型查詢文件、全文搜尋內容、檢視自訂類型,並使用儲存庫參考進行內容版本管理。

工具組文件: composio.dev/toolkits/prismic


設定

  1. 將 Composio MCP 伺服器加入您的設定:
    https://rube.app/mcp
    
  2. 系統提示時,連接您的 Prismic 帳戶。代理將提供驗證連結。
  3. 大部分內容查詢需要 ref 令牌。請始終先呼叫 PRISMIC_REPOSITORY_API_GET_REFS 或 PRISMIC_REPOSITORY_API_GET_INFO,以取得主參考。

核心工作流程

1. 取得儲存庫資訊與參考

擷取完整的儲存庫後設資料,包括可用的參考(內容版本)、自訂類型、語言、標籤與書籤。這通常是您第一個 API 呼叫。

工具: PRISMIC_REPOSITORY_API_GET_INFO、PRISMIC_REPOSITORY_API_GET_REFS

無需參數——這些端點會回傳完整的儲存庫設定。refs 欄位至關重要,因為所有內容查詢都需要參考。

範例提示:「取得我的 Prismic 儲存庫資訊和目前的主參考」


2. 使用謂詞查詢文件

利用 Prismic 的謂詞查詢語法,搭配完整的分頁與篩選支援來擷取文件。

工具: PRISMIC_CONTENT_API_QUERY_DOCUMENTS

關鍵參數:

  • ref(必要)——內容發佈參考 ID(通常是主參考)
  • q——謂詞查詢,例如 [[at(document.type, "page")]]
  • page(最小 1)與 pageSize(1-100)——分頁
  • lang——語言代碼,例如 en-us(預設 * 代表全部)
  • orderings——排序順序,例如 [my.article.date desc]
  • fetch——以逗號分隔的欄位列表,減少回應大小
  • fetchLinks——內聯解析連結的文件欄位

範例提示:「查詢 Prismic 中所有已發佈的部落格文章,按日期降序排列,語言為英文」


3. 依類型擷取文件

自動解析主參考後,擷取特定自訂類型的所有文件。

工具: PRISMIC_GET_DOCUMENTS_BY_TYPE

關鍵參數:

  • type(必要)——自訂類型 API ID,例如 blog_post、article、page
  • page(預設 1)與 pageSize(1-100,預設 20)——分頁
  • lang——語言代碼篩選器
  • orderings——排序順序,例如 [my.article.date desc]
  • after——基於游標的分頁,用於超過第 50 頁的深層分頁

範例提示:「取得 Prismic 中所有 blog_post 文件,每頁 20 筆」


4. 全文搜尋

在所有文件的所有文字欄位中搜尋指定詞彙。不區分大小寫,比對字根。

工具: PRISMIC_CONTENT_API_GET_DOCUMENTS_WITH_FULLTEXT_SEARCH

關鍵參數:

  • q(必要)——全文謂詞,例如 [[fulltext(document, "machine learning")]]
  • page、pageSize、lang、orderings——與其他查詢相同的分頁/篩選功能

範例提示:「在所有 Prismic 文件中搜尋「machine learning」」


5. 依 ID 取得單一文件

透過文件的唯一識別碼擷取特定文件。

工具: PRISMIC_GET_DOCUMENT_BY_ID

關鍵參數:

  • document_id(必要)——文件唯一識別碼
  • ref(必要)——來自儲存庫的內容參考
  • lang——可選的語言篩選器

範例提示:「擷取 Prismic 文件 Xx2KLhEAAJljVWaA」


6. 列出自訂類型

探索儲存庫中定義的所有自訂類型(內容模型),包括其結構定義。

工具: PRISMIC_TYPES_API_GET_TYPES

關鍵參數:

  • limit——每頁回傳的最大類型數量
  • page——頁碼(從 1 開始)
  • sort——排序順序,例如 name

範例提示:「列出我的 Prismic 儲存庫中所有自訂類型」


已知陷阱

  • 所有內容查詢都需要參考: 在查詢任何文件之前,您必須先從 PRISMIC_REPOSITORY_API_GET_REFS 或 PRISMIC_REPOSITORY_API_GET_INFO 取得有效的 ref(通常是主參考)。缺少參考的查詢會失敗。
  • 謂詞語法需要雙重括號: Prismic 查詢使用雙方括號:[[at(document.type, "page")]]。對於多個謂詞,請合併它們:[[at(document.type, "blog")][at(document.tags, ["featured"])]]。
  • 深層分頁限制: 標準的基於頁碼的分頁在第 50 頁之後可能失敗。對於深層分頁,請使用 after 參數,並傳入上一結果集中的最後一個文件 ID。
  • pageSize 上限為 100: 請求每頁超過 100 個文件會被拒絕。請使用分頁來迭代更大的結果集。
  • 語言篩選: 預設語言篩選器為 *(所有語言)。如果您需要特定語系的文件,請務必明確傳入 lang(例如 en-us、fr-fr)。
  • 整合欄位需要單獨的參考: 使用 PRISMIC_CONTENT_API_GET_DOCUMENTS_WITH_INTEGRATION_FIELDS 時,除了標準的內容 ref 之外,您還需要一個 integrationFieldsRef。

快速參考

工具縮寫說明
PRISMIC_REPOSITORY_API_GET_INFO取得儲存庫後設資料、參考、類型、語言
PRISMIC_REPOSITORY_API_GET_REFS列出所有參考(主參考 + 發佈版)
PRISMIC_TYPES_API_GET_TYPES列出所有自訂類型 / 內容模型
PRISMIC_CONTENT_API_QUERY_DOCUMENTS使用謂詞和分頁查詢文件
PRISMIC_GET_DOCUMENTS_BY_TYPE依自訂類型篩選擷取文件
PRISMIC_GET_DOCUMENT_BY_ID依 ID 擷取單一文件
PRISMIC_CONTENT_API_GET_DOCUMENTS_WITH_FULLTEXT_SEARCH在所有文件中進行全文搜尋
PRISMIC_CONTENT_API_GET_DOCUMENTS_WITH_PREDICATES使用多重謂詞條件篩選文件
PRISMIC_CONTENT_API_GET_DOCUMENTS_WITH_INTEGRATION_FIELDS擷取包含整合欄位資料的文件
PRISMIC_GET_DOCUMENTS_ORDERED依指定欄位排序擷取文件

由 Composio 提供技術支援

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComposioHQ/-21risk-automation

Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/-2chat-automation

Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/ably-automation

Automate Ably tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abstract-automation

Automate Abstract tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abuselpdb-automation

Automate Abuselpdb tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abyssale-automation

Automate Abyssale tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accelo-automation

Automate Accelo tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accredible-certificates-automation

Automate Accredible Certificates tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/acculynx-automation

Automate Acculynx tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/active-campaign-automation

Automate ActiveCampaign tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/addresszen-automation

Automate Addresszen tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adobe-automation

Automate Adobe tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adrapid-automation

Automate Adrapid tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adyntel-automation

Automate Adyntel tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aeroleads-automation

Automate Aeroleads tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aero-workflow-automation

Automate Aero Workflow tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinda-automation

Automate Affinda tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinity-automation

Automate Affinity tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agencyzoom-automation

Automate Agencyzoom tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agent-deep-links

Build, validate, and troubleshoot deep links for Codex, Cursor, VS Code, Visual Studio, and similar tools. Use when users ask for clickable links (especially in Slack) that open threads, files, folders, or app settings.

相關技能