Skill Prompt Generator

repository·main·Indexed 23 days ago

https://github.com/huangserva/skill-prompt-generator

A system for generating high-quality AI image prompts using a 'Skills' architecture. It enables AI agents like Claude Code and OpenAI Codex CLI to act as domain experts in portrait photography, graphic design, and product photography. The system features a multi-layered architecture including a v2.0 CrossDomainGenerator and v1.0 IntelligentGenerator Python API, supported by a Universal Elements Library and a Design Variable Library.

Tokens
7.8K
Snippets
7
Records
44
Agent score
80%

What's inside skill-prompt-generator

  1. Apply Warm & Cute design principles

    main

    The 'Warm & Cute' (温馨可爱) design style is intended for children (ages 3-8), parents, and educators. It focuses on conveying warmth, softness, encouragement, and affinity. Use this style for children's education, parent-child content, enlightenment learning, and family activities.

    Core Emotional Goals:

    • Security: Achieved through soft, rounded shapes.
    • Curiosity: Achieved through bright, interesting elements.
    • Encouragement: Achieved through positive copy and achievement-based elements (stars, medals).
    • Sense of Achievement: Using rewarding visual feedback.
  2. Implement shapes and shadows in Modern Minimalist style

    main

    Shapes

    Use small to medium rounded corners (4-12px) to maintain a modern yet professional look. A standard value is 8px.

    • Avoid: Large rounded corners (>16px), sharp right angles (0px), or full circles.

    Shadows

    Use very soft, subtle shadows to create depth without breaking the flat aesthetic.

    • Format: 0 Xpx Ypx rgba(R,G,B,opacity)
    • X (Horizontal): 0-4px
    • Y (Vertical): 2-8px
    • Opacity: 0.04-0.08
  3. Maintain backward compatibility with v1.0

    main

    If you are upgrading from v1.0, your existing code using IntelligentGenerator will continue to work without modification. While CrossDomainGenerator is the recommended unified interface for new projects, IntelligentGenerator remains available for simple requirements.

    # v1.0 way (still valid)
    from intelligent_generator import IntelligentGenerator
    gen = IntelligentGenerator()
    elements = gen.select_elements_by_intent(intent)
    prompt = gen.compose_prompt(elements)
  4. Configure color palettes for Warm & Cute style

    main

    Use pastel colors with controlled saturation and brightness to ensure the UI is soft but not dull, and bright but not eye-straining.

    Color Specifications:

    • Saturation: 60-70%
    • Brightness (Value): 75-85%

    Recommended Color Systems:

    • Coral Pink: #FF9AA2, #FFB7B2, #FFDAC1
    • Sky Blue: #B5EAD7, #C7CEEA, #E0BBE4
    • Mint Green: #C7CEEA, #98FF98, #B5EAD7
    • Cream: #FFFEF9, #FFF8E7, #FFEDD8

    Color Rules:

    • Primary Color: One color from the pastel palette.
    • Secondary Color: Harmonious colors (analogous or monochromatic).
    • Background: Cream white or very light pastel.
    • Text: Warm charcoal gray #2C2C2C (avoid pure black).
  5. Understand the v2.0 Three-Layer Architecture

    main

    The v2.0 architecture is organized into three layers to support complex prompt generation:

    1. Layer 3: Unified Interface (CrossDomainGenerator): The entry point that performs intelligent routing and type identification.
    2. Layer 2: Specialized Generators:
      • Portrait Generator: Handles standard portraits (v1.0 compatible).
      • Design Bridge: Combines SQLite data with YAML variables (colors, borders, etc.).
      • CrossDomain QueryEngine: Manages multi-domain element retrieval.
    3. Layer 1: Data Layer:
      • elements.db (SQLite): Contains 1,246 elements across 12 domains.
      • variables/ (YAML): Contains design variables like colors.yaml and borders.yaml.

    This structure allows the system to scale from simple portraits to complex, design-heavy, or multi-domain prompts.

  6. Apply Modern Minimalist design principles

    main
    The Modern Minimalist style is designed for professional, efficient, and restrained aesthetics. It is intended for adult audiences and professional settings such as tech products, business presentations, and corporate branding. Use this style to convey professionalism, trust, modernity, and a high-end feel through geometric precision and controlled whitespace.
  7. Understand the Skill Prompt Generator Architecture

    main

    The project is organized into a multi-layered architecture designed to move from high-level agent interaction down to raw data elements:

    1. User Layer: Interaction via Claude Code or OpenAI Codex CLI using natural language to trigger Skills.
    2. Skills Layer: 12 specialized expert Skills (located in .claude/skills/ or .codex/skills/) that handle domain-specific logic (e.g., art-master, design-master, product-master).
    3. Engine Layer:
      • v2.0 Engine (core/): Handles cross-domain queries, variable sampling, and design system integration.
      • v1.0 Engine: The original Python engine supporting the Skills.
    4. Data Layer: The foundation consisting of the Universal Elements Library (1246 elements), a Community Corpus (675 source prompts), and a Design Variable Library (colors, borders, decorations).
  8. Understand the three generation modes

    main

    The system supports three distinct generation modes based on the input intent:

    1. Portrait (portrait): Used for pure portrait photography. It utilizes the portrait domain (containing 502 elements).

      • Example: generator.generate("生成一个年轻女性肖像")
    2. Cross-Domain (cross_domain): Used for complex action or multi-concept scenes. It combines multiple domains (portrait + video + art + common).

      • Example: generator.generate("龙珠悟空打出龟派气功的蜡像3D感")
    3. Design (design): Used for poster, card, or graphic design. It integrates SQLite elements with YAML variables (colors, borders, decorations).

      • Example: generator.generate("温馨可爱风格的儿童教育海报")
  9. Choose a Modern Minimalist sub-style

    main

    Depending on the use case, select one of the following sub-styles:

    1. Tech Future: For AI, software, and tech products. Uses deep blue, purple, or cyan as primary colors with gradients and dot grids.
    2. Business Pro: For B2B, consulting, and corporate services. Uses deep blue, dark green, or neutral gray with geometric lines.
    3. Premium Black-Gold: For luxury and high-end services. Uses black (#1A1A1A) and gold (#D4AF37) with fine lines and gradients.
  10. Configure color palettes for Modern Minimalist style

    main

    Use dark or neutral tones with moderate brightness. Avoid overly bright or dark extremes.

    Common Color Systems:

    • Deep Blue: #1F2937, #374151, #4B5563
    • Purple: #6366F1, #8B5CF6, #A78BFA
    • Dark Green: #059669, #10B981, #34D399
    • Neutral Gray: #1F2937, #374151, #6B7280

    Color Rules:

    • Primary: Dark or saturated colors.
    • Secondary: Harmonious with primary (analogous or complementary).
    • Background: Pure white #FFFFFF or very light gray #F9FAFB.
    • Text: Deep gray #1F2937 for high contrast.