### Install mcp2skill from Source Source: https://github.com/fenwei-dev/mcp2skill/blob/main/README.md Install the latest version directly from the GitHub repository using Go. ```bash go install github.com/fenwei-dev/mcp2skill/cmd/mcp2skill@latest ``` -------------------------------- ### Install mcp2skill Source: https://context7.com/fenwei-dev/mcp2skill/llms.txt Commands to install the tool via script, Go, or source build. ```bash # Quick install on Linux/macOS curl -sSL https://raw.githubusercontent.com/fenwei-dev/mcp2skill/main/install.sh | bash # From source go install github.com/fenwei-dev/mcp2skill/cmd/mcp2skill@latest # Development build git clone https://github.com/fenwei-dev/mcp2skill.git cd mcp2skill go build ./cmd/mcp2skill ``` -------------------------------- ### Install mcp2skill via Shell Source: https://github.com/fenwei-dev/mcp2skill/blob/main/README.md Use the provided shell script to install the tool on Linux or macOS systems. ```bash curl -sSL https://raw.githubusercontent.com/fenwei-dev/mcp2skill/main/install.sh | bash ``` -------------------------------- ### Example SKILL.md Frontmatter and Content Source: https://context7.com/fenwei-dev/mcp2skill/llms.txt Example of the generated SKILL.md file content including YAML frontmatter and tool documentation. ```markdown --- name: fetch description: Provides access to the Fetch MCP server. It offers 2 tool(s): {"fetch":"Fetch content from a URL","search":"Search the web"} --- # fetch This skill provides access to the `Fetch` MCP server. ## MCP Server Info - **Server Version:** 1.0.0 - **Protocol Version:** 2024-11-05 - **Capabilities:** tools ## Available Tools This skill provides the following tools: - **fetch**: Fetch content from a URL - **search**: Search the web ## Usage This skill includes an embedded `mcp2skill` binary at `bin/mcp2skill`. Use `./bin/mcp2skill --help` to see available commands. Use `./bin/mcp2skill list-tools --server fetch` to list tools. Use `./bin/mcp2skill call-tool --server fetch --tool --args ''` to call a tool. ``` -------------------------------- ### Scenario Formatting Examples Source: https://github.com/fenwei-dev/mcp2skill/blob/main/openspec/AGENTS.md Correct and incorrect formatting for scenarios in specification files. ```markdown #### Scenario: User login success - **WHEN** valid credentials provided - **THEN** return JWT token ``` ```markdown - **Scenario: User login** ❌ **Scenario**: User login ❌ ### Scenario: User login ❌ ``` -------------------------------- ### Example ADDED Requirement: Two-Factor Authentication Source: https://github.com/fenwei-dev/mcp2skill/blob/main/openspec/AGENTS.md Illustrates the 'ADDED' requirement format for introducing a new capability, including its description and a specific scenario. ```markdown ## ADDED Requirements ### Requirement: Two-Factor Authentication Users MUST provide a second factor during login. #### Scenario: OTP required - **WHEN** valid credentials are provided - **THEN** an OTP challenge is required ``` -------------------------------- ### Configure stdio Transport Source: https://github.com/fenwei-dev/mcp2skill/blob/main/README.md Example configuration for an MCP server using stdio transport. ```json { "type": "stdio", "command": "uvx", "args": ["mcp-server-fetch"], "env": { "FETCH_API_KEY": "sk-..." } } ``` -------------------------------- ### Example RENAMED Requirement Source: https://github.com/fenwei-dev/mcp2skill/blob/main/openspec/AGENTS.md Demonstrates the format for renaming a requirement, specifying the 'FROM' and 'TO' states. ```markdown ## RENAMED Requirements - FROM: `### Requirement: Login` - TO: `### Requirement: User Authentication` ``` -------------------------------- ### Configure http Transport Source: https://github.com/fenwei-dev/mcp2skill/blob/main/README.md Example configuration for an MCP server using http transport. ```json { "type": "http", "url": "https://api.githubcopilot.com/mcp/", "headers": { "Authorization": "Bearer ghp_..." } } ``` -------------------------------- ### Example ADDED Requirement: OTP Email Notification Source: https://github.com/fenwei-dev/mcp2skill/blob/main/openspec/AGENTS.md Shows the 'ADDED' requirement format for a notification capability, detailing the requirement and its purpose. ```markdown ## ADDED Requirements ### Requirement: OTP Email Notification ... ``` -------------------------------- ### Build mcp2skill for Development Source: https://github.com/fenwei-dev/mcp2skill/blob/main/README.md Clone the repository and build the binary locally. ```bash git clone https://github.com/fenwei-dev/mcp2skill.git cd mcp2skill go build ./cmd/mcp2skill ``` -------------------------------- ### Build the project Source: https://github.com/fenwei-dev/mcp2skill/blob/main/README.md Commands for building the CLI tool, including a static binary build for distribution. ```bash # Standard build go build ./cmd/mcp2skill # Static binary for distribution CGO_ENABLED=0 go build -ldflags="-s -w" ./cmd/mcp2skill ``` -------------------------------- ### Initialize OpenSpec Project Source: https://github.com/fenwei-dev/mcp2skill/blob/main/openspec/AGENTS.md Initialize a new OpenSpec project in the specified path using `openspec init [path]`. ```bash openspec init [path] ``` -------------------------------- ### Build and Test Commands Source: https://github.com/fenwei-dev/mcp2skill/blob/main/AGENTS.md Standard commands for building the binary, running tests with various configurations, and linting the codebase. ```bash # Build go build ./cmd/mcp2skill # Standard build CGO_ENABLED=0 go build -ldflags="-s -w" ./cmd/mcp2skill # Static binary for distribution # Run all tests go test ./... # Run tests with coverage go test -cover ./... # Run a single test file go test -v ./internal/config # Run a single test function go test -v -run TestFunctionName ./internal/config # Run tests in specific package with timeout go test -timeout 30s ./internal/mcp # Lint (if golangci-lint is installed) golangci-lint run ./... golangci-lint run --new-from-rev HEAD~1 # Lint only changes ``` -------------------------------- ### Generate and Update Skill Packages in Go Source: https://context7.com/fenwei-dev/mcp2skill/llms.txt Demonstrates initializing a generator, creating a new skill package, and managing updates for existing skills. ```go package main import ( "context" "fmt" "github.com/fenwei-dev/mcp2skill/internal/config" "github.com/fenwei-dev/mcp2skill/internal/mcp" "github.com/fenwei-dev/mcp2skill/internal/skill" ) func main() { ctx := context.Background() // Load configuration cfg, err := config.LoadEffective("") if err != nil { fmt.Printf("Config error: %v\n", err) return } // Get server config serverCfg := cfg.MCP["fetch"] mcpCfg := mcp.ServerConfig{ Type: mcp.TransportType(serverCfg.Type), Command: serverCfg.Command, Args: serverCfg.Args, Env: serverCfg.Env, } // Create MCP client and skill generator client := mcp.NewClient(mcpCfg) generator := skill.NewGenerator(client, cfg, true) // true = embed binary // Generate skill package info, err := generator.Generate(ctx, "fetch", "./skills/fetch", false) if err != nil { fmt.Printf("Generate error: %v\n", err) return } fmt.Printf("Generated skill at: %s\n", info.UpdatePath) fmt.Printf(" SKILL.md: %s\n", info.SKILLMD) fmt.Printf(" TOOLS.md: %s\n", info.ToolsMD) fmt.Printf(" Binary: %s\n", info.BinaryPath) // Generate updates for existing skill updateGenerator := skill.NewGenerator(client, cfg, false) updateInfo, err := updateGenerator.GenerateUpdates(ctx, "./skills/fetch", false) if err != nil { fmt.Printf("Update error: %v\n", err) return } if updateInfo != nil { fmt.Printf("Updates available at: %s\n", updateInfo.UpdatePath) // Apply updates if err := updateGenerator.ApplyUpdates("./skills/fetch"); err != nil { fmt.Printf("Apply error: %v\n", err) return } fmt.Println("Updates applied successfully") } // Identify server from existing skill serverName, err := updateGenerator.IdentifyServer("./skills/fetch") if err != nil { fmt.Printf("Identify error: %v\n", err) return } fmt.Printf("Identified server: %s\n", serverName) // Discard pending updates if err := updateGenerator.DiscardUpdates("./skills/fetch"); err != nil { fmt.Printf("Discard error: %v\n", err) } } ``` -------------------------------- ### Manage Configuration Files Source: https://context7.com/fenwei-dev/mcp2skill/llms.txt Commands to create and resolve global configuration files. ```bash # Config file resolution order: # 1. --config flag (explicit path) # 2. .mcp2skill/config.json (project directory or parent) # 3. ~/.mcp2skill/config.json (global) # Create global config mkdir -p ~/.mcp2skill cat > ~/.mcp2skill/config.json <<'EOF' { "mcp": { "fetch": { "type": "stdio", "command": "docker", "args": ["run", "-i", "--rm", "mcp/fetch"] } } } EOF ``` -------------------------------- ### Connect and interact with MCP servers in Go Source: https://context7.com/fenwei-dev/mcp2skill/llms.txt Use the mcp package to create clients, connect to servers, and invoke tools or list resources. ```go package main import ( "context" "encoding/json" "fmt" "github.com/fenwei-dev/mcp2skill/internal/mcp" ) func main() { ctx := context.Background() // Create client for stdio transport client := mcp.NewClient(mcp.ServerConfig{ Type: mcp.TransportStdio, Command: "uvx", Args: []string{"mcp-server-fetch"}, Env: map[string]string{"API_KEY": "your-key"}, }) // Or for HTTP transport httpClient := mcp.NewClient(mcp.ServerConfig{ Type: mcp.TransportHTTP, URL: "https://api.example.com/mcp/", Headers: map[string]string{"Authorization": "Bearer token"}, }) _ = httpClient // use as needed // Connect to the server if err := client.Connect(ctx); err != nil { fmt.Printf("Connection error: %v\n", err) return } defer client.Close() // Get server metadata metadata, err := client.GetMetadata(ctx) if err != nil { fmt.Printf("Metadata error: %v\n", err) return } fmt.Printf("Server: %s v%s (Protocol: %s)\n", metadata.Name, metadata.Version, metadata.Protocol) // List available tools tools, err := client.ListTools(ctx) if err != nil { fmt.Printf("List tools error: %v\n", err) return } for _, tool := range tools { fmt.Printf("Tool: %s - %s\n", tool.Name, tool.Description) } // Call a tool result, err := client.CallTool(ctx, "fetch", map[string]interface{}{ "url": "https://example.com", }) if err != nil { fmt.Printf("Call tool error: %v\n", err) return } resultJSON, _ := json.MarshalIndent(result, "", " ") fmt.Printf("Result: %s\n", resultJSON) // List resources (if server supports them) resources, err := client.ListResources(ctx) if err != nil { fmt.Printf("List resources error: %v\n", err) return } for _, res := range resources { fmt.Printf("Resource: %s (%s)\n", res.Name, res.URI) } } ``` -------------------------------- ### Implementation Tasks Template Source: https://github.com/fenwei-dev/mcp2skill/blob/main/openspec/AGENTS.md Standard structure for tasks.md files. ```markdown ## 1. Implementation - [ ] 1.1 Create database schema - [ ] 1.2 Implement API endpoint - [ ] 1.3 Add frontend component - [ ] 1.4 Write tests ``` -------------------------------- ### Generate Skill Package Source: https://github.com/fenwei-dev/mcp2skill/blob/main/README.md Execute the generate-skill command to create a skill package from a configured server. ```bash mcp2skill generate-skill --server github --output ~/.claude/skills ``` -------------------------------- ### List Specifications with OpenSpec Source: https://github.com/fenwei-dev/mcp2skill/blob/main/openspec/AGENTS.md Use `openspec list --specs` to enumerate all specifications within the project. ```bash openspec list --specs ``` -------------------------------- ### Go Project Structure for mcp2skill Source: https://github.com/fenwei-dev/mcp2skill/blob/main/openspec/changes/archive/2026-01-24-add-mcp2skill-cli/design.md Standard Go project layout with cmd/, internal/, and pkg/ directories for clear separation of concerns. Internal packages are used to prevent external dependencies on internal APIs. ```tree mcp2skill/ ├── cmd/mcp2skill/ # Main CLI entry point ├── internal/ │ ├── cli/ # CLI command definitions │ ├── mcp/ # MCP client wrapper │ ├── config/ # Config management │ └── skill/ # Skill generation logic ├── pkg/ │ └── mcp2skill/ # Reusable packages if needed ├── go.mod ``` -------------------------------- ### Manage configurations with Go API Source: https://context7.com/fenwei-dev/mcp2skill/llms.txt Load, merge, and save server configurations using the internal config package. ```go package main import ( "fmt" "github.com/fenwei-dev/mcp2skill/internal/config" ) func main() { // Load effective config (merges global + project configs) cfg, err := config.LoadEffective("") if err != nil { fmt.Printf("Error: %v\n", err) return } // Access server configurations for name, serverCfg := range cfg.MCP { fmt.Printf("Server: %s, Type: %s\n", name, serverCfg.Type) if serverCfg.Type == config.TransportStdio { fmt.Printf(" Command: %s %v\n", serverCfg.Command, serverCfg.Args) } else { fmt.Printf(" URL: %s\n", serverCfg.URL) } } // Load from specific path customCfg, err := config.Load("/path/to/config.json") if err != nil { fmt.Printf("Error: %v\n", err) return } // Merge configs (second takes precedence) merged := config.Merge(cfg, customCfg) fmt.Printf("Merged servers: %d\n", len(merged.MCP)) // Save config newCfg := config.DefaultConfig() newCfg.MCP["my-server"] = config.ServerConfig{ Type: config.TransportStdio, Command: "uvx", Args: []string{"mcp-server-fetch"}, Env: map[string]string{"API_KEY": "secret"}, } if err := config.Save(newCfg, "/path/to/new-config.json"); err != nil { fmt.Printf("Save error: %v\n", err) } } ``` -------------------------------- ### List MCP Tools Source: https://context7.com/fenwei-dev/mcp2skill/llms.txt Commands to list tools and their schemas from an MCP server. ```bash # List tools from a configured server mcp2skill list-tools --server fetch # Example output: # Found 2 tool(s): # # - **fetch**: Fetch content from a URL # - Args schema: `{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}` # - **search**: Search the web # - Args schema: `{"type":"object","properties":{"query":{"type":"string"}},"required":["query"]}` # Use custom config mcp2skill list-tools --server github --config ./project-config.json ``` -------------------------------- ### Generate New Skill Package Source: https://github.com/fenwei-dev/mcp2skill/blob/main/docs/commands.md Use this command to create a new skill package from an MCP server. Specify the server name and optionally an output directory and whether to embed the binary. The `--force` flag overwrites existing files. ```bash mcp2skill generate-skill [flags] ``` ```bash mcp2skill generate-skill --server my-server --output ./skills --force ``` ```bash mcp2skill generate-skill --server my-server ``` -------------------------------- ### View project structure Source: https://github.com/fenwei-dev/mcp2skill/blob/main/README.md Displays the directory layout of the mcp2skill project. ```text mcp2skill/ ├── cmd/ │ └── mcp2skill/ # Main CLI entry point ├── internal/ │ ├── cliapp/ # CLI command implementations │ ├── config/ # Configuration management │ ├── mcp/ # MCP client wrapper │ └── skill/ # Skill generation logic ├── go.mod └── README.md ``` -------------------------------- ### Project Directory Structure Source: https://github.com/fenwei-dev/mcp2skill/blob/main/AGENTS.md Overview of the repository layout for the mcp2skill project. ```text cmd/mcp2skill/ # Main entry point internal/ cliapp/ # CLI command implementations config/ # Configuration loading/merging mcp/ # MCP client wrapper skill/ # Skill generation logic ``` -------------------------------- ### list-tools Source: https://github.com/fenwei-dev/mcp2skill/blob/main/docs/commands.md Lists all available tools from a specified MCP server. ```APIDOC ## list-tools ### Description List available tools from an MCP server. ### Flags - **--server, -s** (string) - Required - MCP server name from config - **--config** (string) - Optional - Path to config file ### Request Example `mcp2skill list-tools --server my-server` ``` -------------------------------- ### Define Configuration Schema Source: https://github.com/fenwei-dev/mcp2skill/blob/main/README.md Reference for the structure of the mcp2skill configuration file. ```json { "mcp": { "server-name": { "type": "stdio|http", // For stdio transport: "command": "path/to/executable", "args": ["arg1", "arg2"], "env": { "VAR_NAME": "value" }, // For http transport: "url": "https://api.example.com/mcp", "headers": { "Authorization": "Bearer token" } } } } ``` -------------------------------- ### Generate Skill Packages Source: https://context7.com/fenwei-dev/mcp2skill/llms.txt Commands to generate skill packages from configured MCP servers. ```bash # Basic usage - generates skill in ./my-server/ mcp2skill generate-skill --server my-server # Specify output directory - creates ./skills/fetch/ mcp2skill generate-skill --server fetch --output ./skills # Force overwrite existing files mcp2skill generate-skill --server fetch --output ./skills --force # Generate without embedded binary (uses global mcp2skill) mcp2skill generate-skill --server fetch --output ./skills --no-embed # Use custom config file mcp2skill generate-skill --server fetch --config ./my-config.json ``` -------------------------------- ### List Available Tools from MCP Server Source: https://github.com/fenwei-dev/mcp2skill/blob/main/docs/commands.md Retrieves a list of available tools from a specified MCP server. Requires the server name. ```bash mcp2skill list-tools [flags] ``` ```bash mcp2skill list-tools --server my-server ``` -------------------------------- ### Generate a skill from an HTTP MCP server Source: https://github.com/fenwei-dev/mcp2skill/blob/main/README.md Configures an HTTP-based MCP server in the global config file and generates the skill. ```bash # Configure cat > ~/.mcp2skill/config.json <<'EOF' { "mcp": { "github": { "type": "http", "url": "https://api.githubcopilot.com/mcp/", "headers": { "Authorization": "Bearer ghp_..." } } } } EOF # Generate mcp2skill generate-skill --server github --output ./skills/github ``` -------------------------------- ### Generate a skill from an stdio MCP server Source: https://github.com/fenwei-dev/mcp2skill/blob/main/README.md Configures an stdio-based MCP server in the global config file and generates the skill. ```bash # Configure cat > ~/.mcp2skill/config.json <<'EOF' { "mcp": { "fetch": { "type": "stdio", "command": "uvx", "args": ["mcp-server-fetch"], "env": { "TAVILY_API_KEY": "your-key" } } } } EOF # Generate mcp2skill generate-skill --server fetch --output ./skills/fetch ``` -------------------------------- ### Run project tests Source: https://github.com/fenwei-dev/mcp2skill/blob/main/README.md Commands for executing tests across the project or specific packages. ```bash # Run all tests go test ./... # Run tests with coverage go test -cover ./... # Run specific package tests go test ./internal/config go test ./internal/mcp go test ./internal/cliapp ``` -------------------------------- ### Update Skill Packages Source: https://context7.com/fenwei-dev/mcp2skill/llms.txt Two-phase workflow for safely updating existing skill packages. ```bash # Phase 1: Generate updates (creates ./update/ subdirectory) mcp2skill update-skill --skill ~/.claude/skills/fetch # Output: Updates available at: ./update/ # Run with --confirm to apply changes or --discard to cancel # Review changes in the update directory diff ~/.claude/skills/fetch/SKILL.md ~/.claude/skills/fetch/update/SKILL.md # Phase 2a: Apply the pending updates mcp2skill update-skill --skill ~/.claude/skills/fetch --confirm # Output: Updates applied to: ~/.claude/skills/fetch # Phase 2b: Or discard updates if not satisfied mcp2skill update-skill --skill ~/.claude/skills/fetch --discard # Output: Pending updates discarded # Update binary along with skill files (only if skill has embedded binary) mcp2skill update-skill --skill ~/.claude/skills/fetch --update-binary mcp2skill update-skill --skill ~/.claude/skills/fetch --confirm # For embedded skills, use relative path from skill directory cd ~/.claude/skills/fetch ./bin/mcp2skill update-skill ./bin/mcp2skill update-skill --confirm ``` -------------------------------- ### Skill Package Directory Structure Source: https://context7.com/fenwei-dev/mcp2skill/llms.txt Standardized file layout for generated skill packages. ```text my-skill/ ├── SKILL.md # Main skill documentation with YAML frontmatter ├── references/ │ ├── TOOLS.md # Detailed tool reference with JSON schemas │ └── RESOURCES.md # Resource reference (if server provides resources) └── bin/ └── mcp2skill # Embedded binary (if not using --no-embed) ``` -------------------------------- ### Interactive OpenSpec Commands Source: https://github.com/fenwei-dev/mcp2skill/blob/main/openspec/AGENTS.md Use `openspec show` for interactive selection or `openspec validate` for bulk validation mode. ```bash openspec show ``` ```bash openspec validate ``` -------------------------------- ### Proposal Markdown Template Source: https://github.com/fenwei-dev/mcp2skill/blob/main/openspec/AGENTS.md Standard structure for proposal.md files. ```markdown # Change: [Brief description of change] ## Why [1-2 sentences on problem/opportunity] ## What Changes - [Bullet list of changes] - [Mark breaking changes with **BREAKING**] ## Impact - Affected specs: [list capabilities] - Affected code: [key files/systems] ``` -------------------------------- ### Show Change or Spec Details with OpenSpec Source: https://github.com/fenwei-dev/mcp2skill/blob/main/openspec/AGENTS.md Use `openspec show [item]` to display details of a specific change or specification. For JSON output, use `--json`. ```bash openspec show [item] ``` ```bash openspec show [change] --json --deltas-only ``` ```bash openspec show [spec] --type spec --json ``` -------------------------------- ### Project Directory Structure Source: https://github.com/fenwei-dev/mcp2skill/blob/main/openspec/AGENTS.md The standard layout for organizing project specifications and change proposals. ```text openspec/ ├── project.md # Project conventions ├── specs/ # Current truth - what IS built │ └── [capability]/ # Single focused capability │ ├── spec.md # Requirements and scenarios │ └── design.md # Technical patterns ├── changes/ # Proposals - what SHOULD change │ ├── [change-name]/ │ │ ├── proposal.md # Why, what, impact │ │ ├── tasks.md # Implementation checklist │ │ ├── design.md # Technical decisions (optional; see criteria) │ │ └── specs/ │ │ └── [capability]/ │ │ └── spec.md # ADDED/MODIFIED/REMOVED │ └── archive/ # Completed changes ``` -------------------------------- ### Skill File Structure Source: https://github.com/fenwei-dev/mcp2skill/blob/main/openspec/changes/archive/2026-01-24-add-mcp2skill-cli/design.md Standardized directory structure for generated skill packages, including SKILL.md for documentation, a references/ subdirectory for generated lists, and an optional bin/ directory for embedded binaries. ```tree skill-name/ ├── SKILL.md # Main skill doc with server info ├── references/ │ ├── TOOLS.md # Generated tool list │ └── RESOURCES.md # Generated resource list (future) └── bin/ └── mcp2skill # Embedded binary (optional) ``` -------------------------------- ### Configure MCP Servers Source: https://github.com/fenwei-dev/mcp2skill/blob/main/README.md Define MCP server connections in the configuration file using stdio or http transport types. ```json { "mcp": { "fetch": { "type": "stdio", "command": "docker", "args": [ "run", "-i", "--rm", "mcp/fetch" ] }, "github": { "type": "http", "url": "https://api.githubcopilot.com/mcp/", "headers": { "Authorization": "Bearer {github_pat}" } } } } ``` -------------------------------- ### call-tool Source: https://github.com/fenwei-dev/mcp2skill/blob/main/docs/commands.md Executes a tool call from an MCP server. ```APIDOC ## call-tool ### Description Call a tool from an MCP server directly. ### Flags - **--server, -s** (string) - Required - MCP server name from config - **--tool, -t** (string) - Required - Tool name to call - **--args, -a** (string) - Optional - Tool arguments as JSON string - **--dry-run** (boolean) - Optional - Show what would be called without executing - **--config** (string) - Optional - Path to config file ### Request Example `mcp2skill call-tool --server my-server --tool fetch --args '{"url": "https://example.com"}'` ``` -------------------------------- ### Update Existing Skill Package Source: https://github.com/fenwei-dev/mcp2skill/blob/main/docs/commands.md Updates an existing skill package with new information from the MCP server. This command uses a two-phase workflow: first generating updates in a temporary directory, then applying them upon confirmation. Use `--confirm` to apply or `--discard` to cancel. ```bash mcp2skill update-skill [flags] ``` ```bash ./bin/mcp2skill update-skill ``` ```bash ./bin/mcp2skill update-skill --confirm ``` ```bash ./bin/mcp2skill update-skill --discard ``` ```bash mcp2skill update-skill --skill ~/.claude/skills/my-server ``` ```bash mcp2skill update-skill --skill ~/.claude/skills/my-server --confirm ``` -------------------------------- ### Generate a skill without embedded binary Source: https://github.com/fenwei-dev/mcp2skill/blob/main/README.md Creates a skill that references the global mcp2skill binary instead of embedding it. ```bash mcp2skill generate-skill --server fetch --output ./skills/fetch --no-embed ``` -------------------------------- ### Debug with verbose output Source: https://github.com/fenwei-dev/mcp2skill/blob/main/README.md Runs the generation command with the verbose flag to troubleshoot connection or configuration issues. ```bash mcp2skill generate-skill --server my-server --verbose ``` -------------------------------- ### Happy Path Script: Add Two-Factor Authentication Source: https://github.com/fenwei-dev/mcp2skill/blob/main/openspec/AGENTS.md A step-by-step bash script demonstrating the process of adding a new capability, including scaffolding, adding deltas, and validation. ```bash # 1) Explore current state openspec spec list --long openspec list # Optional full-text search: # rg -n "Requirement:|"Scenario:" openspec/specs # rg -n "^#|Requirement:" openspec/changes # 2) Choose change id and scaffold CHANGE=add-two-factor-auth mkdir -p openspec/changes/$CHANGE/{specs/auth} printf "## Why\n...\n\n## What Changes\n- ...\n\n## Impact\n- ...\n" > openspec/changes/$CHANGE/proposal.md printf "## 1. Implementation\n- [ ] 1.1 ...\n" > openspec/changes/$CHANGE/tasks.md # 3) Add deltas (example) cat > openspec/changes/$CHANGE/specs/auth/spec.md << 'EOF' ## ADDED Requirements ### Requirement: Two-Factor Authentication Users MUST provide a second factor during login. #### Scenario: OTP required - **WHEN** valid credentials are provided - **THEN** an OTP challenge is required EOF # 4) Validate openspec validate $CHANGE --strict ``` -------------------------------- ### Overwrite existing output directory Source: https://github.com/fenwei-dev/mcp2skill/blob/main/README.md Forces the generation of a skill into a non-empty directory. ```bash mcp2skill generate-skill --server my-server --output ./skills/my-server --force ``` -------------------------------- ### generate-skill Source: https://github.com/fenwei-dev/mcp2skill/blob/main/docs/commands.md Generates a new skill package from a specified MCP server. ```APIDOC ## generate-skill ### Description Generates a new skill package from an MCP server. ### Flags - **--server, -s** (string) - Required - MCP server name from config - **--output, -o** (string) - Optional - Parent directory for the skill (default: current directory) - **--no-embed** (boolean) - Optional - Do not embed the binary in the skill package - **--force, -f** (boolean) - Optional - Overwrite existing files without warning - **--config** (string) - Optional - Path to config file ### Request Example `mcp2skill generate-skill --server my-server --output ./skills --force` ``` -------------------------------- ### List Active Changes with openspec Source: https://github.com/fenwei-dev/mcp2skill/blob/main/openspec/AGENTS.md Use this command to view all proposed changes that are currently active and not yet built. It helps in identifying potential conflicts or overlaps. ```bash openspec list # What's in progress? ``` -------------------------------- ### List Active Changes with OpenSpec Source: https://github.com/fenwei-dev/mcp2skill/blob/main/openspec/AGENTS.md Use `openspec list` to see active changes in the project. For more details, use `openspec list --long`. ```bash openspec list ``` ```bash openspec list --long ``` -------------------------------- ### SKILL.md Template Source: https://github.com/fenwei-dev/mcp2skill/blob/main/README.md The format of the generated SKILL.md file following the Agent Skills specification. ```markdown --- name: my-server description: Provides access to My MCP Server (v1.0.0) MCP server with tools: tool1, tool2. Use when the user requests My MCP Server functionality. --- # My MCP Server This skill provides access to the My MCP Server MCP server. ## MCP Server Info - **MCP Server:** my-server - **Server Version:** 1.0.0 - **Server Title:** My MCP Server Title - **Protocol Version:** 2024-11-05 ## Available Tools This skill provides the following tools: - **tool1**: Description of tool1 - **tool2**: Description of tool2 ## Usage This skill is automatically invoked when tools from this MCP server are required. For detailed documentation on each tool's parameters and usage, see [TOOLS.md](references/TOOLS.md). ``` -------------------------------- ### Update OpenSpec Instruction Files Source: https://github.com/fenwei-dev/mcp2skill/blob/main/openspec/AGENTS.md Update OpenSpec instruction files in the specified path using `openspec update [path]`. ```bash openspec update [path] ``` -------------------------------- ### Call Tool Directly from MCP Server Source: https://github.com/fenwei-dev/mcp2skill/blob/main/docs/commands.md Executes a tool from an MCP server directly. You must specify the server, tool name, and arguments as a JSON string. The `--dry-run` flag allows previewing the call without execution. ```bash mcp2skill call-tool [flags] ``` ```bash mcp2skill call-tool --server my-server --tool fetch --args '{"url": "https://example.com"}' ``` ```bash mcp2skill call-tool --server my-server --tool fetch --dry-run ```