Design: /new-post Claude Code Skill

Problem

Adding new blog posts to the bilingual Jekyll site is tedious. Each post requires:

Solution

A Claude Code skill (/new-post) that automates post creation with AI-assisted drafting and translation, using a two-phase approach.

Input Modes

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

  1. Generate or format the primary post (draft from idea, or polish provided content)
  2. 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
  3. Present the full post with front matter for user review
  4. Accept modifications (“change title to X”, “add tag Y”, “rewrite intro”)
  5. Wait for explicit approval before proceeding

Phase 2 — Translate & Create Files

  1. Translate the approved post to the other language, preserving tone and technical accuracy
  2. 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
  3. 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

Decisions