Skip to content
Development
Skill

/nw-code-analysis-port

KNOWLEDGE — resolve code facts (who-calls-X / where-defined-or-read / call-graph / change-scope / file-atoms) through the vendor-neutral CLI `code-fact`, degrading LOUD through bundled adapters (AST, TextSearch). Trigger: any time an agent designs, writes, analyzes, or reviews

From plugin
nwave
635183 skills37 agents

Claude Code

$ npx -y skills add nWave-ai/nWave --skill nw-code-analysis-port --agent claude-code

SKILL.md

nw-code-analysis-port.SKILL.md
name: nw-code-analysis-port
description: "KNOWLEDGE — resolve code facts (who-calls-X / where-defined-or-read / call-graph / change-scope / file-atoms) through the vendor-neutral CLI `code-fact`, degrading LOUD through bundled adapters (AST, TextSearch). Trigger: any time an agent designs, writes, analyzes, or reviews code or tests and needs a structural code fact."
user-invocable: false

nw-code-analysis-port (KNOWLEDGE)

**Kind**: KNOWLEDGE (reference / discipline). Consulted whenever you need a fact about code. No forced sequence — load it, obey the resolution rule.

TRIGGER

Any time you design, write, analyze, or review code or tests and need a code fact — who calls X, where Y is defined or read, the call graph, the blast-radius of a change, or what a file contains — resolve it **through the vendor-neutral `code-fact` CLI**, not ad-hoc grep.

Public CLI — available now

The five-capability public stable core is wrapped in the production CLI:

code-fact query.callers-of SYMBOL --root ROOT
code-fact query.reads-of SYMBOL --root ROOT
code-fact query.never-wired SYMBOL --root ROOT
code-fact query.atoms-in-file --root FILE_OR_ROOT
code-fact query.adr-section ANCHOR --root ROOT

The CLI returns JSON: `{ provider, confidence, payload, index, coverage, trace }`. Agents consume that envelope and degrade LOUD; they never probe/install/select an analyzer themselves. `code-fact refresh --root ROOT` is the one explicit way to regenerate the index (see "Index snapshot, coverage and refresh").

The resolution rule (one order, every time)

The CLI delegates to the best available bundled adapter. You report the answer tagged with which adapter answered.

The chain is walked top-down, highest declared precision first; the first provider covering the capability answers. The query's `trace` names the answering provider and scope. Do not duplicate a provider ranking in prose or infer precision from a familiar module name. What is stable, and all a consumer needs:

  • AST gives `approx` confidence (structural, per-language) on any parseable target.
  • grep / lexical search is the **last resort**, never the default. Reach for it only when AST cannot answer.

DEGRADE-LOUD (never silent)

  • Always state which adapter answered and at what confidence: `approx` | `binding-resolved` | `noisy`.
  • If the answer came from **TextSearch (grep)**, announce the degradation AND its limits. Example: "AST unavailable → grep fallback (`noisy`): may include false positives, miss dynamic/indirect references, and conflate same-named symbols."
  • Never silently let grep stand in for the port. A `noisy` answer presented as fact is the failure mode this skill exists to prevent.
  • The CLI's `trace` array names which provider answered and its scan-scope honesty (`complete` | `filtered` | `unfiltered`) — that per-query record is the loud announcement a gate reads.

Operations quick-reference (question → CLI command)

| Code fact you need | CLI command | Stable | |--------------------|-------------|--------| | Who calls X? | `code-fact query.callers-of SYMBOL --root ROOT` | yes | | Where is Y read / referenced? | `code-fact query.reads-of SYMBOL --root ROOT` | yes | | Is this symbol defined-but-never-wired/used? | `code-fact query.never-wired SYMBOL --root ROOT` | yes | | What atoms (defs/symbols) does this file contain? | `code-fact query.atoms-in-file --root FILE_OR_ROOT` | yes | | What does an ADR / design-prose section say? | `code-fact query.adr-section ANCHOR --root ROOT` | yes | | Call graph / change-scope / scope-delta | **unsupported by stable CLI** — use bounded stable queries + manual inspection with explicit limitation note | no |

The five stable-core capabilities answer on any UTF-8 repository, including repositories without Python: textsearch supplies the lexical floor at `noisy` confidence. A capability with no covering adapter returns no answer (none faked), records the honest failure in `trace`, and the work proceeds — do NOT substitute grep and call it the same fact.

Index snapshot, coverage and refresh

A query never writes a file and never regenerates anything. Every answer states where it was read from and what that source covers:

  • `index` is `{ "kind": "present", graph_sha256, manifest_sha256, indexed_files }` when a paired code index answered, or `{ "kind": "live-source" }` when the answer was read from live sources (no index, or an index no refresh has paired).
  • `coverage` is `{ missing, stale, empty_unindexed }`: non-empty files in scope the index never recorded, files whose recorded modification time differs from the live one, and 0-byte files absent from the index. The lists are complete and sorted, matched by exact path (never by a shared file name). An empty unindexed file is reported but never makes an answer indeterminate.
  • When the index claims a capability and `missing` or `stale` is non-empty, the CLI prints `{ "resolution": "indeterminate", uncovered, index, coverage, trace }` and exits 1. `uncovered` is exactly `missing` plus `stale`. No lower tier answers in its place. Do NOT treat it as an answer, and do NOT treat an empty result as "none": say which files are uncovered.
  • To regenerate the index, run `code-fact refresh --root ROOT`. It prints `{ "refresh": "refreshed", index, coverage }` and exits 0; `refused` (index unchanged) or `indeterminate` (naming the changed index files) exit 1 with a reason. It is the only command that regenerates, it needs the indexing tool on PATH, and refuses without it.

Invocation — how to use the CLI

For ANY structural code fact, call the CLI directly:

1. **Stable-core queries** — use `code-fact query.<capability>` with the exact form above.

  • The CLI parses JSON and emits it; consume the `provider`, `confidence`, and `payload` fields.
  • Inspect `trace` for the answering provider + scan-scope honesty (AST unavailable → TextSearch fallback).

2. **Beyond the five capabilities** — feature-level change-scope / ca

Read more
@nwave-ai
Ships withnwave

nWave supplies specialist roles and a host-led delivery workflow for software teams.

635183 skills37 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
635
Star history of nWave-ai/nWave on GitHub, a chart by star-history.com

Other skills on nwave.

nw-ab-agent-template

nw-ab-agent-template

KNOWLEDGE — the canonical agent-spec template (frontmatter + body skeleton). Reference loaded by the create/migrate procedures;…

@nwave-ai@nwave-aiInstall Skill
nw-ab-anti-patterns

nw-ab-anti-patterns

KNOWLEDGE — agent/skill/command anti-pattern catalog with fixes. Reference scanned by validate-spec; no sequence.

@nwave-ai@nwave-aiInstall Skill
nw-ab-create-agent

nw-ab-create-agent

PROCEDURE — create a NEW agent via the 5-phase workflow (ANALYZE→DESIGN→CREATE→VALIDATE→REFINE). Trigger: build a new AI agent.…

@nwave-ai@nwave-aiInstall Skill
nw-ab-examples

nw-ab-examples

KNOWLEDGE — canonical worked examples for agent creation, migration, and command optimization. Reference for the relevant…

@nwave-ai@nwave-aiInstall Skill
nw-ab-house-style

nw-ab-house-style

KNOWLEDGE — caveman-native authoring house style + by-construction guarantees (Reasoning Mandate injection, measured-gain…

@nwave-ai@nwave-aiInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills13d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react4d252k
@facebook@facebookInstall Skill

Questions about nw-code-analysis-port.

Which coding agents can use nw-code-analysis-port?
nw-code-analysis-port installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.