how_to_model_slice
Get step-by-step guidance to create or update Prismic slice models using best practices. Input slice details and content requirements to receive naming conventions, field shapes, and validation steps.
Instructions
PURPOSE: Provide detailed, opinionated guidance to create or update Prismic slice model files using modern best practices, including naming, file placement, allowed fields, shapes, and configuration.
USAGE: Use FIRST for any Prismic slice creation or modeling request. Do not use for component or mock implementation. Input Type Selection Rules:
If the user attaches an image, include "image".
If the user attaches code, include "code".
Include "text" ONLY if the prompt contains model-related information (e.g., explicitly describes desired fields/structure, adds nuance, or overrides what is seen in the code/image).
It is acceptable to include multiple input types when each adds model-relevant signal per the rules above.
RETURNS: Step-by-step modeling instructions, naming conventions, final Prismic model shapes, comprehensive field shape reference, opinionated modeling guidance, validation and testing steps.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sliceMachineConfigAbsolutePath | Yes | Absolute path to 'slicemachine.config.json' file | |
| sliceName | Yes | The name of the slice, it MUST be PascalCase, e.g., 'SliceName', cannot start with a number, and with no special characters allowed | |
| isNewSlice | Yes | Whether this is a new slice creation (true) or updating existing slice (false) | |
| contentRequirements | Yes | Description of what content the slice should contain (e.g., 'hero with title, description, and CTA button') | |
| inputTypes | Yes | The kinds of input present in the prompt. |