Claude-skill-registry context7-skill-generator
Automatically generates skills from Context7 MCP documentation responses
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/context7-skill-generator" ~/.claude/skills/majiayu000-claude-skill-registry-context7-skill-generator && rm -rf "$T"
skills/data/context7-skill-generator/SKILL.mdContext7 Skill Generator
Automatically captures Context7 MCP documentation responses and generates properly formatted skill files.
How It Works
When Context7 MCP is invoked during a conversation, this skill:
- Detects Context7 usage - Identifies when Context7 tools were called
- Extracts documentation - Pulls the relevant docs from the conversation
- Formats as skill - Creates proper YAML frontmatter and markdown structure
- Generates skill file - Writes to the appropriate location
Usage
Automatic Detection
Simply invoke this skill after using Context7:
/skill context7-skill-generator
The skill will analyze the conversation for Context7 responses and prompt you for:
- Skill name (e.g.,
,latest-nextjs
)react-compiler - Description (brief summary of what the skill covers)
- Plugin location (which plugin to add the skill to)
Manual Command
For explicit invocation with parameters:
/skill:from-context7
Context7 Tool Patterns
The skill looks for these Context7 MCP tool invocations:
- Library resolutionresolve-library-id
- Documentation queriesquery-docs
Generated Skill Structure
The generated skill follows this template:
--- name: skill-name description: Brief description of the skill updated: YYYY-MM-DD source: context7 library: library-name version: detected-version ---
Sections Generated
- Frontmatter - YAML metadata (name, description, updated, source, library, version)
- Title - Formatted from skill name
- Overview - Brief introduction
- Key Features - Main functionality extracted from docs
- Code Examples - Relevant examples from Context7 response
- API Reference - Important API patterns
- Best Practices - Usage patterns found in docs
- Migration Notes - Any version-specific migration info
- Resources - Links to official docs
Output Location
Skills are generated to:
plugins/{plugin-name}/skills/{skill-name}/SKILL.md
Example Workflow
# 1. Use Context7 to get documentation How do I set up Next.js 16 middleware? use context7 # 2. Generate a skill from the response /skill context7-skill-generator # 3. Provide prompted information: # - Skill name: nextjs-middleware # - Description: Next.js 16 middleware patterns and configuration # - Plugin: nextjs # 4. Skill file created at: # plugins/nextjs/skills/nextjs-middleware/SKILL.md
Extraction Logic
Content Identification
The skill identifies Context7 content by looking for:
- Tool results containing
orresolve-library-idquery-docs - Documentation sections with code examples
- Version-specific information
- API patterns and usage examples
Smart Formatting
- Code blocks - Preserved as markdown code fences
- Headers - Converted to proper markdown hierarchy
- Lists - Formatted as bulleted or numbered lists
- Links - Preserved as markdown links
- Tables - Converted to markdown tables
Version Detection
Attempts to extract version information from:
- Explicit version mentions in docs
- Library identifiers (e.g.,
)/vercel/next.js - Release notes or changelog entries
Error Handling
If the skill cannot:
- Find Context7 content: Prompts you to paste the documentation manually
- Determine library: Asks for library name manually
- Detect version: Uses current date and notes version as "latest"
Best Practices
- Review generated skills - Always review and edit the generated skill for accuracy
- Add custom examples - Supplement Context7 content with project-specific examples
- Keep focused - Generate skills for specific topics, not entire libraries
- Update regularly - Re-run for updated documentation as libraries evolve
- Index skills - Run
after generating new skillsupdate-indexes
Integration with Marketplace
This skill integrates with the IP Labs marketplace by:
- Following marketplace skill conventions (YAML frontmatter, markdown structure)
- Supporting multi-plugin skill generation
- Maintaining consistency with existing skills like
andlatest-nextjslatest-react
Advanced Usage
Batch Generation
For multiple libraries, invoke multiple times:
/skill context7-skill-generator # (generate first skill) /skill context7-skill-generator # (generate second skill)
Custom Sections
Add custom sections by editing the generated skill file after creation. Common additions:
- Project-Specific Patterns - How your team uses this library
- Integration Examples - Connecting with other tools in your stack
- Troubleshooting - Common issues and solutions
- Performance Tips - Optimization guidance