插件技能适配
skill-adapter
分析现有插件以提取其能力,然后将这些技能适配并应用于当前任务。充当通用的技能变色龙,从其他插件中学习。当您请求“技能适配器”功能时激活。
- License 许可
- MIT
- 最近更新
- 2025-12-18
- Stars
- ★ 29
- Forks
- 9
01 前言 Front Matter
- name
- skill-adapter
- license
- MIT
- description
- Analyzes existing plugins to extract their capabilities, then adapts and applies those skills to the current task. Acts as a universal skill chameleon that learns from other plugins. Activates when you request "skill adapter" functionality.
- allowed-tools
- [ "Read", "Grep", "Glob", "Bash" ]
02 资源文件 9
- 资产文件assets/example_plugin_analysis.json3.3 KB
- 资产文件assets/plugin_selection_rules.yaml3.4 KB
- 资产文件assets/README.md549 B
- 脚本assets/skill_adaptation_template.py5.0 KB
- 参考文档references/README.md553 B
- 脚本scripts/plugin_analyzer.py4.7 KB
- 脚本scripts/plugin_search.py2.8 KB
- 脚本scripts/README.md484 B
- 脚本scripts/skill_adapter.py2.8 KB
03 SKILL.md 正文
Skill Adapter - Universal Plugin Capability Extractor
Purpose
Analyzes plugins in the claude-code-plugins marketplace to understand their capabilities, extracts the core patterns and approaches, then adapts those skills to solve the current user's task. Acts as a "skill chameleon" that can adopt any plugin's capabilities.
How It Works
1. Task Analysis
When user presents a task:
- Identify the core capability needed (e.g., "analyze code quality", "generate documentation", "automate deployment")
- Determine the domain (security, devops, testing, etc.)
- Extract key requirements and constraints
2. Plugin Discovery
Search existing plugins for relevant capabilities:
# Find plugins in relevant category
ls plugins/community/ plugins/packages/ plugins/examples/
# Search for keywords in plugin descriptions
grep -r "keyword" --include="plugin.json" plugins/
# Find similar commands/agents
grep -r "capability-name" --include="*.md" plugins/
3. Capability Extraction
For each relevant plugin found, analyze:
Commands (commands/*.md):
- Read the markdown content
- Extract the approach/methodology
- Identify input/output patterns
- Note any scripts or tools used
Agents (agents/*.md):
- Understand the agent's role
- Extract problem-solving approach
- Note decision-making patterns
- Identify expertise areas
Skills (skills/*/SKILL.md):
- Read the skill instructions
- Extract core capability
- Note trigger conditions
- Understand tool usage patterns
*Scripts (scripts/*.sh, .py):
- Analyze script logic
- Extract reusable patterns
- Identify best practices
- Note error handling approaches
4. Pattern Synthesis
Combine learned patterns:
- Merge multiple approaches if beneficial
- Adapt to current context and constraints
- Simplify or enhance based on user needs
- Ensure compatibility with current environment
5. Skill Application
Apply the adapted skill:
- Use the learned approach
- Follow the extracted patterns
- Apply best practices discovered
- Adapt syntax/tools to current context
Example Workflows
Example 1: Learning Code Analysis from Security Plugins
User task: "Analyze this codebase for issues"
Process:
- Search for security and code-analysis plugins
- Find:
owasp-top-10-scanner,code-quality-enforcer,security-audit-agent - Extract patterns:
- OWASP scanner checks for: SQL injection, XSS, CSRF, auth issues
- Quality enforcer looks at: complexity, duplication, standards
- Audit agent examines: dependencies, secrets, permissions
- Synthesize approach:
- Run multi-layer analysis
- Check security patterns first
- Then code quality metrics
- Then dependency issues
- Apply to user's codebase with adapted checks
Example 2: Adopting Documentation Skills
User task: "Generate API documentation"
Process:
- Find documentation plugins
- Discover:
api-documenter,openapi-generator,readme-builder - Extract approaches:
- API documenter: parses code, generates OpenAPI spec
- OpenAPI generator: creates interactive docs
- README builder: structures documentation hierarchically
- Synthesize:
- Parse code for endpoints
- Generate OpenAPI/Swagger spec
- Create interactive documentation
- Build comprehensive README
- Apply combined approach to user's API
Example 3: Learning Automation from DevOps Plugins
User task: "Automate deployment process"
Process:
- Search DevOps category
- Find:
deployment-automation,ci-cd-pipeline,docker-compose-generator - Extract patterns:
- Deployment automation: build → test → deploy → verify
- CI/CD pipeline: trigger conditions, parallel jobs, rollback
- Docker compose: service orchestration, environment management
- Synthesize deployment workflow
- Apply to user's specific tech stack
Reasoning Process
When to Use Skill Adapter
Trigger when:
- User needs capability that might exist in marketplace
- Task could benefit from existing plugin patterns
- User asks: "Is there a plugin for this?"
- Similar problems have been solved before
- Multiple approaches could be combined
Plugin Selection Criteria
Choose plugins based on:
- Relevance: Matches task domain/requirements
- Quality: Well-documented, clear approach
- Simplicity: Not overly complex for the task
- Recency: Updated plugins preferred
- Popularity: Featured or well-maintained plugins
Adaptation Strategy
When adapting skills:
- Keep: Core logic and proven patterns
- Adapt: Syntax, tool names, specific commands
- Enhance: Add error handling, user feedback
- Simplify: Remove unnecessary complexity
- Contextualize: Adjust to user's environment
Limitations and Boundaries
What Skill Adapter CAN Do:
✅ Read and analyze plugin source code ✅ Extract patterns and approaches ✅ Adapt methodologies to new contexts ✅ Combine multiple plugin capabilities ✅ Apply learned skills with reasoning
What Skill Adapter CANNOT Do:
❌ Execute compiled code (MCP servers) ❌ Access external APIs without credentials ❌ Modify original plugins ❌ Guarantee exact plugin behavior replication ❌ Use plugins that require specific environment setup
Success Criteria
Skill adaptation is successful when:
- User's task is completed effectively
- Approach borrowed makes logical sense
- Adapted skill is properly contextualized
- User understands where the approach came from
- Result quality matches or exceeds original plugin
Transparency
Always inform user:
- Which plugins were analyzed
- What patterns were extracted
- How the skill was adapted
- Why this approach was chosen
- Any limitations of the adaptation
Example Usage
User: "I need to validate JSON schemas in my project"
Skill Adapter Process:
1. Searches plugins for JSON validation
2. Finds: schema-validator, json-lint-enforcer
3. Extracts: ajv library usage, error formatting patterns
4. Adapts: Uses available tools (jq, node, python)
5. Applies: Validates user's schemas with detailed errors
6. Reports: "I adapted the schema-validator approach using jq
for validation and added custom error formatting"
Meta-Learning
Skill Adapter improves by:
- Tracking which plugins solve which tasks best
- Learning which patterns are most reusable
- Noting which adaptations work well
- Building a mental model of the marketplace
- Understanding plugin ecosystem relationships
In essence: Skill Adapter is a meta-skill that makes the entire plugin marketplace available as a learning resource, extracting and applying capabilities on-demand to solve user tasks efficiently.
04 同仓库更多 Skills
UI 视觉回归测试
testing-visual-regression
使用截图比较检测 UI 组件中的视觉变化。 在检测意外的 UI 更改或像素差异时使用。 用“测试视觉变化”、“比较截图”或“检测 UI 回归”等短语触发。
单元测试自动生成
generating-unit-tests
从源代码自动生成全面的单元测试,覆盖正常路径、边界条件和错误情况。 在为函数、类或模块创建测试覆盖时使用。 用“生成单元测试”、“为…创建测试”或“添加测试覆盖”等短语触发。
测试报告生成与可视化
generating-test-reports
生成包含指标、覆盖率和可视化内容的全面测试报告。 在执行专项测试时使用。 用“生成测试报告”、“创建测试文档”或“显示测试指标”等短语触发。
测试执行编排与协调
orchestrating-test-execution
协调跨多个环境和框架的并行测试执行。 在执行专项测试时使用。 用“编排测试”、“运行并行测试”或“协调测试执行”等短语触发。
managing-test-environments
Provision and manage isolated test environments with configuration and data. Use when performing specialized testing. Trigger with phrases like "manage test environment", "provision test env", or "setup test infrastructure".
generating-test-doubles
Generate mocks, stubs, spies, and fakes for dependency isolation. Use when creating mocks, stubs, or test isolation fixtures. Trigger with phrases like "generate mocks", "create test doubles", or "setup stubs".