radar
AGENTS.md1 starsChanged 3 months agoMITView on GitHub
Agent skill that tracks the tools a repo cares about (competitors, upstream projects, dependencies) and hands changelogs to a coding agent for analysis. Published via the Agent Skills spec; installed with gh skill install mralabs/radar radar. Data always lives in the CONSUMING repo under .radar/ (cwd-relative, git-tracked JSON). This repo's root files (README, AGENTS.md, CI, tests, evals) are for development only — but note the two channels differ: gh skill install ships only skills/radar/, while the plugin channel clones the…
- Reads credentials
- Commits and pushes
The file
Files
radar — agent guide
Agent skill that tracks the tools a repo cares about (competitors, upstream
projects, dependencies) and hands changelogs to a coding agent for analysis.
Published via the Agent Skills spec; installed with
gh skill install mralabs/radar radar.
Layout
action.yml composite action consumers run SHA-pinned in weekly CI
skills/radar/ the installable skill (the only dir a skill install ships)
├── SKILL.md agent behavior: init/check/analyze/mark-analyzed cycle
├── scripts/
│ ├── radar.js entry point — plain .js so it starts on ANY node and
│ │ can explain a too-old runtime instead of crashing
│ ├── radar.ts thin CLI — command dispatch, printing, .radar/ paths
│ ├── auth.ts GitHub token resolution (env → gh CLI); outside core/
│ └── core/ self-contained domain logic (no imports outside core/)
│ └── api/ one adapter per source: github, npm, pypi, nuget
└── templates/ registry seed + weekly GitHub Actions workflow
tests/ unit tests — outside the skill so installs stay lean
evals/ agent-behavior evals — the SKILL.md layer tests can't reachData always lives in the CONSUMING repo under .radar/ (cwd-relative,
git-tracked JSON). This repo's root files (README, AGENTS.md, CI, tests,
evals) are for development only — but note the two channels differ:
gh skill install ships only skills/radar/, while the plugin channel
clones the whole repo into the user's plugin cache. Anything committed
anywhere in this repo reaches plugin users; never commit fixtures or
artifacts you wouldn't ship.
Commands
npm test # all tests — network-free, must pass
npm run typecheck # strict tsc --noEmit, must pass
node skills/radar/scripts/radar.js helpCI enforces both on every push/PR.
Evals score SKILL.md's agent behavior — the half of radar no unit test can reach. They call real models, so they are not in CI: run them before a release or when SKILL.md changes.
# from the repo root, so the plugin auto-detects and the ablation arm resolves
CLAUDE_CODE_WALNUT_SPIRE=1 claude plugin eval . \
--scaffold --allow-tools Bash Write Edit WebFetch WebSearch--scaffold runs each case's scaffold.sh as you (we authored them; it only
writes a fake repo into the sandbox cwd). --threshold 0.8 gates on score.
Roughly $0.20–0.50 per case per run, ×3 runs by default — cases are stochastic,
so a single run proves little. When iterating on one case, scope with
--case <name> (and --runs 1) instead of paying for the full suite.
--ablation with-without adds a no-plugin arm, but its Δ means little here:
two of the scaffolds hand the baseline a populated .radar/, and where they
don't (curated-registry) the baseline can't attempt the task at all — either
way Δ doesn't measure "is radar good". The signal is the plugin arm's own
score.
Two ways an eval lies green. Both have already happened here:
- Grading the mechanism instead of the outcome. The first draft of
curated-registrywatched for aradar.ts addcall and passed while the agent wrote the very same unapproved entries intoregistry.jsonwith an ad-hocbun -escript. Assert on the resulting file. - Denying the tool the violation needs. A case asserting the agent did NOT
file/add/write proves nothing if it could not have. Grant the tools the
violation would use — hence the
--allow-toolslist above. Watch the run output fordenied tools (pass --allow-tools to grant): any case that prints it scored on a fiction.
Invariants — do not regress these
- Never silently incomplete. Corrupt/misshapen JSON fails loud instead of
returning defaults (a default + save wipes user data). Incomplete ranges
(unfound changelog anchor, fetch caps) must surface a
warning, never look exhaustive. Failed fetches must not overwrite last-known version state. - A failed command exits non-zero. Anything that could not do what was
asked — missing argument, unknown tool id, a failed operation — goes through
fail(), which setsprocess.exitCode(neverprocess.exit, which can truncate the very message being printed). Two deliberate exceptions: partial fetch errors duringcheck, because one 404 must not break the weekly action, and--json, because a valid payload describing the problem IS the requested output —action.ymlreads.errorsout of exactly such a payload. This is worth stating because the bug class is invisible to a human: the error prints either way, and only a caller reading$?can tell. Thirteen paths shipped wrong for a long time before the CI step incheckcaught it. - Never read a token from a file.
.radar/config.jsonis git-tracked by design, so a secret must not be configurable there. The resolution order isGITHUB_TOKEN→GH_TOKEN→gh auth token --hostname github.com, and an empty var counts as unset. The gh step is a best-effort shortcut, not a dependency: missing gh, logged-out gh, a GHES-only login, or a hung call (3s timeout) all fall through to anonymous 60 req/h — no command may require it to succeed. It lives inauth.ts, never incore/: core stays subprocess-free and deterministic.auth.tstakes its gh runner as a defaulted parameter sotests/auth.test.tscan fake every branch without spawning anything. radar.jsstays dumb on purpose. It is the entry point, and its only job on an unsupported runtime is to explain the floor instead of dying inside the module loader. So it carries NO module syntax (noimport/export, no top-level await) and no modern operators: it has to start on node versions that cannot run anything else here, andgh skill installshipsskills/radar/with no package.json, so nothing declares whether it is ESM or CommonJS. Modernising it would leave every other CI job green while silently breaking the one path it exists for — thetoo-old-nodejob is what catches that. Real CLI logic belongs in radar.ts.- Zero runtime dependencies. Built-in
fetchandnode:modules only; dev-deps are for typecheck/tests. The CLI must run with barenode≥ 22.18 AND barebun: relative imports carry explicit.tsextensions and tsconfig'serasableSyntaxOnlyblocks syntax node can't strip (enums, namespaces) — don't undo either. - The toolchain is node, nothing else. Tests are
node:test+node:assert/strict, npm is the package manager, and there is no test framework to install. Do not add an assertion library or reintroduce a hand-rolledexpecthelper — a homemade assertion layer is the one piece of test infrastructure whose bugs turn into false passes. CI runs the suite on three arms — the 22.18.0 floor, Active LTS, and Current — so the floor is tested rather than written down, and the Current arm warns early about type stripping, the mechanism the floor exists for. The floor is the oldest node that CAN run the sources, not the newest that is fashionable: don't raise it without a feature that actually requires it. A separate job smoke-runs the CLI under bun, because SKILL.md still offers bun as a runtime and that claim should be verified rather than assumed. - Shipping
.tsand running it unbuilt is a priced decision, not a default. It is why the node floor exists at all, and it is unusual: across the highest-star skill repos (superpowers, anthropics/skills, addyosmani, trailofbits, claude-plugins-official) the scripts agents invoke are Python or plain.js, and every.tsfound in them turned out to be an example, a test sample, or a separately-run MCP server — none is executed as a skill script. The two TypeScript ones compile: dev-browser shipsbin/*.jsvia npm, and claude-hud — same git-clone distribution as radar, so no install step runs — commitsdist/and drops its floor to node >= 18. That is the alternative on offer, and its price is a build artifact that can silently go stale, which is the one thing "never silently incomplete" exists to prevent. radar pays a runtime floor instead. Don't re-open this without a new reason; both prices were compared on 2026-08-18. Nor is bun the escape from it: measured the same day, bun starts the CLI in 52ms against node's 97ms, but radar's work is network-bound, so a realcheckcame out 2% apart (1592ms vs 1623ms). bun is supported because it rescues an old-node machine, not because it is faster here. - Tests stay deterministic. Stub
globalThis.fetch; no live network, noDate.now()assertions. Inject fakes via thefetcherparameter pattern (seecheckUpdates). - CI executes only SHA-pinned code. The consumer workflow runs the
radar composite action (
action.yml) at a commit SHA resolved byinit --workflow; actions stay pinned to commit SHAs. No floating refs (@main, tags) — ever. (Pre-0.5 vendored the CLI into.github/radar/instead; that dir is legacy and init tells users it's safe to delete.) - Registry stays curated. Agent flows may propose tools or tasks but never add them without user approval (see SKILL.md).
Conventions
- Conventional commits (
feat:,fix:,chore:…), English. - Release =
gh skill publish --tag vX.Y.ZAND bumpingversionin.claude-plugin/plugin.jsonhere + radar's catalog entry in mralabs/claude-plugins (the org marketplace; plugin channel only sees updates when that field changes). This repo has no marketplace.json — one org, one catalog. Letgh skill publishcreate the tag — it refuses a tag that already exists, so a hand-pushedgit taglocks you out of the skill channel and you have togh release createon top of the bare tag instead (--dry-runstill validates). Three channels read three different things: the plugin channel reads the twoversionfields,init --workflowpins the newest semver tag's SHA, andgh skill installresolves the newest release — a tag without a release leaves the skill channel on the old version. - Deterministic work belongs in scripts; judgment belongs in SKILL.md prose.
- New source type touches four places: an adapter in
core/api/(+ its export incore/api/index.ts),TOOL_TYPESin types.ts, thefetchVersionswitch in reports.ts, and — if changelogs should work for it —resolveChangelogRepoin reports.ts. Add stubbed adapter tests. Thewebtype (closed-source products: fetch page, regex the version) is the exception that skipsresolveChangelogRepo— it has no repo, sogetChangelogreturns the URL + range and the agent WebFetches it. Radar does not scrape release notes; stripped-markup prose would look exhaustive while silently dropping half the page. A custompatternis matched against the stripped text first and the raw page only if that finds nothing — the order is the whole design. Raw-only looked right (the pattern says where the version is) but regresses silently:<meta content="Conductor 1.4.0">outranks the body's 1.4.7, so the weekly check reports a version older than the page shows. Stripped first can only return what it always returned; the fallback exists for pages that keep the version nowhere else, like Mintlify's<Update label="v0.22.0">. The default heuristic never falls back — the strip is the only thing keeping "first version-shaped string" off asset URLs. Apatternwritten as a sibling ofsourceis refused rather than dropped, but only when it is actually the one being dropped: beside asource.patternthat IS in effect it changes nothing, and failing there would break a working entry every week. Re-export fromcore/index.tsonly if the client should be public barrel API (not needed for CLI behavior).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

