This commit implements full feature parity across all platforms (Claude, Gemini, OpenAI, Markdown) and all skill modes (Docs, GitHub, PDF, Unified, Local Repo). ## Core Changes ### Phase 1: MCP Package Tool Multi-Platform Support - Added `target` parameter to `package_skill_tool()` in packaging_tools.py - Updated MCP server definition to expose `target` parameter - Platform-specific packaging: ZIP for Claude/OpenAI/Markdown, tar.gz for Gemini - Platform-specific output messages and instructions ### Phase 2: MCP Upload Tool Multi-Platform Support - Added `target` parameter to `upload_skill_tool()` in packaging_tools.py - Added optional `api_key` parameter for API key override - Updated MCP server definition with platform selection - Platform-specific API key validation (ANTHROPIC_API_KEY, GOOGLE_API_KEY, OPENAI_API_KEY) - Graceful handling of Markdown (upload not supported) ### Phase 3: Standalone MCP Enhancement Tool - Created new `enhance_skill_tool()` function (140+ lines) - Supports both 'local' mode (Claude Code Max) and 'api' mode (platform APIs) - Added MCP server definition for `enhance_skill` - Works with Claude, Gemini, and OpenAI - Integrated into MCP tools exports ### Phase 4: Unified Config Splitting Support - Added `is_unified_config()` method to detect multi-source configs - Implemented `split_by_source()` method to split by source type (docs, github, pdf) - Updated auto-detection to recommend 'source' strategy for unified configs - Added 'source' to valid CLI strategy choices - Updated MCP tool documentation for unified support ### Phase 5: Comprehensive Feature Matrix Documentation - Created `docs/FEATURE_MATRIX.md` (~400 lines) - Complete platform comparison tables - Skill mode support matrix - CLI and MCP tool coverage matrices - Platform-specific notes and FAQs - Workflow examples for each combination - Updated README.md with feature matrix section ## Files Modified **Core Implementation:** - src/skill_seekers/mcp/tools/packaging_tools.py - src/skill_seekers/mcp/server_fastmcp.py - src/skill_seekers/mcp/tools/__init__.py - src/skill_seekers/cli/split_config.py - src/skill_seekers/mcp/tools/splitting_tools.py **Documentation:** - docs/FEATURE_MATRIX.md (NEW) - README.md **Tests:** - tests/test_install_multiplatform.py (already existed) ## Test Results - ✅ 699 tests passing - ✅ All multiplatform install tests passing (6/6) - ✅ No regressions introduced - ✅ All syntax checks passed - ✅ Import tests successful ## Breaking Changes None - all changes are backward compatible with default `target='claude'` ## Migration Guide Existing MCP calls without `target` parameter will continue to work (defaults to 'claude'). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
169 lines
4.7 KiB
Python
169 lines
4.7 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
Complete Skill Installation Workflow
|
|
One-command installation: fetch → scrape → enhance → package → upload
|
|
|
|
This CLI tool orchestrates the complete skill installation workflow by calling
|
|
the install_skill MCP tool.
|
|
|
|
Usage:
|
|
skill-seekers install --config react
|
|
skill-seekers install --config configs/custom.json --no-upload
|
|
skill-seekers install --config django --unlimited
|
|
skill-seekers install --config react --dry-run
|
|
|
|
Examples:
|
|
# Install React skill from official configs
|
|
skill-seekers install --config react
|
|
|
|
# Install from local config file
|
|
skill-seekers install --config configs/custom.json
|
|
|
|
# Install without uploading
|
|
skill-seekers install --config django --no-upload
|
|
|
|
# Preview workflow without executing
|
|
skill-seekers install --config react --dry-run
|
|
"""
|
|
|
|
import asyncio
|
|
import argparse
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
# Add parent directory to path to import MCP server
|
|
sys.path.insert(0, str(Path(__file__).parent.parent))
|
|
|
|
# Import the MCP tool function
|
|
from skill_seekers.mcp.server import install_skill_tool
|
|
|
|
|
|
def main():
|
|
"""Main entry point for CLI"""
|
|
parser = argparse.ArgumentParser(
|
|
description="Complete skill installation workflow (fetch → scrape → enhance → package → upload)",
|
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
epilog="""
|
|
Examples:
|
|
# Install React skill from official API
|
|
skill-seekers install --config react
|
|
|
|
# Install from local config file
|
|
skill-seekers install --config configs/custom.json
|
|
|
|
# Install without uploading
|
|
skill-seekers install --config django --no-upload
|
|
|
|
# Unlimited scraping (no page limits)
|
|
skill-seekers install --config godot --unlimited
|
|
|
|
# Preview workflow (dry run)
|
|
skill-seekers install --config react --dry-run
|
|
|
|
# Install for Gemini instead of Claude
|
|
skill-seekers install --config react --target gemini
|
|
|
|
# Install for OpenAI ChatGPT
|
|
skill-seekers install --config fastapi --target openai
|
|
|
|
Important:
|
|
- Enhancement is MANDATORY (30-60 sec) for quality (3/10→9/10)
|
|
- Total time: 20-45 minutes (mostly scraping)
|
|
- Multi-platform support: claude (default), gemini, openai, markdown
|
|
- Auto-uploads if API key is set (ANTHROPIC_API_KEY, GOOGLE_API_KEY, or OPENAI_API_KEY)
|
|
|
|
Phases:
|
|
1. Fetch config (if config name provided)
|
|
2. Scrape documentation
|
|
3. AI Enhancement (MANDATORY - no skip option)
|
|
4. Package for target platform (ZIP or tar.gz)
|
|
5. Upload to target platform (optional)
|
|
"""
|
|
)
|
|
|
|
parser.add_argument(
|
|
"--config",
|
|
required=True,
|
|
help="Config name (e.g., 'react') or path (e.g., 'configs/custom.json')"
|
|
)
|
|
|
|
parser.add_argument(
|
|
"--destination",
|
|
default="output",
|
|
help="Output directory for skill files (default: output/)"
|
|
)
|
|
|
|
parser.add_argument(
|
|
"--no-upload",
|
|
action="store_true",
|
|
help="Skip automatic upload to Claude"
|
|
)
|
|
|
|
parser.add_argument(
|
|
"--unlimited",
|
|
action="store_true",
|
|
help="Remove page limits during scraping (WARNING: Can take hours)"
|
|
)
|
|
|
|
parser.add_argument(
|
|
"--dry-run",
|
|
action="store_true",
|
|
help="Preview workflow without executing"
|
|
)
|
|
|
|
parser.add_argument(
|
|
"--target",
|
|
choices=['claude', 'gemini', 'openai', 'markdown'],
|
|
default='claude',
|
|
help="Target LLM platform (default: claude)"
|
|
)
|
|
|
|
args = parser.parse_args()
|
|
|
|
# Determine if config is a name or path
|
|
config_arg = args.config
|
|
if config_arg.endswith('.json') or '/' in config_arg or '\\' in config_arg:
|
|
# It's a path
|
|
config_path = config_arg
|
|
config_name = None
|
|
else:
|
|
# It's a name
|
|
config_name = config_arg
|
|
config_path = None
|
|
|
|
# Build arguments for install_skill_tool
|
|
tool_args = {
|
|
"config_name": config_name,
|
|
"config_path": config_path,
|
|
"destination": args.destination,
|
|
"auto_upload": not args.no_upload,
|
|
"unlimited": args.unlimited,
|
|
"dry_run": args.dry_run,
|
|
"target": args.target
|
|
}
|
|
|
|
# Run async tool
|
|
try:
|
|
result = asyncio.run(install_skill_tool(tool_args))
|
|
|
|
# Print output
|
|
for content in result:
|
|
print(content.text)
|
|
|
|
# Return success/failure based on output
|
|
output_text = result[0].text
|
|
if "❌" in output_text and "WORKFLOW COMPLETE" not in output_text:
|
|
return 1
|
|
return 0
|
|
|
|
except KeyboardInterrupt:
|
|
print("\n\n⚠️ Workflow interrupted by user")
|
|
return 130 # Standard exit code for SIGINT
|
|
except Exception as e:
|
|
print(f"\n\n❌ Unexpected error: {str(e)}")
|
|
return 1
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|