gitnexus-pdg-query

Query control and data-dependence edges in GitNexus using pdg_query.

Updated Jun 2, 2026
One-click install
npx skills add https://github.com/FlexNetOS/envctl --skill gitnexus-pdg-query-flexnetos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gitnexus-pdg-query
Source: https://github.com/FlexNetOS/envctl/tree/main/home/.claude/skills/gitnexus-pdg-query
Command: npx skills add https://github.com/FlexNetOS/envctl --skill gitnexus-pdg-query-flexnetos

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill allows you to query and extend the PDG control/data-dependence surface in GitNexus, helping you understand "what controls X" and "where does Y flow."

Core Features & Use Cases

  • PDG Query: Execute pdg_query for control/data-dependence queries and reasoning.
  • Guard Clause Discovery: Identify early-return guards in the code.
  • CDG and REACHING_DEF Edges: Analyze CDG and REACHING_DEF edges for data dependence and control flow.
  • Use Case: Use this Skill to trace a variable within a function and understand why a pdg_query result might be empty.

Quick Start

Run the 'gitnexus-pdg-query' skill to query the control/data-dependence of a function.

Frequently Asked Questions about gitnexus-pdg-query

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

FAQPage Schema
How do I query control and data dependence in a codebase?

To query control and data dependence, you execute a pdg_query against your codebase to analyze CDG edges for control flow and REACHING_DEF edges for data flow. This identifies what controls a statement and where variables flow.

Why does my data flow query return empty results?

A data flow query might return empty if PDG layers are not enabled in your GitNexus codebase, or the target variable lacks REACHING_DEF edges. You can use this Skill to trace the variable within the function and understand why the pdg_query result is empty.

How do I find guard clauses and early returns using control flow analysis?

Control flow analysis finds guard clauses by querying CDG edges to identify early-return guards in your code. This reveals which conditions control the execution path leading to those early exits.

Do I need a specific environment setup to analyze data flow and control dependence?

Yes, you need a GitNexus codebase with PDG layers enabled to analyze data flow and control dependence. This environment provides the necessary CDG and REACHING_DEF edge surface for the pdg_query tool to function.

Can I trace a variable within a function to understand its data flow?

You can trace a variable within a function by running a pdg_query for REACHING_DEF edges to map its data flow. This allows you to see exactly where the variable is defined and how it reaches subsequent operations.

What is the difference between CDG and REACHING_DEF edges in code analysis?

In code analysis, CDG edges represent control dependence showing what conditions govern a statement, while REACHING_DEF edges represent data dependence showing variable definitions reaching subsequent uses, together providing full program dependence surface coverage.