td-network-cleanup

Installation
SKILL.md

Cleanup

Organize operator networks into clean, readable layouts. Only moves, resizes, colors, and annotates — never creates functional operators or changes parameters.

Process

  1. Load td-node-layout skill — required for spacing, padding formulas, and containment checks. Do not skip this step
  2. Survey — list_operators(path, depth=2) for positions, sizes, overlaps, and existing annotations. Use get_connections(path, graph=true) for full signal flow topology in execution order
  3. Delete old annotations — destroy any existing annotateCOMP ops before reorganizing
  4. Plan layout — identify functional groups, chains, parallel branches. Independent groups go side-by-side when they have similar vertical extent (saves space vs stacking). Use actual nodeWidth/nodeHeight to compute bounding boxes. Replace long cross-network wires with selectCHOP chop parameter references — especially for merge inputs and fan-out patterns
  5. Apply layout — use reposition_operators to batch-move operators (see Positioning below)
  6. Check vertical spacing — ensure enough Y gap between groups for annotation headers (60px top padding) + 20px gap between annotations. If groups are too close, move ops down before annotating
  7. Compute annotation bounds — for each group, find min/max X/Y from actual operator positions + sizes, then add padding (25px sides/bottom, 60px top). Don't guess dimensions — calculate them
  8. Add annotations — annotation(parent_path=..., comment=...) around every functional group. All groups get annotated, not just complex ones
  9. Verify containment — for each annotation, confirm all ops in the group satisfy: op.nodeY >= ann.nodeY + 25 (bottom padding) and op.nodeY + op.nodeHeight <= ann.nodeY + ann.nodeHeight - 60 (60px top padding = 25px content gap + ~35px header). If any op fails, fix the annotation or move the op
  10. Verify no annotation overlaps — check that no two annotations share any area. For each pair: ann1.nodeY + ann1.nodeHeight + 20 <= ann2.nodeY (vertically stacked) or ann1.nodeX + ann1.nodeWidth + 20 <= ann2.nodeX (side by side). Fix before proceeding
  11. Apply colors — only for special patterns (see Operator Colors below). Do not color by family
  12. Final verify — list_operators one more time. Check for: ops overlapping annotation headers, excessive margins, misaligned annotations, backward wires. Fix anything found. Repeat until clean
Installs
2
GitHub Stars
32
First Seen
Oct 8, 2026