prismic-api

Query and manage Prismic CMS documents, custom types, and slices via HTTP APIs.

Updated May 11, 2026
One-click install
npx skills add https://github.com/mmnavarr/harness --skill prismic-api-mmnavarr
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prismic-api
Source: https://github.com/mmnavarr/harness/tree/main/skills/prismic-api
Command: npx skills add https://github.com/mmnavarr/harness --skill prismic-api-mmnavarr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Working with a Prismic CMS repository requires juggling three separate APIs (Content, Custom Types, Migration) with different authentication tokens, ref resolution, and URL-encoded predicate queries. This Skill centralizes that knowledge and provides ready-made scripts so you can query documents, manage content models, and migrate content without memorizing endpoint details. ## Core Features & Use Cases - Content Querying: Search documents by type, UID, or full-text using the Content API with automatic master ref resolution and jq filtering. - Schema Management: List, create, update, and delete custom types and shared slices through the Custom Types API. - Content Migration: Create, update, and delete documents programmatically via the Migration API, including adding slices like FAQ accordions to existing pages. - Use Case: You need to audit all A/B test experiments in your Prismic repo. Run the list-experiments script to get every experiment's UID, enabled status, and slice types in one command, then drill into a specific experiment's variations. ## Quick Start Ask the AI to list all experiments in the Prismic repository along with their enabled status using the prismic-api skill.

Frequently Asked Questions about prismic-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query Prismic documents by type or UID?▼

Use the Content API search endpoint with a URL-encoded predicate query like [[at(document.type,"page")]] or [[at(my.page.uid,"about")]]. The included query-document.sh script handles encoding and ref resolution automatically.

How to create or update Prismic documents programmatically?▼

Use the Migration API at migration.prismic.io with POST /documents to create and PUT /documents/{id} to update. It requires the migration token sent as both Authorization Bearer and x-api-key headers, distinct from the Content API token.

Can I add a new slice type to a custom type via the Prismic API?▼

No. Adding a slice to a custom type's slice zone cannot be done through the Custom Types API and must be configured in the Slice Machine UI. The Migration API rejects documents containing slices not allowed in the target slice zone.

What authentication does the Prismic Custom Types API require?▼

The Custom Types API requires a bearer token sent in the Authorization header plus a repository header. Credentials are injected from 1Password using op inject with the provided .env.example template, and the .env file should be sourced, never printed.

Why does my Prismic Migration API request return a 422 error?▼

A 422 response means the request body is invalid or the referenced document ID does not exist. Save the API response to a file and inspect it with jq before parsing to identify the exact validation failure.