Skip to content

Conversation

@wolfiesch
Copy link
Collaborator

@wolfiesch wolfiesch commented Jan 15, 2026

Summary

Implements Phase 1, 2, and 4 of the FGP skill architecture plan:

  • Phase 1: Skill package format with skill.yaml manifest and validation
  • Phase 2: GitHub tap registry system for skill distribution
  • Phase 4: Agent adapters for exporting skills to Claude Code, Cursor, Codex, MCP, Windsurf

New Commands

# Validate a skill manifest
fgp skill validate ./my-skill/

# Export to agent-specific formats
fgp skill export claude-code my-skill -o ./output/
fgp skill export cursor my-skill -o ./output/
fgp skill export mcp my-skill -o ./output/

# GitHub tap management (like Homebrew)
fgp skill tap add fast-gateway-protocol/official-skills
fgp skill tap list
fgp skill tap update
fgp skill tap show official-skills
fgp skill tap remove official-skills

# Tap-aware search and install
fgp skill search research     # Searches all taps
fgp skill install research-assistant  # Installs from tap

Key Files

File Description
src/commands/skill_validate.rs Validation logic for skill.yaml
src/commands/skill_export.rs Export to 5 agent formats
src/commands/skill_tap.rs GitHub tap registry system
src/commands/skill.rs Updated search/install for taps
Cargo.toml Added serde_yaml dependency

Tap Registry Structure

~/.fgp/taps/
├── taps.json                    # Registry of configured taps
└── repos/
    └── fast-gateway-protocol/
        └── official-skills/     # Cloned tap repo
            ├── tap.yaml         # Tap metadata
            └── skills/
                └── research-assistant/
                    └── skill.yaml

Test plan

  • fgp skill validate ../protocol/skills/research-assistant/ - validates example skill
  • fgp skill export claude-code ../protocol/skills/research-assistant/ - generates SKILL.md
  • fgp skill export cursor ../protocol/skills/research-assistant/ - generates .cursorrules
  • fgp skill tap list - shows configured taps
  • fgp skill tap add - clones GitHub repo
  • fgp skill search research - finds skills in taps
  • fgp skill install research-assistant - installs from tap + exports to Claude Code
  • cargo build --release - compiles successfully

🤖 Generated with Claude Code

wolfiesch and others added 2 commits January 15, 2026 01:20
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>
Copy link

Copilot AI left a 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.yaml validation 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)
Copy link

Copilot AI Jan 15, 2026

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.

Suggested change
/// Export skill for a specific agent (claude-code, cursor, mcp, windsurf)
/// Export skill for a specific agent (claude-code, cursor, codex, mcp, windsurf)

Copilot uses AI. Check for mistakes.
Comment on lines +392 to +404
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(())
}
Copy link

Copilot AI Jan 15, 2026

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.

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +31
let skill_dir = if skill_path.is_dir() {
skill_path.to_path_buf()
} else {
skill_path.parent().unwrap_or(Path::new(".")).to_path_buf()
};
Copy link

Copilot AI Jan 15, 2026

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.

Copilot uses AI. Check for mistakes.
if source_link.exists() {
fs::remove_file(&source_link)?;
}
std::os::unix::fs::symlink(&source_path, &source_link)?;
Copy link

Copilot AI Jan 15, 2026

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.

Copilot uses AI. Check for mistakes.
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>
@wolfiesch wolfiesch changed the title feat(skill): add skill.yaml validation and agent export feat(skill): add skill.yaml validation, agent export, and GitHub tap registry Jan 15, 2026
- 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>
@wolfiesch wolfiesch merged commit faef9d4 into master Jan 15, 2026
1 of 3 checks passed
@wolfiesch wolfiesch deleted the feat/skill-yaml-schema branch January 15, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant