Guide for formatting Claude-facing documentation with proper line wrapping and YAML multi-line syntax
Formats Claude-facing documentation with proper line wrapping and YAML multi-line syntax.
/plugin marketplace add cowwoc/claude-code-cat/plugin install cat@claude-code-catThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Use this skill when editing Claude-facing documentation files to ensure proper formatting.
110 characters for Claude-facing documentation files
| Format | Technique | Example |
|---|---|---|
| YAML frontmatter | Use > or ` | ` for multi-line |
| Markdown prose | Break at word boundaries | Natural paragraph flow |
| Code blocks | Do NOT wrap | Leave as-is (preserve formatting) |
| URLs | Do NOT wrap | Leave as-is (would break link) |
| Tables | Do NOT wrap | Leave as-is (would break structure) |
| Inline code | Do NOT wrap within backticks | Leave as-is |
Problem: Long YAML values exceed 110 character limit
Solution: Use folded (>) or literal (|) style operators
Example - Folded Style (for prose):
# BEFORE (unsafe - long line):
description: This is a very long description that exceeds 110 characters and would cause readability issues
# AFTER (safe - using folded style >):
description: >
This is a very long description that exceeds 110 characters
and would cause readability issues
Key YAML Operators:
> (folded): Newlines become spaces (use for prose)| (literal): Newlines preserved (use for code/commands)>- / |-: Same but strips trailing newlineExample - Literal Style (for code):
# For commands or code that must preserve line breaks
command: |
git commit -m "$(cat <<'EOF'
Multi-line commit message
with preserved formatting
EOF
)"
Technique: Break at word boundaries, maintain natural paragraph flow
Example:
# BEFORE (exceeds 110 chars):
This is a very long line of markdown prose that exceeds the 110 character limit and should be wrapped for readability.
# AFTER (wrapped at word boundary):
This is a very long line of markdown prose that exceeds the 110 character
limit and should be wrapped for readability.
Tips:
Claude-facing documentation (110 char limit):
CLAUDE.md.claude/ configuration files (hooks, skills, commands)docs/project/ protocol documentationdocs/code-style/*-claude.md detection patternsHuman-facing documentation (no strict limit):
README.mdchangelog.mddocs/code-style/*-human.md explanationsWhen editing Claude-facing docs:
> or | operators❌ Wrapping URLs: Breaks links
❌ Wrapping code blocks: Breaks formatting
❌ Forgetting YAML operator: Long description without > still violates limit
❌ Breaking mid-word: Use word boundaries only
❌ Inconsistent indentation: YAML multi-line requires consistent indent (usually 2 spaces)
YAML Frontmatter - Before/After:
# BEFORE (violation):
description: Comprehensive guide for formatting markdown documentation with proper line wrapping and YAML syntax
# AFTER (correct):
description: >
Comprehensive guide for formatting markdown documentation with proper line
wrapping and YAML syntax
Markdown Prose - Before/After:
# BEFORE (violation):
This mandatory protocol ensures that all agents follow the complete backup-verify-cleanup workflow when performing git operations to prevent data loss.
# AFTER (correct):
This mandatory protocol ensures that all agents follow the complete
backup-verify-cleanup workflow when performing git operations to prevent data
loss.
Leave Unwrapped - Code Block:
# CORRECT (code block not wrapped even if long):
```bash
git commit -m "$(cat <<'EOF'
Very long commit message that exceeds 110 characters but must be preserved exactly as-is
EOF
)"
\```
After formatting:
yq or python -c "import yaml")This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.