AI Skill Hub 强烈推荐:主题套件 是一款优质的MCP工具。AI 综合评分 8.0 分,在同类工具中表现稳健。如果你正在寻找可靠的MCP工具解决方案,这是一个值得深入了解的选择。
主题套件 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
主题套件 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/isamercan/ThemeKit
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"----": {
"command": "npx",
"args": ["-y", "themekit"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 主题套件 执行以下任务... Claude: [自动调用 主题套件 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"____": {
"command": "npx",
"args": ["-y", "themekit"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
Native, brand-neutral SwiftUI design system — 175 token-bound components that re-skin from a single accent color: light/dark, per-subtree, zero core dependencies.
Docs · API (DocC) · Wiki · npm (MCP) · Releases · Issues · Changelog
<p align="center"> <img src="Screenshots/Banner.png" alt="ThemeKit — native SwiftUI design system: 204 components, fully tokenized, per-subtree theming, Swift 6, Liquid Glass, light + dark" width="820"> </p>
The banner above is rendered by ThemeKit itself (its own tokens + components) — the same render pipeline that paints every tile in the gallery.
A theme-driven, brand-neutral SwiftUI component library. Every color, typography, spacing, radius and shadow is a design token resolved at runtime from the active Theme, so the whole UI re-skins from a single accent color — without touching component code. Components never hardcode a color — swap the theme and everything follows.
import ThemeKit
- 🎨 Figma → ThemeKit — design_via_figma_mcp reads a design through a Figma MCP server, the LLM maps it to idiomatic ThemeKit, and the server verifies it (get_component_api / validate_code); see the Advanced — Figma & MCP section. - 🔁 Code ⇄ Figma round-trip — export_figma_variables turns the token catalog + 32 presets into a themeable Figma Variables library (one mode per preset); import_figma_variables pulls any company's Figma file back into a live ThemeConfig that re-skins every component. One vocabulary, both directions. - 🪄 Design Mode — point ThemeKit at a free-form design.md (or a bundled style — Linear, Notion, iOS, Brutalist, Pastel) and it re-skins every component to match, via an offline heuristic parser (+ an optional LLM path). - 🤖 AI-native — a 22-tool MCP server, a Claude Code Agent skill, and an llms.txt, so agents generate correct, token-bound UI — all from one source. - 🧩 Design tokens everywhere — colors / radius / spacing from JSON, typography / shadows in code; one semantic name (fg-hero, rd-sm), different values per theme. - 🌈 33 theme presets — ThemeKit's Default plus 32 ready-made color sets (cupcake, dracula, cyberpunk, nord…) inspired by daisyUI, each recoloring the whole Ant-style palette on device. - 📸 Snapshot + render testing — every component renders to a theme-aware PNG via ImageRenderer; the suite guards tokens, themes, validation and renders. - 204 components — Atoms / Molecules / Organisms, all token-bound. - 🧬 Flexibility architecture — six archetype style protocols (CardStyle, FieldStyle, ChipStyle, BarStyle, MeterStyle, ToastStyle, ListRowStyle) let you re-skin a whole component family with .cardStyle(_:) / .fieldStyle(_:) / etc., ViewBuilder slots (.leading{}, .trailing{}, .empty{}…) inject custom content, and config modifiers accept theme tokens (.spacing(SpacingKey), .cornerRadius(RadiusRole)) alongside raw values — all additive, defaults pixel-identical. - Runtime theming — a Swift token generator + a live configurator turn any accent (or base-100) color into a full Ant-style palette on device (no Python, no baked files). - Validation — pure, testable predicates + a SwiftUI presentation layer. - Accessibility — Dynamic Type and Reduce Motion honored throughout. - Localization — English-default strings via a bundled String Catalog; translate the entire library by dropping one ThemeKit.xcstrings into your app (no per-call code), with restart-free in-app language switching. Every default is also overridable per call. - 📅 Calendar add-on — ThemeKitCalendar adds a token-bound date-range picker (DateRangePicker, built on Almanac) that re-skins with the active theme; opt-in, iOS-only. - Zero-dependency core — Lottie and the Calendar are opt-in, separate products. - DocC catalog, a demo app, and a test suite.
| Platforms | iOS 15.6+ · macOS 14+ · *Calendar add-on: iOS 17+* |
| Swift tools | 6.2 |
| Dependencies | none (core) · lottie-ios 4.4.0+ (Lottie add-on) · Almanac 0.2.0+ (Calendar add-on, iOS 17+ only) |
Swift Package Manager. In Xcode: File ▸ Add Package Dependencies… and enter the repository URL, or add it to your Package.swift:
dependencies: [
// Core only — a plain install resolves ZERO third-party packages.
.package(url: "https://github.com/isamercan/ThemeKit.git", from: "1.3.0"),
// Opt into an add-on's dependency via package traits (Swift 6.1+):
// .package(url: "https://github.com/isamercan/ThemeKit.git", from: "1.3.0",
// traits: ["Lottie", "Calendar"]),
],
targets: [
.target(
name: "MyApp",
dependencies: [
.product(name: "ThemeKit", package: "ThemeKit"),
// Or, for just the theme layer (tokens + @Environment(\.theme), no components):
// .product(name: "ThemeKitCore", package: "ThemeKit"),
// Only with the matching trait enabled above:
// .product(name: "ThemeKitLottie", package: "ThemeKit"),
// .product(name: "ThemeKitCalendar", package: "ThemeKit"),
]
),
]
Install the theme once at the root, then build with token-bound views:
@main
struct MyApp: App {
init() { Theme.shared.applyPersistedConfig() } // restore last-used theme (optional)
var body: some Scene {
WindowGroup {
ContentView().themeKit() // inject + repaint on theme change
}
}
}
struct ContentView: View {
@ThemeContext private var theme
var body: some View {
VStack(spacing: theme.spacing(.md)) {
Text("Welcome").textStyle(.headingBase)
PrimaryButton("Get started") { await signIn() }
}
.padding(theme.spacing(.base))
.background(theme.background(.bgWhite))
.cornerRadius(.base)
.themeShadow(.elevated)
}
}
Theme.shared.loadTheme(named: "oceanTheme") // runtime switch
The demo app on device — the component catalog, live theming, the design-token gallery, and a full booking flow built entirely from ThemeKit components.
![]() Component catalog |
![]() Live theming · 33 presets |
![]() Design-token gallery |
![]() Theme Generator |
![]() Button · variants |
![]() DataTable · sort/paginate |
![]() Example · search |
![]() Example · detail |
Real screens from the bundled Demo app, not mockups — every pixel is a ThemeKit component reading live design tokens.
Demo/ — a SwiftUI app (local package reference) with Components (gallery), Themes (the ThemePicker + a live preview), Colors (token gallery + live Theme Configurator), Type, Layout (spacing / radius / shadow tokens), and Example (a full flow built from the real components), plus a light/dark switcher.
The library ships a runtime token generator (ThemeGenerator, a Swift port of tools/gen_tokens.py): from a handful of inputs it regenerates the whole palette, neutral ramp, surfaces, borders, text, and radius / spacing / font / shadow ramps — on device, no Python and no baked palette files.
The Demo's Theme Configurator (Colors tab) lets you dial in an accent color + tint + scale knobs + font + dark and exports a ThemeConfig recipe. To apply one:
// a) one-liner (paste the configurator's "Apply (Swift)" export)
Theme.shared.applyGenerated(primaryHex: "ff0d87", tint: 0.13, radiusScale: 1.0, font: "Montserrat")
// b) ship the Codable recipe as a resource (the configurator's `theme.json`)
let cfg = try ThemeConfig(jsonData: Data(contentsOf: themeJSONURL))
Theme.shared.apply(cfg)
Theme.shared.persistConfig() // remember across launches
// c) generator-free: bundle the pre-baked token JSON ("Copy full token JSON")
Theme.shared.setTheme(jsonData: Data(contentsOf: tokensURL))
ThemeConfig is Codable / Sendable / Equatable — persist it, sync it, A/B it.
175 token-bound components, grouped by complexity:
- Atoms (44) — Badge, Chip, Avatar, Icon, Rating, Spinner, StatusDot, ProgressBar, PriceTag, PointsBadge, CountdownTimer, QRCode, Barcode, Aura, TiltCard, CodeBlock… - Molecules (64) — TextInput, OTPInput, Select, Checkbox, RangeSlider, SearchBar, TimeField, GuestSelector, PriceHistogram, InstallmentSelector, CurrencyPicker, Dropdown, ScrubGallery, buttons… - Organisms (67) — Card, Carousel, DataTable, Accordion, Timeline, NavigationBar, Sidebar, FlightCard, FareSummary, ReviewCard, LoyaltyCard, SeatMap, LocationCard, HotelResultCard, BoardingPass, BrowserFrame, WindowFrame, PhoneFrame…
Every component is curated by category in the DocC catalog, and listed with a verified usage snippet on the docs site — Atoms · Molecules · Organisms.
Rendered straight from the library via ImageRenderer (plain <img> so they render everywhere, including the GitHub mobile app) — regenerate with make screenshots. Interactive overlays (Dialog, Drawer, Tour, BottomSheet…) and media components are best seen live in the Demo app.
Zero-config assumes Bundle.main + table "ThemeKit". If your catalog ships in an app extension (whose .main is the extension) or in a framework that embeds ThemeKit, or you use a different table name, point ThemeKit at it once at launch:
ThemeKitStrings.register(bundle: .myFrameworkBundle, table: "ThemeKit")
Precedence (highest wins): per-call parameter (e.g. ValidationRule.required("…")) → your catalog (forced locale → device language → your English rewording) → ThemeKit's bundled catalog → the English source. Per-call overrides always win; with no consumer catalog the output is byte-identical to stock ThemeKit. Full walkthrough: Localization guide · design rationale: ADR-0003.
Note:.xcstringsresolves only when compiled — Xcode/xcodebuilddo this for app targets automatically (a bareswift buildof the library copies it verbatim). Your catalog lives in the app target, so real apps are always fine.
ThemeKit 是一个原生且品牌中立的 SwiftUI 设计系统。它包含 135 个基于 Token 绑定的组件,能够通过单一的 Accent Color 实现全套皮肤的快速重绘,支持 Light/Dark 模式以及按子树(per-subtree)进行主题定制。该库核心部分零依赖,旨在为开发者提供高度灵活且易于维护的 UI 解决方案。
ThemeKit 支持强大的 Figma 联动能力:通过 `design_via_figma_mcp` 配合 Figma MCP server,LLM 可以直接读取设计稿并将其映射为符合 ThemeKit 规范的代码,并通过 `get_component_api` 与 `validate_code` 进行校验。此外,它还支持 Code ⇄ Figma 的双向同步,利用 `export_figma_variables` 将 Token 目录和 32 种预设转换为 Figma Variables 库,实现设计与代码的高度一致性。
本项目对系统环境有一定要求:平台需支持 iOS 17+ 或 macOS 14+;Swift 工具链版本需为 6.2。核心库本身不依赖任何第三方库,但若需使用 Lottie 动画扩展,需集成 `lottie-ios` 4.4.0+;若需使用日历扩展(仅限 iOS),则需集成 `Almanac` 0.2.0+。
您可以通过 Swift Package Manager (SPM) 轻松集成 ThemeKit。在 Xcode 中,通过 *File ▸ Add Package Dependencies…* 并输入仓库 URL 即可;或者直接在您的 `Package.swift` 文件中添加依赖项,指定版本号为 `0.3.0` 或更高。对于需要动画功能的项目,请记得在 targets 中额外添加 Lottie 相关的 product。
使用非常直观:只需在 App 的入口处(如 `@main` 结构体)调用 `Theme.shared.applyPersistedConfig()` 来恢复上次使用的主题配置,并在根视图上使用 `.themeKit()` 进行注入。在视图层级中,通过 `@ThemeContext` 属性包装器即可获取当前主题上下文,实现响应式的主题重绘,确保 UI 始终与 Token 保持同步。
ThemeKit 内置了运行时 Token 生成器 `ThemeGenerator`(由 Python 工具移植而来),它可以在设备端直接根据少量输入重新生成完整的调色板、中性色阶、表面色、边框、文本以及圆角/间距/字体/阴影等 Ramp。这意味着您无需预置庞大的调色板文件,也不需要 Python 环境,即可通过 Theme Configurator 实现动态的主题定制。
ThemeKit 提供了丰富的组件库,共计 135 个基于 Token 的组件,按复杂度分为不同层级:Atoms(原子级)包含 `Badge`、`Avatar`、`Spinner`、`QRCode` 等 34 个基础组件;Molecules(分子级)包含 `TextInput`、`Select`、`Checkbox` 等 51 个交互组件。所有组件均通过 `ImageRenderer` 进行预览,确保在不同平台(包括 GitHub Mobile)上都能正确渲染。
一个不错的SwiftUI设计系统,值得关注
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
总体来看,主题套件 是一款质量优秀的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | ThemeKit |
| 原始描述 | 开源MCP工具:Theme-driven, brand-neutral SwiftUI design system — re-skin your whole app from 。⭐9 · Swift |
| Topics | design-systemswiftcomponent-library |
| GitHub | https://github.com/isamercan/ThemeKit |
| License | MIT |
| 语言 | Swift |
收录时间:2026-07-04 · 更新时间:2026-07-04 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端