Skip to main content
ClaudeWave
Slash Command28k estrellas del repoactualizado yesterday

create-blog-article

The create-blog-article command generates a complete SEO-optimized blog post for a Claude Code component, including metadata extraction from the component file, automatic cover image generation via Python script, and formatted HTML output. Use this when documenting new agents, MCPs, skills, commands, or hooks to create professional marketing content with AI-generated imagery and structured blog metadata.

Instalar en Claude Code
Copiar
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/davila7/claude-code-templates/HEAD/.claude/commands/create-blog-article.md -o ~/.claude/commands/create-blog-article.md
Después abre una sesión nueva de Claude Code; el slash command carga automáticamente.

create-blog-article.md

# Create Blog Article for Claude Code Component

You will create a complete, SEO-optimized blog article for a Claude Code component.

## Component Path Argument

Component path provided: **$ARGUMENTS**

Expected format examples:
- `development-team/frontend-developer` (for agents)
- `supabase` (for MCPs)
- `productivity/nowait` (for skills)

## Step 1: Identify Component Type and Read Component File

Based on the path structure, determine the component type:
- If path has `/`, could be an agent, MCP, command, skill, or hook in a folder
- Single word could be MCP, command, or skill

Read the component file:
- Agents: `cli-tool/components/agents/$ARGUMENTS.md` (e.g., `development-team/frontend-developer.md`)
- MCPs: `cli-tool/components/mcps/$ARGUMENTS.json` (e.g., `devtools/context7.json`)
- Skills: `cli-tool/components/skills/$ARGUMENTS/SKILL.md`
- Commands: `cli-tool/components/commands/$ARGUMENTS.md` (e.g., `setup/ci-cd-pipeline.md`)
- Hooks: `cli-tool/components/hooks/$ARGUMENTS.md`

**CRITICAL:** Use `find` or `grep` to locate the actual file path first, then extract folder/name structure.

Extract from the component file:
- `name`: Component name
- `description`: Component description
- `tools`: Available tools (for agents)
- Key capabilities and focus areas from the content

## Step 2: Generate Component-Specific Blog ID and Names

From the component path, create:
- **Blog ID**: Convert path to blog-friendly ID
  - Example: `development-team/frontend-developer` → `frontend-developer-agent`
  - Example: `supabase` → `supabase-mcp`
  - Example: `productivity/nowait` → `nowait-skill`

- **Component Name**: Human-readable name
  - Example: `frontend-developer` → `Frontend Developer`
  - Example: `supabase` → `Supabase`

- **Component Type**: Uppercase type
  - AGENT, MCP, SKILL, COMMAND, HOOK

## Step 3: Generate Cover Image FIRST

**CRITICAL**: Generate the cover image BEFORE creating the HTML file.

Use the Python script to generate the image:

```bash
python3 scripts/generate_blog_images.py
```

But first, temporarily add a new entry to `docs/blog/blog-articles.json` with:
```json
{
  "id": "[blog-id]",
  "title": "Temporary",
  "description": "Temporary",
  "url": "[blog-id]/",
  "image": "https://www.aitmpl.com/blog/assets/[blog-id]-cover.png",
  "category": "[Component Type]",
  "publishDate": "2025-01-15",
  "readTime": "4 min read",
  "tags": ["Claude Code"],
  "difficulty": "basic",
  "featured": true,
  "order": 999
}
```

Then run the script, which will:
1. Detect the new entry
2. Find the component path
3. Generate the image at `docs/blog/assets/[blog-id]-cover.png`

After image generation, update the entry with correct information.

## Step 4: Create Blog Article HTML

Create directory:
```bash
mkdir -p docs/blog/[blog-id]
```

**CRITICAL PROCESS:**

1. **First, READ the template file completely:**
   ```bash
   Read docs/blog/code-reviewer-agent/index.html
   ```

2. **Copy the ENTIRE content** to the new file location:
   ```bash
   Write docs/blog/[blog-id]/index.html
   ```

3. **Then, ONLY replace the specific content sections** (listed below)

**DO NOT:**
- ❌ Create HTML from scratch
- ❌ Use a different template
- ❌ Simplify or remove any scripts
- ❌ Change the header/footer structure
- ❌ Modify CSS paths or class names

Create `docs/blog/[blog-id]/index.html` using this process:

### HTML Template Structure

**CRITICAL**: Use `docs/blog/code-reviewer-agent/index.html` as the EXACT base template.

This template includes ALL required components:
- ✅ Header with `class="header"` (NOT "blog-header")
- ✅ ASCII art logo in terminal-header
- ✅ Copy as Markdown button (`id="copy-markdown-btn"`)
- ✅ Proper article structure: `article-header` → `article-body` → `article-content-full`
- ✅ "Explore Components" banner at the end of content
- ✅ Footer with ASCII art and links
- ✅ CodeCopy script (adds copy buttons to code blocks)
- ✅ MarkdownCopier script (copy entire article as markdown)
- ✅ Mermaid diagram support script

**DO NOT create custom HTML structure** - copy the template EXACTLY and only replace the content-specific parts.

#### How to Use the Template:

1. **Copy the entire file** from `code-reviewer-agent/index.html`
2. **Only replace these specific content areas**:
   - SEO meta tags (title, description, keywords, Open Graph)
   - Article title and subtitle in `<h1>` and `<p class="article-subtitle">`
   - Tags in `<div class="article-tags">`
   - Main content inside `<div class="article-content-full">` (everything between the opening and closing div)
   - Cover image src and alt text
3. **Keep EVERYTHING else unchanged**:
   - Header structure and navigation
   - Copy Markdown button
   - Footer with ASCII art
   - All three scripts at the end (CodeCopy, MarkdownCopier, Mermaid)
   - CSS links and paths

#### Key SEO Elements to Customize:

**Title Tag** (Line 6):
```html
<title>[Component Name] for Claude Code: [Key Technologies] Expert AI Assistant</title>
```

**Meta Description** (Line 26):
```html
<meta name="description" content="Install the [Component Name] for Claude Code to [main benefit]. AI-powered [component type] for [key features].">
```

**Open Graph Tags** (Lines 28-32):
```html
<meta property="og:title" content="[Component Name] for Claude Code: [Key Technologies]">
<meta property="og:description" content="Install the [Component Name] for Claude Code...">
```

**Keywords** (Line 58):
Focus on: Claude Code, Component Type, Main Technologies
```html
<meta name="keywords" content="Claude Code [type], [Component Name], Claude Code [tech1], [tech2], AI [domain] development, ...">
```

**Structured Data** (Lines 81-136):
```json
{
  "@type": "BlogPosting",
  "headline": "[Component Name] for Claude Code: [Technologies]",
  "keywords": "Claude Code [type], [Component Name], ...",
  "articleSection": "Claude Code [Type]s",
  "about": [
    {"@type": "Thing", "name": "Claude Code"},
    {"@type": "Thing", "name": "[Component Type]"},
    ...
  ]
}
```

**
agent-expertSubagent

Use this agent when creating specialized Claude Code agents for the claude-code-templates components system. Specializes in agent design, prompt engineering, domain expertise modeling, and agent best practices. Examples: <example>Context: User wants to create a new specialized agent. user: 'I need to create an agent that specializes in React performance optimization' assistant: 'I'll use the agent-expert agent to create a comprehensive React performance agent with proper domain expertise and practical examples' <commentary>Since the user needs to create a specialized agent, use the agent-expert agent for proper agent structure and implementation.</commentary></example> <example>Context: User needs help with agent prompt design. user: 'How do I create an agent that can handle both frontend and backend security?' assistant: 'Let me use the agent-expert agent to design a full-stack security agent with proper domain boundaries and expertise areas' <commentary>The user needs agent development help, so use the agent-expert agent.</commentary></example>

blog-writerSubagent

Use this agent to create blog articles for aitmpl.com from Claude Code Templates components. Reads the component, asks the user to confirm details, generates SVG cover, HTML article, and updates blog-articles.json. Examples: <example>Context: User wants a blog for a component. user: 'Create a blog article for cli-tool/components/hooks/security/secret-scanner.json' assistant: 'I'll use the blog-writer agent to create the full blog article with cover image and proper structure' <commentary>The user wants a blog article from a component, use blog-writer for the full pipeline.</commentary></example>

build-checkerSubagent

Runs pre-deploy build checks on the dashboard. Validates Astro build, checks for common esbuild/JSX issues, verifies API endpoints compile, and reports errors with fixes. Use before merging PRs that touch dashboard/.

catalog-generatorSubagent

Regenerates the component catalog (docs/components.json) by running the Python script. Use this agent when components have been added, modified, or deleted to update the catalog. Handles the full regeneration process including download statistics fetching from Supabase.

cli-ui-designerSubagent

CLI interface design specialist. Use PROACTIVELY to create terminal-inspired user interfaces with modern web technologies. Expert in CLI aesthetics, terminal themes, and command-line UX patterns.

command-expertSubagent

Use this agent when creating CLI commands for the claude-code-templates components system. Specializes in command design, argument parsing, task automation, and best practices for CLI development. Examples: <example>Context: User wants to create a new CLI command. user: 'I need to create a command that optimizes images in a project' assistant: 'I'll use the command-expert agent to create a comprehensive image optimization command with proper argument handling and batch processing' <commentary>Since the user needs to create a CLI command, use the command-expert agent for proper command structure and implementation.</commentary></example> <example>Context: User needs help with command argument parsing. user: 'How do I create a command that accepts multiple file patterns?' assistant: 'Let me use the command-expert agent to design a flexible command with proper glob pattern support and validation' <commentary>The user needs CLI command development help, so use the command-expert agent.</commentary></example>

component-improverSubagent

Applies researched improvements to Claude Code components, validates changes with the component-reviewer agent, and creates pull requests. The only agent that modifies files and creates PRs.

component-migratorSubagent

Migrates components (agents, commands, skills, hooks, settings, MCPs) from external GitHub repositories to claude-code-templates, validates them with component-reviewer, and regenerates the catalog