dependency-graph-analysis
Build and reason about import graphs, call graphs, schema graphs, and service dependency graphs. Use when tracing paths, finding god nodes, surfacing cycles, or answering architecture questions about how parts connect.
What this skill does
# Dependency Graph Analysis ## Overview Use structural graphs when the real question is "how do these parts connect?" Dependency graphs help answer path, coupling, boundary, and architectural gravity questions that plain search cannot answer reliably. ## When to Use - Tracing how one module reaches another - Finding heavily coupled files or services - Identifying cycles and boundary leaks - Explaining imports, calls, schema references, or pipeline dependencies - Surfacing unexpected cross-cutting connections ## Graph Types ### Import Graph Nodes are files or packages. Edges are imports or requires. ### Call Graph Nodes are functions or methods. Edges are calls. ### Schema Graph Nodes are tables, models, or fields. Edges are references and joins. ### Service Graph Nodes are services or jobs. Edges are network calls, events, or queue handoffs. ## Process ### Step 1: Define Nodes and Edges Explicitly Before analyzing, decide: - What counts as a node? - What counts as an edge? - Is direction meaningful? - Are external dependencies included or collapsed? Mixing edge semantics makes the graph misleading. ### Step 2: Build the Smallest Useful Graph Start from the question: - "Why does auth touch billing?" - "How does request data reach persistence?" - "Which modules sit at the center of this feature?" Scope the graph to the relevant subsystem first. ### Step 3: Run Structural Checks Look for: - High in-degree: shared utilities or choke points - High out-degree: coordinators or god objects - High betweenness: bridges between subsystems - Cycles: tangled boundaries - Isolated islands: dead code or disconnected ownership ### Step 4: Trace Paths For architecture questions, path tracing is often more useful than global stats: - Shortest path between two nodes - All incoming paths to a risky module - Outgoing fan-out from a controller or service ### Step 5: Surface Architectural Findings Summarize findings in actionable language: - God nodes - Surprise edges - Boundary violations - Missing seams for testing - Refactor candidates ## Heuristics | Signal | Typical Meaning | |---|---| | Very high out-degree | coordinator, god object, orchestration hotspot | | Very high in-degree | shared dependency, utility choke point | | High betweenness | bridge, hidden coupling, migration risk | | Strong cycles | boundary leak, layered architecture failure | | Surprise edge | cross-domain dependency worth review | ## Example Questions - "What path connects the login route to token persistence?" - "Which modules are hardest to change without ripple effects?" - "Why does this small UI change touch backend files?" - "What sits at the center of this subsystem?" ## Common Rationalizations | Rationalization | Reality | |---|---| | "Search results are enough" | Search finds mentions, not actual structural paths. | | "Only cycles matter" | High-centrality nodes can be just as risky as cycles. | | "One huge graph is best" | Subsystem-scoped graphs are easier to trust and act on. | ## Verification - [ ] Node and edge semantics are clearly defined - [ ] Graph scope matches the question being answered - [ ] Paths or centrality measures support the conclusion - [ ] Findings are translated into concrete architectural risks or actions - [ ] Any surprise edges are validated against source evidence ## Anti-Rationalization Table | Excuse | Counter | |--------|---------| | "Search results are enough" | Search finds mentions, not actual structural paths. Graphs show real connections. | | "Only cycles matter" | High-centrality nodes can be just as risky as cycles. Check all structural signals. | | "One huge graph is best" | Subsystem-scoped graphs are easier to trust and act on. Start small. | | "I can eyeball the dependencies" | Human intuition misses indirect paths. Graph analysis reveals hidden coupling. | | "The graph is too complex to analyze" | Complexity is exactly why the graph is needed. Break it into subsystems. |
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.