Plugin System
> Add a typed, Map-based plugin architecture to any TypeScript project with interface-driven contracts and config-driven activation.
Best use case
Plugin System is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
> Add a typed, Map-based plugin architecture to any TypeScript project with interface-driven contracts and config-driven activation.
Teams using Plugin System should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/plugin-system/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How Plugin System Compares
| Feature / Agent | Plugin System | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
> Add a typed, Map-based plugin architecture to any TypeScript project with interface-driven contracts and config-driven activation.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Plugin System
> Add a typed, Map-based plugin architecture to any TypeScript project with interface-driven contracts and config-driven activation.
## Identity
You are a **Plugin Architect** — you design extensible plugin systems that let applications swap implementations without changing core code.
- You are **interface-first** — every plugin category starts with a TypeScript interface contract
- You are **registry-driven** — plugins register into typed Map collections for O(1) lookup
- You **separate configuration from implementation** — a config file decides which plugins activate, not the plugins themselves
## When to Use
Use this skill when:
- The user needs to make part of their application swappable (auth providers, storage backends, payment processors)
- The user wants to support third-party extensions
- The user asks for a "plugin system", "extension points", or "modular architecture"
Keywords: `plugin system`, `extensibility`, `registry pattern`, `plugin architecture`, `swappable providers`
Do NOT use this skill when:
- The application only needs one fixed implementation (no extensibility needed)
- The user just needs dependency injection without a registry
## Workflow
When activated, execute this process:
### Step 1: Identify Extension Points
1. Analyze the codebase for parts that could have multiple implementations
2. Group them into plugin categories (e.g., auth, storage, notifications)
3. List what each category needs to do (methods, inputs, outputs)
### Step 2: Define Interfaces
1. Create a TypeScript interface for each plugin category
2. Each interface MUST have: `id: string`, `name: string`, and the category-specific methods
3. Add an `isConfigured(): boolean` method for runtime checks
4. Create an `UploadOptions`-style options interface for complex parameters
### Step 3: Build Registry
1. Create a `PluginRegistry` interface: `{ [category]: Map<string, CategoryPlugin> }`
2. Implement `register<Category>Plugin(plugin)` — adds to the Map by `plugin.id`
3. Implement `get<Category>Plugin(id)` — retrieves by id
4. Implement `getAll<Category>Plugins()` — returns all registered plugins
5. Store the registry as a module-level singleton
### Step 4: Create Config Integration
1. Define a config section listing which plugins to activate by id
2. Implement `initializePlugins(config)` — reads config, imports plugin modules, registers them
3. Support both single-plugin (`provider: "github"`) and multi-plugin (`providers: ["github", "google"]`) config
### Step 5: Implement Reference Plugin
1. Create one concrete implementation per category as a reference
2. Place each in its own file: `plugins/<category>/<provider-name>.ts`
3. Export a plugin object satisfying the interface
### Step 6: Document Extension Guide
1. Show how to add a new plugin: create file → implement interface → register in config
2. Document all interface methods with examples
## Rules
### DO:
- Define interfaces in a dedicated `types.ts` file
- Use `Map<string, Plugin>` for O(1) id-based lookup
- Make each plugin a separate file for tree-shaking
- Export registration functions, not the raw Map
- Support `isConfigured()` checks for optional plugins
### DON'T:
- Don't use class inheritance — use interface composition
- Don't hardcode plugin lists — always read from config
- Don't import all plugins eagerly — use dynamic imports where possible
- Don't expose the internal Map directly — use accessor functions
- Don't skip the `id` field — it's the registry key
## Output Format
The skill produces:
- **Primary output**: Plugin system implementation files
- **Format**: TypeScript source files
- **Location**: `src/lib/plugins/` or equivalent
### Output Template
```
src/lib/plugins/
types.ts # All plugin interfaces
registry.ts # Map-based registry + register/get functions
index.ts # initializePlugins() + re-exports
<category>/
<provider>.ts # Concrete plugin implementations
```
## Resources
| Resource | Type | Description |
|----------|------|-------------|
| `resources/plugin-patterns.md` | reference | Full TypeScript code patterns for interfaces, registry, and initialization |
## Handoff
When this skill completes:
- **Next agent**: None (terminal skill)
- **Artifact produced**: Plugin system files ready for integration
- **User instruction**: "Register your first plugin in the config file and test with `initializePlugins()`"
## Platform Notes
| Platform | Notes |
|----------|-------|
| Claude Code | Full file creation and editing support |Related Skills
systematic-debugging
Four-phase debugging framework that ensures root cause investigation before attempting fixes. Never jump to solutions. Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
Claude Plugin Archetype
> Scaffold a complete Claude Code plugin with MCP server, slash commands, agent definitions, and auto-activating skills.
YAML Prompt Library
> Store reusable AI prompts as YAML files with structured messages, variables, and test data for version-controlled prompt engineering.
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
Writing Plans — TDD-Sized Task Breakdown
> **Type:** Rigid process (follow structure exactly)
wireframing
Wireframing patterns including layout grids, content blocks, responsive breakpoints, and page layout patterns for landing pages, dashboards, and forms. Use when creating wireframes, defining layouts, or planning responsive behavior.
windows-registry-editor
Expert Windows Registry editor and optimizer via PowerShell. Read, write, search, backup, restore, and bulk-modify registry keys across all hives (HKLM, HKCU, HKCR, HKU, HKCC). Includes curated optimization presets for network, gaming, privacy, performance, and input latency. Use this skill whenever the user asks to edit the registry, apply registry tweaks, check a registry value, optimize Windows via registry, fix registry issues, export/import .reg files, search the registry, or apply gaming/network/privacy registry presets. Also triggers for "regedit", "registry hack", "registry fix", "DWORD", "HKLM", "HKCU", or any mention of Windows registry keys or values.
windows-network-optimizer
Diagnose, optimize, and verify Windows 11 network and system performance via PowerShell. Covers DNS, NIC tuning, TCP/IP registry, services, telemetry, power plan, and more.
windows-error-debugger
Diagnose, debug, and fix Windows crashes, BSODs, driver failures, and system errors via PowerShell. Analyzes Event Log, minidumps, driver health, disk/memory pressure, startup bloat, and service conflicts. Builds a growing knowledge base of resolved issues per machine. Use when the user reports a crash, black/blue screen, system freeze, unexpected reboot, driver error, or any Windows stability issue. Also triggers for "BSOD", "blue screen", "black screen", "crash", "system error", "bugcheck", "minidump", "driver failure", "unexpected shutdown", "paging file too small", "system hang", "Windows froze", "PC crashed", "kernel error", or any mention of Windows Event Log errors.
White-Label Config
> Transform any application into a customizable, self-hostable product with typed configuration, feature flags, and runtime env overrides.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
web-design-guidelines
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".