gitnexus-cli
Use when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki,…
Use when querying or extending GitNexus's PDG control/data-dependence surface (the `pdg_query` MCP tool, CDG/REACHING_DEF edges), or reasoning about \"what controls X\" / \"where does Y flow\" / guard clauses. Examples: \"what guards this statement?\", \"trace this variable
Claude Code
$ npx -y skills add abhigyanpatwari/GitNexus --skill gitnexus-pdg-query --agent claude-code
Codex
$ npx skills add abhigyanpatwari/GitNexus --skill gitnexus-pdg-query -a codex -y
Cursor
$ npx skills add abhigyanpatwari/GitNexus --skill gitnexus-pdg-query -a cursor -y
Gemini CLI
$ npx skills add abhigyanpatwari/GitNexus --skill gitnexus-pdg-query -a gemini-cli -y
GitHub Copilot
$ npx skills add abhigyanpatwari/GitNexus --skill gitnexus-pdg-query -a github-copilot -y
OpenCode
$ npx skills add abhigyanpatwari/GitNexus --skill gitnexus-pdg-query -a opencode -y
Windsurf
$ npx skills add abhigyanpatwari/GitNexus --skill gitnexus-pdg-query -a windsurf -y
name: gitnexus-pdg-query description: "Use when querying or extending GitNexus's PDG control/data-dependence surface (the `pdg_query` MCP tool, CDG/REACHING_DEF edges), or reasoning about \"what controls X\" / \"where does Y flow\" / guard clauses. Examples: \"what guards this statement?\", \"trace this variable within the function\", \"why is the pdg_query result empty?\", \"add a CDG query\"."
Expert knowledge for the `pdg_query` MCP tool and the control/data-dependence edges it reads — the opt-in `--pdg` program-dependence layers. Read this before touching `gitnexus/src/mcp/local/local-backend.ts` (`_pdgQueryImpl`) or the `pdg_query` tool def, or when explaining a `pdg_query` result.
`pdg_query` runs **on** the same graph taint runs on. Each layer is opt-in behind `--pdg`; a default `analyze` run records none of them (byte-identical).
L1 CFG per-function basic blocks + control-flow edges (M1 #2081) L2 REACHING_DEF GEN/KILL def→use data dependence (pure solver) (M2 #2082) L5 CDG Ferrante control dependence (post-dominators) (M5 #2085)
All three are `BasicBlock → BasicBlock` edges in the single `CodeRelation` table (keyed by the `type` property). There is **no** `Function → BasicBlock` edge.
each edge: controlling predicate block → dependent block + branch sense in `reason` (`'T'` = predicate's true/taken arm, `'F'` = false/fall-through). An edge into an early-return/throw block is flagged `guard: true`.
edges; `variable` filters to one binding.
`target` is **required** — a file path or a symbol/function name (resolved like `context()`). There is no anchorless mode (see below).
The RFC #567 §2 form (`[:CDG {label:'F'}]`) does **not** run as written. Edges are values of the single `CodeRelation` table's `type` property, and the branch sense is in `reason`, NOT a `label` column:
MATCH (pred:BasicBlock)-[r:CodeRelation {type: 'CDG'}]->(dep:BasicBlock)
WHERE dep.text STARTS WITH 'return' OR dep.text STARTS WITH 'throw'
RETURN pred.startLine, r.reason AS branch, dep.startLine, dep.text`r.reason` is the sense the predicate took to reach the early exit. For `if (!ok) return;` the return rides the predicate's **true** arm (`'T'`) and the protected body rides the **false** arm (`'F'`) — polarity depends on the guard, so don't hard-code one sense.
an unanchored `[:CDG*]`/`[:REACHING_DEF*]` path scan is unbounded. `pdg_query` requires `target` and bounds the page; raw `cypher` callers must anchor on a file id-prefix or symbol span themselves.
the block is matched by its id-prefix (`BasicBlock:<file>:<fnStartLine>:…`) plus `startLine` within the symbol's span. BasicBlock `startLine` is **1-based** while the symbol node's `startLine`/`endLine` are **0-based**, so **both** bounds are shifted `+1` (`[symStart+1, symEnd+1]`): the upper `+1` keeps a guard/def/use on the function's **final line**, the lower `+1` excludes an adjacent function's block on the line directly **above**. Same-line / nested functions anchor coarsely.
`--pdg` the tool returns `{ results: [], note: "no PDG layer …" }` (cheap meta probe on `RepoMeta.pdg.maxCdgEdgesPerFunction` / `maxReachingDefEdgesPerFunction`).
conditions are not yet distinguished.
`_pdgQueryImpl` is the front half of `_explainImpl` (WAL wrapper, meta no-layer probe, limit validation, `resolveSymbolCandidates` anchoring) with CDG/ REACHING_DEF instead of TAINTED — and none of taint's path-codec / interproc `TAINT_PATH` machinery. Reuse those shared helpers; do not re-implement them.
GitNexus indexes a codebase into a knowledge graph of symbols, calls, dependencies and execution flows. Use it through your coding agent's MCP tools, the CLI, or a web graph explorer.
Use when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki,…
Use when the user is debugging a bug, tracing an error, or asking why something fails. Examples: \"Why is X failing?\", \"Where…
Use when the user asks how code works, wants to understand architecture, trace execution flows, or explore unfamiliar parts of…
Use when the user asks about GitNexus itself — available tools, how to query the knowledge graph, MCP resources, graph schema, or…
Use when the user wants to know what will break if they change something, or needs safety analysis before editing code. Examples:…
Use when the user wants the GitNexus engineering pipeline run end-to-end on a task: gitnexus-plan (plan depth chosen up front), a…
Query and invoke tools on MCP servers using fastmcp list and fastmcp call. Use when you need to discover what tools a server…
Design n8n AI agents the right way. Use when building or editing any @n8n/n8n-nodes-langchain.* AI node — an AI Agent, LLM chain,…
小红书内容发布技能。支持两种发布模式:(1) 上传图文模式 - 图片+短文;(2) 写长文模式 - 长篇文章+排版模板。 支持两种输入方式:用户提供完整内容和图片/图片URL,直接发布;或提供网页URL,自动提取内容和图片。…