-
Notifications
You must be signed in to change notification settings - Fork 0
feat(skill): add skill.yaml validation, agent export, and GitHub tap registry #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codex stores skills in ~/.codex/skills using the same SKILL.md format as Claude Code. Now detected alongside other AI agents. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements Phase 1 and Phase 4 of the FGP skill architecture: Phase 1 - Skill Package Format: - Add SkillManifest struct for skill.yaml parsing - Implement `fgp skill validate` command - Support daemon dependencies, instructions, triggers, workflows - Validate name format, version semver, auth config Phase 4 - Agent Adapters: - Add `fgp skill export` command with 5 targets - Claude Code: generates SKILL.md with YAML frontmatter - Cursor: generates .cursorrules - Codex: generates tool spec JSON - MCP: generates MCP tool schema - Windsurf: generates cascade rules New files: - src/commands/skill_validate.rs - validation logic - src/commands/skill_export.rs - export to agent formats Dependencies: - Added serde_yaml for YAML parsing Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements Phase 1 and Phase 4 of the FGP skill architecture, adding skill manifest validation and agent export capabilities. The changes enable validation of skill.yaml files and exporting skills to multiple agent formats including Claude Code, Cursor, Codex, MCP, and Windsurf.
Changes:
- Added
skill.yamlvalidation with comprehensive schema checks for skill manifests - Implemented export functionality to 5 agent-specific formats (Claude Code, Cursor, Codex, MCP, Windsurf)
- Added skill management commands including install, update, search, and marketplace management
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main.rs | Added CLI commands for skill validation, export, and management |
| src/commands/skill_validate.rs | Implements validation logic for skill.yaml manifests |
| src/commands/skill_export.rs | Exports skills to agent-specific formats |
| src/commands/skill.rs | Full skill management system with marketplace support |
| src/commands/generate.rs | New daemon generation command from templates |
| src/commands/mod.rs | Module exports for new skill commands |
| src/commands/agents.rs | Added Codex, Gemini CLI, and Antigravity agent detection |
| Cargo.toml | Added serde_yaml, chrono, and dirs dependencies |
| logs/user_prompt_submit.json | Development session logs (not functional code) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| path: String, | ||
| }, | ||
|
|
||
| /// Export skill for a specific agent (claude-code, cursor, mcp, windsurf) |
Copilot
AI
Jan 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doc comment on line 220 lists 4 targets (claude-code, cursor, mcp, windsurf) but line 222 lists 5 targets including 'codex'. These should be consistent - update line 220 to include 'codex' in the list.
| /// Export skill for a specific agent (claude-code, cursor, mcp, windsurf) | |
| /// Export skill for a specific agent (claude-code, cursor, codex, mcp, windsurf) |
| fn validate_version(version: &str) -> Result<()> { | ||
| // Simple semver check | ||
| let parts: Vec<&str> = version.split('-').next().unwrap_or(version).split('.').collect(); | ||
| if parts.len() != 3 { | ||
| bail!("Version must be semver format (e.g., 1.0.0)"); | ||
| } | ||
| for part in parts { | ||
| if part.parse::<u32>().is_err() { | ||
| bail!("Version components must be numbers"); | ||
| } | ||
| } | ||
| Ok(()) | ||
| } |
Copilot
AI
Jan 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version validation doesn't check if any part is empty before parsing. A malformed version like '1..0' or '1.2.' would split into empty strings, and parsing an empty string as u32 would fail with a generic error message. Add a check to ensure each part is non-empty before attempting to parse, or provide a more specific error message for empty components.
| let skill_dir = if skill_path.is_dir() { | ||
| skill_path.to_path_buf() | ||
| } else { | ||
| skill_path.parent().unwrap_or(Path::new(".")).to_path_buf() | ||
| }; |
Copilot
AI
Jan 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the skill parameter is a skill name (not a path), skill_dir is set to the parent of a non-existent path or '.', which is incorrect. For the third case on line 38-41 where skill is assumed to be a name, skill_dir should be set to the installed skills directory (~/.fgp/skills//) instead. This causes instruction file paths to be resolved incorrectly.
| if source_link.exists() { | ||
| fs::remove_file(&source_link)?; | ||
| } | ||
| std::os::unix::fs::symlink(&source_path, &source_link)?; |
Copilot
AI
Jan 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using std::os::unix::fs::symlink makes the code Unix-specific and won't compile on Windows. Consider using a cross-platform approach or conditionally compiling this code with #[cfg(unix)], or use std::os::windows::fs::symlink_dir on Windows platforms to maintain cross-platform compatibility.
Add GitHub-based skill distribution (like Homebrew taps):
- Add `fgp skill tap add/remove/list/update/show` commands
- Integrate tap search into `fgp skill search`
- Integrate tap install into `fgp skill install`
- Auto-export to Claude Code SKILL.md on install
Tap structure:
~/.fgp/taps/
├── taps.json # Registry of configured taps
└── repos/
└── owner/repo/ # Cloned tap repositories
└── skills/
└── skill-name/
└── skill.yaml
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Aider (~/.aider.conf.yml) - Zed AI (~/.config/zed) - GitHub Copilot (~/.config/github-copilot) - Sourcegraph Cody (~/.sourcegraph) - Amazon Q (~/.aws/amazonq) - Opencode (~/.config/opencode) Total supported agents: 14 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
Implements Phase 1, 2, and 4 of the FGP skill architecture plan:
skill.yamlmanifest and validationNew Commands
Key Files
src/commands/skill_validate.rssrc/commands/skill_export.rssrc/commands/skill_tap.rssrc/commands/skill.rsCargo.tomlTap Registry Structure
Test plan
fgp skill validate ../protocol/skills/research-assistant/- validates example skillfgp skill export claude-code ../protocol/skills/research-assistant/- generates SKILL.mdfgp skill export cursor ../protocol/skills/research-assistant/- generates .cursorrulesfgp skill tap list- shows configured tapsfgp skill tap add- clones GitHub repofgp skill search research- finds skills in tapsfgp skill install research-assistant- installs from tap + exports to Claude Codecargo build --release- compiles successfully🤖 Generated with Claude Code