Project Overview
skill-prompt-generator is an open-source Claude Code Skills library that converts a plain creative brief into a richly detailed, domain-accurate AI image-generation prompt โ eliminating the manual prompt engineering that slows down workflows with tools like Midjourney, DALL-E 3, or Stable Diffusion.
Project Background & Positioning
Why It Exists
Writing effective AI image prompts demands deep vocabulary knowledge in each creative domain: portrait lighting terminology differs fundamentally from poster layout language, product photography material taxonomy, or cinematic motion vocabulary. Most developers and creators lack this breadth, and their prompts are either too generic or internally inconsistent. skill-prompt-generator packages that domain expertise into 12 specialist Claude Code skills backed by a 1,246+ element SQLite database โ call a skill, receive an expert-quality prompt in seconds.
How It Differs From Similar Projects
Unlike static prompt template libraries or single-purpose builders, skill-prompt-generator is a native Claude Code Skills system with intelligent routing. The engine reads the user's intent, automatically selects the correct specialist skill from 12 domain modules, applies semantic consistency checks to prevent clashing elements, and samples from the element database to ensure variety. Version 2.0 adds Cross-Domain Mode for multi-genre scenes and a Design Mode backed by 200,000+ color, border, and layout combinations โ capabilities that far exceed anything achievable with rule-based templates.
Functional Categories
๐ธ Portrait Photography
- 502 curated elements covering lighting, lens, pose, skin texture, expression, and era
- Smart dependency rules (e.g., ancient era auto-triggers traditional styling)
- Examples: golden-hour rim lighting, 85mm f/1.4 bokeh, editorial fashion framing, cinematic color grade
- Purpose: Generate realistic, technically precise portrait prompts for headshots, lifestyle, and editorial work
๐จ Graphic Design & Posters
- 155 elements covering layout, typography, color theory, and print conventions
- Design Mode samples 200,000+ color-border-decoration combinations on every run
- Examples: Swiss grid poster, neon brutalist card, minimalist brand identity, retro concert flyer
- Purpose: Produce visually distinct design prompts that never repeat across runs
๐๏ธ Product Photography
- 77 commercial elements for tabletop lighting, material texture, background, and brand context
- Examples: floating cosmetic bottle, matte ceramic diffuse light, hero-shot beverage, lifestyle flat-lay
- Purpose: Craft prompts for e-commerce, advertising, and catalog imagery with professional composition rules
๐ผ๏ธ Art Styles
- 51 fine-art technique elements spanning classical to contemporary movements
- Examples: Chinese ink wash, impasto oil, generative geometric abstraction, retro pop-art halftone
- Purpose: Apply genre-accurate art vocabulary to any subject for gallery-quality image generation
๐ฌ Video Generation
- 49 motion-aware elements for camera movement, pacing, and dynamic scene composition
- Examples: tracking dolly push-in, slow-motion splash, aerial time-lapse, rack-focus reveal
- Purpose: Generate video prompts for tools like Sora, Kling, or RunwayML with correct cinematographic language
๐ท General Photography Techniques
- 205 elements covering exposure, depth of field, color grading, and compositional framing
- Examples: tilt-shift miniature, cross-process film simulation, HDR landscape, rule-of-thirds crop
- Purpose: Supplement any domain with photographic precision regardless of subject type
Core Highlights
Intelligent 4-Step Domain Routing โ A built-in decision tree inspects the user's intent, classifies the primary domain, detects conflicts, and invokes the most appropriate specialist skill without any manual configuration. Users never need to know which skill to call.
1,246+ Element SQLite Database โ All prompt vocabulary lives in a normalized relational database (elements.db) with domain, category, reusability score, and usage-counter metadata. This makes the library queryable, versionable, and extensible without touching source code.
Three Generation Modes (v2.0) โ Portrait Mode maintains full v1.0 backward compatibility; Cross-Domain Mode blends 2โ4 domain vocabularies for complex scenes; Design Mode wires a YAML variable sampler to 200,000+ color-border-layout combinations for graphic outputs.
Self-Learning Universal Learner โ A built-in extraction pipeline scans any new prompt for undefined features, prioritizes them by category importance, and generates a review report for human approval before committing to the database โ allowing the library to grow autonomously over time.
Semantic Consistency Engine โ Before finalizing a prompt, IntelligentGenerator runs check_consistency() and resolve_conflicts() to detect incompatible element pairings (e.g., neon cyberpunk lighting with a Victorian era background) and auto-corrects them โ preventing incoherent image outputs.
Full Python API + Skills Interface โ Developers can call intelligent_generator.py directly from Python scripts or integrate via the Claude Code Skills interface, supporting both programmatic pipelines and interactive creative sessions.
Use Cases by Role
General Developers
Integrate the Python API into image-generation pipelines. Pass a one-line subject description; receive a production-ready prompt string that can be forwarded directly to a diffusion model API. The self-learning system means the library improves as you feed it new prompts.
DevOps / Automation Engineers
Embed the CrossDomainGenerator into batch jobs that generate marketing assets, product catalog images, or social media content at scale. The 200,000+ combination space ensures visual variety across large runs without manual prompt variation.
Data & Research Teams
Use the SQLite element database as a structured dataset for prompt-engineering research. Export via export_to_json() for version-controlled analysis, query element co-occurrence patterns, and benchmark prompt quality scores stored in source_prompts.
Product & Creative Teams
Use Claude Code Skills interactively: describe a creative concept in plain language, let the routing system choose the right skill (art-master, design-master, video-master, etc.), and iterate on the generated prompt without learning prompt syntax. Design Mode produces on-brand results by encoding color palettes and typography rules in YAML configuration files your team controls.
Quick Start
๐ How to Find Resources
The project's 1,246+ elements are organized by domain in the SQLite database. To explore available elements:
from element_db import ElementDB
db = ElementDB("extracted_results/elements.db")
print(db.get_stats()) # Library-wide metrics
results = db.search_by_domain("portrait", min_reusability=0.7)
The .claude/SKILL_ROUTING_GUIDE.md documents the full 4-step decision tree and all 12 skill definitions. The knowledge_base/ directory contains human-readable guides (e.g., color control theory).
๐ How to Install / Integrate
Prerequisites: Python 3.9+, anthropic>=0.7.0, pyyaml>=6.0
# 1. Clone the repository
git clone https://github.com/huangserva/skill-prompt-generator.git
cd skill-prompt-generator
# 2. Install dependencies
pip install -r requirements.txt
# 3. Generate a prompt via Python API
python - <<'EOF'
from intelligent_generator import assemble_prompt_from_elements, query_candidates_by_intent
intent = "a confident young woman in a sunlit cafรฉ, editorial fashion style"
elements = query_candidates_by_intent(intent)
prompt = assemble_prompt_from_elements(elements, subject_desc=intent)
print(prompt)
EOF
Claude Code Skills Integration
Place the .claude/ directory in your project root and open the project in Claude Code. All 12 skills become available immediately โ no additional configuration required:
# In Claude Code, simply describe your image:
> Generate a product shot for a matte black water bottle on a marble surface
# โ Routes automatically to product-master skill
v2.0 Cross-Domain Mode
from core.cross_domain_generator import CrossDomainGenerator
gen = CrossDomainGenerator()
result = gen.generate(
intent="cyberpunk city street at night with neon reflections",
mode="cross_domain" # auto-detected if omitted
)
print(result["prompt"])
๐ค How to Contribute
# Fork and clone
git clone https://github.com/<your-username>/skill-prompt-generator.git
cd skill-prompt-generator
# Create a feature branch
git checkout -b feature/add-architecture-domain
# Add new elements via the ElementDB API (preferred over direct SQL)
python - <<'EOF'
from element_db import ElementDB
db = ElementDB("extracted_results/elements.db")
db.add_element(
domain="architecture",
category="style",
template="brutalist concrete faรงade with exposed aggregate",
keywords=["brutalism", "concrete", "architecture"],
reusability_score=0.85
)
EOF
# Run the universal learner to discover undefined features
python -c "from intelligent_generator import IntelligentGenerator; IntelligentGenerator().run_learner()"
# Commit and open a pull request
git add -A && git commit -m "feat: add architecture domain elements"
git push origin feature/add-architecture-domain
Project Structure
skill-prompt-generator/
โโโ intelligent_generator.py # Main generation engine & IntelligentGenerator class
โโโ element_db.py # ElementDB CRUD, search, import/export
โโโ framework_loader.py # YAML framework loading utilities
โโโ prompt_framework.yaml # Seven-category framework configuration (v1.0)
โโโ requirements.txt # Python dependencies
โ
โโโ core/ # v2.0 architecture modules
โ โโโ cross_domain_generator.py # Unified three-mode generation interface
โ โโโ cross_domain_query.py # Cross-domain element retrieval engine
โ โโโ design_bridge.py # YAML design-system โ prompt bridge
โ โโโ variable_sampler.py # 200K+ combination sampler
โ โโโ yaml_sampler.py # YAML variable loading & random sampling
โ โโโ schema_migration_v1.sql # Database migration script
โ
โโโ .claude/ # Claude Code integration
โ โโโ claude.md # Architecture rules & design principles
โ โโโ SKILL_ROUTING_GUIDE.md # 4-step routing decision tree
โ โโโ skills/ # 12 skill directories
โ โโโ intelligent-prompt-generator/ # Portrait photography
โ โโโ art-master/ # Fine-art styles
โ โโโ design-master/ # Graphic design & posters
โ โโโ product-master/ # Product photography
โ โโโ video-master/ # Video generation
โ โโโ prompt-master/ # Orchestrator skill
โ โโโ domain-classifier/ # Intent classification
โ โโโ prompt-analyzer/ # Prompt quality analysis
โ โโโ prompt-extractor/ # Feature extraction
โ โโโ prompt-xray/ # Prompt structure inspection
โ โโโ universal-learner/ # Self-learning pipeline
โ โโโ prompt-crafter/ # Design-system prompt builder
โ
โโโ variables/ # Design system YAML configs
โ โโโ colors.yaml # 37 color schemes (warm-cute + modern-minimal)
โ โโโ borders.yaml # Border style definitions
โ โโโ decorations.yaml # Decoration element library
โ
โโโ design-logic/ # Design template directories
โ โโโ modern-minimal/ # Deep-blue / neutral professional style
โ โโโ warm-cute/ # Coral-pink / sky-blue accessible style
โ
โโโ knowledge_base/ # Human-readable domain guides
โ โโโ how_to_control_color.md
โ
โโโ extracted_results/ # Generated prompt outputs (gitignored DB)
โโโ .gitignore # Preserves elements.db locally
Related Ecosystem
Upstream Platforms
- Claude Code (Anthropic) โ The skills runtime that executes all 12 domain skills; the
.claude/directory integrates directly without plugins - Anthropic Python SDK (
anthropic>=0.7.0) โ Powers the AI-assisted feature extraction in the Universal Learner pipeline
Image Generation Targets
- Midjourney โ Primary prompt destination; the element vocabulary aligns with Midjourney's parameter conventions
- DALL-E 3 / GPT-Image โ Compatible prompt structure; Design Mode outputs suit OpenAI's style descriptors
- Stable Diffusion / ComfyUI โ Prompt strings are plain-text compatible with any SD frontend
- Sora / Kling / RunwayML โ Video Master skill outputs cinematographic language suitable for video generation APIs
Complementary Tools
- SQLite Browser โ Inspect and manually edit
elements.dbfor bulk element management - PyYAML โ Powers the variable sampler and design-system configuration layer
- Pandas (optional) โ Useful for bulk analysis of
source_promptsquality scores
License
MIT License
| โ Commercial use | Permitted โ use in products, SaaS, client work |
| โ Modification | Permitted โ fork, extend, rebrand |
| โ Distribution | Permitted โ redistribute with attribution |
| โ Private use | Permitted โ internal tools, research |
| โ Liability | No warranty provided; use at your own risk |
| โ Trademark | MIT does not grant trademark rights to the project name |
| โน๏ธ Attribution | Include the original MIT license text in distributions |
FAQ
Q: Do I need a Claude API key to use the prompt generator?
A: The core Python generation engine (intelligent_generator.py, element_db.py) runs locally with no API calls. The Claude API is only used by the Universal Learner's AI-assisted feature extraction step โ all other generation is deterministic Python.
Q: How do I add a new creative domain (e.g., architecture or fashion illustration)?
A: Use ElementDB.add_element() to insert vocabulary with a new domain value, then create a corresponding skill directory under .claude/skills/ following the existing skill template. The routing system picks up new domains automatically once their keywords are registered in SKILL_ROUTING_GUIDE.md.
Q: What is the difference between v1.0 and v2.0?
A: v1.0 supports Portrait Mode only (502 elements, 7-category framework). v2.0 expands to 1,246+ elements, adds Cross-Domain Mode and Design Mode, raises SQLite utilization from 40% to 80%, and introduces 200,000+ design combinations. v2.0 is 100% backward-compatible; existing v1.0 calls require no changes.
Q: Can the generated prompts be saved and reused?
A: Yes. save_generated_prompt() persists every generated prompt to the source_prompts table with a quality score, user intent, and the element IDs used. The Universal Learner can later scan these stored prompts to discover new vocabulary for the library.
Q: How does the consistency checker prevent bad element combinations?
A: check_consistency() evaluates element pairs against hard-coded incompatibility rules (era conflicts, lighting contradictions, style clashes). resolve_conflicts() applies a priority hierarchy โ subject > lighting > style > background โ and replaces lower-priority conflicting elements with compatible alternatives automatically.
Quick Links
- Repository: https://github.com/huangserva/skill-prompt-generator
- v2.0 Release Notes:
README_v2.0.mdin the repository root - Migration Guide:
UPGRADE_GUIDE_v2.0.mdin the repository root - Routing Reference:
.claude/SKILL_ROUTING_GUIDE.md - Architecture Principles:
.claude/claude.md - Issues & Feature Requests: https://github.com/huangserva/skill-prompt-generator/issues
Summary
skill-prompt-generator is the most complete open-source Claude Code Skills implementation for AI image prompt generation, combining a 1,246+ element domain database, intelligent routing across 12 specialist skills, and a self-learning pipeline that expands the library over time. It is the right tool for any developer, creative team, or automation engineer who wants professional-grade AI image prompts without manually mastering the vocabulary of every visual domain.