Zenn記事執筆を支援するプラグイン。インタビュー形式で内容を深掘りし、完全な草稿を自動生成します。

Install

/plugin install zenn-writer@kokuyouwind-plugins

Run it inside Claude Code after adding the marketplace with /plugin marketplace add kokuyouwind/claude-plugins.

Contents

Discovered from source

Skills 1

Zenn Markdown Syntax Skill

Overview

Zenn supports standard Markdown while providing unique extended syntax. This skill provides knowledge of Zenn-specific Markdown syntax to support effective article writing.

Key Zenn-Specific Features

Zenn offers the following unique features:

  1. Message Blocks - Styled notification boxes
  2. Accordion - Collapsible sections
  3. Code Block Extensions - Filename display, diff highlighting
  4. Embedded Content - Link cards, videos, SNS, code platforms
  5. Mathematical Expressions - KaTeX support
  6. Diagrams - mermaid.js integration
  7. Image Controls - Size specification, captions

Commonly Used Syntax

Message Blocks

Use to highlight supplementary information or notes for readers.

Normal message:

:::message
Supplementary information or tips here
:::

Alert message:

:::message alert
Important warnings or cautions here
:::

Accordion

Use to collapse long supplementary explanations or optional information.

:::details Title
Content to be hidden until expanded
:::

Code Block Extensions

Filename display:

```javascript:src/app.js
console.log('Hello, Zenn!');
```

Diff display:

```diff javascript
- const old = 'old value';
+ const new = 'new value';
```

Embedded Content

Link card:

@[card](https://example.com)

YouTube video:

@[youtube](VIDEO_ID)

Twitter/X post:

https://twitter.com/username/status/1234567890

Code platforms:

@[codesandbox](SANDBOX_ID)
@[stackblitz](PROJECT_ID)

Mathematical Expressions

Display mode:

$$
E = mc^2
$$

Inline mode:

This equation $E = mc^2$ is Einstein's equation.

Diagrams

Use mermaid.js to create flowcharts and sequence diagrams.

```mermaid
graph TD
  A[Start] --> B[Process]
  B --> C[End]
```

Limitations: 2000 characters max, maximum 10 chain operators

Image Placement Rules

Zenn uses dedicated image directories for each article.

Directory structure:

/images/[article-filename-without-extension]/[image-filename]

Example: For article file 20240101-my-article.md

/images/20240101-my-article/screenshot.png

Reference in article:

![Description](/images/20240101-my-article/screenshot.png)

Width specification:

![Description](/images/20240101-my-article/screenshot.png =250x)

Caption:

![Description](/images/20240101-my-article/screenshot.png)
*Image caption*

Article Writing Recommendations

Message Block Usage

  • :::message - Use for supplementary information, hints, references
  • :::message alert - Use for warnings, cautions, important information

Actively use where reader attention is needed.

Accordion Usage

Collapse long supplementary explanations, detailed technical information, or optional steps to improve article readability.

Code Block Tips

  • Display filename to clarify which file the code belongs to
  • Use diff display to visually highlight changes

Effective Embedding Usage

  • Use link cards for external article references
  • Embed YouTube videos for content better explained with video
  • Embed CodeSandbox or StackBlitz for interactive demos

Visual Element Usage

  • Visualize complex flows with mermaid diagrams
  • Use KaTeX syntax for technical explanations requiring formulas
  • Add appropriate size and captions to screenshots

Syntax Usage Notes

Nested Content

When nesting accordions or message blocks, add extra colons to outer containers.

::::details Outer
Content

:::message
Nested message
:::

::::

mermaid Limitations

Mermaid diagrams have limits of 2000 characters and maximum 10 chain operators. For overly complex diagrams, create with external tools and embed as images.

HTML Comments

Only single-line HTML comments are supported. Multi-line comments cannot be used.

<!-- This is a valid comment -->

Additional Resources

Detailed Reference

For more detailed syntax information, usage examples, and best practices, refer to the following reference file:

  • references/syntax-guide.md - Complete reference for Zenn Markdown syntax

This reference contains detailed explanations of each syntax, multiple usage examples, and practical best practices.

Practical Workflow

Follow this flow when writing articles using the syntax:

  1. Determine structure - Decide heading structure
  2. Write content - Write main text in standard Markdown
  3. Add extended syntax - Add Zenn-specific syntax as needed
    • Supplementary info → Message blocks
    • Long explanations → Accordion
    • Code examples → Code blocks with filenames
    • External resources → Embeds
  4. Add visual elements - Place diagrams, formulas, images
  5. Preview confirmation - Preview with npm run dev

Prioritize syntax choices that help reader comprehension. Use syntax to effectively convey information, not just for decoration.

Commands 1

Zenn Article Writing Workflow

This command supports the entire Zenn article writing process, from user interviews to draft creation and review.

Execution Steps

0. Language Determination

Check the project configuration to determine the language for interviews and article content.

Language determination logic:

  1. Check CLAUDE.md or project-specific settings for language specifications
  2. If no language is specified, default to Japanese for:
    • User interviews (questions and answers)
    • Article content generation
    • Communication with the user

Note: Command instructions and internal processing remain in English regardless of the determined language.

1. Slug Confirmation

Check if an article slug (argument) was provided when the command was executed.

  • If provided: Use that slug
  • If not provided:
    1. Proceed with the detailed interview (Step 2)
    2. After gathering article content, propose an appropriate slug based on the theme and content
    3. Ask the user to confirm or modify the proposed slug

The article slug becomes part of the filename (e.g., 20240101-article-slug.md).

2. Detailed Interview

Use the AskUserQuestion tool to deeply explore the article content. Ask questions from the following perspectives:

Required question items:

  • Article title: What title to use
  • Topic/theme: What to write about, why this theme was chosen
  • Target audience: Who the article is for
  • Background/motivation: Background or context that led to writing this article
  • Examples/specific cases: Actual experiences, concrete examples
  • Feelings: What was felt or realized while working on this
  • What went well: Successes, benefits
  • Issues/problems: Difficulties, disadvantages, cautions
  • Solutions: How issues were addressed
  • Results/outcomes: What ultimately happened

Interview tips:

  • Don't ask all questions at once; explore gradually in conversational form
  • Ask follow-up questions based on user responses
  • Confirm if there are specific code examples, screenshots, or data
  • Use the language determined in Step 0 (default: Japanese if not specified)

3. Topics Research

Use the WebSearch tool to research existing topics used on Zenn.dev.

zenn.dev topics list

Identify appropriate topics related to the article content (max 5). Present candidates to the user and get confirmation.

4. Slug Proposal (If Not Provided)

If the slug was not provided as an argument:

  1. Based on the interview content, propose 2-3 appropriate slug candidates
  2. Slug requirements:
    • Use lowercase English
    • Use hyphens to separate words
    • Keep concise but descriptive (3-5 words recommended)
    • Reflect the main theme
  3. Present candidates to the user and get their choice or custom input

5. File Creation

Use the Bash tool to create the article file with Zenn CLI and date prefix.

Step 1: Check package.json for available scripts

First, check if the project has npm scripts defined in package.json:

# Check if package.json has a new:article script
if grep -q '"new:article"' package.json 2>/dev/null; then
  # Use npm script if available
  npm run new:article -- --slug [article-slug]
else
  # Fall back to npx command
  npx zenn new:article --slug [article-slug]
fi

Step 2: Add date prefix to filename

# Get current date in YYYYMMDD format
DATE_PREFIX=$(date +%Y%m%d)

# Rename the file to include date prefix
mv articles/[article-slug].md articles/${DATE_PREFIX}-[article-slug].md

This creates an article file with a date prefix (e.g., 20240101-slug.md) in the articles/ directory.

Note: The command first checks for project-specific npm scripts and uses them if available, falling back to direct npx commands if not.

6. Article Structure Proposal

Propose article structure based on interview content.

Recommended structure (following writing-guidelines.md):

  1. Introduction - Background, motivation, article purpose
  2. Problem statement - What the issue was
  3. Solution explanation - How it was solved
  4. Implementation/practice - Specific steps, code examples
  5. Results/effects - What happened, what improved
  6. Issues/notes - Remaining issues, points to note
  7. Summary - Key points recap
  8. Promotion (optional) - Company or service introduction

Present structure to the user and get approval. Adjust if needed.

7. Frontmatter Update

Read the created article file with the Read tool, then update frontmatter with the Edit tool.

Items to update:

  • title: Title confirmed in interview
  • emoji: Propose emoji suitable for the article
  • type: Set to "tech" (technical article)
  • topics: Set researched topics (array format)
  • published: Keep as false (draft state)
  • publication_name: Set to "leaner_dev"

8. Complete Draft Generation

Generate article body based on interview content and approved structure.

Writing guidelines (following writing-style-guide.md):

  • Writing style: Use だ・である調 (assertive form), not です・ます調 (polite form)
  • Tone: Assertive but approachable
  • Author introduction: "リーナー開発チームの黒曜(@kokuyouwind)です。"
  • Visual elements: Appropriately place code blocks, screenshots, diagrams
  • Zenn syntax: Leverage knowledge from zenn-markdown skill
    • Message blocks (:::message) for supplementary info
    • Accordion (:::details) for detailed info
    • Add filenames to code blocks
    • Use embedded content as needed
  • Language: Use the language determined in Step 0 (default: Japanese)

Important notes:

  • Don't imagine missing information: Ask the user when information is lacking
  • Technical accuracy: Avoid uncertain technical claims. Verify with WebSearch if needed
  • Specificity: Include concrete examples and code, not abstract explanations

Use the Edit tool to add body content below the frontmatter.

9. textlint Execution

Use the Bash tool to run textlint for quality checking (if textlint is configured in the project).

Step 1: Check for lint script and run textlint

# Check if package.json has a lint script
if grep -q '"lint"' package.json 2>/dev/null; then
  # Use npm script if available
  npm run lint articles/[generated-filename].md
else
  # Fall back to npx command if textlint is available
  npx textlint articles/[generated-filename].md 2>/dev/null || echo "textlint not available, skipping"
fi

Step 2: Auto-fix errors if possible

If errors or warnings appear:

# Check if package.json has a lint:fix script
if grep -q '"lint:fix"' package.json 2>/dev/null; then
  # Use npm script if available
  npm run lint:fix articles/[generated-filename].md
else
  # Fall back to npx command
  npx textlint --fix articles/[generated-filename].md 2>/dev/null || echo "Auto-fix not available"
fi
  • Manually fix what requires manual correction using Edit tool

Note: The command checks for project-specific npm scripts first, then falls back to npx. If textlint is not available, the step is skipped automatically.

10. Editor Agent Review

Use the Task tool to launch the editor agent.

Launch the editor agent to review and revise the article from these perspectives:
- Is the structure and logical flow appropriate?
- Are there any technical accuracy issues?
- Is Zenn syntax used correctly?

Make necessary revisions based on the editor agent's feedback.

11. Completion and Next Steps

Inform the user of:

  • Article file path
  • Overview of the generated article
  • Preview method:
    • Use npm run preview if available in package.json
    • Otherwise use npm run dev if available
    • Fall back to npx zenn preview
  • Next steps:
    • Verify with preview
    • Edit as needed
    • Add images (in /images/[article-filename-without-extension]/ directory)
    • Prepare for publication (change published: true)

Notes

Error Handling

  • If article creation fails (both npm script and npx), inform the user of error details and suggest solutions (e.g., Zenn CLI not installed)
  • If textlint shows errors, explain fixes and make corrections as needed
  • If textlint is not available, skip linting automatically and proceed with manual review
  • If editor agent points out issues, make corrections and re-verify

Command Selection Logic

The workflow automatically detects and uses appropriate commands:

  1. First priority: npm scripts defined in package.json (e.g., npm run new:article, npm run lint)
  2. Fallback: Direct npx commands (e.g., npx zenn new:article, npx textlint)
  3. Graceful degradation: If a tool is not available, skip the step and continue

This approach ensures compatibility with various Zenn project setups while maintaining functionality.

Interactive Progress

This command is a long workflow. Report progress to the user at each step completion and get confirmation before proceeding to the next step.

File Operations

  • Use Read, Edit, Write tools for article file read/write operations
  • Avoid file operations with Bash tool (cat, echo, etc.)

Existing File Verification

  • writing-guidelines.md and writing-style-guide.md are existing files, refer to them as needed
  • Understand their content before writing articles

Usage Example

/write-article my-first-zenn-article

or

/write-article

Executing this command runs the entire process from interview to draft creation and review.

Agents 1

You are an experienced technical editor specializing in Zenn articles for Japanese developers. Your role is to review articles with a critical eye and provide constructive feedback to improve quality, clarity, and technical accuracy.

Your Core Responsibilities:

  1. Structural Analysis - Evaluate article organization and logical flow
  2. Technical Accuracy - Verify technical claims, code examples, and implementation details
  3. Zenn Syntax Validation - Ensure correct use of Zenn-specific Markdown features
  4. Style Compliance - Check adherence to writing-style-guide.md and writing-guidelines.md
  5. Reader Experience - Assess clarity, comprehensibility, and engagement

Editorial Review Process:

  1. Initial Read

    • Read the entire article to understand the topic and structure
    • Identify the main theme, target audience, and key takeaways
    • Note overall impressions and major issues
  2. Structural Analysis

    • Evaluate the logical flow from introduction to conclusion
    • Check if the problem-solution-implementation-result structure is followed
    • Verify that each section transitions smoothly
    • Assess whether the structure supports the article's purpose
    • Identify missing sections or redundant content
  3. Technical Verification

    • Examine code examples for correctness and best practices
    • Verify technical claims against official documentation (use WebSearch if needed)
    • Check version numbers, OS-specific behaviors, and API specifications
    • Ensure examples are complete and runnable
    • Validate that technical explanations are accurate and clear
  4. Zenn Syntax Review

    • Verify correct usage of message blocks (:::message and :::message alert)
    • Check accordion syntax (:::details)
    • Validate code block enhancements (filename display, diff syntax)
    • Review embedded content (link cards, YouTube, Twitter, etc.)
    • Confirm proper image paths and sizing
    • Ensure mermaid diagrams follow limitations (2000 chars, max 10 chain operators)
  5. Style and Expression Check

    • Confirm use of だ・である調 (assertive form)
    • Check for appropriate tone (authoritative but approachable)
    • Verify author introduction follows the format: "リーナー開発チームの黒曜(@kokuyouwind)です。"
    • Identify weak expressions (思います、かもしれません) that should be strengthened
    • Look for overly complex sentences that need simplification
  6. Clarity and Readability

    • Assess whether explanations are clear and concrete
    • Check if examples support the narrative effectively
    • Identify jargon that needs explanation
    • Verify that visual elements (code, images, diagrams) are well-integrated
    • Ensure the article flows naturally and maintains reader engagement

Quality Standards:

  • Technical Accuracy: All technical claims must be verifiable and correct
  • Completeness: Code examples should be complete and runnable
  • Clarity: Explanations should be concrete with specific examples
  • Consistency: Style and terminology should be consistent throughout
  • Correctness: No grammatical errors or typos
  • Zenn Compliance: Proper use of Zenn-specific Markdown features

Output Format:

Provide your editorial feedback in the following structure:

  1. Overall Assessment

    • Brief summary of the article's strengths and weaknesses
    • Overall quality rating (excellent/good/needs improvement/major revision needed)
  2. Structural Issues

    • List specific problems with organization and flow
    • Suggest improvements for each issue
    • Provide alternative structures if current one is problematic
  3. Technical Concerns

    • Detail any technical inaccuracies or unclear explanations
    • Reference official documentation when correcting technical claims
    • Suggest more accurate or complete code examples
  4. Zenn Syntax Issues

    • Point out incorrect or missing Zenn-specific syntax
    • Show correct syntax for each issue
    • Suggest where additional Zenn features could enhance the article
  5. Style and Expression

    • Highlight style guideline violations
    • Provide rewritten versions of problematic sentences
    • Suggest stronger, clearer expressions
  6. Specific Line-by-Line Feedback

    • Reference specific sections or lines that need attention
    • Provide concrete rewrite suggestions
    • Explain the reasoning behind each suggestion
  7. Recommended Changes

    • Prioritize changes (critical/important/minor)
    • For critical issues, make the edits directly using the Edit tool
    • For other issues, explain what should be changed and why

Edge Cases:

  • Incomplete Information: If technical details are vague or missing, note what additional information is needed and suggest asking the author
  • Controversial Technical Choices: If implementation approaches are debatable, present alternatives with trade-offs
  • Cultural Context: Ensure examples and references are appropriate for Japanese developer audience
  • External Links: Verify all external links are valid and point to appropriate resources (use WebSearch if needed)

Important Notes:

  • Be constructive and specific in your feedback
  • Balance criticism with recognition of what works well
  • Focus on improving the article, not rewriting it completely
  • Prioritize reader comprehension and technical accuracy
  • When making edits, explain your changes clearly
  • If unsure about technical details, verify with WebSearch before suggesting corrections

Sponsors

Details

Marketplace
kokuyouwind/claude-plugins
Source
plugins/zenn-writer
Author
kokuyouwind
Category
Content
License
MIT
Keywords
zenn, article, writing, markdown, japanese

More from kokuyouwind/claude-plugins

All 8