Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add Haaaiawd/ANWS --skill nexus-querygit clone --depth 1 https://github.com/Haaaiawd/ANWSWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/haaaiawd/anws/nexus-query)<a href="https://agentmods.dev/skills/haaaiawd/anws/nexus-query"><img src="https://agentmods.dev/badge/skills/haaaiawd/anws/nexus-query/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/haaaiawd/anws/nexus-query"><img src="https://agentmods.dev/badge/skills/haaaiawd/anws/nexus-query.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00119 | $0.01483 |
| Opus 5 | $0.00060 | $0.00741 |
| Sonnet 5 | $0.00024 | $0.00297 |
| Haiku 4.5 | $0.00012 | $0.00148 |
Grade A, and why
nexus-query scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.
nexus-query — 代码结构精准查询
何时调用
| 场景 | 调用 |
|---|---|
| 「这个文件有哪些类/方法,依赖什么」 | 是 |
| 「改这个接口/模块,哪些文件受影响」 | 是 |
| 「这个改动的影响半径是多大」 | 是 |
| 「项目里谁是真正的核心依赖节点」 | 是 |
| 「整个项目大概分哪几块」 | 是 |
用户希望生成完整的 .nexus-map/ 知识库 |
否 → 改用 nexus-mapper |
| 运行环境无 shell 执行能力 | 否 |
| 宿主机无本地 Python 3.10+ | 否 |
前提:确保 ast_nodes.json 可用
进入查询前 → 检查是否有 ast_nodes.json
├── 有(.nexus-map/raw/ast_nodes.json 或用户指定路径)→ 直接查询
└── 没有 → 运行 extract_ast.py 生成 → 再查询
# 默认路径(和 nexus-mapper 的 .nexus-map/ 兼容,可互通)
AST_JSON="$repo_path/.nexus-map/raw/ast_nodes.json"
GIT_JSON="$repo_path/.nexus-map/raw/git_stats.json" # 可选
# 若 ast_nodes.json 不存在,先创建目录再生成(约数秒)
mkdir -p "$repo_path/.nexus-map/raw"
python $SKILL_DIR/scripts/extract_ast.py $repo_path > $AST_JSON
# 若需要 git 风险数据(可选,仅在存在 .git 时)
python $SKILL_DIR/scripts/git_detective.py $repo_path --days 90 > $GIT_JSON
$SKILL_DIR为本 Skill 的安装路径(通常是.agents/skills/nexus-query,投影到目标 IDE 时以该目标的 skills 目录为准)。
依赖安装(首次使用):
pip install -r $SKILL_DIR/scripts/requirements.txt
五个查询模式
# 文件骨架:类、方法、行号、import 清单
python $SKILL_DIR/scripts/query_graph.py $AST_JSON --file <path>
python $SKILL_DIR/scripts/query_graph.py $AST_JSON --file <path> --git-stats $GIT_JSON
# 反向依赖:谁 import 了这个模块(区分源码文件和测试文件)
python $SKILL_DIR/scripts/query_graph.py $AST_JSON --who-imports <module_or_path>
# 影响半径:上游依赖 + 下游被依赖(X upstream, Y downstream)
python $SKILL_DIR/scripts/query_graph.py $AST_JSON --impact <path>
python $SKILL_DIR/scripts/query_graph.py $AST_JSON --impact <path> --git-stats $GIT_JSON
# 全仓库核心节点:按扇入(被引用最多)和扇出(引用最多)排序
python $SKILL_DIR/scripts/query_graph.py $AST_JSON --hub-analysis [--top N]
# 按顶层目录聚合结构摘要
python $SKILL_DIR/scripts/query_graph.py $AST_JSON --summary
各模式核心价值
| 模式 | 一句话价值 | 典型触发时机 |
|---|---|---|
--file |
不读源码也能掌握文件骨架,精确到行号 | 接手大型模块前;Bug 调查缩小读取区间 |
--who-imports |
改接口前的"炸弹清单"——列出所有调用方 | 删函数/改签名/重命名类之前,必须跑 |
--impact |
0 upstream, 24 downstream 一眼看清改动范围 |
Sprint 估时;评估修改是局部手术还是全局手术 |
--hub-analysis |
找出真正的高耦合核心,不靠目录名猜 | 架构评审;技术债优先级排序 |
--summary |
5 秒建立全局分层认知,比 README 更客观 | 初次接触项目;识别循环依赖风险区域 |
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 115 lines · 119 tokens per session scan A 9ab35d70df65
nexus-query is a skill published in the GitHub repository Haaaiawd/ANWS (142 stars, last pushed 3mo ago), licensed MIT. It adds 119 tokens to every session and 1,483 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
reviewer
Get a second-opinion review from Google's Antigravity CLI (agy staffer, fast Gemini) - of code (a diff, PR, working tree) or of a decision, plan, or design. Use when the user says /agy:reviewer, "have agy review this", "second opinion on my diff/PR/plan", or after finishing work and wanting an independent verifier…
owasp-reviewer-prompt
A paranoid OWASP-Top-10-aware system prompt for AI code review that traces data flow, treats every input as malicious, maps each finding to an OWASP category, and outputs a structured Summary / Findings / Severity / Score block reviewers can act on.
tribunal
Runs a doer -> verifier-panel -> consensus loop to verify a deliverable before it ships. An orchestrator freezes acceptance criteria before implementation, dispatches a doer, then convenes a context-walled panel of independent verifiers - including an adversary with an explicit must-oppose mandate - for…
agy-reviewer
Get a second-opinion review from Google's Antigravity CLI (agy staffer, fast Gemini) - of code (a diff, PR, working tree) or of a decision, plan, or design. Use when the user says /skill:agy-reviewer, "have agy review this", "second opinion on my diff/PR/plan", or after finishing work and wanting an independent…
tldr-review
Ultra-compressed code review comments. Cuts noise from PR feedback while preserving the actionable signal. Each comment is one line: location, problem, fix. Use when user says "review this PR", "code review", "review the diff", "/review", or invokes /tldr-review. Auto-triggers when reviewing pull requests.
speckit.analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.