diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 11569a3..e89e653 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -6,7 +6,7 @@ }, "metadata": { "description": "Skills shared by Baoyu for improving daily work efficiency", - "version": "0.7.0" + "version": "0.8.0" }, "plugins": [ { diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ff5416..f99b1b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ English | [中文](./CHANGELOG.zh.md) +## 0.8.0 - 2026-01-17 + +### Features +- `baoyu-xhs-images`: adds content analysis framework (`analysis-framework.md`, `outline-template.md`) for structured content breakdown and outline generation. + +### Documentation +- `CLAUDE.md`: adds Output Path Convention (directory structure, backup rules) and Image Naming Convention (format, slug rules) to standardize image generation outputs. +- Multiple skills: updates file management conventions to use unified directory structure (`[source-name-no-ext]//`). + - `baoyu-article-illustrator`, `baoyu-comic`, `baoyu-cover-image`, `baoyu-slide-deck`, `baoyu-xhs-images` + ## 0.7.0 - 2026-01-17 ### Features diff --git a/CHANGELOG.zh.md b/CHANGELOG.zh.md index ed9f06b..2ac70bf 100644 --- a/CHANGELOG.zh.md +++ b/CHANGELOG.zh.md @@ -2,6 +2,16 @@ [English](./CHANGELOG.md) | 中文 +## 0.8.0 - 2026-01-17 + +### 新功能 +- `baoyu-xhs-images`:新增内容分析框架(`analysis-framework.md`、`outline-template.md`),提供结构化内容拆解与大纲生成方案。 + +### 文档 +- `CLAUDE.md`:新增 Output Path Convention(目录结构、备份规则)和 Image Naming Convention(文件命名格式、slug 规则),统一图片生成输出规范。 +- 多个技能:更新文件管理规范,采用统一目录结构(`[source-name-no-ext]//`)。 + - `baoyu-article-illustrator`、`baoyu-comic`、`baoyu-cover-image`、`baoyu-slide-deck`、`baoyu-xhs-images` + ## 0.7.0 - 2026-01-17 ### 新功能 diff --git a/CLAUDE.md b/CLAUDE.md index f1650e6..609022d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -135,6 +135,53 @@ Use this template when implementing image generation in skills: 4. On failure, auto-retry once before reporting error ``` +### Output Path Convention + +Generated images from the same skill and source file MUST be grouped together: + +**With source file** (e.g., `/path/to/project/content/my-article.md`): +``` +/path/to/project/content/my-article// +``` +- Remove file extension from source filename +- Use skill name suffix (e.g., `xhs-images`, `cover-image`, `slide-deck`) +- Example: source `/tests-data/anthropic-economic-index.md` + skill `baoyu-xhs-images` → `/tests-data/anthropic-economic-index/xhs-images/` + +**Without source file**: +``` +./// +``` +- Place under current project directory +- Use descriptive slug for the content + +**Directory Backup**: +- If output directory already exists, rename existing directory with timestamp +- Format: `-backup-YYYYMMDD-HHMMSS` +- Example: `xhs-images` → `xhs-images-backup-20260117-143052` + +### Image Naming Convention + +Image filenames MUST include meaningful slugs for readability: + +**Format**: `NN-{type}-[slug].png` +- `NN`: Two-digit sequence number (01, 02, ...) +- `{type}`: Image type (cover, content, page, slide, illustration, etc.) +- `[slug]`: Descriptive kebab-case slug derived from content + +**Examples**: +``` +01-cover-ai-future.png +02-content-key-benefits.png +03-page-enigma-machine.png +04-slide-architecture-overview.png +``` + +**Slug Rules**: +- Derived from image purpose or content (kebab-case) +- Must be unique within the output directory +- 2-5 words, concise but descriptive +- When content changes significantly, update slug accordingly + ### Best Practices - Always read the image generation skill's SKILL.md before calling diff --git a/skills/baoyu-article-illustrator/SKILL.md b/skills/baoyu-article-illustrator/SKILL.md index d834701..e7cbec9 100644 --- a/skills/baoyu-article-illustrator/SKILL.md +++ b/skills/baoyu-article-illustrator/SKILL.md @@ -102,22 +102,44 @@ When no `--style` is specified, analyze content to select the best style: ## File Management -Save illustrations to `imgs/` subdirectory in the same folder as the article: +### With Article Path + +Save illustrations to `[source-name-no-ext]/illustrations/` subdirectory in the same folder as the article: ``` path/to/ ├── article.md -└── imgs/ +└── article/ + └── illustrations/ + ├── outline.md + ├── prompts/ + │ ├── illustration-concept-a.md + │ ├── illustration-concept-b.md + │ └── ... + ├── illustration-concept-a.png + ├── illustration-concept-b.png + └── ... +``` + +Example: `/posts/ai-future.md` → `/posts/ai-future/illustrations/` + +### Without Article Path (Pasted Content) + +Save to `./illustrations/[topic-slug]/`: + +``` +illustrations/ +└── ai-future/ + ├── source.md ├── outline.md ├── prompts/ - │ ├── illustration-concept-a.md - │ ├── illustration-concept-b.md - │ └── ... - ├── illustration-concept-a.png - ├── illustration-concept-b.png - └── ... + └── *.png ``` +### Directory Backup + +If target directory exists, rename existing to `-backup-YYYYMMDD-HHMMSS` + ## Workflow ### Step 1: Analyze Content & Select Style @@ -266,7 +288,7 @@ Style notes: [specific style characteristics] Insert generated images at corresponding positions: ```markdown -![illustration description](imgs/illustration-[slug].png) +![illustration description]([article-name]/illustrations/illustration-[slug].png) ``` **Insertion Rules**: diff --git a/skills/baoyu-comic/SKILL.md b/skills/baoyu-comic/SKILL.md index 5b11c2f..07590af 100644 --- a/skills/baoyu-comic/SKILL.md +++ b/skills/baoyu-comic/SKILL.md @@ -84,8 +84,12 @@ Style × Layout × Aspect can be freely combined. Custom styles can be described ``` **Target directory**: -- With source path: `[source-dir]/comic/` -- Without source: `comic-outputs/YYYY-MM-DD/[topic-slug]/` +- With source path: `[source-dir]/[source-name-no-ext]/comic/` + - Example: `/posts/turing-story.md` → `/posts/turing-story/comic/` +- Without source: `./comic/[topic-slug]/` + +**Directory backup**: +- If target directory exists, rename existing to `-backup-YYYYMMDD-HHMMSS` ## Workflow diff --git a/skills/baoyu-cover-image/SKILL.md b/skills/baoyu-cover-image/SKILL.md index 6716b02..26c3e6b 100644 --- a/skills/baoyu-cover-image/SKILL.md +++ b/skills/baoyu-cover-image/SKILL.md @@ -76,30 +76,36 @@ When no `--style` is specified, the system analyzes content to select the best s ### With Article Path -Save to `imgs/` subdirectory in the same folder as the article: +Save to `[source-name-no-ext]/cover-image/` subdirectory in the same folder as the article: ``` path/to/ ├── article.md -└── imgs/ +└── article/ + └── cover-image/ + ├── prompts/ + │ └── cover.md + └── cover.png +``` + +Example: `/posts/ai-future.md` → `/posts/ai-future/cover-image/` + +### Without Article Path (Pasted Content) + +Save to `./cover-image/[topic-slug]/`: + +``` +cover-image/ +└── ai-future/ + ├── source.md # Saved pasted content ├── prompts/ │ └── cover.md └── cover.png ``` -### Without Article Path (Pasted Content) +### Directory Backup -Save to `cover-outputs/YYYY-MM-DD/[topic-slug]/`: - -``` -cover-outputs/ -└── 2026-01-17/ - └── ai-future/ - ├── source.md # Saved pasted content - ├── prompts/ - │ └── cover.md - └── cover.png -``` +If target directory exists, rename existing to `-backup-YYYYMMDD-HHMMSS` ## Workflow diff --git a/skills/baoyu-slide-deck/SKILL.md b/skills/baoyu-slide-deck/SKILL.md index faaaaaa..8e24ec1 100644 --- a/skills/baoyu-slide-deck/SKILL.md +++ b/skills/baoyu-slide-deck/SKILL.md @@ -89,18 +89,21 @@ This deck is designed for **reading and sharing**, not live presentation: ``` content-dir/ ├── source-content.md -└── slide-deck/ - ├── outline.md - ├── prompts/ - │ └── 01-slide-cover.md, 02-slide-{slug}.md, ... - ├── 01-slide-cover.png, 02-slide-{slug}.png, ... - ├── {topic-slug}.pptx - └── {topic-slug}.pdf +└── source-content/ + └── slide-deck/ + ├── outline.md + ├── prompts/ + │ └── 01-slide-cover.md, 02-slide-{slug}.md, ... + ├── 01-slide-cover.png, 02-slide-{slug}.png, ... + ├── {topic-slug}.pptx + └── {topic-slug}.pdf ``` +Example: `/posts/ai-intro.md` → `/posts/ai-intro/slide-deck/` + ### Without Content Path (Pasted Content) ``` -slide-outputs/YYYY-MM-DD/{topic-slug}/ +slide-deck/{topic-slug}/ ├── source.md ├── outline.md ├── prompts/ @@ -109,6 +112,10 @@ slide-outputs/YYYY-MM-DD/{topic-slug}/ └── {topic-slug}.pdf ``` +### Directory Backup + +If target directory exists, rename existing to `-backup-YYYYMMDD-HHMMSS` + ## Workflow ### Step 1: Analyze Content diff --git a/skills/baoyu-xhs-images/SKILL.md b/skills/baoyu-xhs-images/SKILL.md index bab67de..c4e9366 100644 --- a/skills/baoyu-xhs-images/SKILL.md +++ b/skills/baoyu-xhs-images/SKILL.md @@ -110,8 +110,12 @@ Detailed layout definitions: `references/layouts/.md` ``` **Target directory**: -- With source path: `[source-dir]/xhs-images/` -- Without source: `xhs-outputs/YYYY-MM-DD/[topic-slug]/` +- With source path: `[source-dir]/[source-name-no-ext]/xhs-images/` + - Example: `/tests-data/article.md` → `/tests-data/article/xhs-images/` +- Without source: `./xhs-images/[topic-slug]/` + +**Directory backup**: +- If target directory exists, rename existing to `-backup-YYYYMMDD-HHMMSS` ## Workflow