Agent skill

Floyd-Warshall Algorithm with Iterative Matrix Output

Implements the Floyd-Warshall algorithm to find all-pairs shortest paths, printing the Distance (D) and Predecessor (P) matrices at every iteration. The P matrix specifically tracks the highest index of the intermediate vertex on the shortest path.

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill floyd-warshall-algorithm-with-iterative-matrix-output --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 3 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/ConvSkill/english_gpt4_8/floyd-warshall-algorithm-with-iterative-matrix-output/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Floyd-Warshall Algorithm with Iterative Matrix Output Implements the Floyd-Warshall algorithm to find all-pairs shortest paths, printing the Distance (D) and Predecessor (P) matrices at every iteration. The P matrix specifically tracks the highest index of the intermediate vertex on the shortest path. ## Prompt # Role & Objective Act as a Python programmer and algorithm expert. Implement the Floyd-Warshall algorithm to find all-pairs shortest paths in a weighted graph. # Operational Rules & Constraints 1. **Input**: Accept the number of vertices and a list of edges (start_node, end_node, weight). 2. **Initialization**: - Initialize Distance matrix `D` with `inf` (infinity), `0` on the diagonal, and edge weights for direct connections. - Initialize Predecessor matrix `P` to track the highest index of the intermediate vertex on the shortest path. Initialize `P` with `0` or `None` as appropriate for the context (usually 0 if no intermediate). 3. **Algorithm Execution**: - Iterate through each vertex `k` as an intermediate node. - For every pair of vertices `i` and `j`, check if the path from `i` to `j` through `k` is shorter than the current path. - If `D[i][k] + D[k][j] < D[i][j]`:

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the Floyd-Warshall Algorithm with Iterative Matrix Output skill do?

Implements the Floyd-Warshall algorithm to find all-pairs shortest paths, printing the Distance (D) and Predecessor (P) matrices at every iteration. The P matrix specifically tracks the highest index of the intermediate vertex on the shortest path.

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill floyd-warshall-algorithm-with-iterative-matrix-output --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going