ChapterWise Plugins
for Claude Code
A complete suite of AI-powered writing tools for Claude Code. Create, edit, analyze, and manage your manuscripts in Chapterwise Codex format directly from your terminal.
What is Claude Code?
Claude Code is Anthropic's official command-line tool that brings Claude's AI capabilities directly to your terminal. It can read files, execute commands, and help you work on complex projects—including writing manuscripts.
Don't have Claude Code?
Install Claude Code first, then come back to set up the ChapterWise Plugins.
Install Claude CodeThree Powerful Plugins
The ChapterWise plugin suite includes three specialized plugins, each designed for different aspects of manuscript management.
chapterwise-codex
Core document management for Codex files. Create, format, validate, split, merge, and convert between formats.
chapterwise (insert)
Intelligent note insertion with semantic location finding. Insert content using natural language descriptions.
chapterwise-analysis
AI-powered literary analysis modules. Analyze characters, plot structure, story beats, and identify plot holes.
Install the ChapterWise Plugins
Add the ChapterWise Plugins to your Claude Code installation. You can install individual plugins or all of them.
Via Marketplace (Recommended)
# Step 1: Add the ChapterWise marketplace
/plugin marketplace add ansonphong/chapterwise-claude-plugins
# Step 2: Install the plugins you need
/plugin install chapterwise-codex
/plugin install chapterwise
/plugin install chapterwise-analysis
Direct from GitHub
# Install directly from GitHub
/plugin install --source github ansonphong/chapterwise-claude-plugins
Requirements
- Claude Code 1.0.33 or later
- Python 3.8+ (for helper scripts)
- PyYAML (
pip install pyyaml)
Codex Commands
The chapterwise-codex plugin includes 12 commands for working with Codex files.
format
/chapterwise-codex:format
Convert any content to Chapterwise Codex V1.3 format. Creates proper YAML structure with metadata, unique IDs, timestamps, and runs the auto-fixer. Works for any content type: chapters, characters, locations, recipes, meetings, and more.
Key features:
- Infinite schema flexibility for any content type
- Nested children with recursive structure
- Typed attributes (string, int, date, url, markdown, etc.)
- Relations and tags for cross-referencing
explode
/chapterwise-codex:explode
Split a large codex file into modular components. Extracts children into separate files and replaces them with include: directives.
Options:
implode
/chapterwise-codex:implode
The inverse of explode. Resolves all include: directives and merges referenced files back into a single unified document.
Options:
index
/chapterwise-codex:index
Generate an index.codex.yaml file for your project. Defines folder structure, discovery patterns, and custom type styling with emoji and colors.
Creates index.codex.yaml (user-controlled), NOT .index.codex.yaml (system cache)
lite
/chapterwise-codex:lite
Create Codex Lite files—standard Markdown with YAML frontmatter. A simplified, portable format that works with any Markdown renderer.
Available frontmatter fields:
format-regen-ids
/chapterwise-codex:format-regen-ids
Regenerate ALL IDs in a codex file, even valid ones. Essential when duplicating or forking content that needs completely fresh unique identifiers.
format-folder
/chapterwise-codex:format-folder
Batch process all codex files in a directory. Fixes missing metadata, invalid IDs, duplicate IDs, legacy fields, and formatting issues.
Options:
convert-to-codex
/chapterwise-codex:convert-to-codex
Upgrade Codex Lite (.md with frontmatter) or plain Markdown to full Codex format with children support and structured data.
Options:
convert-to-markdown
/chapterwise-codex:convert-to-markdown
Export Codex files to portable Markdown (Codex Lite) for use with blogs, standard editors, or external sharing.
Children and relations are not included in the conversion
generate-tags
/chapterwise-codex:generate-tags
Auto-generate tags from body content using text analysis. Uses stopword filtering, word frequency analysis, bigram extraction, and heading boost.
Options:
update-word-count
/chapterwise-codex:update-word-count
Update word_count metadata in codex files. Counts words in body fields and follows include directives.
Options:
Insert Plugin
The chapterwise plugin provides intelligent note insertion with AI-powered semantic location finding.
insert
/insert
Intelligently insert notes into your manuscripts using natural language instructions. Claude AI semantically matches your description to find the perfect insertion point.
Example usage:
# Insert a note after a specific scene
/insert after the hyperborean incursion
Add this paragraph about the aftermath...
Single Insert
/insert [instruction]
Insert one note with location
Batch Mode
/insert --batch notes.txt
Process multiple notes from file
Interactive
/insert --interactive
Confirm each insert
Clipboard
/insert --clipboard
Read from system clipboard
Dry Run
/insert --dry-run
Preview without changes
Undo
/insert --undo [file]
Restore from backup
Command Flags
| Flag | Short | Description |
|---|---|---|
| --batch <file> | -b | Process notes from file (delimiter: ---) |
| --target <dir> | -t | Target directory to scan |
| --accept | -a | Accept pending INSERT markers |
| --accept-all | Accept all pending inserts in directory | |
| --confidence <n> | Minimum confidence threshold (default: 50) | |
| --delimiter <str> | Custom delimiter for batch notes | |
| --no-backup | Skip backup creation |
Confidence-Based Behavior
Auto-insert without asking
Present options to choose from
Ask user for clarification
Analysis Plugin
The chapterwise-analysis plugin provides AI-powered literary analysis modules.
analysis
/analysis
Run AI-powered literary analysis on your Codex files. Analyze characters, plot structure, story beats, and identify potential plot holes. Results are saved as sibling .analysis.codex.yaml files.
summary
/analysis summary
Generate comprehensive summaries of your manuscript sections.
characters
/analysis characters
Analyze character development, arcs, and relationships throughout your story.
plot-holes
/analysis plot-holes
Identify inconsistencies, contradictions, and potential plot holes.
story-beats
/analysis story-beats
Map your narrative structure against proven story beat frameworks.
critical-review
/analysis critical-review
Get a comprehensive critical review covering pacing, dialogue, description, and overall narrative effectiveness.
# Interactive module picker
/analysis
# Direct analysis with module
/analysis summary chapter-01.codex.yaml
# List available modules
/analysis list
# Get help for a module
/analysis help characters
Usage Examples
Real-world examples of how to use the ChapterWise plugins in your writing workflow.
# Ask Claude to create a new chapter in Codex format
$ claude
> Create a new codex chapter called "The Journey Begins"
with a scene in a medieval tavern. Include character
introductions for three main characters.
# Insert a note using natural language location
/insert after the dragon attack scene
The aftermath was devastating. Smoke curled from the
ruins of what had once been the village square...
# Fix all codex files in your manuscript folder
/chapterwise-codex:format-folder
> Format all files in ./manuscript --recursive
# Also update word counts
/chapterwise-codex:update-word-count ./manuscript --recursive
# Explode a monolithic file into separate chapter files
/chapterwise-codex:explode
> Explode book.codex.yaml --types chapter,scene
# Creates ./chapters/chapter-01.codex.yaml, etc.
# Analyze characters across your manuscript
/analysis characters manuscript/
# Check for plot holes
/analysis plot-holes manuscript/
Codex Format Reference
The Chapterwise Codex V1.3 format is a flexible YAML/JSON structure for organizing any type of content.
metadata: formatVersion: "1.3" documentVersion: "1.0.0" author: "Your Name" created: "2025-01-31T10:00:00Z" id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" type: "chapter" title: "The Journey Begins" summary: "Our hero sets out on their adventure" status: draft body: | The morning sun cast long shadows across the cobblestone streets as Elena gathered her belongings... attributes: - key: word_count name: "Word Count" value: 2500 dataType: int tags: - adventure - fantasy - journey children: - id: "scene-001" type: "scene" title: "Morning Departure" body: | Scene content here...
Infinite Flexibility
Use any type value. Not limited to chapters—works for recipes, meetings, characters, locations, or any custom content type.
Recursive Children
Any node can have children: with the same structure. Nest content to any depth.
Include Directives
Use include: ./path/file.codex.yaml to reference external files. Paths with / are repo-relative.
Typed Attributes
Attributes support types: string, int, float, boolean, date, url, markdown, and more.
Ready to Start Writing?
With the ChapterWise plugins installed, you have a complete AI-powered writing suite right in your terminal. Create manuscripts, insert notes, analyze your work, and manage your content with ease.
QUICK REFERENCE
/chapterwise-codex:format
/insert
/analysis