Skip to content

πŸ”¨ (WIP) A skill for quickly creating, configuring, and deploying Docsify documentation projects.

License

Notifications You must be signed in to change notification settings

docsifyjs/docsify-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Docsify Documentation Generator Skill

A powerful Claude Code skill that helps users quickly generate, configure, and manage Docsify documentation projects with built-in version management to prevent breaking changes.

🎯 What This Skill Does

This skill provides an easy way to:

  • Initialize new Docsify documentation projects with theme selection
  • Generate documentation from source code and Markdown files
  • Manage versions with specific major versions (@4, @5) to avoid breaking changes
  • Preview documentation locally with hot reload

✨ Key Features

  • βœ… One-command project initialization with interactive setup
  • βœ… Version-specific installation support (@4, @5, or exact versions)
  • βœ… Automatic documentation structure generation with theme selection
  • βœ… Documentation generation from source code
  • βœ… Local development server with hot reload
  • βœ… Breaking change prevention with version pinning
  • βœ… Helper prompts for user guidance

πŸš€ Quick Start

1. Install Dependencies

Ensure Node.js and docsify-cli are installed on your system:

# Install Node.js from https://nodejs.org/ (v12 or higher)
# Install docsify-cli globally
npm install -g docsify-cli@4

2. Create a New Project

# With stable v4 (recommended)
/docsify init --name my-docs --version @4

# Or with latest v5
/docsify init --name my-docs --version @5

3. Preview Your Docs

/docsify serve

Visit http://localhost:3000 in your browser to see your documentation!

πŸ“‹ Available Commands

Command Purpose
/docsify init Initialize a new Docsify project with default structure
/docsify generate Generate documentation from source code and Markdown files
/docsify serve Start local development server for preview

For detailed command documentation, options, and examples, see .claude/skills/docsify.md

πŸ“ Skill Structure

docsify-skill/
β”œβ”€β”€ README.md              # This file
└── SKILL.md              # Main skill definition with command details

πŸ”’ Version Management (Important!)

This skill helps you avoid breaking changes by supporting specific major versions:

Why Version Management Matters

  • Breaking Changes: Major versions often introduce breaking changes
  • Consistency: Keep your team using the same version
  • Predictability: Know exactly what version is installed
  • Safety: Test upgrades before applying them

Using Specific Versions

# Install stable v4 (recommended for existing projects)
/docsify install-deps --version @4

# Install latest v5 (new features, possible breaking changes)
/docsify install-deps --version @5

# Initialize with specific version
/docsify init --name my-docs --version @4

# Install exact version
/docsify install-deps --version @4.13.1

πŸ“š Documentation

  • SKILL.md - Complete command reference, options, and best practices

πŸ› οΈ Prerequisites

Before using this skill, ensure you have:

  1. Node.js (v12 or higher)

  2. npm (comes with Node.js)

    • Check: npm --version
  3. docsify-cli

    npm install -g docsify-cli@4  # Or @5 for latest

For detailed installation instructions, see the "Prerequisites & Installation" section in SKILL.md

πŸ’‘ Common Workflows

Basic Documentation Project

# 1. Initialize project with v4
/docsify init --name my-docs --version @4

# 2. Preview locally
/docsify serve

# 3. Edit markdown files in my-docs/docs/
# 4. Commit and deploy docs folder to hosting

Generate Documentation from Source Code

# 1. Initialize project
/docsify init --name api-docs --version @4

# 2. Generate docs from source code
/docsify generate --source ./src --output ./api-docs/docs

# 3. Preview locally
/docsify serve

# 4. Deploy docs folder

Upgrade Major Version

# 1. Check current version
npm list docsify-cli

# 2. Install new version globally
npm install -g docsify-cli@5

# 3. Test with serve command
/docsify serve

# 4. If successful, commit changes. If issues, rollback to @4
npm install -g docsify-cli@4

πŸŽ“ Best Practices

Documentation Organization

  • Use clear, hierarchical structure
  • Keep consistent naming conventions
  • Include a comprehensive README
  • Organize navigation logically

Version Management

  • Lock major versions in package.json
  • Test before upgrading major versions
  • Document version usage in your project
  • Communicate changes to your team
  • Review breaking changes before updating

Deployment

  • Always test locally first
  • Build and verify before deployment
  • Keep version history in git
  • Maintain backward compatibility during transitions

πŸ“– External Resources

πŸ› Troubleshooting

Command Not Found

# Make sure docsify-cli is installed globally
npm install -g docsify-cli@4

# Verify installation
docsify --version

Version Conflicts

# Check installed version
npm list -g docsify-cli

# Reinstall specific version
npm install -g docsify-cli@4

Port Already in Use

# Use different port
/docsify serve --port 3001

πŸ“ Usage Examples

Example 1: Basic Project Setup

# Create stable documentation site
/docsify init --name api-docs --version @4
cd api-docs
/docsify serve

# Then edit files in the docs/ folder and reload browser

Example 2: Generate from Source Code

# Initialize project
/docsify init --name technical-docs --version @4

# Generate docs from source code
/docsify generate --source ./my-project/src --output ./technical-docs/docs

# Preview
/docsify serve

Example 3: Documentation Site Workflow

# 1. Initialize
/docsify init --name my-project-docs --version @4

# 2. Generate from source code
/docsify generate --source ./src --output ./my-project-docs/docs

# 3. Preview locally
/docsify serve

# 4. Edit markdown files in my-project-docs/docs/
# 5. Deploy my-project-docs folder to GitHub Pages, Netlify, or Vercel

🀝 Contributing

To extend or modify this skill:

  1. Edit SKILL.md for command definitions
  2. Update README.md for documentation changes
  3. Test all commands locally before committing
  4. Keep version management guidelines updated

πŸ“„ License

This skill is provided as-is for use with Claude Code Skill. LICENSE

❓ Support

For issues or questions:

  • Review the command documentation in SKILL.md
  • Visit Docsify official docs for Docsify-specific questions

Happy documenting! πŸ“š

About

πŸ”¨ (WIP) A skill for quickly creating, configuring, and deploying Docsify documentation projects.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  
  •