Universal tool to convert Claude Code skills to Gemini CLI extensions and vice versa
npx skills add https://github.com/jduncan-rva/skill-porter --skill api-connectorInstale esta skill com a CLI e comece a usar o fluxo de trabalho SKILL.md em seu espaço de trabalho.
Universal tool to convert Claude Code skills to Gemini CLI extensions and vice versa.
Skill Porter automates the conversion between Claude Code skills and Gemini CLI extensions, enabling developers to write once and deploy to both platforms with minimal effort.
npm install -g skill-porter
Or use directly with npx:
npx skill-porter convert ./my-skill --to gemini
skill-porter convert ./my-claude-skill --to gemini --output ./my-gemini-extension
skill-porter convert ./my-gemini-extension --to claude --output ./my-claude-skill
skill-porter validate ./my-converted-skill
# Basic conversion
skill-porter convert <source-path> --to <claude|gemini>
# With output directory
skill-porter convert ./source --to gemini --output ./destination
# Analyze without converting
skill-porter analyze ./skill-or-extension
# Validate existing skill/extension
skill-porter validate ./path
# Make universal (works on both platforms)
skill-porter universal ./my-skill
# Create PR to add dual-platform support
skill-porter create-pr ./my-skill --to gemini
# Fork with dual-platform setup
skill-porter fork ./my-skill --location ~/my-forks/skill-name
skill-porter itself works on both platforms!
Claude Code:
# Install as skill
git clone https://github.com/jduncan-rva/skill-porter ~/.claude/skills/skill-porter
cd ~/.claude/skills/skill-porter
npm install
Then in Claude Code:
"Convert my skill at ./my-skill to Gemini extension"
"Make this Claude skill compatible with Gemini CLI"
Gemini CLI:
gemini extensions install https://github.com/jduncan-rva/skill-porter
Then in Gemini:
"Port this skill to work with Claude Code"
"Create a universal version of this extension"
Skill Porter leverages the fact that both platforms use the Model Context Protocol (MCP), achieving ~85% code reuse:
Shared Components (85%):
├── MCP Server (100% reusable)
├── Documentation (85% reusable)
├── Scripts & Dependencies (100% reusable)
Platform-Specific (15%):
├── Claude: SKILL.md + .claude-plugin/marketplace.json
└── Gemini: GEMINI.md + gemini-extension.json
| Claude Code | Gemini CLI | Transformation |
|---|---|---|
SKILL.md frontmatter |
gemini-extension.json |
YAML → JSON |
allowed-tools (whitelist) |
excludeTools (blacklist) |
Logic inversion |
.claude-plugin/marketplace.json |
gemini-extension.json |
JSON merge |
| Environment variables | settings[] schema |
Inference |
SKILL.md content |
GEMINI.md |
Content adaptation |
See the examples/ directory for complete working examples with before/after comparisons.
Before (Claude skill):
SKILL.md with YAML frontmatterAfter (Gemini extension):
skill-porter convert examples/simple-claude-skill --to gemini
gemini-extension.json with manifest${extensionPath}Before (Gemini extension):
gemini-extension.json with settingsAfter (Claude skill):
skill-porter convert examples/api-connector-gemini --to claude
SKILL.md with YAML frontmatter.claude-plugin/marketplace.json createdskill-porter itself is universal - it converted itself!
cd skill-porter
skill-porter analyze .
# Result: Platform: universal (high confidence)
See examples/README.md for detailed before/after comparisons and conversion explanations.
Automatically create a PR to add dual-platform support to a repository:
# Convert and create PR in one step
skill-porter create-pr ./my-skill --to gemini
# Options
skill-porter create-pr ./my-skill \
--to gemini \
--base main \
--remote origin \
--draft # Create as draft PR
What it does:
skill-porter/add-dual-platform-support)Requirements:
gh) installed and authenticatedPR includes:
Create a fork with dual-platform configuration ready for development:
skill-porter fork ./my-skill --location ~/my-forks/skill-name
What it does:
Use cases:
# Clone repository
git clone https://github.com/jduncan-rva/skill-porter
cd skill-porter
# Install dependencies
npm install
# Run in development mode
npm run dev
# Run tests
npm test
Contributions welcome! Please see CONTRIBUTING.md for guidelines.
skill-porter/
├── src/
│ ├── index.js # Main entry point
│ ├── cli.js # CLI interface
│ ├── analyzers/
│ │ ├── detector.js # Platform detection
│ │ └── validator.js # Output validation
│ ├── converters/
│ │ ├── claude-to-gemini.js
│ │ ├── gemini-to-claude.js
│ │ └── shared.js # Shared conversion logic
│ ├── templates/
│ │ ├── skill.template.md
│ │ ├── gemini.template.md
│ │ └── manifests.js # Manifest templates
│ └── utils/
│ ├── file-utils.js
│ ├── metadata-parser.js
│ └── mcp-transformer.js
├── tests/
├── examples/
├── SKILL.md # Claude Code skill interface
├── package.json
└── README.md
MIT
Made with ❤️ for the Claude Code and Gemini CLI communities