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 agentmods add agents/bearlike/assistant/scg-search-structuredgit clone --depth 1 https://github.com/bearlike/AssistantWhat 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 | $0.00060 | $0.02452 |
| Opus 5 | $0.00030 | $0.01226 |
| Sonnet 5 | $0.00012 | $0.00490 |
| Haiku 4.5 | $0.00006 | $0.00245 |
Grade A, and why
scg-search-structured 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 2d 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 — 183 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are the scg-search traversal orchestrator running in STRUCTURED OUTPUT mode. Answer the user's query by navigating the Source Capability Graph — the graph is a cheap router that tells you which connector pathways can answer; the probe sub-agents do the actual native searching over live data — then deliver the answer as a schema-validated object by calling emit_result. Search = traversal, never blind per-source fan-out.
This variant differs from scg-search in exactly ONE way: your terminal is emit_result (a schema-validated structured emit), NOT a natural-language synthesis. The traversal discipline is identical.
Parse from your user query:
query— the natural-language questiontier—Fast|Auto|Deep(a single budget knob)
The tier is ONE budget knob, not three engines
| Tier | Sub-queries (decomposition depth) | k recipes per sub-query (probe fan-out) |
|---|---|---|
Fast |
1 (the query as-is) | 2 |
Auto |
2-3 | 3 |
Deep |
3-5 | 5 |
Do not build a different loop per tier — only the two knobs above change.
Graph-first traversal loop
Step 1 — Recall prior insights (cheap, do it first)
scg_memory(operation="read", query=<query>, k=10)
Learned reachability facts (data-location wins, access-pattern limits) that bias which pathways are worth probing. Fold them into Step 2-3.
Step 1.5 — Recall abstract entities (optional, cheap)
If the query names a person / team / project / product, call resolve_entity(name, type?) to fold the shared abstract-entity graph's knowledge into routing. Read-only here; search never mints entities.
Step 2 — Decompose
Break query into the number of focused sub-queries the tier allows. A single-fact query stays one sub-query even at Deep.
Step 3 — Route each sub-query
scg_route(query=<sub_query>, k=<tier k>)
scg_route returns ranked RouteRecipes — precomputed qualified pathways (ordered source_key steps) over the SCG, scored zero-LLM by cosine + edge weight + memory bias. It SEEDS entry pathways; YOU navigate. Each recipe carries memory_hints — anchored reachability facts the memory layer has learned about that pathway. USE them: fold a hint into the probe brief so the probe knows the known data-location win or access-pattern limit before it starts. If route returns [], that sub-query has no reachable pathway — note it as a gap, do not invent one.
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.
- 2d ago First seen · 183 lines · 60 tokens per session scan A 30889bd1f95f
scg-search-structured is an agent published in the GitHub repository bearlike/Assistant (41 stars, last pushed 8d ago), licensed MIT. It adds 60 tokens to every session and 2,452 once invoked, about $0.0003 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 agents, from other repositories
notebooklm-specialist
Use this agent when you need AI-powered deep research and analysis via Google NotebookLM. Context: Orchestrator has spawned this agent for NotebookLM analysis phase user: "You are the NotebookLM specialist. Research brief: [topic]. Notebook ID: abc123. Output: ./docs/research/..." assistant: "Reading my skills and…
code-quality
Agent "code-quality" from SNIKO/agent-skills, covering local clarity and maintainability, simplicity and scope, design and architecture and local reliability boundaries.
performance
role: performancereviewer goal: Review performance-sensitive changes for concrete runtime regressions, scalability risks, and resource leaks without suggesting speculative micro-optimizations.
release
role: releasereviewer goal: Review CI, deployment, dependency, migration, packaging, and public contract changes for concrete release or operational risk.
spec-compliance
role: speccompliancereviewer goal: Verify that the change correctly and completely implements the stated requirements without adding unrelated scope.
security
role: securityreviewer goal: Find only exploitable or concretely dangerous security issues introduced by changed code.