Claude Skills
How I made a Claude skill for Hugo
Published: Saturday, Nov 1, 2025 Last modified: Saturday, Nov 1, 2025
Creating a Blogging Skill for Claude Code
I wanted to streamline my blogging workflow with Claude Code, so I created a custom skill that helps me create new blog posts using Hugo. Here’s how I did it.
Understanding Claude Skills
Claude Skills are reusable automation workflows that activate automatically when you make relevant requests. They live in .claude/skills/ directories and consist of a SKILL.md file with frontmatter and instructions.
The Challenge
My blog uses Hugo with a specific structure:
- Posts are organized by year:
content/blog/YEAR/filename.md - Each post needs YAML frontmatter with title, date, and description
- Filenames should be SEO-friendly (lowercase, hyphenated)
I wanted Claude to:
- Dynamically determine the current year
- Help me create SEO-friendly titles and descriptions
- Use Hugo’s
hugo newcommand to bootstrap posts - Update the frontmatter automatically
Creating the Skill
First, I learned that skills need a specific structure:
- A directory in
.claude/skills/ - A
SKILL.mdfile (uppercase!) with frontmatter - The frontmatter needs a
nameanddescription
I created the skill at .claude/skills/blog/SKILL.md:
---
name: blog
description: Create a new blog post for dabase.com using Hugo with SEO-friendly title and description
---
The Key Insights
-
Use
date +%Y- Instead of hardcoding the year, the skill runs this command to dynamically get the current year. -
Leverage Hugo’s CLI - Rather than manually creating files, use
hugo new content/blog/YEAR/filename.mdto bootstrap with proper frontmatter. -
SEO Focus - The skill prompts for what the post is about and generates appropriate titles and descriptions.
-
Filename Generation - Converts titles to lowercase, replaces spaces with hyphens, and removes special characters.
The Complete Workflow
When I ask Claude to create a blog post, it:
- Runs
date +%Yto get the year - Asks what the blog is about
- Suggests an SEO-friendly title and description
- Generates a clean filename from the title
- Runs
hugo new content/blog/2025/filename.md - Updates the frontmatter with the title and description
- Confirms the file location
Common Pitfall
Initially, I created a single blog.md file in .claude/skills/, but skills must be directories containing a SKILL.md file (uppercase). Once I fixed that structure, everything worked perfectly.
The Result
Now I can simply tell Claude “I want to write a blog post about X” and it handles all the boilerplate, letting me focus on writing content. The skill is version-controlled with my blog repository, so it’s available across machines.
Skills are a powerful way to encode your project-specific workflows directly into Claude Code, making repetitive tasks automatic and consistent.