publish-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Publish Skill to Site

将Skill发布至网站

Automate the full pipeline for publishing a skill to the claude-skills-site Astro website.
实现将Skill发布至claude-skills-site Astro网站的全流程自动化。

Paths

路径

  • Skills repo:
    ~/ai_projects/claude-skills/
  • Site repo:
    ~/ai_projects/claude-skills-site/
  • Site skills:
    ~/ai_projects/claude-skills-site/src/content/skills/*.mdx
  • Site bundles:
    ~/ai_projects/claude-skills-site/src/content/bundles/*.mdx
  • 技能仓库:
    ~/ai_projects/claude-skills/
  • 网站仓库:
    ~/ai_projects/claude-skills-site/
  • 网站技能文件:
    ~/ai_projects/claude-skills-site/src/content/skills/*.mdx
  • 网站bundle文件:
    ~/ai_projects/claude-skills-site/src/content/bundles/*.mdx

Invocation

调用方式

/publish-skill <skill-name>              # New skill
/publish-skill <skill-name> --update     # Regenerate existing .mdx
/publish-skill <skill-name> --dry-run    # Show what would be written, no commits
/publish-skill <skill-name> --with-image # Also generate hero image via Codex
/publish-skill <skill-name>              # 发布新技能
/publish-skill <skill-name> --update     # 重新生成现有.mdx文件
/publish-skill <skill-name> --dry-run    # 展示将要写入的内容,不执行提交
/publish-skill <skill-name> --with-image # 同时通过Codex生成hero image

Workflow

工作流程

Execute these phases in order. Stop and report on any error.
按顺序执行以下阶段,若出现任何错误则停止并报告。

Phase 1 — Locate and Read Source

阶段1 — 定位并读取源文件

  1. Check
    ~/ai_projects/claude-skills/<skill-name>/SKILL.md
    exists. Also check
    ~/.claude/skills/<skill-name>/SKILL.md
    .
  2. If neither exists, report error: "SKILL.md not found for
    <skill-name>
    . Ensure the skill directory exists in the skills repo or ~/.claude/skills/."
  3. If both exist, compare them. If
    ~/.claude/skills/
    version is newer (by mtime), sync it to the skills repo with
    rsync -av --exclude='*.egg-info' --exclude='__pycache__'
    , commit the change, and push. This ensures the skills repo always has the latest version.
  4. Read the SKILL.md (preferring the skills repo copy after any sync). Extract:
    • name
      from YAML frontmatter
    • description
      from YAML frontmatter
    • Body content (everything after the frontmatter closing
      ---
      )
  5. Also check if
    ~/ai_projects/claude-skills/<skill-name>/README.md
    exists — if so, read it for supplementary context.
  1. 检查
    ~/ai_projects/claude-skills/<skill-name>/SKILL.md
    是否存在,同时检查
    ~/.claude/skills/<skill-name>/SKILL.md
  2. 若两者都不存在,报告错误:"未找到
    <skill-name>
    对应的SKILL.md文件,请确保技能目录存在于技能仓库或~/.claude/skills/中。"
  3. 若两者都存在,进行对比。如果
    ~/.claude/skills/
    中的版本更新(根据修改时间判断),使用
    rsync -av --exclude='*.egg-info' --exclude='__pycache__'
    将其同步到技能仓库,提交并推送该变更,确保技能仓库始终拥有最新版本。
  4. 读取SKILL.md文件(同步后优先使用技能仓库中的副本),提取以下内容:
    • YAML前置元数据中的
      name
    • YAML前置元数据中的
      description
    • 正文内容(前置元数据结束标记
      ---
      之后的所有内容)
  5. 同时检查
    ~/ai_projects/claude-skills/<skill-name>/README.md
    是否存在,若存在则读取以获取补充上下文。

Phase 2 — Check for Existing MDX

阶段2 — 检查现有MDX文件

  1. Check if
    ~/ai_projects/claude-skills-site/src/content/skills/<skill-name>.mdx
    already exists.
  2. If it exists and
    --update
    was NOT passed: stop and ask for confirmation. "The skill
    <skill-name>
    already has an .mdx on the site. Pass
    --update
    to regenerate, or confirm to overwrite."
  3. If it exists and
    --update
    was passed: read the existing .mdx. Preserve these fields from the existing file (do not regenerate):
    • apothecary_name
    • hero_image
    • auto_activity
    • auto_last_synced
      (will be updated to today)
  1. 检查
    ~/ai_projects/claude-skills-site/src/content/skills/<skill-name>.mdx
    是否已存在。
  2. 若文件已存在且未传递
    --update
    参数:停止操作并请求确认。"技能
    <skill-name>
    在网站上已有对应的.mdx文件。请传递
    --update
    参数重新生成,或确认是否覆盖。"
  3. 若文件已存在且传递了
    --update
    参数:读取现有.mdx文件,保留以下字段(不重新生成):
    • apothecary_name
    • hero_image
    • auto_activity
    • auto_last_synced
      (将更新为当前日期)

Phase 3 — Generate MDX Frontmatter

阶段3 — 生成MDX前置元数据

Generate each field:
name
— Use the skill directory name (kebab-case). Must match the filename.
tagline
— One sentence, max 80 characters. Summarize what the skill does in plain language. End with a period. Do not start with "A skill that..." — lead with the action verb or the thing it produces.
apothecary_name
— A poetic 2-4 word name in the style of an old apothecary shop. Follow the existing pattern:
  • "The Listener's Ear" (meeting-intelligence)
  • "The Scholar's Deep Draught" (deep-research)
  • "The Artificer's Bench" (developer-tools)
  • "The Therapist's Grimoire" (cognitive-toolkit)
  • Use "The [Noun]'s [Noun]" or "[Noun] of [Noun]" patterns.
bundle
— Select the best-fit bundle by analyzing the skill's purpose against these categories:
Bundle keyNameCovers
meeting-intelligence
Meeting IntelligenceTranscripts, meetings, recordings, action items, video/audio processing
communication
CommunicationEmail, messaging, Telegram, Google Workspace, Zoom
research
ResearchWeb research, search, image sourcing, knowledge retrieval
content-publishing
Content & PublishingImage generation, presentations, PDFs, reports, brand assets, visual tools
personal-analytics
Personal AnalyticsHealth data, dictation analytics, browsing history, self-reflection, hardware signals, knowledge visualization
thinking-strategy
Thinking & StrategyDecision frameworks, JTBD, dialogue modes, cognitive tools, self-design
developer-tools
Developer ToolsTDD, LLM CLI, issue tracking, session search, code tools
lab-consulting
Lab & ConsultingLab meetings, client discovery, retrospectives, demos
If the skill could fit multiple bundles, prefer the one where it adds the most differentiation. If genuinely unsure, ask the user.
tags
— 3-6 lowercase kebab-case tags. Derive from the skill's domain, tools used, and output types. Check existing skills for tag reuse.
accent_color
— Pick from the validated set:
amber
(default),
blue
,
cyan
,
green
,
orange
,
purple
,
violet
. Use
amber
unless the skill has a strong thematic reason for another color (e.g., hardware/signals →
cyan
, mental health →
violet
, nature/strategy →
green
).
auto_description
— Copy the
description
field from the SKILL.md frontmatter verbatim. Truncate at 200 characters if longer.
auto_triggers
— Extract 0-3 trigger phrases from the SKILL.md description (e.g., "queries like", "check my email"). Leave empty
[]
if no clear triggers.
auto_tools
— Leave as
[]
.
auto_last_synced
— Today's date in
YYYY-MM-DD
format. Run
date +"%Y-%m-%d"
to get it.
auto_last_commit
— Run
git -C ~/ai_projects/claude-skills log -1 --format="%Y-%m-%d" -- <skill-name>/
to get the last commit date for that skill directory.
auto_activity
— Leave as
[]
for new skills. Preserve from existing .mdx on
--update
.
install_command
— Leave as
""
.
repo_path
— The skill directory name (same as
name
).
dependencies
— Extract from SKILL.md requirements/prerequisites sections. List Python packages, CLI tools, or APIs needed. Use
[]
if none.
hero_image
— Leave commented out (
# hero_image:
) unless the skill has a screenshot in the repo.
生成以下各个字段:
name
— 使用技能目录名称(短横线分隔格式),必须与文件名一致。
tagline
— 一句话描述,最多80个字符。用平实语言总结Skill的功能,以句号结尾。不要以"一个可以...的Skill"开头,直接以动作动词或产出物开头。
apothecary_name
— 2-4个单词的诗意名称,风格类似古老的药剂师店铺。遵循现有命名模式:
  • "The Listener's Ear"(meeting-intelligence)
  • "The Scholar's Deep Draught"(deep-research)
  • "The Artificer's Bench"(developer-tools)
  • "The Therapist's Grimoire"(cognitive-toolkit)
  • 使用"The [名词]'s [名词]"或"[名词] of [名词]"的结构。
bundle
— 通过分析Skill的用途,从以下分类中选择最匹配的bundle:
Bundle键名称覆盖领域
meeting-intelligence
会议智能转录、会议、录音、行动项、音视频处理
communication
沟通协作邮件、消息、Telegram、Google Workspace、Zoom
research
研究调研网页搜索、信息检索、图片获取、知识提取
content-publishing
内容与发布图片生成、演示文稿、PDF、报告、品牌资产、可视化工具
personal-analytics
个人分析健康数据、听写分析、浏览历史、自我反思、硬件信号、知识可视化
thinking-strategy
思维与策略决策框架、JTBD、对话模式、认知工具、自我设计
developer-tools
开发者工具TDD、LLM CLI、问题追踪、会话搜索、代码工具
lab-consulting
实验室与咨询实验室会议、客户探索、回顾会议、演示
若Skill可适配多个bundle,优先选择能体现其差异化价值的分类。若确实无法确定,请询问用户。
tags
— 3-6个小写短横线分隔格式的标签,从Skill的领域、使用工具和产出类型中提取。参考现有技能的标签以保持一致性。
accent_color
— 从以下验证集合中选择:
amber
(默认)、
blue
cyan
green
orange
purple
violet
。除非Skill有明确的主题理由使用其他颜色(如硬件/信号类→
cyan
,心理健康类→
violet
,自然/策略类→
green
),否则默认使用
amber
auto_description
— 直接复制SKILL.md前置元数据中的
description
字段,若超过200字符则截断。
auto_triggers
— 从SKILL.md的描述中提取0-3个触发短语(例如"类似这样的查询"、"检查我的邮件")。若没有明确触发词则留空
[]
auto_tools
— 留空
[]
auto_last_synced
— 当前日期,格式为
YYYY-MM-DD
。可通过执行
date +"%Y-%m-%d"
获取。
auto_last_commit
— 执行
git -C ~/ai_projects/claude-skills log -1 --format="%Y-%m-%d" -- <skill-name>/
获取该技能目录的最后提交日期。
auto_activity
— 新技能留空
[]
,使用
--update
时保留现有.mdx文件中的内容。
install_command
— 留空
""
repo_path
— 技能目录名称(与
name
一致)。
dependencies
— 从SKILL.md的要求/先决条件部分提取所需的Python包、CLI工具或API。若无依赖则留空
[]
hero_image
— 除非技能仓库中有截图,否则保持注释状态(
# hero_image:
)。

Phase 4 — Generate MDX Body

阶段4 — 生成MDX正文

Write the body following this exact structure:
mdx
undefined
严格按照以下结构编写正文:
mdx
undefined

What it does

功能介绍

[2-3 sentences describing the skill's primary function. Be specific about what it produces or enables. Reference concrete tools, APIs, or protocols if relevant.]
[2-3句话描述Skill的核心功能,明确说明其产出或能实现的效果,若涉及具体工具、API或协议请提及。]

Key features

核心特性

[Bulleted list of 4-6 distinguishing features. Each bullet: Bold label — explanation. Focus on what makes this skill interesting, not obvious capabilities.]
[4-6个差异化特性的项目符号列表,每个项目:加粗标签 — 说明内容。聚焦于Skill的独特之处,而非通用功能。]

When to use

使用场景

[1-2 sentences describing the trigger scenarios. Start with "When..." to match the existing pattern.]

Additional sections to include only when relevant:
- `## Signals` or `## Modes` — if the skill has named operational modes or signal types
- `## How it works` — if the skill uses a non-obvious protocol (MIDI, MCP, etc.)

Do NOT include: installation instructions, quick start commands, code blocks, or dependency lists. Those belong in the SKILL.md and README, not the site .mdx.
[1-2句话描述触发场景,遵循现有模式以"当...时"开头。]

仅在相关时添加以下额外章节:
- `## 信号`或`## 模式` — 若Skill有命名的操作模式或信号类型
- `## 工作原理` — 若Skill使用非通用协议(如MIDI、MCP等)

请勿包含:安装说明、快速启动命令、代码块或依赖列表,这些内容应放在SKILL.md和README中,而非网站的.mdx文件。

Phase 5 — Validate

阶段5 — 验证

Before writing, verify:
  1. Bundle exists: Confirm
    ~/ai_projects/claude-skills-site/src/content/bundles/<bundle>.mdx
    exists.
  2. No duplicate: If not
    --update
    , confirm no .mdx already exists (handled in Phase 2).
  3. Accent color valid: Must be one of:
    amber
    ,
    blue
    ,
    cyan
    ,
    green
    ,
    orange
    ,
    purple
    ,
    violet
    .
  4. Name matches: The
    name
    field,
    repo_path
    , and filename must all match.
  5. Tagline length: Must be under 100 characters.
If any check fails, report the specific error and stop.
写入前需验证以下内容:
  1. Bundle存在: 确认
    ~/ai_projects/claude-skills-site/src/content/bundles/<bundle>.mdx
    存在。
  2. 无重复: 若未使用
    --update
    ,确认不存在重复的.mdx文件(阶段2已处理)。
  3. 强调色有效: 必须是以下颜色之一:
    amber
    blue
    cyan
    green
    orange
    purple
    violet
  4. 名称一致:
    name
    字段、
    repo_path
    和文件名必须完全匹配。
  5. 标语长度: 必须少于100字符。
若任何检查失败,报告具体错误并停止操作。

Phase 6 — Write Files

阶段6 — 写入文件

  1. Write the .mdx file to
    ~/ai_projects/claude-skills-site/src/content/skills/<skill-name>.mdx
    .
  2. Update the bundle: Read the target bundle .mdx. Add the skill name to the
    skills:
    array if not already present. Append at the end of the array.
  3. If
    --dry-run
    : Instead of writing, display the full .mdx content and the bundle change, then stop.
  1. 写入.mdx文件
    ~/ai_projects/claude-skills-site/src/content/skills/<skill-name>.mdx
  2. 更新bundle: 读取目标bundle的.mdx文件,若技能名称未在
    skills:
    数组中则添加至数组末尾。
  3. 若使用
    --dry-run
    :不执行写入操作,仅展示完整的.mdx内容和bundle变更,然后停止。

Phase 6.5 — Generate Hero Image (optional, requires
--with-image
)

阶段6.5 — 生成Hero Image(可选,需传递
--with-image

Skip this phase unless
--with-image
was passed.
Generate a hero image using the
/codex
skill. Codex has a built-in
image_gen
tool that produces images without needing an API key. The image follows the site's apothecary visual language established in the original Codex design session.
Prompt template — fill in
SKILL_NAME
,
APOTHECARY_NAME
,
SCENE_BACKDROP
,
SUBJECT
,
COMPOSITION_DETAIL
, and
AVOID_EXTRA
:
Use case: stylized-concept
Asset type: 16:9 skill hero image for the Claude Skills site
Primary request: Create a skill-specific hero artwork for the skill "SKILL_NAME", apothecary name "APOTHECARY_NAME". No readable text.
Style reference: Match the existing main site hero style: dark apothecary workbench fused with developer terminal artifacts, hand-tinted copperplate engraving, technical diagram overlays, tactile paper grain, oxidized copper, medicinal green, ink brown, warm bone, tiny electric-blue signal accents.
Scene/backdrop: SCENE_BACKDROP
Subject: SUBJECT
Composition: Wide 16:9, COMPOSITION_DETAIL, quiet dark negative space left, no border.
Lighting: Low raking desk light, sharp engraving detail, warm copper highlights.
Avoid: no readable words, no logos, no human figures, AVOID_EXTRA, no stock-photo look, no neon sci-fi.
Exact prompts from existing hero images (use as style/structure reference):
tdd ("The Test Anvil"):
  • Scene: A heavy workbench inside an apothecary cabinet, with brass measuring instruments, drawers, glass vials, and translucent command cards.
  • Subject: A small blacksmith anvil used as a testing station, with three distinct stages represented by red wax seal, green reagent glow, and polished brass refactor tool; tiny checklist slips and code-bracket glyphs etched into metal.
  • Composition detail: anvil and three-stage testing ritual centered-right
  • Avoid extra: no generic fantasy forge, no smoke-heavy scene
jtbd ("The Hiring Compass"):
  • Scene: A researcher's apothecary desk with interview cards, opportunity maps, tiny sample vials, brass compass, and drawer labels represented only by abstract marks.
  • Subject: A brass compass pointing through customer-job constellations, annotated review-mining cards, small scales for scoring opportunities, and translucent terminal cards with abstract brackets.
  • Composition detail: compass and opportunity map centered-right
  • Avoid extra: no corporate stock imagery, no generic charts, no bright flat UI, no blurry glow
skill-studio ("The Automation Architect"):
  • Scene: A precise apothecary drafting bench with brass calipers, small drawers, vellum workflow maps, index cards, and translucent terminal recipe cards.
  • Subject: An architect's compass, interview question cards, a flowchart map, and small vial-like modules arranged into a structured automation blueprint.
  • Composition detail: detailed lower and right areas, some quiet negative space for page text overlay if needed
  • Avoid extra: no modern stock-photo look, no blurry glow, no readable UI text
telegram-telethon ("The Daemon's Relay"):
  • Scene: An apothecary communications bench with relay coils, brass switches, labeled drawers with abstract marks, sealed message tubes, and glass vials.
  • Subject: A daemon relay apparatus: brass telegraph key, paper-plane-like message glyphs etched on translucent cards, audio waveform phials, and blue signal lines running between drawers and terminal cards.
  • Composition detail: relay apparatus and message tubes centered-right, darker negative space left
  • Avoid extra: no Telegram logo, no brand marks, no modern phone mockup
agency-docs-updater ("The Publisher's Engine"):
  • Scene: A compact apothecary publishing press connected to terminal recipe cards, archive drawers, reels, and document trays.
  • Subject: A brass engine that transforms a meeting transcript scroll into three outputs: a video reel glyph, a bound documentation sheet, and a clean index card; conveyor belts, gears, redaction veil strips, and synchronized blue trace lines.
  • Composition detail: publishing engine centered-right
  • Avoid extra: no YouTube logo, no brand marks, no modern UI screenshot, no generic printer
vision-bench ("The Judge's Loupe"):
  • Scene: A dark apothecary judging bench with comparison trays, specimen drawers, translucent image plates, and brass optical instruments.
  • Subject: A large judge's loupe examining two image plates side by side, small scoring weights and calibration vials, vision-model glyphs as abstract eye diagrams, and blue signal traces connecting evaluation cards.
  • Composition detail: loupe and image comparison plates centered-right
  • Avoid extra: no realistic eyeballs, no modern UI screenshot, no generic camera stock image
Subject crafting guidelines:
  • Map the skill's core action to a physical apothecary/workshop metaphor
  • Each subject should have: a central object (anvil, compass, loupe, engine), supporting detail objects (cards, vials, glyphs), and subtle digital traces (blue signal lines, terminal brackets)
  • The metaphor should be immediately recognizable to someone who knows what the skill does
  • Keep subject descriptions to 1-2 sentences
Steps:
  1. Craft all template fields (scene, subject, composition, avoid) based on the skill's purpose
  2. Invoke the
    /codex
    skill with the assembled prompt, requesting a 16:9 image saved to
    ~/ai_projects/claude-skills-site/public/images/SKILL_NAME-hero.jpg
  3. Verify the image was created and is approximately 1672x941 pixels (the standard size for existing heroes)
  4. Update the .mdx frontmatter: change
    # hero_image:
    to
    hero_image: "/images/SKILL_NAME-hero.jpg"
  5. Stage the image file alongside the .mdx in Phase 8
If Codex is not available or image generation fails, warn the user and continue without the image. The skill publishes fine without a hero image.
仅当传递
--with-image
参数时执行此阶段。
使用
/codex
Skill生成Hero Image。Codex内置
image_gen
工具,无需API密钥即可生成图片,图片需符合原始Codex设计会议确立的网站药剂师视觉风格。
提示模板 — 填充
SKILL_NAME
APOTHECARY_NAME
SCENE_BACKDROP
SUBJECT
COMPOSITION_DETAIL
AVOID_EXTRA
使用场景:风格化概念图
资产类型:Claude Skills网站用16:9比例Skill Hero Image
核心需求:为技能"SKILL_NAME"(药剂师名称"APOTHECARY_NAME")创建专属Hero插画,无可读文字。
风格参考:匹配网站主Hero风格:融合药剂师工作台与开发者终端元素的深色场景,手工着色铜版画,技术图表叠加,纸质纹理,氧化铜色、药用绿色、墨棕色、暖骨色,点缀细微电蓝色信号。
场景/背景:SCENE_BACKDROP
主体:SUBJECT
构图:宽屏16:9,COMPOSITION_DETAIL,左侧留深色空白区域,无边框。
光线:低角度桌面光,清晰版画细节,暖铜色高光。
避免:无可读文字、无logo、无人物、AVOID_EXTRA、无库存照片风格、无霓虹科幻元素。
现有Hero Image的参考提示(用于风格/结构参考):
tdd("The Test Anvil"):
  • 场景:药剂师柜内的重型工作台,配有黄铜测量仪器、抽屉、玻璃小瓶和半透明命令卡。
  • 主体:用作测试站的小型铁匠铁砧,通过红色蜡封、绿色试剂光和抛光黄铜重构工具体现三个测试阶段;金属上刻有微小的清单条和代码括号符号。
  • 构图细节:铁砧和三阶段测试仪式位于右侧居中
  • 避免额外元素:无通用奇幻锻造场景、无浓烟场景
jtbd("The Hiring Compass"):
  • 场景:研究员的药剂师工作台,配有访谈卡、机会地图、微小样本瓶、黄铜指南针和仅用抽象标记标注的抽屉标签。
  • 主体:指向客户工作星座的黄铜指南针、带注释的挖掘评审卡、用于机会评分的小秤和带抽象括号的半透明终端卡。
  • 构图细节:指南针和机会地图位于右侧居中
  • 避免额外元素:无企业库存图像、无通用图表、无明亮扁平化UI、无模糊光晕
skill-studio("The Automation Architect"):
  • 场景:精确的药剂师绘图工作台,配有黄铜卡尺、小抽屉、牛皮纸工作流地图、索引卡和半透明终端配方卡。
  • 主体:建筑师指南针、访谈问题卡、流程图和排列成结构化自动化蓝图的小瓶状模块。
  • 构图细节:右下区域细节丰富,预留部分空白用于页面文字叠加
  • 避免额外元素:无现代库存照片风格、无模糊光晕、无可读UI文字
telegram-telethon("The Daemon's Relay"):
  • 场景:药剂师通信工作台,配有继电器线圈、黄铜开关、带抽象标记的标签抽屉、密封消息管和玻璃小瓶。
  • 主体:守护进程中继装置:黄铜电报键、半透明卡片上蚀刻的纸飞机状消息符号、音频波形瓶、连接抽屉和终端卡的蓝色信号线。
  • 构图细节:中继装置和消息管位于右侧居中,左侧深色空白区域
  • 避免额外元素:无Telegram logo、无品牌标记、无现代手机模型
agency-docs-updater("The Publisher's Engine"):
  • 场景:紧凑的药剂师印刷机,连接终端配方卡、存档抽屉、卷轴和文档托盘。
  • 主体:将会议记录卷轴转换为三种输出的黄铜引擎:视频卷轴符号、装订文档页和干净索引卡;传送带、齿轮、遮红条和同步蓝色轨迹线。
  • 构图细节:印刷引擎位于右侧居中
  • 避免额外元素:无YouTube logo、无品牌标记、无现代UI截图、无通用打印机
vision-bench("The Judge's Loupe"):
  • 场景:深色药剂师评审工作台,配有对比托盘、样本抽屉、半透明图像板和黄铜光学仪器。
  • 主体:放大对比两块图像板的大型法官放大镜、微小评分砝码和校准瓶、作为抽象眼图的视觉模型符号、连接评估卡的蓝色信号轨迹。
  • 构图细节:放大镜和图像对比板位于右侧居中
  • 避免额外元素:无真实眼球、无现代UI截图、无通用相机库存图像
主体设计指南:
  • 将Skill的核心动作映射到物理药剂师/工坊隐喻
  • 每个主体应包含:核心对象(铁砧、指南针、放大镜、引擎)、辅助细节对象(卡片、小瓶、符号)和细微数字痕迹(蓝色信号线、终端括号)
  • 了解Skill功能的人应能立即识别该隐喻
  • 主体描述控制在1-2句话
步骤:
  1. 根据Skill用途填充模板所有字段(场景、主体、构图、避免元素)
  2. 使用组装好的提示调用
    /codex
    Skill,请求生成16:9比例的图片并保存至
    ~/ai_projects/claude-skills-site/public/images/SKILL_NAME-hero.jpg
  3. 验证图片已创建且尺寸约为1672x941像素(与现有Hero图片标准尺寸一致)
  4. 更新.mdx前置元数据:将
    # hero_image:
    改为
    hero_image: "/images/SKILL_NAME-hero.jpg"
  5. 在阶段8中将图片文件与.mdx文件一起暂存
若Codex不可用或图片生成失败,向用户发出警告并继续发布流程,Skill可在无Hero Image的情况下正常发布。

Phase 7 — Show Diff and Confirm

阶段7 — 展示差异并确认

  1. Run
    git -C ~/ai_projects/claude-skills-site diff
    to show all changes.
  2. Present the diff to the user.
  3. Ask: "Publish these changes? This will commit and push to claude-skills-site." Wait for confirmation.
  1. 执行
    git -C ~/ai_projects/claude-skills-site diff
    展示所有变更。
  2. 向用户展示差异内容。
  3. 询问:"是否发布这些变更?这将提交并推送至claude-skills-site仓库。"等待用户确认。

Phase 8 — Commit and Push

阶段8 — 提交并推送

  1. Stage the changed files:
    bash
    git -C ~/ai_projects/claude-skills-site add src/content/skills/<skill-name>.mdx src/content/bundles/<bundle>.mdx
  2. Commit with message:
    feat: add <skill-name> skill to site
    • For
      --update
      :
      feat: update <skill-name> skill on site
  3. Push:
    git -C ~/ai_projects/claude-skills-site push
  4. Report the commit hash and confirm success.
  1. 暂存变更文件:
    bash
    git -C ~/ai_projects/claude-skills-site add src/content/skills/<skill-name>.mdx src/content/bundles/<bundle>.mdx
  2. 提交并添加消息:
    feat: add <skill-name> skill to site
    • 若使用
      --update
      feat: update <skill-name> skill on site
  3. 推送:
    git -C ~/ai_projects/claude-skills-site push
  4. 报告提交哈希值并确认发布成功。

Error Recovery

错误恢复

ErrorRecovery
SKILL.md not foundCheck both paths, report which were tried
Bundle .mdx not foundList available bundles, ask user to pick
.mdx already exists (no --update)Ask user to confirm overwrite or pass --update
Git push failsShow error, suggest
git pull --rebase
first
accent_color invalidDefault to
amber
, warn user
Skill already in bundle arraySkip bundle update, not an error
错误恢复方式
SKILL.md未找到检查两个路径,报告已尝试的路径
Bundle .mdx未找到列出可用bundle,请求用户选择
.mdx已存在(未使用--update)请求用户确认覆盖或传递--update参数
Git推送失败展示错误信息,建议先执行
git pull --rebase
accent_color无效默认使用
amber
,并向用户发出警告
Skill已在bundle数组中跳过bundle更新,不属于错误

MDX Template

MDX模板

---
name: "<skill-name>"
tagline: "<tagline>"
apothecary_name: "<apothecary_name>"
bundle: <bundle>
tags: [<tags>]
accent_color: <color>
---
name: "<skill-name>"
tagline: "<tagline>"
apothecary_name: "<apothecary_name>"
bundle: <bundle>
tags: [<tags>]
accent_color: <color>

hero_image:

hero_image:

auto_description: "<description>" auto_triggers: [<triggers>] auto_tools: [] auto_last_synced: "<date>" auto_last_commit: "<date>" auto_activity: [] install_command: "" repo_path: "<skill-name>" dependencies: [<deps>]

auto_description: "<description>" auto_triggers: [<triggers>] auto_tools: [] auto_last_synced: "<date>" auto_last_commit: "<date>" auto_activity: [] install_command: "" repo_path: "<skill-name>" dependencies: [<deps>]

What it does

功能介绍

<body>
<body>

Key features

核心特性

<features>
<features>

When to use

使用场景

<when> ```
<when> ```