detect-tool-vendor-by-query

detect-tool-vendor-by-query is a skill for Claude Code, Codex from chen3feng/agent-skills. It costs 32 tokens per session (1,682 once invoked), scanned A, original, Apache-2.0.

A development aid that identifies a compiler, linker, interpreter, or other build tool by asking the program for its version. It does not rely on the executable's filename or location.

In plain words
What is it for?
Use it when code must choose flags or behavior for tools such as GCC, Clang, CPython, PyPy, GNU utilities, or BSD utilities.
Why use it?
Tool names and paths can be misleading: a file called gcc may actually be Clang, and python3 may point to different Python installations. Querying the tool avoids choosing incompatible options.

Skill for Claude CodeCodex

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

Good fit Use it when code must choose flags or behavior for tools such as GCC, Clang, CPython, PyPy, GNU utilities, or BSD utilities.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chen3feng/agent-skills/detect-tool-vendor-by-query
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 chen3feng/agent-skills --skill detect-tool-vendor-by-query
Clone the repo
git clone --depth 1 https://github.com/chen3feng/agent-skills

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 detect-tool-vendor-by-query

README.md
[![agentmods](https://agentmods.dev/badge/skills/chen3feng/agent-skills/detect-tool-vendor-by-query/github.svg)](https://agentmods.dev/skills/chen3feng/agent-skills/detect-tool-vendor-by-query)
Your own site
<a href="https://agentmods.dev/skills/chen3feng/agent-skills/detect-tool-vendor-by-query"><img src="https://agentmods.dev/badge/skills/chen3feng/agent-skills/detect-tool-vendor-by-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.

agentmods 80×15 button for detect-tool-vendor-by-query

Your own site · 80×15
<a href="https://agentmods.dev/skills/chen3feng/agent-skills/detect-tool-vendor-by-query"><img src="https://agentmods.dev/badge/skills/chen3feng/agent-skills/detect-tool-vendor-by-query.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,682 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.00032 $0.01682
Opus 5 $0.00016 $0.00841
Sonnet 5 $0.00006 $0.00336
Haiku 4.5 $0.00003 $0.00168

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

Security

Grade A, and why

detect-tool-vendor-by-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 10d 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.

skills/detect-tool-vendor-by-query/SKILL.md · 151 lines

How it starts

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

Detect tool vendor by query, not by name

When to use

You are writing code that branches on which compiler, linker, interpreter, or other build tool is in use — GCC vs. Clang, CPython vs. PyPy, BSD vs. GNU coreutils, system Python vs. a pyenv shim — and your current approach is to look at the executable's name or path ("gcc" in argv0, which python3, basename $CC).

Signal phrases: "we assume /usr/bin/gcc is GCC", "the driver is called cc so it must be…", "python3 on PATH is 3.x", or a bug report that reproduces only on macOS / only on a system with a vendor-renamed toolchain.

Problem

Tool names lie. Common traps:

  • macOS ships /usr/bin/gcc but it's Apple Clang under the hood. Any substring check like 'gcc' in cc_path misclassifies it as GNU and then tries to pass GNU-only flags (-static-libgcc, -flto=auto, -fno-fat-lto-objects, …), which Clang rejects at link time.
  • cc is a symlink whose target varies by distro: GCC on most Linux, Clang on FreeBSD / macOS, tcc on some minimal installs. The name cc tells you nothing.
  • python3 on PATH may be the system's frozen 3.9, a pyenv shim, a Homebrew keg, or a virtualenv. Checking the path (/usr/bin/python3 → "system Python") gives you the source, not the version.
  • GNU vs BSD coreutilssed, awk, tar, date on macOS are BSD variants with different flag sets; they're spelled exactly the same as their GNU cousins.
  • Cross-compilers and wrappers (ccache gcc, distcc clang, arm-linux-gnueabihf-gcc) contain the vendor substring but may forward to a different backend than the name implies.

The fix is always the same: ask the tool.

Solution

  1. Run the tool's identity query once, at init time, and cache the result. Don't re-probe on every call site.
  2. Parse a known-stable field, not the whole banner:
    • C/C++ drivers: first line of cc --version. Look for 'Apple clang' / 'clang' / 'gcc' / 'Free Software Foundation'. Normalize to a closed enum ({'clang', 'gcc', 'unknown'}).
    • Python: python -c 'import sys; print(sys.version_info[:2])' or python -V and parse "Python X.Y.Z". Compare as a tuple, never as a float (3.10 < 3.9 if you use floats).
    • coreutils: sed --version 2>&1 | head -1"GNU sed" vs. "invalid option" on BSD.
  3. Have a defined unknown bucket. Exotic toolchains exist; don't let the detector crash on them. Emit a warning and fall back to the most conservative flag set.
  4. Gate feature flags on the cached vendor, not on the path:

Read the full file on GitHub · 151 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. 10d ago First seen · 151 lines · 32 tokens per session scan A eaae4350c03b

Subscribe to this mod's changes

detect-tool-vendor-by-query is a skill published in the GitHub repository chen3feng/agent-skills (5 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 32 tokens to every session and 1,682 once invoked, about $0.0002 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

sentry-app-setup

Create and configure a Sentry internal integration so the assistant can manage issues, alerts, and releases under its own identity.

vellum-ai/vellum-assistant · 29 tokens

burrow-system-tools

Diagnose and fix the user's Mac with Burrow's local MCP tools (burrowdoctor, burrowsnapshot, burrowtopprocesses, burrowprocessusage, burrowports, burrowanalyze, burrowdiskforecast, burrowdupes, burrowanomalies, burrowagentaudit, burrowclean, …). Use whenever the Mac is slow, hot, loud, low on disk, draining battery…

caezium/burrow · 194 tokens

wispterm-diagnostics

Use when a user wants to report, troubleshoot, or collect context for a WispTerm issue, including crashes, rendering/DPI glitches, high CPU, keyboard/input bugs, selection/copy/scrolling, SSH/SCP failures, SSH image preview failures, HTML preview/browser panel failures, SSH disconnects such as…

xuzhougeng/wispterm · 88 tokens

self-diagnose

Sutando introspection — read logs + git + memory + build log for a chosen time window and produce a concise narrative of what the agent has been doing, what's broken, and what to prioritize next.

sonichi/sutando · 47 tokens

call-diagnostics

Analyze phone call observability data, detect problems, track them across calls, and recommend systematic repairs.

sonichi/sutando · 0 tokens

regression-search

Search phone-call history for when a feature regressed (find-regression.py) and drill into a single call to see what went wrong (diagnose-call.py). Skips reading 100+ transcripts by hand.

sonichi/sutando · 47 tokens