Agent 生成器
- 作者仓库星标 180
- 作者更新于 实时读取
- 作者仓库 skill-porter
- 领域
- 通用
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @jduncan-rva · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- 读取环境变量
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: skill-porter
description: Converts Claude Code skills to Gemini CLI extensions and vice versa. Use when the user wants to…
category: 通用
runtime: 无特殊运行时
---
# skill-porter 输出预览
## PART A: 任务判断
- 适用问题:通用任务拆解、检查和交付。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Core Capabilities / Bidirectional Conversion / Smart Platform Detection”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于通用任务拆解、检查和交付,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Core Capabilities / Bidirectional Conversion / Smart Platform Detection”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、读取环境变量、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、读取环境变量;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、读取环境变量。
先用一个小任务确认它会围绕“Core Capabilities / Bidirectional Conversion / Smart Platform Detection”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: skill-porter
description: Converts Claude Code skills to Gemini CLI extensions and vice versa. Use when the user wants to…
category: 通用
source: jduncan-rva/skill-porter
---
# skill-porter
## 什么时候使用
- 把通用方向的常用动作沉淀成 Agent 可调用的技能 适合处理通用任务拆解、检查、交付和复盘,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤;通常不需要额外…
- 面向通用任务拆解、检查和交付,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Core Capabilities / Bidirectional Conversion / Smart Platform Detection」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、读取环境变量;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "skill-porter" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Core Capabilities / Bidirectional Conversion / Smart Platform Detection
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、读取环境变量 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Skill Porter - Cross-Platform Skill Converter
This skill automates the conversion between Claude Code skills and Gemini CLI extensions, enabling true cross-platform AI tool development.
Core Capabilities
Bidirectional Conversion
Convert skills and extensions between platforms while preserving functionality:
Example requests:
- "Convert this Claude skill to work with Gemini CLI"
- "Make my Gemini extension compatible with Claude Code"
- "Create a universal version of this skill that works on both platforms"
- "Port the database-helper skill to Gemini"
Smart Platform Detection
Automatically analyzes directory structure to determine source platform:
Detection criteria:
- Claude: Presence of
SKILL.mdwith YAML frontmatter or.claude-plugin/marketplace.json - Gemini: Presence of
gemini-extension.jsonorGEMINI.mdcontext file - Universal: Has both platform configurations
Example requests:
- "What platform is this skill built for?"
- "Analyze this extension and tell me what needs to be converted"
- "Is this a Claude skill or Gemini extension?"
Metadata Transformation
Intelligently converts between platform-specific formats:
Conversions handled:
- YAML frontmatter ↔ JSON manifest
allowed-tools(whitelist) ↔excludeTools(blacklist)- Environment variables ↔ settings schema
- MCP server configuration paths
- Platform-specific documentation formats
Example requests:
- "Convert the metadata from this Claude skill to Gemini format"
- "Transform the allowed-tools list to Gemini's exclude pattern"
- "Generate a settings schema from these environment variables"
MCP Server Preservation
Maintains Model Context Protocol server configurations across platforms:
Example requests:
- "Ensure the MCP server config works on both platforms"
- "Update the MCP server paths for Gemini's ${extensionPath} variable"
- "Validate that the MCP configuration is compatible"
Validation & Quality Checks
Ensures converted output meets platform requirements:
Validation checks:
- Required files present (SKILL.md, gemini-extension.json, etc.)
- Valid YAML/JSON syntax
- Correct frontmatter structure
- MCP server paths resolve correctly
- Tool restrictions are valid
- Settings schema is complete
Example requests:
- "Validate this converted skill"
- "Check if this Gemini extension meets all requirements"
- "Is this conversion ready to install?"
Conversion Process
When you request a conversion, I will:
- Analyze the source directory structure
- Detect which platform it's built for
- Extract metadata, MCP configuration, and documentation
- Transform the data to target platform format
- Generate required files for target platform
- Validate output meets all requirements
- Report what was converted and any manual steps needed
Platform Differences Handled
File Structure
- Claude:
SKILL.md+.claude-plugin/marketplace.json - Gemini:
GEMINI.md+gemini-extension.json - Universal: Both sets of files + shared documentation
Metadata Format
- Claude: YAML frontmatter in SKILL.md
- Gemini: JSON manifest file
- Conversion: Bidirectional YAML ↔ JSON transformation
Tool Restrictions
- Claude:
allowed-tools(whitelist - only listed tools permitted) - Gemini:
excludeTools(blacklist - listed patterns blocked) - Conversion: Logic inversion with intelligent mapping
Configuration
- Claude: Environment variables (user sets before running)
- Gemini: Settings schema (prompted during installation)
- Conversion: Infer schema from env vars or generate env var docs
MCP Server Paths
- Claude: Relative paths from skill directory
- Gemini: Uses
${extensionPath}variable substitution - Conversion: Automatic path transformation
Usage Examples
Convert Claude Skill to Gemini
User: "I have a Claude skill at ./database-helper. Convert it to Gemini."
Claude: I'll analyze the skill and convert it to Gemini format...
- Detected Claude skill (found SKILL.md with frontmatter)
- Extracted metadata and MCP configuration
- Generated gemini-extension.json and GEMINI.md
- Transformed allowed-tools to excludeTools
- Created settings schema from environment variables
✓ Conversion complete! Ready to install with: gemini extensions install ./database-helper
Convert Gemini Extension to Claude
User: "Port my Gemini extension to Claude Code"
Claude: I'll convert this Gemini extension to a Claude skill...
- Detected Gemini extension (found gemini-extension.json)
- Extracted manifest and context file
- Generated SKILL.md with YAML frontmatter
- Created .claude-plugin/marketplace.json
- Converted excludeTools to allowed-tools
✓ Conversion complete! Install with: cp -r ./extension ~/.claude/skills/
Create Universal Extension
User: "Make this skill work on both platforms"
Claude: I'll create a universal extension structure...
- Analyzing current configuration
- Generating both Claude and Gemini files
- Moving shared content to shared/ directory
- Updating MCP server paths for both platforms
✓ Universal extension created! Works with both Claude Code and Gemini CLI
Advanced Features
Pull Request Generation
Create a PR to add dual-platform support to the parent repository:
Example requests:
- "Convert this skill and create a PR to add Gemini support"
- "Generate a pull request with the universal version"
Fork and Dual Setup
Create a fork with both platform configurations:
Example requests:
- "Fork this repo and set it up for both platforms"
- "Create a dual-platform fork I can use with both CLIs"
Validation Only
Check compatibility without converting:
Example requests:
- "Validate this skill's conversion to Gemini"
- "Check if this extension can be ported to Claude"
- "What needs to change to make this universal?"
Configuration
This skill operates directly on filesystem directories and doesn't require external configuration. It uses:
- File system access to read and write skill/extension files
- Git operations for PR and fork features
- GitHub CLI (
gh) for repository operations
Safety Features
- Non-destructive: Creates new files, doesn't modify source unless explicitly requested
- Validation: Checks output before completion
- Reporting: Clear summary of changes made
- Rollback friendly: All changes are standard file operations
Limitations
Some aspects may require manual review:
- Custom slash commands (platform-specific syntax)
- Complex MCP server configurations with multiple servers
- Platform-specific scripts that don't translate directly
- Edge cases in tool restriction mapping
These will be flagged in the conversion report.
Technical Details
Tool Restriction Conversion
Claude → Gemini (Whitelist → Blacklist):
- Analyze allowed-tools list
- Generate exclude patterns for all other tools
- Special handling for wildcard permissions
Gemini → Claude (Blacklist → Whitelist):
- List all available tools
- Remove excluded tools
- Generate allowed-tools list
Settings Inference
When converting Claude → Gemini, environment variables in MCP config become settings:
// MCP env var
"env": { "DB_HOST": "${DB_HOST}" }
// Becomes Gemini setting
"settings": [{
"name": "DB_HOST",
"description": "Database host",
"default": "localhost"
}]
Path Transformation
Claude uses relative paths, Gemini uses variables:
// Claude
"args": ["mcp-server/index.js"]
// Gemini
"args": ["${extensionPath}/mcp-server/index.js"]
For implementation details, see the repository at https://github.com/jduncan-rva/skill-porter
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核