Stay Updated!

Get the latest posts and insights delivered directly to your inbox

Skip to content
← Back to Claude Prompts

Add Prompt: Quick Prompt Collection Entry

Instruction Claude Claude Sonnet

Quickly add new prompts to the blog's prompts collection with auto-generated frontmatter

💡 Use Case:
Use when you have a raw Claude Code skill/instruction prompt and want to add it to src/content/prompts/
📤 Expected Output:
A new prompt file in src/content/prompts/ with complete frontmatter

Prompt Content


description: Add a new prompt to the blog’s prompts collection with auto-generated frontmatter argument-hint: [paste raw prompt content] model: sonnet allowed-tools: Read, Write, Glob, AskUserQuestion#

Add Prompt to Collection

Add a new prompt to src/content/prompts/ with properly generated frontmatter.

Phase 1: Parse Input#

The user will provide raw prompt content. This typically includes:

  • A YAML config block with: description, allowed-tools, model, argument-hint
  • Markdown instructions/body

Extract:

  1. name: From the heading or first line (e.g., ”# Learn from Conversation” → “learn”)
  2. description: From the YAML description field
  3. model: From the YAML model field
  4. allowed-tools: From the YAML allowed-tools field

Phase 2: Generate Frontmatter#

Create the primary frontmatter block for the prompts collection:

---
title: "{Title Case Name}: {Brief Purpose}"
pubDatetime: {today's date}T00:00:00Z
tool: "claude"
category: "{skill|instruction|prompt|agent}"  # Infer from content
tags: [{extract relevant keywords}]
description: "{from input description}"
useCase: "{derive from when/how to use}"
modelVersion: "{from model field, formatted nicely}"
expectedOutput: "{infer from the prompt's goal}"
draft: false
---

Category inference:

  • Has allowed-tools + specific workflow → “instruction”
  • Has name: field in YAML → “skill”
  • Simple prompt without execution config → “prompt”
  • Describes an autonomous agent → “agent”

Phase 3: Generate Filename#

Format: claude-{kebab-case-name}-command.md

Examples:

  • “Learn” → claude-learn-command.md
  • “Fix Pipeline” → claude-fix-pipeline-command.md
  • “Create Skill” → claude-create-skill.md

Phase 4: Present Draft#

Show the complete file content:

  1. The generated primary frontmatter
  2. The original skill config YAML block (preserved as-is)
  3. The original prompt body (preserved as-is)

Ask: “Ready to create {filename}?”

Phase 5: Create File#

After user approval:

  1. Write to src/content/prompts/{filename}
  2. Confirm creation with path