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.yaml before 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 configured hexo_blog.repo and github_oss.repo as the source of truth.
  • Read and update GitHub files with gh api /repos/<owner>/<repo>/contents/<path> or gh 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-commit as unsafe for an existing dirty repository: it may stage broad changes with git add .. Prefer manual git commands, stage only task-related files, and inspect git status --short before and after every Hexo generation step.
  • hexo generate, hexo server, and plugin validation can rewrite frontmatter in unrelated posts, especially abbrlink, 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 update banner and headimg.
  • Before using Hexo-specific syntax in a post, identify the installed third-party plugins from the online package.json and 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_content style settings. Do not impose a fixed writing style from this skill when blog_content is empty; ask the user or infer from existing posts only when appropriate.

Configuration

Installs
13
First Seen
Mar 3, 2026
hexo-blog-manager — imhansiy/my-skills