Loading...
Loading...
Universal Learner - Automatically extract reusable elements from Prompts in any field, continuously learn and accumulate knowledge
npx skill4agent add huangserva/skill-prompt-generator universal-learnerLearn this Prompt: [Paste the complete Prompt]Analyze and learn: A premium collector's edition book photographed with Phase One camera, featuring Italian calfskin binding...Batch learn all PromptsLearn all Prompts in extracted_modules.jsonOnly learn Prompts in the product fieldLearn Prompt #1, #6, #14, #16 (Product Photography)Learn this design system: [Paste the complete design system specifications]Learn this workflow module: [Complete workflow content]Input Prompt
↓
【Step 0: Type Identification】⭐ Newly Added
- Determine if it is "image description type" or "design system type"
- Design system features: Contains "design system", "style specifications", has hierarchical structure
- Output: {"type": "prompt" | "design_system"}
↓
【Step 0.1: Module System Judgment】⭐ Key Enhancement
- Detect keywords: 【Module】【System】【Workflow】【Framework】
- YES → Module system mode (Need to save complete original content)
- NO → Normal learning mode (Only extract elements)
↓
【Step 1: Domain Classification】domain_classifier.md
- Identify main fields (product/design/art/video...)
- Determine if it involves multiple fields
- Output: {"primary": "product", "secondary": ["photography"]}
↓
【Step 2: Element Extraction】element_extractor.md
- Extract corresponding elements according to the field
- product → product_types, materials, photography_techniques
- design → layouts, effects, typography
- art → art_styles, special_effects
- Output: List[{category, name, template, keywords}]
↓
【Step 3: Automatic Tagging】tagger.md
- Generate tags based on keywords
- Add domain tags and category tags
- Cross-domain tag recognition (luxury, glass, dynamic...)
- Output: List of tags
↓
【Step 4: Calculate Reusability】
- reusability_score (1-10)
- Based on: Universality, Clarity, Independence
↓
【Step 5: Update Database】library_updater.md
- Check for existing elements (deduplication)
- Generate element_id
- Write to elements.db
- Update tag_index
↓
【Step 5.1: If it is a Design System】⭐ Newly Added
- Create template record at the same time
- Write to design_templates table
- Associate all extracted elements
- Save complete information such as design concepts and usage guidelines
↓
【Step 5.2: If it is Module System Mode】⭐ Key Enhancement
- Save complete original content to visual_reference field
- Including: Complete workflow, all templates, configuration parameters, etc.
- Purpose: Can be used directly without recombining elements
↓
【Step 6: Generate Report】
- List of newly learned elements
- Grouped by field and category
- Recommended tags
- Quality evaluation
- (Design System) Additional template information display# Universal Learner - Learning Report
**Learning Time**: 2026-01-01 18:30:00
**Source Prompt**: Prompt #1
## 🎯 Domain Identification
Primary Domain: **product** (Product Photography)
Secondary Domain: **common** (General Photography)
## 📦 Extracted Elements
### Product Types (product_types)
1. **collector_edition_book** - Collector's Edition Book
- Template: premium collector's edition book, luxury binding, Italian calfskin cover
- Keywords: collector's edition, premium book, luxury binding
- Tags: product, book, luxury, collectible
- Reusability: 7.5/10
- element_id: product_product_types_001
### Material Textures (material_textures)
2. **glossy_reflective** - Glossy Reflective Material
- Template: high-end glossy surface, reflective finish, metallic sheen
- Keywords: glossy, reflective, shiny, polished
- Tags: material, glossy, luxury, product
- Reusability: 8.5/10
- element_id: product_material_textures_002
### Photography Techniques (photography_techniques)
3. **macro_product_shot** - Product Macro Close-up
- Template: Phase One medium format camera with 100mm macro lens, razor-sharp focus
- Keywords: macro, close-up, detailed, high-resolution
- Tags: photography, macro, product, technical
- Reusability: 9.0/10
- element_id: common_photography_techniques_032
## ✅ Added to Database
- 3 new elements have been written to elements.db
- Updated 12 tag indexes
- Product field: 60 → 63 elements
- Common field: 31 → 32 elements
## 💡 Quality Evaluation
- Extraction Completeness: 95%
- Tag Quality: Excellent
- Average Reusability Score: 8.3/10| Score | Criteria |
|---|---|
| 9-10 | Extremely high reusability: Cross-domain universal, such as "macro photography", "soft lighting" |
| 7-8 | High reusability: Universal within the domain, such as "product on table", "geometric layout" |
| 5-6 | Medium reusability: Specific scenario, such as "collector's edition book" |
| 3-4 | Low reusability: Very specific, such as "vintage 1960s typewriter" |
| 1-2 | Extremely low reusability: One-time description, not recommended for extraction |
extracted_results/extracted_modules.jsonextracted_results/elements.dbextracted_results/universal_elements_library.json| Module | File | Function |
|---|---|---|
| Domain Classifier | | Identify which domain the Prompt belongs to |
| Element Extractor | | Extract reusable elements |
| Tag Generator | | Automatically generate tags |
| Library Updater | | Update the database |