Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问clear审计未展示

theme-factory主题工厂

Agent Skill

theme-factory 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

7,392

周安装

288

GitHub Stars

公开资料未说明

下载量

3,658
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:theme-factory(主题工厂)
来源仓库:https://github.com/chunkytortoise/enterprisehub
仓库路径:skills/theme-factory
安装命令:
npx skills add chunkytortoise/enterprisehub --skill "theme-factory"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add chunkytortoise/enterprisehub --skill "theme-factory"

简介

用于查找、检索和筛选相关信息。theme-factory 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 适合在需要根据关键词或任务场景快速定位候选结果时使用。
  • 可结合来源仓库和原始 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态及是否会触发联网或命令执行。
  • 适用于 Codex、Claude、Cursor、Gemini CLI 等宿主环境。

SKILL.md

name
Theme Factory
description
This skill should be used when implementing "professional styling", "theme systems", "brand consistency", "design tokens", "visual identity", "color schemes", "typography systems", or when creating cohesive visual themes for applications.
version
2.0.0

Theme Factory: Professional Styling and Theming

Overview

This skill provides comprehensive theming capabilities for creating professional, brand-consistent visual identities across applications. It includes theme generators, design token management, and automated styling systems specifically optimized for Streamlit applications.

When to Use This Skill

Use this skill when implementing:

  • Professional brand themes and visual identities
  • Multi-theme support and theme switching
  • Design token systems for consistent styling
  • Dark/light mode implementations
  • Industry-specific themes (real estate, finance, healthcare)
  • Custom brand guidelines and style systems
  • Responsive theme adaptations

Quick Start

1. Basic Theme Creation

from theme_factory import ThemeFactory, ThemeMode

# Create factory and generate theme
factory = ThemeFactory()
theme = factory.create_real_estate_theme(
    primary_color="#1e40af",
    mode=ThemeMode.LIGHT
)

# Apply to Streamlit
from theme_factory import apply_theme_to_streamlit_app
apply_theme_to_streamlit_app("Real Estate Professional (Light)")

2. Theme Customization

# Create luxury theme with dark mode
luxury_theme = factory.create_luxury_real_estate_theme(
    mode=ThemeMode.DARK
)

# Register custom theme
factory.register_theme(luxury_theme)

# Save theme for reuse
factory.save_theme(luxury_theme, Path("themes/luxury_dark.json"))

3. Theme Switching in Streamlit

import streamlit as st
from theme_factory import create_theme_selector

# Add theme selector to sidebar
selected_theme = create_theme_selector()

# Theme is automatically applied to app
st.title("My Application")
st.markdown("This content uses the selected theme")

Core Components

ThemeDefinition

Complete theme specification with design tokens for colors, typography, spacing, shadows, and animations.

See: reference/theme-architecture.md for complete data structures

ThemeFactory

Factory class for generating and managing themes.

Key Methods:

  • create_real_estate_theme() - Professional business theme
  • create_luxury_real_estate_theme() - Premium theme with gold accents
  • register_theme() - Add theme to factory
  • save_theme() / load_theme() - Persistence

StreamlitThemeInjector

Applies themes to Streamlit applications via CSS injection.

See: reference/streamlit-integration.md for implementation details

ColorUtilities

Color manipulation and palette generation utilities.

Key Methods:

  • generate_palette() - Create 10-shade palette from base color
  • lighten_color() / darken_color() - Color adjustments
  • ensure_contrast() - Accessibility compliance

Common Workflows

Creating a Custom Industry Theme

# 1. Define brand colors
brand_primary = "#2563eb"  # Your brand blue
brand_secondary = "#64748b"  # Neutral gray
brand_accent = "#f59e0b"  # Warning/CTA orange

# 2. Create base theme
theme = factory.create_real_estate_theme(
    primary_color=brand_primary,
    mode=ThemeMode.LIGHT
)

# 3. Customize if needed (advanced)
# See: reference/advanced-customization.md

# 4. Apply to app
injector = StreamlitThemeInjector(theme)
injector.inject_theme()

Implementing Dark/Light Mode Toggle

import streamlit as st

# Theme selector in sidebar
if 'theme_mode' not in st.session_state:
    st.session_state.theme_mode = 'light'

mode = st.sidebar.radio("Theme Mode", ['light', 'dark'])

# Apply appropriate theme
theme_name = f"Real Estate Professional ({mode.title()})"
theme = apply_theme_to_streamlit_app(theme_name)

Using Design Tokens in Custom Components

# Access current theme from session state
theme = st.session_state.get('current_theme')

if theme:
    # Use design tokens for consistent styling
    st.markdown(f"""
        <div class="theme-card">
            <h3 class="theme-title">Lead Score: 85/100</h3>
            <p class="theme-text">High-priority lead detected</p>
        </div>
    """, unsafe_allow_html=True)

Available Theme Presets

Real Estate Professional (Light/Dark)

  • Primary: Professional blue (#1e40af)
  • Secondary: Warm gray
  • Accent: Gold (#f59e0b)
  • Typography: Inter, SF Pro Display
  • Use Case: Standard real estate applications

Luxury Real Estate (Light/Dark)

  • Primary: Deep charcoal / Ghost white
  • Secondary: Gold (#d4af37)
  • Accent: Saddle brown
  • Typography: Playfair Display (serif), Montserrat
  • Use Case: High-end luxury property platforms

Design Token System

All themes include comprehensive design token systems:

  • Colors: 10-shade palettes (50-900) for primary, secondary, accent, plus semantic colors
  • Typography: Font families, sizes (xs-6xl), weights, line heights, letter spacing
  • Spacing: Scale from 0px to 384px (96 units)
  • Border Radius: 9 levels from sharp to fully rounded
  • Shadows: 8 elevation levels for depth
  • Animations: Duration and easing functions

See: reference/design-tokens.md for complete specifications

Best Practices

  1. Use Design Tokens: Always reference CSS variables, never hardcode values
  2. Test Both Modes: Verify themes in light and dark mode
  3. Accessibility: Ensure WCAG AA contrast ratios (4.5:1 minimum)
  4. Brand Consistency: Customize themes to match client guidelines
  5. Performance: Minimize CSS complexity, reuse tokens
  6. Documentation: Document custom theme rationale and usage

Troubleshooting

Theme Not Applying

Cause: Theme injector called after components render Solution: Call apply_theme_to_streamlit_app() early in app initialization

Colors Look Wrong

Cause: Mode mismatch (dark colors on light background) Solution: Ensure ThemeMode matches intended display context

Custom Styles Conflicting

Cause: CSS specificity issues Solution: Use inject_component_styles() for targeted overrides

Advanced Usage

For advanced theming scenarios, see:

  • reference/theme-architecture.md - Complete data structures
  • reference/streamlit-integration.md - Advanced CSS injection patterns
  • reference/advanced-customization.md - Creating fully custom themes
  • reference/color-theory.md - Color palette generation algorithms
  • examples/custom-theme-builder.py - Complete custom theme example

Integration with EnterpriseHub

Theme Factory is integrated with EnterpriseHub components:

# In streamlit_demo/app.py
from theme_factory import create_theme_selector

# Add theme selector
create_theme_selector()

# All components automatically use theme
# - Lead dashboards
# - Property cards
# - Analytics charts
# - Executive metrics

See: examples/enterprise-hub-integration.py for complete integration patterns

Quick Reference

TaskCommand
Create themefactory.create_real_estate_theme()
Apply themeapply_theme_to_streamlit_app(name)
Add selectorcreate_theme_selector()
Generate paletteColorUtilities.generate_palette(base)
Save themefactory.save_theme(theme, path)
Load themefactory.load_theme(path)

Next Steps

  1. Start Simple: Use preset themes first
  2. Customize Gradually: Adjust colors, then typography
  3. Test Thoroughly: Verify all components look correct
  4. Document Changes: Record customization rationale
  5. Share Themes: Export themes for reuse across projects

Version: 2.0.0 (Token-Optimized) Original: 1,396 lines Optimized: ~400 lines (71% reduction) Full Documentation: See reference/ directory

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

windsurf

24.97%
按下载量换算913

OpenCode

21.8%
按下载量换算797

Codex

16.91%
按下载量换算619

Claude Code

12.88%
按下载量换算471

Antigravity

8.1%
按下载量换算296

Gemini CLI

3.36%
按下载量换算123

安全审计

暂无安全审计结果可展示。

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills