agentsclimarketplace

Plugin dependency resolver

Skill a5c-ai/babysitter/library/specializations/cli-mcp-development/skills/plugin-dependency-resolver

Generate plugin dependency resolution logic with topological sorting.From its SKILL.md

Install
npx -y skills add a5c-ai/babysitter --skill plugin-dependency-resolver

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

1.6 KB, 289 tokens by cl100k_base, as published. Nobody here has run it

Plugin Dependency Resolver

Generate plugin dependency resolution logic.

Generated Patterns

interface PluginNode {
  name: string;
  dependencies: string[];
}

export function resolveDependencies(plugins: PluginNode[]): string[] {
  const graph = new Map<string, string[]>();
  const inDegree = new Map<string, number>();

  for (const plugin of plugins) {
    graph.set(plugin.name, plugin.dependencies);
    inDegree.set(plugin.name, 0);
  }

  for (const [, deps] of graph) {
    for (const dep of deps) {
      inDegree.set(dep, (inDegree.get(dep) || 0) + 1);
    }
  }

  const queue = [...inDegree.entries()].filter(([, d]) => d === 0).map(([n]) => n);
  const result: string[] = [];

  while (queue.length > 0) {
    const node = queue.shift()!;
    result.push(node);
    for (const dep of graph.get(node) || []) {
      inDegree.set(dep, inDegree.get(dep)! - 1);
      if (inDegree.get(dep) === 0) queue.push(dep);
    }
  }

  if (result.length !== plugins.length) {
    throw new Error('Circular dependency detected');
  }

  return result.reverse();
}

Target Processes

  • plugin-architecture-implementation

What ships with it: 1 file

174 B alongside SKILL.md

Keep looking

Skills are one crate of 326,059. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.