hexo-blog-manager
Installation
SKILL.md
Hexo Blog & OSS Resource Manager Skill
This skill defines the standard operating procedure (SOP) for managing the Hexo blog repository and image-hosting repository configured in ~/.config/hexo/config.yaml.
Critical Guardrails
- Read
~/.config/hexo/config.yamlbefore deciding repository names, CDN base URLs, posts paths, API base URLs, models, or image sizes. Do not hardcode a specific blog repository, OSS repository, CDN host, or local checkout path. - Operate online-first with
gh. Do not look for the user's local Hexo repo, clone repositories, or edit local blog files unless the user explicitly asks for local work. Treat the configuredhexo_blog.repoandgithub_oss.repoas the source of truth. - Read and update GitHub files with
gh api /repos/<owner>/<repo>/contents/<path>orgh api --method PUT ... --input <payload.json>. For updates, fetch the current file SHA first and include it in the PUT payload. - Local disk use is allowed only for temporary generated artifacts, API payload JSON, or inspection scratch files needed to call
gh api; clean them up after successful upload/update. - Treat
create_post.py --auto-commitas unsafe for an existing dirty repository: it may stage broad changes withgit add .. Prefer manual git commands, stage only task-related files, and inspectgit status --shortbefore and after every Hexo generation step. hexo generate,hexo server, and plugin validation can rewrite frontmatter in unrelated posts, especiallyabbrlink, YAML array formatting, and folded URLs. If the user did not ask for those changes, restore those files before committing.- Do not commit generated
public/,db.json, temporary payload JSON, generated cover previews, or unrelated frontmatter churn unless the user explicitly asks for them. - When fixing rendering, verify both build output and browser behavior. For Mermaid, checking that Hexo produced
<div class="mermaid">is not enough; the active theme must load Mermaid JS and run initialization after first load and PJAX navigation. - For image uploads, upload binary assets to the configured
github_oss.repo, verify the uploaded file exists or the CDN URL resolves, then updatebannerandheadimg. - Before using Hexo-specific syntax in a post, identify the installed third-party plugins from the online
package.jsonand Hexo config files. Use the plugin's documented tag/filter/frontmatter syntax instead of inventing Markdown or HTML. - Before generating or rewriting article body content, read the configured
blog_contentstyle settings. Do not impose a fixed writing style from this skill whenblog_contentis empty; ask the user or infer from existing posts only when appropriate.