Plugin Loader Generator
SkillDev toolsGenerate dynamic plugin loading system with discovery, validation, and lifecycle management.
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
Then ask your AI: use the Plugin Loader Generator skill
What this skill tells your AI
The instructions your AI receives, as published by a5c-ai/babysitter in library/specializations/cli-mcp-development/skills/plugin-loader-generator/SKILL.md and read by ahel’s review.
Generate dynamic plugin loading system.
Generated Patterns
import fs from 'fs';
import path from 'path';
interface Plugin {
name: string;
version: string;
init: () => Promise<void>;
destroy?: () => Promise<void>;
}
export class PluginLoader {
private plugins = new Map<string, Plugin>();
private pluginDirs: string[];
constructor(pluginDirs: string[]) {
this.pluginDirs = pluginDirs;
}
async discover(): Promise<string[]> {
const found: string[] = [];
for (const dir of this.pluginDirs) {
if (!fs.existsSync(dir)) continue;
const entries = fs.readdirSync(dir, { withFileTypes: true });
for (const entry of entries) {
if (entry.isDirectory()) {
const manifestPath = path.join(dir, entry.name, 'manifest.json');
if (fs.existsSync(manifestPath)) {
found.push(path.join(dir, entry.name));
}
}
}
}
return found;
}
async load(pluginPath: string): Promise<Plugin> {
const manifest = JSON.parse(fs.readFileSync(path.join(pluginPath, 'manifest.json'), 'utf-8'));
const module = await import(path.join(pluginPath, manifest.main));
const plugin: Plugin = { name: manifest.name, version: manifest.version, ...module };
await plugin.init();
this.plugins.set(plugin.name, plugin);
return plugin;
}
async unload(name: string): Promise<void> {
const plugin = this.plugins.get(name);
if (plugin?.destroy) await plugin.destroy();
this.plugins.delete(name);
}
}
Target Processes
- plugin-architecture-implementation
- cli-application-bootstrap
Signals
- GitHub stars
- 2k
- Forks
- 112
- Last commit
- Sep 2026
Advanced
- Item type
- skill
- Key
plugin-loader-generator- Source
- github.com/a5c-ai/babysitter
Related picks
setup-ts-deep-modules
Skill · mattpocock
The pick for TypeScripttypescript-pro
Skill · jeffallan
The pick for TypeScriptnodejs-backend-patterns
Skill · wshobson
The pick for Noderun-node-tests
Skill · hiroro-work
The pick for Nodeteach
Skill · mattpocock
More in Dev toolsponytail
Skill · dietrichgebert
More in Dev tools
Skill · mattpocock
The pick for TypeScripttypescript-pro
Skill · jeffallan
The pick for TypeScriptnodejs-backend-patterns
Skill · wshobson
The pick for Noderun-node-tests
Skill · hiroro-work
The pick for Nodeteach
Skill · mattpocock
More in Dev toolsponytail
Skill · dietrichgebert
More in Dev tools