Examples
Real-world examples of composable AI prompts
Basic Text Analysis
A simple prompt with parameters
---
id: text-analyzer
name: Text Analyzer
version: 1.0.0
description: Analyzes text for sentiment and key themes
parameters:
- name: text
type: string
required: true
- name: analysis_type
type: enum
values: [sentiment, themes, summary]
default: sentiment
---
# Text Analysis
Analyze the following text for {analysis_type}:
{text}
Provide detailed insights and actionable recommendations.Data Processing with Inheritance
Building on a base prompt template
---
id: advanced-data-processor
name: Advanced Data Processor
version: 2.0.0
description: Advanced data processing with visualization
inherits: "@prompd/base-data-analyzer@1.5.0"
parameters:
- name: dataset
type: string
required: true
- name: visualize
type: boolean
default: false
---
# Advanced Data Processing
Process the dataset: {dataset}
{% if visualize %}
Create visualizations for the key metrics.
{% endif %}
Apply statistical analysis and generate insights.Document Analysis with Binary Assets
Extracting content from Excel and PDF files
---
id: financial-report-analyzer
name: Financial Report Analyzer
version: 1.0.0
description: Analyzes financial reports from Excel and PDF
assets:
- path: ./quarterly-data.xlsx
type: excel
extract: all
- path: ./annual-report.pdf
type: pdf
extract: text
parameters:
- name: fiscal_year
type: string
required: true
---
# Financial Report Analysis - FY {fiscal_year}
Analyze the quarterly data from the Excel file and cross-reference
with the annual report PDF.
Provide:
1. Revenue trends
2. Key performance indicators
3. Risk assessment
4. Strategic recommendationsCode Review with Model Configuration
Advanced example using object parameters for flexible model configuration
---
id: code-reviewer
name: Code Reviewer
version: 1.0.0
description: Comprehensive code review assistant
parameters:
- name: code
type: string
required: true
- name: language
type: string
required: true
- name: focus_areas
type: array
default: [security, performance, maintainability]
- name: model_config
type: object
properties:
provider:
type: string
enum: [openai, anthropic, ollama]
model:
type: string
temperature:
type: number
required: [provider, model]
default:
provider: openai
model: gpt-4o
temperature: 0.7
---
# Code Review - {language}
Review the following {language} code:
```{language}
{code}
```
Focus on: {% for area in focus_areas %}{{ area }}{% if not loop.last %}, {% endif %}{% endfor %}
Provide:
- Security vulnerabilities
- Performance optimizations
- Code quality improvements
- Best practice recommendationsCLI Usage Examples
Create and Run a Prompt
# Initialize a new project folder
prompd init ./my-project
# Run with parameters
prompd run my-project/example.prmd --param text="This product is amazing!"Package and Publish
# Create a package from current directory
prompd package create . my-analyzer.pdpkg
# Validate package
prompd package validate my-analyzer.pdpkg
# Publish to registry
prompd login
prompd publish my-analyzer.pdpkgInstall and Use Published Packages
# Search registry
prompd search "sentiment analysis"
# Install package
prompd install @username/sentiment-analyzer@1.0.0
# Run installed package
prompd run @username/sentiment-analyzer --param text="Great service!"Explore More Examples
Browse hundreds of community-created prompts and packages
Visit Registry →