AgentSkillsCN

writing-hugo-blog

根据用户查询、阅读结果或对话内容,以中文撰写 Hugo 博客文章。当用户要求撰写博客文章、为自己的博客生成内容,或把研究与洞见转化为文章形式时使用。能够处理文章结构、前言格式、AI 内容标注,以及在 content/posts/YYYY/ 目录中妥善组织文件。

SKILL.md
--- frontmatter
name: writing-hugo-blog
description: Create Hugo blog posts in Chinese based on user queries, reading results, or conversations. Use when the user asks to write a blog post, generate content for their blog, or convert research/insights into an article format. Handles article structure, front matter formatting, AI content labeling, and proper file organization in the content/posts/YYYY/ directory.

Writing Hugo Blog

Overview

This skill enables creation of Chinese blog posts for the Neo VRAINS Hugo blog. Articles are generated based on user queries, research results, or conversation content, following the blog's established format and style guidelines.

Blog Structure

Location

  • Articles are stored in content/posts/YYYY/ (year-based subdirectories)
  • Example: content/posts/2026/my-article.md

Front Matter Format

All blog posts use YAML front matter with these required fields:

yaml
---
title: "Article Title"
date: YYYY-MM-DDTHH:MM:SS+08:00
draft: false
author: "<AgentName>"
categories: ["Things I Learned"]
showToc: true
tags: ["tag1", "tag2", "AI generated"]
---

Field descriptions:

  • title: Chinese article title (required)
  • date: Publication date in ISO 8601 format (required)
  • draft: Set to false for published posts, true for drafts
  • author: Article author (required, should be the name of the agent creating the article)
  • categories: Typically ["Things I Learned"] or other category names
  • showToc: Enable table of contents for longer articles
  • tags: Relevant tags for content discoverability (array of strings). MUST include "AI generated" for AI-generated content.

Article Content Guidelines

  1. Language: Simplified Chinese, natural and fluent writing style
  2. Length (determine based on article type):
    • Quick Summary/Sharing: 500-1500 words - For sharing thoughts on external blog posts or quick insights
    • Project Analysis/Deep Dive: 2000-3000 words - For in-depth project analysis, research findings, or practical experience
    • General Guideline: Reading time under 5 minutes (avg 400-600 Chinese characters/minute)
  3. Structure: Clear headings, logical flow, short paragraphs
  4. AI Content Labeling: Every article generated by AI MUST include this disclaimer at the end:
markdown
---

*本文包含AI生成内容*
  1. Code examples: When including code, use proper syntax highlighting with language tags
  2. Reference Sources: For articles based on external content (blog posts, documentation, etc.), add a references section at the end before the AI disclaimer:
markdown

## 参考资料

- [Source Title 1](url-1)
- [Source Title 2](url-2)

Use [Title](Link) format for easy navigation to original content.

Workflow

Step 1: Determine Article Context

  • Understand the user's intent: research summary, technical tutorial, reflection, or insight
  • Identify key points from the query, reading results, or conversation
  • Determine article type to set appropriate length:
    • Quick Summary/Sharing: 500-1500 words (引用他人博客内容分享思考)
    • Project Analysis/Deep Dive: 2000-3000 words (项目实践分析)
    • General guideline: Reading time should be under 5 minutes (avg 400-600 Chinese chars/minute)
  • Determine appropriate tags and categories based on content

Step 2: Generate Article

  1. Create front matter with proper YAML format
  2. Write article body in Chinese with:
    • Engaging title that reflects content
    • Clear introduction setting context
    • Well-structured body with headings
    • Concise conclusion or key takeaways
  3. Add AI content disclaimer at the end
  4. Set publication date to current time in China timezone (+08:00)

Step 3: Save Article

  1. Determine the year for the article directory (current year)
  2. Create a descriptive filename in lowercase with hyphens (e.g., my-article.md)
  3. Save to content/posts/YYYY/ directory
  4. Verify file structure matches other blog posts

Step 4: Verification

Check that:

  • Front matter is valid YAML
  • Date format is correct: YYYY-MM-DDTHH:MM:SS+08:00
  • Article contains AI content disclaimer
  • File is in correct directory structure
  • Markdown syntax is valid

Examples

Technical Article

yaml
---
title: "使用 Hugo 构建静态博客"
date: 2026-02-14T01:30:00+08:00
draft: false
author: "<YourAgentName>"
categories: ["Things I Learned"]
showToc: true
tags: ["Hugo", "Static Site Generator", "Web Development", "AI generated"]
---

Research Summary

yaml
---
title: "AI 辅助编程的实践经验"
date: 2026-02-14T02:00:00+08:00
draft: false
author: "<YourAgentName>"
categories: ["Things I Learned"]
showToc: true
tags: ["AI", "Programming", "Productivity", "AI generated"]
---

Writing Style

  • Tone: Professional yet conversational, similar to technical blog posts
  • Voice: First-person perspective when sharing personal insights
  • Clarity: Explain technical concepts simply but accurately
  • Engagement: Use examples and practical applications when possible
  • Brevity: Respect the reader's time, match length to article type - concise for summaries, thorough for deep dives

Reference Information

Common Categories

  • "Things I Learned" - Technical tutorials and insights
  • Create new categories as needed based on article type

Content Organization

  • content/posts/YYYY/ - Blog posts organized by year
  • content/archives.md - Archives page (if applicable)
  • Front matter consistency is important for proper indexing

Blog Configuration (User-Specific)

Before creating articles, read the blog configuration to understand:

  1. Config file location: Hugo supports multiple config file formats:

    • config.yml (YAML)
    • config.toml (TOML)
    • config.yaml (YAML, alternative)
    • config.json (JSON)
  2. Key configuration values (from config.yml):

    yaml
    baseURL: "https://www.sdlinks.net"  # Blog URL
    title: "Neo VRAINS"                 # Site title
    theme: hugo-PaperMod               # Theme used
    
    params:
      title: "Neo VRAINS"
      author: Christophe                # Default author
    
  3. Reading configuration: Always check the actual config file in the blog root directory before generating content. This ensures articles match the blog's settings and style.

These settings vary by user and should be read dynamically from the config file, not hardcoded.