创建主题

创建主题 is a skill for Claude Code, Codex from jianchen08/Agent-os-open. It costs 83 tokens per session (3,392 once invoked), scanned A, original, Apache-2.0.

A set of rules for creating or changing frontend visual themes through configuration. It covers colors, interface components, effects, backgrounds, naming, accessibility, and how preset themes are registered.

In plain words
What is it for?
Adding or modifying light, dark, special, or base themes in a frontend project, including their configuration files and preset registration.
Why use it?
It prevents theme changes from being added through the wrong system or breaking the expected theme structure and color-contrast requirements.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/jianchen08/agent-os-open/resource-theme-create
Any agent
npx skills add jianchen08/Agent-os-open --skill resource-theme-create
Clone the repo
git clone --depth 1 https://github.com/jianchen08/Agent-os-open

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for 创建主题

README.md
[![agentmods](https://agentmods.dev/badge/skills/jianchen08/agent-os-open/resource-theme-create.svg)](https://agentmods.dev/skills/jianchen08/agent-os-open/resource-theme-create)
Your own site
<a href="https://agentmods.dev/skills/jianchen08/agent-os-open/resource-theme-create"><img src="https://agentmods.dev/badge/skills/jianchen08/agent-os-open/resource-theme-create.svg" alt="Measured on agentmods" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,392 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00083 $0.03392
Opus 5 $0.00042 $0.01696
Sonnet 5 $0.00017 $0.00678
Haiku 4.5 $0.00008 $0.00339

Measured today against content hash 2b82c6ac44d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

创建主题 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/resource-theme-create/SKILL.md · 187 lines

How it starts

The opening of the file, as written. The whole thing — 187 lines — stays where its author put it; the contents beside it link to each section on GitHub.

创建主题

本技能是流程指引,不是逐条打勾清单:按场景判断使用,遇不适用情况保持裁量,不机械执行。

〇、定位:主题是"配置自动读取"资源,不注册、不搜索

问题 答案 原因
主题要不要 register_resource 注册? 不要 前端 index.tspresetThemes 映射表即注册中心,放进去就自动被发现
主题要不要 resource_search 搜索? 不要 主题不是后端 Registry 资源,搜索工具只管 agent/tool/skill
谁用这个技能? 资源管理 Agent 在用户要新增/改主题时加载本技能执行

不要改 register_resource / resource_search 去加 theme 类型。 那是给后端动态资源用的通道,主题走配置直读,两套机制不该混。

一、唯一主题系统在前端(后端那套已清理)

系统 位置 状态
前端主题系统(本规范对象) frontend/src/config/themes/ + frontend/src/types/theme.ts ✅ 实际在用,7 个预设主题,接入 DOM/shadcn

历史上后端曾有一套 design_tokens / style_config,零消费方,已删除。主题只在前端做。

二、主题文件放哪、叫什么

对象 规范 示例
主题 ID kebab-case,全局唯一,与文件名一致 ocean-breeze
预设文件 frontend/src/config/themes/presets/{id}.ts presets/ocean-breeze.ts
导出常量 camelCase + Theme export const oceanBreezeTheme
类别 category light / dark / special / base 四选一 light

三、ThemeConfig 四大支柱(结构真相源 = frontend/src/types/theme.ts

类型定义是唯一真相源。创建/修改前务必对照 types/theme.ts,不要凭记忆。四大顶层字段:

1. colors(必填,决定配色)

colors: {
  primary:   '#0891b2',          // 主色,必填
  secondary: '#06b6d4',          // 次色,必填
  accent:    '#22d3ee',          // 强调色,必填
  background: { main, card, sidebar, input, elevated },   // 必填,5 个子字段
  text:       { primary, secondary, muted, disabled },     // 必填,4 个子字段
  border:     { default, hover, active },                  // 必填,3 个子字段
  status:     { success, warning, error, info, running, pending }, // 必填,6 个子字段
  bubble:     { user_bg, user_text, ai_bg, ai_text, ...可选 },    // 必填,气泡配色
  // 可选扩展:task / phase / acceptance / task_type / agent_level
}
  • 颜色值:纯色用 #RRGGBB;带透明度用 rgba(...);渐变背景可写 linear-gradient(...)
  • background.main 既可是纯色也可是渐变(会影响 body 背景,见 themeService.applyTheme

2. components(必填,决定组件外观)

覆盖全部交互组件样式,字段较多,照抄一个最接近的预设再改(推荐抄 ocean-breeze.ts):

子字段 作用 关键约束
borderRadius 圆角梯度 none/sm/md/lg/xl/full + defaultRadius defaultRadius 必须是六个之一
fonts ui / code 两个字体族 code 用等宽字体栈
fontSize xs/sm/md/lg/xl + defaultFontSize 用 rem/px 字符串
shadows none/light/normal/strong 四档 + defaultShadow defaultShadow 是四档之一
glow running/waiting/success/error 发光 + defaultGlowIntensity 可选
button style(pill/square/rounded) + variants(primary/secondary/ghost/destructive) variants 四套必填 bg/text/border/hoverBg
input / card / badge / dialog / tabs / toast / progress / dropdownMenu 各组件样式 见 types/theme.ts 逐字段

Read the full file on GitHub · 187 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +2 lines 2b82c6ac44d3
  2. 5d ago First seen · 185 lines · 83 tokens per session scan A fe8b48e2855e

Subscribe to this mod's changes

创建主题 is a skill published in the GitHub repository jianchen08/Agent-os-open (5 stars, last pushed yesterday), licensed Apache-2.0. It adds 83 tokens to every session and 3,392 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

ardot_design_to_code

"Use this skill for Ardot canvas tasks that convert a design into frontend code, or extract a design system / style guide from a website. Covers: design-to-code, design → HTML/CSS/JS, export as webpage, pixel-perfect reproduction, generate an Application from a design, slide transitions, responsive scaling; and…

crane-in-clear-sky/WorkWit-AI-Agent · 200 tokens

background-task

Add or modify work that runs outside the request/response cycle — emails, document ingestion, webhooks, cleanups, scheduled jobs. Use when something is slow or fire-and-forget, or when adding a periodic/cron task. This project's queue is {{ cookiecutter.backgroundtasks }}.

vstorm-co/full-stack-ai-agent-template · 62 tokens

agent-tool

Add a new tool/function the AI agent can call (e.g. look something up, hit an external API, perform an action). Use when extending the assistant's capabilities, wiring a new function into the agent, or when the model needs a new action. This project uses {{ cookiecutter.aiframework }}.

vstorm-co/full-stack-ai-agent-template · 66 tokens

frontend-feature

Build a new page, view, or data-driven feature in the Next.js frontend. Use when adding a route under the dashboard/marketing area, wiring UI to a backend endpoint, adding client state, or creating a localized page. Covers App Router, data fetching, Zustand stores, and i18n.

vstorm-co/full-stack-ai-agent-template · 64 tokens

pytest-suite

Write or extend the backend test suite following this project's conventions. Use when adding tests for a new service/route/repository, when coverage is missing, or when asked to test a feature. Knows the mocked-session + httpx AsyncClient setup so tests run with no database.

vstorm-co/full-stack-ai-agent-template · 59 tokens

rag-knowledge

Work with the RAG knowledge base — ingest documents, run semantic search, manage collections, or add a sync source/connector (Google Drive, S3). Use when populating or debugging the knowledge base, tuning retrieval, or adding a new document source. This project uses {{ cookiecutter.vectorstore }} + {{…

vstorm-co/full-stack-ai-agent-template · 76 tokens