关于 pre-publish-post-assistant
pre-publish-post-assistant 是一项用于准备博客文章发布的技能,可建议分类、标签和 SEO 元数据。它会参考网站现有分类体系及分布数据,并说明建议依据。
主要功能
- 01建议一至两个分类
- 02从现有标签中推荐
- 03检查分类体系分布
- 04生成 SEO 标题和描述
- 05说明建议理由
适用场景
- 01为博客草稿选择分类
- 02根据网站标签体系挑选标签
- 03准备发布所需的 SEO 元数据
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ nicepkg/ ai-workflow --skill pre-publish-post-assistant安装后在 Claude Code 中输入/pre-publish-post-assistant确认已加载。
详细介绍
发布前文章助手技能
目的
此技能通过提供智能建议,帮助为博客文章做好发布准备:
- 分类 - 从现有站点分类中选择,并考虑分布情况
- 标签 - 从现有标签中选择,避免标签泛滥
- SEO 元数据 - 标题、元描述和焦点关键短语
所有建议都会附上说明,解释背后的理由。
何时使用此技能
- 用户说“为这篇文章分类”或“推荐分类/标签”
- 用户要求“为这篇文章做好发布准备”
- 用户想为草稿获取“SEO 建议”
- 用户提供文章草稿,并要求推荐分类体系
- 用户提到“新博客文章”,需要分类方面的帮助
核心原则
分类选择
- 每篇文章限制为 1-2 个分类(主要分类 + 可选的次要分类)
- 优先选择文章数量适中的分类(避免过多或过少)
- 与内容主题相符,而不只是匹配关键词
- 适用时考虑分类层级
标签选择
- 每篇文章限制为 3-5 个标签
- 仅使用现有标签(除非用户明确要求,否则不创建新标签)
- 避免标签泛滥(仅有 1-2 篇文章的标签价值较低)
- 优先选择能有效归类相关内容的标签
- 考虑标签的搜索潜力
SEO 元数据
- 标题:50-60 个字符,包含主要关键词,具有吸引力
- 元描述:150-160 个字符,总结价值主张,并包含行动号召
- 焦点关键短语:2-4 个词,便于搜索,且与内容相关
输入格式
此技能接受多种格式的文章草稿:
# File path
"Classify this post: /path/to/draft.md"
# URL (for already-published posts needing optimization)
"Suggest tags for https://example.com/my-post/"
# Inline text
"Here's my draft: [content]... What categories fit?"
数据来源
分类和标签
可从以下来源获取:
- WordPress GraphQL - 来自 WP 的实时数据
- 静态 dist 文件夹 - 从构建后的网站中解析(
/category/、/tag/页面) - 缓存的分类体系文件 - 预先生成的
taxonomy.json
分布数据
为了提供均衡的建议,技能需要获取各分类/标签的文章数量:
- 分类:力求分布均匀;若某分类会变得过于庞大,则发出提示
- 标签:优先选择有 5 篇以上文章的标签,并提醒用户注意孤立标签
输出格式
## Suggested Categories
| Category | Post Count | Confidence | Rationale |
|----------|------------|------------|-----------|
| personal-development | 245 | High | Core theme matches self-improvement focus |
| productivity-effectiveness | 89 | Medium | Secondary theme around habits and routines |
**Recommendation**: Use "personal-development" as primary category.
---
## Suggested Tags
| Tag | Post Count | Confidence | Rationale |
|-----|------------|------------|-----------|
| habits | 45 | High | Central topic of the post |
| productivity | 67 | High | Directly discussed |
| morning-routine | 12 | Medium | Specific example in content |
**Recommendation**: Use all 3 tags. Avoid creating new tags.
---
## SEO Metadata
**Title** (58 chars):
> How to Build Morning Habits That Actually Stick | Your Blog
**Meta Description** (156 chars):
> Discover the science-backed approach to building morning habits that last. Learn the 3-step framework used by high performers. Start your transformation today.
**Focus Keyphrase**:
> morning habits
**Rationale**:
- "morning habits" has good search volume and matches user intent
- Title includes keyphrase naturally at the beginning
- Description creates urgency and promises specific value
工作流
1. 分析内容
- 提取主要主题和话题
- 识别关键概念和术语
- 判断内容类型(操作指南、观点、评测等)
2. 加载分类体系
- 获取现有分类及其文章数量
- 获取现有标签及其文章数量
- 识别分布模式
3. 匹配并评分
- 根据相关性为每个分类/标签评分
- 考虑分布均衡性
- 标记潜在问题(孤立标签、过于庞大的分类)
4. 生成 SEO 内容
- 撰写包含主要关键词的标题
- 撰写有吸引力的元描述
- 推荐焦点关键短语
5. 提供建议及理由
- 以表格形式展示建议
- 解释每条建议的理由
- 指出任何问题或替代方案
配置
{
"taxonomy_source": "graphql|dist|file",
"dist_path": "./dist",
"taxonomy_file": "./taxonomy.json",
"graphql_endpoint": "https://wp.example.com/graphql",
"limits": {
"max_categories": 2,
"max_tags": 5,
"min_tag_posts": 3
},
"seo": {
"title_max_length": 60,
"description_max_length": 160,
"site_name": "Your Blog"
}
}
使用示例
基本分类
User: "Classify this post for me: /content/drafts/morning-routine-guide.md"
Claude: [Reads file, analyzes content, fetches taxonomy]
[Presents category/tag suggestions with rationale]
[Generates SEO metadata]
快速检查标签
User: "What tags should I use for a post about Bitcoin ETFs and institutional adoption?"
Claude: [Analyzes topic, checks existing tags]
"Based on your existing tags, I recommend:
- bitcoin (89 posts) - primary topic
- cryptocurrency (45 posts) - broader category
- investing (23 posts) - relevant angle
Avoid creating new tags like 'etf' or 'institutional' unless you plan
to write more content on these specific topics."
SEO 重点
User: "Generate SEO metadata for my post about productivity apps for remote workers"
Claude: [Analyzes topic and search intent]
Title: "Best Productivity Apps for Remote Workers in 2025 | Your Blog"
Description: "Discover the top productivity apps that remote workers
swear by. From task management to focus tools, find the perfect
stack for your home office."
Focus Keyphrase: "productivity apps remote workers"
执行的最佳实践
- 避免标签泛滥 - 除非理由充分,否则不会建议创建新标签
- 保持分布均衡 - 若某分类正在变得过于庞大,则会发出提示
- 符合 SEO 规范 - 强制遵守字符限制和关键词位置要求
- 使用现有分类体系 - 始终根据站点的实际数据进行检查
- 理由透明 - 每条建议都附有说明
评论
支持 Markdown