Plugin Discovery Engine (discovery/index.js)

agentsys · dev-tools, discovery, filesystem, plugins, cache, automation

Scans the repository using convention‑based paths to auto‑discover plugins, commands, agents, and skills with caching for fast lookups.

// Source: https://github.com/mperkins0155/agentsys | License: MIT | Copyright 2026 Avi Fenesh
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Plugin Discovery Module
 *
 * Convention-based filesystem scanning to discover plugins, commands,
 * agents, and skills. Replaces all hardcoded registration lists.
 *
 * Convention:
 * - plugins/<name>/.claude-plugin/plugin.json -> plugin
 * - plugins/<name>/commands/*.md -> commands
 * - plugins/<name>/agents/*.md -> agents
 * - plugins/<name>/skills/<skill>/SKILL.md -> skills
 *
 * @module discovery
 * @author Avi Fenesh
 * @license MIT
 */

const fs = require('fs');
const path = require('path');

// Module-level cache
let _cache = null;
let _cacheRoot = null;

/**
 * Parse YAML frontmatter from a markdown file's content.
 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key