pr-dependency-topo-sort

Topologically sort pull request identifiers using a dependency graph.

3|2|Updated May 12, 2026
One-click install
npx skills add https://github.com/kriscendobot/garden --skill pr-dependency-topo-sort
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-dependency-topo-sort
Source: https://github.com/kriscendobot/garden/tree/main/skills/pr-dependency-topo-sort
Command: npx skills add https://github.com/kriscendobot/garden --skill pr-dependency-topo-sort

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill resolves the ambiguity of ordering pull requests that have inter-dependencies, ensuring that blocked PRs are never rendered before their blockers.

Core Features & Use Cases

  • Topological Ordering: Uses Kahn's algorithm to produce a deterministic, stable sort of PRs based on a dependency graph.
  • Cycle Detection: Automatically identifies and surfaces circular dependencies as registry errors rather than silent failures.
  • Use Case: When generating a roadmap or a pending-review bulletin, use this skill to ensure the list of PRs is presented in a logical, dependency-aware sequence.

Quick Start

Use the pr-dependency-topo-sort skill to order the current list of PRs based on the provided dependency graph.

Frequently Asked Questions about pr-dependency-topo-sort

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sort a list of pull requests based on their dependency graph?

To sort pull requests based on their dependency graph, apply a stable topological sort algorithm to ensure blocked PRs are never rendered before their blockers. It uses Kahn's algorithm to produce a deterministic, dependency-aware sequence.

What happens when circular dependencies exist in a PR dependency graph?

When circular dependencies exist in a PR dependency graph, the topological sort automatically identifies them and surfaces the cycles as registry errors rather than failing silently during the ordering process.

How do I generate a deterministic roadmap for pull requests with inter-dependencies?

To generate a deterministic roadmap for pull requests with inter-dependencies, run a topological sort with deterministic tie-breaking rules. This provides consistent output, ensuring the PR list respects all dependency constraints.

Does the topological sort require a specific format for the dependency graph input?

Yes, the topological sort requires a valid dependency graph input to process the pull request identifiers. You must provide a structured graph representing the PR dependencies before executing the sort.

Why does my PR ordering change when regenerating a pending-review bulletin?

PR ordering may change during bulletin regeneration if the sorting algorithm lacks deterministic tie-breaking. Using a stable topological sort ensures consistent output by applying fixed tie-breaking rules to the dependency graph.