wile-goast: Skill for Claude Code

.claude/skills/goast-semiring-queries/SKILL.md

goast-semiring-queries is a skill for Claude Code from aalpar/wile-goast. It costs 94 tokens per session (2,864 once invoked), scanned A, original, Apache-2.0.

A way to answer relationship questions about a Go program's call graph, which shows which functions can call other functions. It uses different mathematical rules to find reachable paths, shortest or cheapest paths, counts, and recursive relationships.

In plain words
What is it for?
Checking whether one function can reach another, measuring the impact of changing a function, finding paths that include or avoid a function, counting call paths, and detecting direct or mutual recursion.
Why use it?
It avoids writing a new graph traversal for every question and helps choose an analysis method based on whether you need a yes/no answer, a cost, or a count.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is aalpar/wile-goast's own configuration. It tells Claude Code how to work on wile-goast itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything wile-goast configures →

Reuse

Borrowing it

Nothing to install: this file belongs to aalpar/wile-goast. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/aalpar/wile-goast/master/.claude/skills/goast-semiring-queries/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/aalpar/wile-goast

Made for: Claude Code.

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 goast-semiring-queries

README.md
[![agentmods](https://agentmods.dev/badge/skills/aalpar/wile-goast/goast-semiring-queries/github.svg)](https://agentmods.dev/skills/aalpar/wile-goast/goast-semiring-queries)
Your own site
<a href="https://agentmods.dev/skills/aalpar/wile-goast/goast-semiring-queries"><img src="https://agentmods.dev/badge/skills/aalpar/wile-goast/goast-semiring-queries/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 goast-semiring-queries

Your own site · 80×15
<a href="https://agentmods.dev/skills/aalpar/wile-goast/goast-semiring-queries"><img src="https://agentmods.dev/badge/skills/aalpar/wile-goast/goast-semiring-queries.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,864 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.00094 $0.02864
Opus 5 $0.00047 $0.01432
Sonnet 5 $0.00019 $0.00573
Haiku 4.5 $0.00009 $0.00286

Measured 11d ago against content hash e33d1a854d05, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

goast-semiring-queries 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 11d 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.

.claude/skills/goast-semiring-queries/SKILL.md · 283 lines

How it starts

The opening of the file, as written. The whole thing — 283 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Semiring queries over the Go call graph

A path question over a call graph is an algebra question. Pick the semiring and the query writes itself. Do not hand-roll a traversal.

Routing: derive the semiring in three lines

  1. What do you accumulate along a path? A yes/no, a cost, a count.
  2. What is ⊕ (combine two alternative paths)? OR, min, +.
  3. What is ⊗ (extend a path by one edge)? AND, +, ×.

Those two operators name the semiring: OR/AND → boolean · min/+ → tropical · +/× → counting. If your answer doesn't fit, it is probably not a semiring question — see Not a semiring question.

Setup, once

(import (wile goast callgraph)     ; go-callgraph
        (wile goast path-algebra)  ; make-path-analysis, path-query, ...
        (wile goast utils)         ; nf — field access on cg-node / cg-edge
        (wile algebra semiring))   ; boolean-semiring, tropical-semiring, ...

(define cg (go-callgraph "«pattern»" 'vta))

Build the graph once and pass it around; name the algorithm explicitly ('static < 'cha < 'rta < 'vta in precision and cost; 'rta errors without a main). Rebuilding per query is the dominant cost in a slow session.

Call-graph records are accessed with nf, not per-field accessors: (nf edge 'callee), (nf edge 'caller), (nf edge 'pos), (nf node 'name). There is no cg-edge-callee.


R1 · Reachability — boolean

Intent triggers: can X reach Y · what does X reach · what reaches Y · does this handler ever hit the DB · blast radius of changing Y

Reduction principle: accumulate reachable-or-not. ⊕ = OR (any one path suffices), ⊗ = AND (a path exists only if every edge on it does). → boolean.

Structure: (boolean-semiring), unit weights (#f).

Recipe:

(go-callgraph-reachable cg "«root»")    ; forward: everything root can reach
(go-callgraph-reaching  cg "«target»")  ; backward: transitive callers = blast radius

(path-query (make-path-analysis (boolean-semiring) cg #f)
            "«src»" "«dst»")            ; point-to-point => #t / #f

Read the full file on GitHub · 283 lines

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. 11d ago First seen · 283 lines · 94 tokens per session scan A e33d1a854d05

Subscribe to this mod's changes

goast-semiring-queries is a skill published in the GitHub repository aalpar/wile-goast (5 stars, last pushed 14d ago), licensed Apache-2.0. It adds 94 tokens to every session and 2,864 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

wakaru

Turn minified, bundled, or transpiled JavaScript back into readable modules. Use when you encounter unreadable production JS — a webpack/esbuild/Metro/Rollup bundle, a minified vendor script, Babel/TypeScript/SWC-transpiled output, or a single mangled .js file — and need to read, audit, debug it, or recover a…

pionxzh/wakaru · 99 tokens

windows-compat

Audit and harden this Rust repo (code-graph-mcp) for Windows correctness: path-spelling drift between producers, the 32,767-char command-line cap, index-key mismatches, and path predicates that assume one ecosystem's layout. Use whenever touching code that builds, compares, prints, or stores a filesystem path; that…

sdsrss/code-graph-mcp · 165 tokens

mypy

Skill "mypy" from bobmatnyc/claude-mpm-skills, covering mypy - static type checking for python, basic mypy, with common type stubs, for fastapi projects and for django projects.

bobmatnyc/claude-mpm-skills · 24 tokens

parecode-explore

Use this skill when the user asks exploration questions like "where is X", "how does Y work", or "find all usages of Z".

BasilSkyWalk/parecode · 34 tokens

mypy

Skill "mypy" from bobmatnyc/claude-mpm, covering mypy - static type checking for python, basic mypy, with common type stubs, for fastapi projects and for django projects.

bobmatnyc/claude-mpm · 24 tokens

devlens

Understand a codebase with the DevLens MCP — TypeScript, JavaScript, Python, Go, Rust, or Java (incl. React/Next.js/Node, FastAPI/Flask/Django, Spring Boot, Gin/Echo/chi/net-http, axum/actix/rocket). Query a precomputed graph of nodes (components, hooks, functions, classes, methods, structs, traits, routes) and typed…

devlensio/devlensOSS · 0 tokens