跳转到主要内容
此内容尚未提供您的语言版本,正在以英文显示。

Build CLI Plugin

技能 已验证 活跃

Build a plugin or adapter for a CLI tool using the abstract base class pattern. Covers defining the contract (static fields, required methods), choosing an installation strategy (symlink, copy, append-to-file), implementing detection, install/uninstall with idempotency, listing, auditing, and registering the plugin. Use when adding support for a new framework to a CLI installer, building a plugin system for any multi-target tool, or extending an existing adapter architecture.

目的

To provide a structured pattern and detailed instructions for developers looking to extend command-line tools with new framework support or plugin systems.

功能

  • Abstract base class pattern for CLI plugins
  • Defining plugin contracts (static fields, required methods)
  • Installation strategies (symlink, copy, append-to-file)
  • Idempotent install/uninstall implementation
  • Plugin detection, listing, and auditing

使用场景

  • Adding support for new frameworks to CLI installers
  • Building plugin systems for multi-target command-line tools
  • Extending existing adapter architectures with new variants
  • Porting content delivery to frameworks with different file layouts

非目标

  • Developing the CLI tool itself
  • Writing framework-specific code outside the plugin adapter
  • Handling runtime environment setup for the CLI tool

工作流

  1. Define the contract (base class)
  2. Choose installation strategy
  3. Implement detection logic
  4. Implement install with idempotency
  5. Implement uninstall with cleanup
  6. Implement listing and audit
  7. Register the plugin
  8. Write tests

实践

  • Plugin Development
  • CLI Tooling
  • Software Architecture

先决条件

  • TypeScript/JavaScript development environment
  • Understanding of CLI tool architectures
  • Familiarity with Node.js file system operations

安装

/plugin install agent-almanac@pjt222-agent-almanac

质量评分

已验证
98 /100
about 22 hours ago 分析

信任信号

最近提交1 day ago
星标14
许可证MIT
状态
查看源代码

类似扩展

V3 Ddd Architecture

100

Domain-Driven Design architecture for claude-flow v3. Implements modular, bounded context architecture with clean separation of concerns and microkernel pattern.

技能
ruvnet

Pathfinder

100

将代码库映射为按功能分组的流程图,识别不同功能之间的重复关注点,并提出统一的架构。在被要求“寻找理想路径”、统一重复系统或在重构前审计架构时使用。输出一个建议的统一流程图以及针对每个系统的“制定计划”提示。

技能
thedotmack

Understand

100

分析代码库以生成交互式知识图谱,用于理解架构、组件和关系

技能
Lum1104

Cloud Architect

100

Designs cloud architectures, creates migration plans, generates cost optimization recommendations, and produces disaster recovery strategies across AWS, Azure, and GCP. Use when designing cloud architectures, planning migrations, or optimizing multi-cloud deployments. Invoke for Well-Architected Framework, cost optimization, disaster recovery, landing zones, security architecture, serverless design.

技能
jeffallan

API Design Patterns

100

Comprehensive API design patterns covering REST, GraphQL, gRPC, versioning, authentication, and modern API best practices

技能
bobmatnyc

Angular Developer

100

生成 Angular 代码并提供架构指导。在创建项目、组件或服务时触发,或针对响应式(signals, linkedSignal, resource)、表单、依赖注入、路由、SSR、可访问性(ARIA)、动画、样式(组件样式, Tailwind CSS)、测试或 CLI 工具的最佳实践。

技能
angular