Irule dataflow

From bitwisecook/tcl-lsp · View interactive version

Irule dataflow is an AI agent skill from the GitHub repository bitwisecook/tcl-lsp. Analyse and visualise data flow in an iRule or Tcl file. Extracts def-use chains, memory aliases, and data-flow edges from the compiler SSA, then generates a Mermaid diagram showing how variables flow through the program. Use when analysing iRule data flow, visualising Tcl variable usage, debugging

How to use this skill

Skill file

Data Flow Analysis

Steps

  1. Read the file.
  2. Call mcp__tcl-lsp__def_use_chains and mcp__tcl-lsp__memory_aliases

with the contents as source. On a tool error report it and suggest

fixes.

  1. Draw the diagram and write the analysis.

Mermaid rules

{{alias}} hexagons for upvar/global aliases

aliases; lattice values (CONST / OVERDEFINED) and inferred types on

definition nodes where known

Output

The diagram in a ```mermaid fence, then: variable flow summary, dead

definitions (optimisation opportunities), alias relationships, phi merge

points, and potential issues (uninitialised reads, unnecessary stores, alias

confusion).

$ARGUMENTS

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.