Skip to content

About

Export Claude Code plugin skills to Gemini, ChatGPT, Claude Projects, and local LLMs

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Claude Skill Porter

Export Claude Code plugin knowledge to Gemini, ChatGPT, Claude Projects

A CLI tool that extracts expert skills from Anthropic's knowledge-work-plugins (52 skills across 11 plugins) and exports them to formats compatible with Gemini CLI, ChatGPT Custom Instructions, and Claude Projects.

License: Apache 2.0


Quick Start

Get up and running in 30 seconds:

# 1. Export a skill to Gemini CLI format
export-skill product-management feature-spec gemini > feature-spec-gemini.txt

# 2. Export a skill to ChatGPT Custom Instructions
export-skill data sql-queries chatgpt

# 3. Export all skills from a plugin to Claude Projects format
export-plugin marketing ~/exports/marketing claude-project

Expected output:

  • Single skill exports: Formatted content written to stdout or file
  • Plugin exports: Directory created with one file per skill
  • Success messages: ✓ Exported [skill-name] to [format]

Installation

Option 1: Curl One-Liner (Recommended)

curl -fsSL https://raw.githubusercontent.com/tentaclequing/claude-skill-porter/main/install.sh | bash

This installs export-skill and export-plugin to ~/.local/bin (added to PATH automatically).

Option 2: Manual Installation

# Clone repository
git clone https://github.com/tentaclequing/claude-skill-porter.git
cd claude-skill-porter

# Add bin/ directory to PATH
echo 'export PATH="$HOME/claude-skill-porter/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Verify Installation

export-skill --version
# Expected: claude-skill-porter v1.0.0

Usage

List Available Plugins

export-skill --list-plugins

Output:

Available plugins:
  - content-creator
  - data
  - marketing
  - product-management
  - sales
  - [... 6 more]

List Skills in a Plugin

export-skill product-management --list-skills

Output:

Available skills in 'product-management':
  - feature-spec
  - metrics-tracking
  - roadmap-planning
  - user-story

Export a Single Skill

Syntax:

export-skill <plugin-name> <skill-name> <format>

Formats: gemini, chatgpt, claude-project

Examples:

# Export to Gemini CLI (writes to stdout)
export-skill data sql-queries gemini > sql-skill-gemini.txt

# Export to ChatGPT Custom Instructions (creates two files)
export-skill product-management feature-spec chatgpt
# Creates: feature-spec-chatgpt-field1.txt (role context)
#          feature-spec-chatgpt-field2.txt (instructions)
# Note: ChatGPT has 1500-char limit per field

# Export to Claude Projects (markdown format)
export-skill marketing campaign-planning claude-project

Export Entire Plugin (Batch Export)

Syntax:

export-plugin <plugin-name> <output-dir> <format>

Example:

export-plugin marketing ~/exports/marketing gemini

Output:

✓ Exported campaign-planning to gemini (~/exports/marketing/campaign-planning-gemini.txt)
✓ Exported social-media to gemini (~/exports/marketing/social-media-gemini.txt)
✓ Exported content-calendar to gemini (~/exports/marketing/content-calendar-gemini.txt)

Batch export complete: 3 skills exported to ~/exports/marketing

Format Comparison

Format Character Limit Best Use Case Example Command Notes
Gemini CLI None System instructions for Gemini CLI export-skill data sql-queries gemini Full content preserved, wrapped with role context
ChatGPT Custom Instructions 1500 chars/field ChatGPT web UI settings export-skill marketing campaign-planning chatgpt Smart truncation for large skills, overflow file created
Claude Projects None Claude Projects knowledge base export-skill product-management feature-spec claude-project Clean markdown, includes attribution

Format-Specific Details

Gemini CLI

  • Output: Single .txt file with system instruction wrapper
  • Structure: Role context header + full skill content
  • Usage: Copy content into Gemini CLI system instruction parameter
  • Character limit: None

ChatGPT Custom Instructions

  • Output: Two files per skill (*-field1.txt, *-field2.txt)
  • Structure:
    • Field 1 (150-300 chars): Role context from plugin/skill description
    • Field 2 (1400-1500 chars): Core content with smart truncation
  • Truncation strategy: Preserves key principles, structure, first 1-2 examples
  • Overflow handling: If content > 3000 chars, creates *-extended.md with full content
  • Usage: Paste field1 into "What would you like ChatGPT to know about you?" and field2 into "How would you like ChatGPT to respond?"

Claude Projects

  • Output: Single .md file
  • Structure: Clean markdown with frontmatter removed, attribution footer
  • Usage: Upload to Claude Projects knowledge base
  • Character limit: None

Advanced Usage

Using Custom Plugin Directory

By default, claude-skill-porter looks for plugins at:

~/.claude/plugins/marketplaces/knowledge-work-plugins/

If your plugins are located elsewhere, use the --plugin-dir flag:

# List plugins from custom directory
export-skill --list-plugins --plugin-dir /path/to/custom/plugins

# Export skill from custom directory
export-skill data sql-queries gemini --plugin-dir /path/to/custom/plugins

LLM-Assisted Command Generation

Not sure which plugins or skills are available? Or need help constructing the right command? Use this prompt template with Gemini, ChatGPT, or Claude:

I'm using claude-skill-porter to export Claude Code plugin skills to your format.

My plugin directory is at: [PASTE YOUR PATH HERE - default is ~/.claude/plugins/marketplaces/knowledge-work-plugins/]

Please help me:
1. Verify this directory exists and contains plugin folders
2. List all available plugins and their skills
3. Generate the correct export command for the skill I want

I want to export: [DESCRIBE WHAT YOU'RE LOOKING FOR]
Examples:
- "a skill about writing SQL queries"
- "all marketing-related skills"
- "the feature spec template from product management"

How this works:

  1. Paste the prompt into your AI assistant
  2. Replace [PASTE YOUR PATH HERE] with your actual plugin directory path
  3. Describe what skill you're looking for
  4. The AI will guide you to the right command

Example interaction:

You: [Paste prompt above, filling in path and "a skill about writing SQL queries"]

AI: I can see your plugins directory. The 'data' plugin contains a 'sql' skill.
     Here's your command:

     export-skill data sql-queries gemini > sql-skill-gemini.txt

     This will export the SQL query skill to Gemini CLI format.

Version Tagging

All exported content includes source version information in the header/footer:

<!-- Exported from knowledge-work-plugins v1.2.0 on 2026-02-09 -->

This helps you track which version of the source material was used, so you can re-export if skills are updated.


Troubleshooting

Error: Plugin directory not found

Symptom:

ERROR: Plugin directory not found: ~/.claude/plugins/marketplaces/knowledge-work-plugins/

Solution:

  1. Verify Claude Code is installed and plugins are synced:
    ls ~/.claude/plugins/marketplaces/knowledge-work-plugins/
  2. If plugins are elsewhere, use --plugin-dir flag:
    export-skill --list-plugins --plugin-dir /your/custom/path

Error: Plugin 'xyz' not found

Symptom:

ERROR: Plugin 'xyz' not found

Available plugins:
  - content-creator
  - data
  [...]

Solution:

  1. Check available plugins: export-skill --list-plugins
  2. Verify spelling (plugin names are case-sensitive and hyphenated)
  3. Common mistakes:
    • productmanagement → product-management
    • DataAnalyst → data

Error: Skill 'xyz' not found in plugin 'abc'

Symptom:

ERROR: Skill 'xyz' not found in plugin 'abc'

Available skills in 'abc':
  - skill-one
  - skill-two
  [...]

Solution:

  1. List skills in plugin: export-skill abc --list-skills
  2. Verify skill name spelling
  3. Common mistakes:
    • featureSpec → feature-spec
    • SQL → sql

Error: Cannot read SKILL.md file

Symptom:

ERROR: Cannot read SKILL.md file: /path/to/plugin/skills/xyz/SKILL.md

Solution:

  1. Check file permissions:
    ls -la ~/.claude/plugins/marketplaces/knowledge-work-plugins/plugin-name/skills/skill-name/
  2. Ensure file exists and is readable:
    cat ~/.claude/plugins/marketplaces/knowledge-work-plugins/plugin-name/skills/skill-name/SKILL.md
  3. If file is missing, re-sync Claude Code plugins

ChatGPT Export Warning: Content Truncated

Symptom:

WARNING: Content truncated to fit ChatGPT 1500-char limit
See feature-spec-extended.md for full content

Solution: This is expected behavior for large skills. The truncated version preserves key content, while the -extended.md file contains the complete original content. You can:

  1. Use the truncated version in ChatGPT Custom Instructions
  2. Reference the extended file in your ChatGPT conversations when needed
  3. Or use Gemini/Claude Projects formats which have no character limits

Permission Denied Error

Symptom:

bash: export-skill: Permission denied

Solution:

  1. Make scripts executable:
    chmod +x ~/claude-skill-porter/bin/export-skill
    chmod +x ~/claude-skill-porter/bin/export-plugin
  2. Or reinstall using curl method (sets permissions automatically)

Contributing

Contributions are welcome! Here's how to get started:

Adding a New Format

  1. Create a new format converter in lib/formats/<format-name>.sh
  2. Implement the format_<name>() function with this signature:
    format_my_format() {
      local skill_file="$1"    # Path to SKILL.md
      local plugin_name="$2"   # Plugin name
      local skill_name="$3"    # Skill name
    
      # Your conversion logic here
      # Output formatted content to stdout
    }
  3. Source your converter in bin/export-skill and bin/export-plugin
  4. Add tests in tests/test-<format-name>.sh
  5. Update this README with format documentation

Example: See lib/formats/gemini.sh for a simple reference implementation.

Testing Guidelines

  • All format converters must have test coverage
  • Tests should verify:
    • Correct output format
    • Character limits (if applicable)
    • Error handling for missing/invalid inputs
    • Edge cases (empty content, special characters)
  • Run tests before submitting PR:
    ./tests/run-all-tests.sh

Code Style Guidelines

Bash scripting conventions:

  • Use set -euo pipefail at top of all scripts
  • Quote all variable expansions: "$variable" not $variable
  • Use local for function variables
  • Prefer [[ over [ for conditionals
  • Use $(command) over backticks
  • Functions should output to stdout, errors to stderr
  • Use return 1 for errors, return 0 for success
  • Document functions with comments explaining purpose and parameters

Naming conventions:

  • Files: kebab-case.sh
  • Functions: snake_case()
  • Variables: snake_case for locals, SCREAMING_SNAKE_CASE for globals

Testing:

  • Test files: test-<feature>.sh
  • Use descriptive test names: test_format_gemini_basic_export()
  • Include setup/teardown for temp files

Submitting a Pull Request

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-new-format
  3. Make your changes following style guidelines
  4. Add/update tests
  5. Run test suite: ./tests/run-all-tests.sh
  6. Update README if adding user-facing features
  7. Commit with clear message: Add support for Ollama format
  8. Push and create PR with description of changes

License

Licensed under the Apache License, Version 2.0. See LICENSE for full text.

Source Material Attribution

This tool extracts knowledge from Anthropic's knowledge-work-plugins, which is also licensed under Apache 2.0. All exported content retains its original licensing.

See THIRD_PARTY_NOTICES for detailed attribution.


Roadmap

v1.0 (Current):

  • ✓ Export to Gemini CLI, ChatGPT, Claude Projects
  • ✓ Single skill and batch plugin export
  • ✓ Custom plugin directory support
  • ✓ Smart truncation for ChatGPT

v1.5 (Planned):

  • Local LLM formats (Ollama, LM Studio)
  • Reverse import (other AI tools → Claude skills)
  • Auto-sync with knowledge-work-plugins updates
  • Interactive mode with fuzzy search

v2.0 (Future):

  • Web catalog UI for browsing and exporting skills
  • CI/CD pipeline for auto-exporting on plugin updates
  • Custom skill creation tools integration

Support


Built with ❤️ for the multi-tool AI practitioner community

About

Export Claude Code plugin skills to Gemini, ChatGPT, Claude Projects, and local LLMs

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages