Design: /new-post Claude Code Skill
Problem
Adding new blog posts to the bilingual Jekyll site is tedious. Each post requires:
- Two files with matching names in
_posts/en/ and _posts/es/
- Precise YAML front matter (layout, title, date, categories, tags, author, lang, permalink, description)
- Correct permalink format (
/en/YYYY/MM/DD/slug.html)
- Translation between Spanish and English
Solution
A Claude Code skill (/new-post) that automates post creation with AI-assisted drafting and translation, using a two-phase approach.
The skill accepts free-form input and auto-detects the mode:
| Input |
Mode |
Behavior |
| Short idea/topic description |
Idea mode |
AI drafts a full post in Spanish |
| Full post in Spanish |
Spanish mode |
Uses content as-is, formats it |
| Full post in English |
English mode |
Uses content as-is, formats it |
Detection: short input (a few sentences) = idea. Long markdown = full post. Language is auto-detected.
Two-Phase Flow
Phase 1 — Draft & Review
- Generate or format the primary post (draft from idea, or polish provided content)
- Auto-generate front matter from content analysis:
title — derived from content
date — today’s date
slug — kebab-case from title, no accents
categories — inferred (3-5)
tags — inferred
description — 1-2 sentence SEO summary
- Present the full post with front matter for user review
- Accept modifications (“change title to X”, “add tag Y”, “rewrite intro”)
- Wait for explicit approval before proceeding
Phase 2 — Translate & Create Files
- Translate the approved post to the other language, preserving tone and technical accuracy
- Create both files:
_posts/es/YYYY-MM-DD-slug.md with lang: es, permalink: /es/YYYY/MM/DD/slug.html
_posts/en/YYYY-MM-DD-slug.md with lang: en, permalink: /en/YYYY/MM/DD/slug.html
- Show the user what was generated (file paths and summary)
Front Matter Template
---
layout: single
title: "Post Title"
date: YYYY-MM-DD
categories: [cat1, cat2, cat3]
tags: [tag1, tag2, tag3]
author: Elio Rincón
lang: en
permalink: /en/YYYY/MM/DD/slug.html
description: "Brief description for SEO"
---
Technical Implementation
- Single skill file at
.claude/skills/new-post.md
- Prompt-based — no scripts, no external dependencies
- Uses Claude’s built-in tools: Write (file creation), AskUserQuestion (review checkpoint)
- Follows existing blog conventions exactly (Minimal Mistakes theme, bilingual structure)
Decisions
- Two-phase over single-phase: Gives a quality checkpoint without being tedious
- Auto-detect input mode: No need to specify flags — just provide content naturally
- No commit: Files are created and shown; user commits when ready
- No frontend: Skill-only for now; frontend can be added later if needed