structural-search

structural-search is a skill for Claude Code, Codex from NicoGenti/opencode-orchestrator-kit. It costs 38 tokens per session (348 once invoked), scanned A, original, MIT.

A read-only code search method that finds structural patterns such as function definitions, calls, and class usage. Unlike plain text search, it can match the shape of code even when names or formatting vary.

In plain words
What is it for?
Use it to locate function definitions, call sites, asynchronous functions, or classes in selected files without changing them.
Why use it?
It makes searches possible when looking for code relationships rather than exact words. It falls back to ordinary text search if the structural search tool is unavailable or unhelpful.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to locate function definitions, call sites, asynchronous functions, or classes in selected files without changing them.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nicogenti/opencode-orchestrator-kit/structural-search
Install

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.

Any agent
npx skills add NicoGenti/opencode-orchestrator-kit --skill structural-search
Clone the repo
git clone --depth 1 https://github.com/NicoGenti/opencode-orchestrator-kit

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for structural-search

README.md
[![agentmods](https://agentmods.dev/badge/skills/nicogenti/opencode-orchestrator-kit/structural-search/github.svg)](https://agentmods.dev/skills/nicogenti/opencode-orchestrator-kit/structural-search)
Your own site
<a href="https://agentmods.dev/skills/nicogenti/opencode-orchestrator-kit/structural-search"><img src="https://agentmods.dev/badge/skills/nicogenti/opencode-orchestrator-kit/structural-search/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.

agentmods 80×15 button for structural-search

Your own site · 80×15
<a href="https://agentmods.dev/skills/nicogenti/opencode-orchestrator-kit/structural-search"><img src="https://agentmods.dev/badge/skills/nicogenti/opencode-orchestrator-kit/structural-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 348 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.00348
Opus 5.5 $0.00015 $0.00139
Sonnet 5.5 $0.00008 $0.00070
Haiku 4.5 $0.00004 $0.00035

Measured yesterday against content hash 39ee6df14528, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

structural-search 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 yesterday.

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.

plugin/assets/skills/structural-search/SKILL.md · 33 lines

What it actually says

Structural Search (ast-grep, opt-in)

Use this skill when the explorer needs structural matches that plain rg cannot express well (e.g. "find all call sites of X", "find all async functions", "find classes implementing Y").

When to use

  • The question is about code structure, not plain text.
  • The sg (ast-grep) binary is available on PATH (sg --version or ast-grep --version).
  • CRG is absent or did not narrow the search enough.

Core patterns

  • Function definition: sg run -p 'function $NAME($$$ARGS) { $$$ }' (adjust per language).
  • Call site: sg run -p '$OBJ.$METHOD($$$ARGS)'.
  • Class usage: sg run -p 'new $CLASS($$$ARGS)'.

Always scope with --globs to the relevant file set (e.g. --globs 'src/**/*.ts') to keep output small.

Safety

  • Read-only: never use ast-grep to rewrite files (--rewrite is forbidden in this workflow).
  • If sg is missing or errors, fall back silently to rg + targeted reads.
  • Respect the explorer's bounded-read and output-contract rules.

Fallback

If structural search yields nothing useful within 2 attempts, revert to the standard rg → targeted-read ladder and note it in Not checked: if relevant.

Changes

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.

  1. yesterday First seen · 33 lines · 38 tokens per session scan A 39ee6df14528

Subscribe to this mod's changes

structural-search is a skill published in the GitHub repository NicoGenti/opencode-orchestrator-kit (8 stars, last pushed yesterday), licensed MIT. It adds 38 tokens to every session and 348 once invoked, about $0.0002 per session on Opus 5.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-10-24.

Related

Other skills, from other repositories

rust-check

Run cargo check on the current Rust project to find compile errors.

Hmbown/CodeWhale · 15 tokens

debug

Reproduce, minimize, localize, identify root cause, and distinguish diagnosis from an authorized fix. Prefer root-cause over symptom patches.

Hmbown/CodeWhale · 30 tokens

feedback

Skill "feedback" from Hmbown/Codewhale, covering feedback, when to use, setup, workflow and non-goals.

Hmbown/Codewhale · 0 tokens

cao-workflow

Author and run CAO Python workflow scripts — multi-step, parameterized, fan-out orchestrations executed by cao workflow run. Use when the user wants a repeatable multi-step job (e.g. data analysis over many files, a review pipeline, a parameterized batch). Authoring ends at a validated script file; running it is a…

awslabs/cli-agent-orchestrator · 79 tokens

cao-plugin

Create a new CAO (CLI Agent Orchestrator) plugin. Use this skill whenever the user wants to add a plugin that reacts to CAO lifecycle or messaging events, scaffold a plugin package, understand plugin requirements, or integrate an external system (Discord, Slack, dashboards, logging, metrics) with CAO. Also use when…

awslabs/cli-agent-orchestrator · 96 tokens

oversight-team

Use when you are a seat on the oversight pod (a standing monitor-mode rig that keeps OTHER rigs healthy), configuring or running the drift detectors, or choosing whether to intervene vs escalate. Covers the pull-not-poll posture, the v0 detectors (premature-park, process-drift, off-task, token-burn), the intervention…

mvschwarz/openrig · 117 tokens