Overview
The@artifactuse/prompts package provides system prompts that teach AI models how to generate Artifactuse artifacts.
Installation
Usage
Include prompts in your AI’s system message:Available Prompts
| Import | Use Case | Size |
|---|---|---|
canvasPrompt | Graphics, banners, logos | ~4.7KB |
videoPrompt | Video intros, animations | ~6.8KB |
formPrompt | Input forms, wizards | ~1.7KB |
socialPrompt | Social media previews | ~1.5KB |
htmlPrompt | Web pages | ~0.6KB |
jsxPrompt | React components | ~0.7KB |
vuePrompt | Vue components | ~0.5KB |
javascriptPrompt | JavaScript code | ~0.5KB |
pythonPrompt | Python code | ~0.5KB |
jsonPrompt | JSON data | ~0.4KB |
svgPrompt | Vector graphics | ~0.6KB |
diffPrompt | Code diffs | ~0.5KB |
fullPrompt | All artifacts | ~20KB |
Selective Import
Only include what you need to minimize token usage:Helper Functions
CommonJS
Example: Creative Assistant
How Prompts Work
Each prompt contains:- Trigger conditions - When to generate the artifact
- Format specification - Code block syntax
- Schema - Required and optional properties
- Rules - Constraints and best practices