hexo-publish-post
A simplified command-line workflow for creating and publishing Hexo blog posts.
Install
mkdir -p .claude/skills/hexo-publish-post && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/19117" && unzip -o skill.zip -d .claude/skills/hexo-publish-post && rm skill.zipInstalls to .claude/skills/hexo-publish-post
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
根据用户提供的文章标题和 Markdown 正文创建新的 Hexo 博客文章,并执行完整发布流程。用于用户希望在 Hexo 站点中发布或部署新文章,且需要执行相当于 `npx hexo new`、`npx hexo clean`、`npx hexo g` 和 `npx hexo d` 的流程。Key capabilities
- →Translate article titles into English URL slugs
- →Insert a `<!--more-->` tag into the article body at a natural summary truncation point
- →Execute `npx hexo new`, `npx hexo clean`, `npx hexo g`, and `npx hexo d` commands
- →Replace the generated article's body while preserving Hexo's front matter
- →Confirm the working directory is a Hexo project before execution
- →Pass an English slug to the script to avoid non-English characters in paths
How it works
The skill translates the article title into an English slug, prepares the Markdown content by inserting a `<!--more-->` tag, and then executes a script that runs Hexo commands to create, clean, generate, and deploy the post.
Inputs & outputs
When to use hexo-publish-post
- →Publishing new blog posts
- →Generating static site content
- →Automating hexo deployment
About this skill
Hexo 发布文章
工作流程
仅当用户同时提供文章标题和正文内容,并且希望直接发布或部署时,使用此 skill。
- 除非用户指定其他 Hexo 目录,否则从 Hexo 项目根目录运行。
- 将文章标题翻译成英文 URL slug,用于生成 Markdown 文件名和匹配的文章资源目录名。文章标题本身保留原语言,但生成的文件名和目录名不能包含中文字符。
- 使用小写英文单词,并用单个连字符分隔。
- 只能使用
a-z、0-9和-。 - 当可以自然翻译成英文时,不要使用拼音。
- 示例:
如何使用 Codex 发布博客->how-to-publish-a-blog-with-codex。
- 在写入临时 Markdown 文件前,先整理文章正文:
- 如果用户没有提供
<!--more-->,插入且只插入一个<!--more-->标记。 - 将它放在自然的摘要截断位置,通常位于文章前半部分,紧跟在能够概括整体主题、并给读者提供代表性预览的段落或小节之后。
- 不要在文章还没有足够上下文形成有效首页摘要前插入。
- 除非用户明确要求,否则临时正文中不要包含 YAML front matter。
- 如果用户没有提供
- 执行 skill 自带脚本:
/path/to/skill/scripts/publish_hexo_post.sh --title "文章标题" --slug "english-title-slug" --content-file /path/to/body.md --cwd /path/to/hexo-project
- 让脚本执行必需流程:
npx hexo new "文章标题" --path "english-title-slug"- 保留 Hexo 生成的 front matter,并替换生成文章的正文
npx hexo cleannpx hexo gnpx hexo d
安全检查
- 运行脚本前,确认工作目录是 Hexo 项目。
- 不要硬编码凭据、部署密钥、token 或远程仓库敏感信息。
- 如果用户要求立即发布,并且已经提供标题和正文,不要再次请求确认;部署命令正是此 skill 的用途。
- 如果缺少标题或正文,先询问缺失内容,再执行部署。
- 始终传入英文
--slug;脚本会拒绝缺失或非英文 slug,避免生成的文章路径包含中文字符。
说明
- 脚本会保留 Hexo 生成的 YAML front matter,只替换正文内容。
- 脚本通过比较执行
npx hexo new前后的source/_posts/*.md文件列表来识别新建文章。 - 首页摘要由
<!--more-->控制;保留已有标记,避免重复插入。 - 如果
npx hexo d失败,报告命令输出,不要盲目重试。
When not to use it
- →When the user does not provide both an article title and body content
- →When the user only wants to create a new post without immediately publishing or deploying
- →When the user wants to manually edit the YAML front matter in the temporary body
Limitations
- →Requires both an article title and body content to proceed
- →Requires an English slug to be passed to the script
- →Does not allow hardcoding credentials or sensitive information
How it compares
This workflow automates the entire Hexo publishing process, including slug generation, content preparation, and the full build/deploy cycle, which is more efficient than performing each step manually.
Compared to similar skills
hexo-publish-post side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| hexo-publish-post (this skill) | 0 | 11d | Review | Beginner |
| document-writer | 3 | 5mo | No flags | Beginner |
| bm-md | 1 | 3mo | Review | Beginner |
| writing-docs | 1 | 12d | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
document-writer
onmax
Use when writing blog posts or documentation markdown files - provides writing style guide (active voice, present tense), content structure patterns, and MDC component usage. Overrides brevity rules for proper grammar. Use nuxt-content for MDC syntax, nuxt-ui for component props.
bm-md
miantiao-me
使用 bm.md 服务进行 Markdown 排版、渲染和格式转换,支持微信公众号、知乎、掘金等多平台
writing-docs
remotion-dev
Guides for writing and editing Remotion documentation. Use when adding docs pages, editing MDX files in packages/docs, or writing documentation content.
update-docs
openvinotoolkit
Update OpenVINO GenAI site documentation for API or feature changes. Use when: new pipelines, models, or use-cases are introduced; site docs need to reflect new capabilities.
resume-builder
amruthpillai
Generate professional resumes that conform to the Reactive Resume schema. Use when the user wants to create, build, or generate a resume through conversational AI, or asks about resume structure, sections, or content. This skill guides the agent to ask clarifying questions, avoid hallucination, and produce valid JSON output for https://rxresu.me.
word
Fergana-Labs
Create, read, edit, and manipulate Microsoft Word documents (.docx files). Use when users ask to work with Word files, create documents, read .docx files, or format text documents.