ワンクリックで
markdown-helper
Token-efficient markdown parsing, editing, and diagram generation using native CLI tools (Windows/Mac/Linux compatible)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Token-efficient markdown parsing, editing, and diagram generation using native CLI tools (Windows/Mac/Linux compatible)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | markdown-helper |
| description | Token-efficient markdown parsing, editing, and diagram generation using native CLI tools (Windows/Mac/Linux compatible) |
| version | 1.0.0 |
| author | SubsHero Team |
| tags | ["markdown","parsing","mermaid","diagrams","linting","token-efficient"] |
Ultra-efficient markdown operations using native CLI tools. Save 60-70% tokens on common markdown tasks.
This skill provides markdown operations WITHOUT reading entire files into context, saving 68% tokens per operation.
Cross-Platform: Works on Windows, Mac, and Linux (uses Node.js + CLI tools).
Token Savings:
CRITICAL: Before executing EACH bash/node command, MUST output:
🔧 [markdown-helper] Running: <command>
Examples:
🔧 [markdown-helper] Running: node .claude/skills/markdown-helper/md-helper.js extract-headers README.md
🔧 [markdown-helper] Running: node .claude/skills/markdown-helper/md-helper.js generate-mermaid workflow.md
🔧 [markdown-helper] Running: node .claude/skills/markdown-helper/md-helper.js lint *.md
Why: This pattern helps users identify which skill is executing which command, improving transparency and debugging.
CRITICAL: All markdown-helper output MUST use the colored-output formatter skill!
Every response MUST start with:
bash .claude/skills/colored-output/color.sh skill-header "markdown-helper" "Message here..."
IMPORTANT: Use MINIMAL colored output (2-3 calls max) to prevent screen flickering!
Example formatted output (MINIMAL PATTERN):
# START: Header only
bash .claude/skills/colored-output/color.sh skill-header "markdown-helper" "Parsing markdown file..."
# MIDDLE: Regular text (no colored calls)
Extracting headers from file...
Found 12 headings (4 H1, 6 H2, 2 H3)
Processing tables and code blocks...
# END: Result only
bash .claude/skills/colored-output/color.sh success "" "Markdown parsed successfully"
WHY: Each bash call creates a task in Claude CLI, causing screen flickering. Keep it minimal!
Command:
node .claude/skills/markdown-helper/md-helper.js extract-headers <file>
Options:
--level <1-6> - Filter by heading level (e.g., --level 2 for H2 only)--json - Output as JSON--count - Show count per levelExamples:
# All headers
node md-helper.js extract-headers README.md
# H2 headers only
node md-helper.js extract-headers README.md --level 2
# JSON output
node md-helper.js extract-headers TASK-024.md --json
Output:
📄 Headers in README.md:
═══════════════════════════════════════
H1: Markdown Helper Skill
H2: Overview
H2: Usage Examples
H3: Extract Headers
H3: Extract Tables
H2: Commands
Command:
node .claude/skills/markdown-helper/md-helper.js extract-tables <file>
Options:
--json - Output as JSON array--index <n> - Extract specific table by index (0-based)--format <csv|json|md> - Output formatExamples:
# Extract all tables
node md-helper.js extract-tables CHANGELOG.md
# First table only
node md-helper.js extract-tables specs.md --index 0
# As CSV
node md-helper.js extract-tables data.md --format csv
Output:
[
{
"headers": ["Command", "Description", "Token Savings"],
"rows": [
["extract-headers", "Parse headers", "500 tokens"],
["extract-tables", "Parse tables", "600 tokens"]
]
}
]
Command:
node .claude/skills/markdown-helper/md-helper.js generate-diagram <type> <output>
Types:
flowchart - Flow diagramssequence - Sequence diagramsclass - Class diagramsgantt - Gantt chartser - Entity relationship diagramsOptions:
--input <file> - Read Mermaid syntax from file--format <svg|png|pdf> - Output format (default: svg)--theme <default|dark|forest|neutral> - Diagram themeExamples:
Interactive (Claude generates Mermaid syntax):
# User: "Create a flowchart for user registration"
# Claude generates Mermaid syntax, then:
node md-helper.js generate-diagram flowchart user-registration.svg
From File:
# diagram.mmd contains Mermaid syntax
node md-helper.js generate-diagram flowchart output.svg --input diagram.mmd
Mermaid Syntax Example:
flowchart TD
A[Start] --> B{Is user logged in?}
B -->|Yes| C[Show Dashboard]
B -->|No| D[Show Login]
D --> E[Authenticate]
E -->|Success| C
E -->|Failure| D
Command:
node .claude/skills/markdown-helper/md-helper.js lint <file-or-pattern>
Options:
--fix - Auto-fix issues (default: true)--check - Check only, don't fix--config <file> - Custom config fileExamples:
# Fix single file
node md-helper.js lint README.md
# Check without fixing
node md-helper.js lint README.md --check
# Fix all markdown in directory
node md-helper.js lint "project-tasks/**/*.md"
Fixed Issues:
Output:
✅ Fixed 12 issues in README.md:
• Added blank line before heading (line 45)
• Fixed list marker spacing (line 67)
• Removed trailing whitespace (5 lines)
⚠️ 1 warning:
• Line length exceeds 80 characters (line 123)
Command:
node .claude/skills/markdown-helper/md-helper.js replace <pattern> <replacement> <files>
Options:
--regex - Use regular expressions--case-sensitive - Case-sensitive matching--dry-run - Preview changes without applying--backup - Create .bak filesExamples:
# Simple replacement
node md-helper.js replace "SubHero" "SubsHero" "**/*.md"
# Regex replacement
node md-helper.js replace "http://" "https://" "*.md" --regex
# Dry run (preview)
node md-helper.js replace "TODO" "DONE" "tasks/*.md" --dry-run
Output:
🔍 Scanning: 47 markdown files
📝 Found 23 matches in 8 files
✅ Replaced: 23 occurrences
Files modified:
• README.md (3 replacements)
• TASK-024.md (8 replacements)
• CHANGELOG.md (12 replacements)
Command:
node .claude/skills/markdown-helper/md-helper.js extract-lists <file>
Options:
--type <ordered|unordered|task> - Filter by list type--json - Output as JSONExamples:
# All lists
node md-helper.js extract-lists TODO.md
# Task lists only (- [ ] items)
node md-helper.js extract-lists TODO.md --type task
# JSON output
node md-helper.js extract-lists TASKS.md --type task --json
Output:
{
"taskLists": [
{"checked": false, "text": "Install CLI tools"},
{"checked": true, "text": "Create skill directory"},
{"checked": false, "text": "Test operations"}
]
}
Command:
node .claude/skills/markdown-helper/md-helper.js stats <file>
Output:
📊 Statistics for TASK-024.md:
═══════════════════════════════════════
Lines: 487
Words: 3,245
Characters: 21,890
Headings: 23 (H1: 1, H2: 8, H3: 14)
Tables: 4
Code Blocks: 12
Links: 67
Images: 3
Lists: 15
Task Lists: 8 (6 incomplete)
Blockquotes: 2
Claude should automatically use this skill when detecting these keywords/patterns:
✅ Use Skill For (Structure extraction):
❌ Use Native Read For (Content understanding):
| User Request | Command |
|---|---|
| "Extract headers from [file]" | extract-headers <file> |
| "Show me tables in [file]" | extract-tables <file> |
| "Create a flowchart for [process]" | generate-diagram flowchart |
| "Fix markdown formatting in [file]" | lint <file> --fix |
| "Replace [old] with [new] in [files]" | replace <old> <new> <files> |
| "Show markdown stats for [file]" | stats <file> |
| "Extract task lists from [file]" | extract-lists <file> --type task |
User: "Analyze the structure of TASK-024.md"
Execute:
node md-helper.js extract-headers TASK-024.md
node md-helper.js stats TASK-024.md
Output:
Headers: 23 (H1: 1, H2: 8, H3: 14)
Key Sections:
- Business Requirements
- Technical Implementation
- Test Cases
- Acceptance Criteria
Statistics: 487 lines, 3,245 words, 67 links
User: "Create a flowchart showing the checkout process with payment, validation, and order confirmation"
Claude: First, let me generate the Mermaid syntax:
flowchart TD
A[Shopping Cart] --> B{Items in cart?}
B -->|No| C[Show empty cart]
B -->|Yes| D[Proceed to checkout]
D --> E[Enter shipping info]
E --> F[Select payment method]
F --> G{Validate payment}
G -->|Invalid| F
G -->|Valid| H[Process payment]
H --> I{Payment success?}
I -->|No| J[Show error]
I -->|Yes| K[Create order]
K --> L[Send confirmation email]
L --> M[Show order confirmation]
Execute:
echo "flowchart TD..." > /tmp/checkout.mmd
node md-helper.js generate-diagram flowchart checkout-process.svg --input /tmp/checkout.mmd
Output: SVG file created at checkout-process.svg
User: "Fix all markdown formatting issues in project-tasks/"
Execute:
node md-helper.js lint "project-tasks/**/*.md" --fix
Output:
✅ Processed 47 files
✅ Fixed 234 issues across 28 files
⚠️ 3 warnings (line length)
🎉 Done! All markdown files formatted correctly.
User: "Find all TODO items in markdown files"
Execute:
node md-helper.js replace "TODO" "TODO" "**/*.md" --dry-run
# OR
node md-helper.js extract-lists "**/*.md" --type task --json
Output:
{
"files": [
{
"file": "TASK-024.md",
"todos": [
{"line": 45, "checked": false, "text": "Implement coupon validation"},
{"line": 67, "checked": true, "text": "Write unit tests"}
]
}
]
}
Marked CLI - Fast markdown parser
Mermaid CLI - Diagram generation
markdownlint-cli2 - Linting & formatting
Traditional Approach:
User: "Extract headers from 500-line markdown"
Claude reads entire file (500 lines × ~1.5 tokens/line) = 750 tokens
Claude parses in context = +50 tokens
Total: ~800 tokens
With Markdown Helper:
User: "Extract headers from 500-line markdown"
Claude executes: node md-helper.js extract-headers file.md
Tool output: 20 lines of headers = 30 tokens
Command overhead = 220 tokens
Total: ~250 tokens
Savings: 68%
10 operations per day = 5,500 tokens saved Monthly savings = ~165,000 tokens
❌ Error: File not found 'unknown.md'
Check file path and try again
❌ Error: Invalid Mermaid syntax
Line 5: Expected node definition
Tip: Validate syntax at https://mermaid.live/
⚠️ No tables found in README.md
This file contains no markdown tables
Create ~/.claude/skills/markdown-helper/.markdownlint.json for custom rules:
{
"default": true,
"MD013": false,
"MD033": false,
"line-length": false
}
| Operation | Traditional | With Skill | Savings |
|---|---|---|---|
| Extract headers | 800 tokens | 250 tokens | 68% |
| Parse tables | 900 tokens | 280 tokens | 69% |
| Generate diagram | 1200 tokens | 350 tokens | 70% |
| Lint files | 850 tokens | 240 tokens | 71% |
| Bulk replace | 1000 tokens | 300 tokens | 70% |
Average savings: 68-70% per operation
npm update -g marked-cli @mermaid-js/mermaid-cli markdownlint-cli2
cd ~/.claude/skills/markdown-helper
node md-helper.js --test
Before: Claude reads entire file → parses → extracts
After: node md-helper.js extract-headers file.md
Savings: 68% tokens
Before: Use markdown MCP server (~400 tokens) After: Use this skill (~250 tokens) Savings: 37% additional tokens
File Location: ~/.claude/skills/markdown-helper/
Files:
skill.md - This documentationinstallation.md - Setup guidemd-helper.js - Main Node.js scriptCommon Issues:
npm install in skill directoryAgentHero AI - Hierarchical multi-agent orchestration system with PM coordination, file-based state management, and interactive menu interface. Use when managing complex multi-agent workflows, coordinating parallel sub-agents, or organizing large project tasks with multiple specialists. All created agents use aghero- prefix.
Fetch and download images from the internet in various formats (JPG, PNG, GIF, WebP, BMP, SVG, etc.). Use when users ask to download images, fetch images from URLs, save images from the web, or get images for embedding in documents or chats. Supports single and batch downloads with automatic format detection.
Generate comprehensive, fact-checked SAP technical articles and configuration guides with embedded images, flowcharts, and references. Use when users request SAP documentation, how-to guides, configuration tutorials, process explanations, or technical articles on SAP topics (ECC, S/4HANA, modules like SD, MM, FI, PP, ABAP, OData APIs, archiving, etc.). Creates professional Word documents with proper formatting and web-sourced visual aids with built-in image downloading.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Update project changelog with uncommitted changes, synchronize package versions, and create version releases with automatic commit, conditional git tags, GitHub Releases, and push
Auto-suggest modern CLI tool alternatives (bat, eza, fd, ripgrep) for faster, more efficient command-line operations with 50%+ speed improvements