For file-based work, run
primo mcp install to connect your coding agent. The workspace’s AGENTS.md explains its layout; MCP tools provide validation and scaffolds. Review generated code, validate it, and check the rendered result before publishing.Watch the workflow
Build a component with an editable field
Watch the field setup and paste a generated component into Primo. Download video · Download captionsRead the walkthrough
Read the walkthrough
- Open the page type to create a reusable block.
- Switch to content and create a Text field.
- Label the field Headline. Its key is headline.
- Set the default content for the field.
- Reference the field in your component markup.
- Preview the result, then create the block.
Prompt Template
Workflow
1
Generate code
Send the prompt to your chosen AI tool. This workflow uses that external tool to generate code; paste the result into Primo in the next step.
2
Paste into Primo
Copy generated code into a new block’s code editor.
3
Add fields
Switch to Content and add each field with its matching type. Field names in the generated code do not create fields automatically.
4
Test
Preview and refine as needed.
Example
Prompt:Common Issues
AI usesexport let:
Remove legacy export let declarations. The browser compiler supplies field props automatically unless your component declares its own $props(). If you use $props(), declare every field the component reads.
Next Steps
Writing Components
Learn to write components from scratch.
Working with Fields
Master field configuration.