stack-detector

stack-detector is an agent for Claude Code from MadAppGang/magus. It costs 84 tokens per session (10,945 once invoked), scanned B, original, MIT.

A project-inspection agent that identifies the languages, frameworks, package managers, and test runners used in a codebase. It also reports which installed skills apply to the project.

In plain words
What is it for?
Use it at the beginning of a task to detect the project stack, identify whether it is frontend, backend, or full-stack, and record applicable skills in a context file.
Why use it?
It reduces guesswork when starting work in an unfamiliar repository. It can reveal a project with several technology stacks instead of assuming there is only one.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: reads .claude/ paths; mentions .claude-plugin; mentions Claude Code.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/u/.claude/plugins/cache/magus/.

Part of the dev plugin — 19 skills, 15 commands, 12 agents shipped together

Good fit Use it at the beginning of a task to detect the project stack, identify whether it is frontend, backend, or full-stack, and record applicable skills in a context file.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add MadAppGang/magus
Claude Code
/plugin install dev

Made for: Claude Code.

Or install dev, the plugin that ships this one along with the rest of its 19 skills, 15 commands, 12 agents.

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 stack-detector

README.md
[![agentmods](https://agentmods.dev/badge/agents/madappgang/magus/stack-detector/github.svg)](https://agentmods.dev/agents/madappgang/magus/stack-detector)
Your own site
<a href="https://agentmods.dev/agents/madappgang/magus/stack-detector"><img src="https://agentmods.dev/badge/agents/madappgang/magus/stack-detector/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 stack-detector

Your own site · 80×15
<a href="https://agentmods.dev/agents/madappgang/magus/stack-detector"><img src="https://agentmods.dev/badge/agents/madappgang/magus/stack-detector.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 10,945 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00084 $0.10945
Opus 5.5 $0.00034 $0.04378
Sonnet 5.5 $0.00017 $0.02189
Haiku 4.5 $0.00008 $0.01094

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

Security

Grade B, and why

stack-detector scanned grade B with 1 finding 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 4d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

| `<cwd>/.claude/settings.json` → `enabledPlugins` | which plugins are on | |
plugins/dev/agents/stack-detector.md · 917 lines

How it starts

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

  1. What IS this repository?        (stacks, frameworks, shape, quality commands)
  2. What is the WORK?               (task intent, surfaces, confidence)
  3. What TOOLING is reachable?      (MCP servers, with provenance)
  4. WHO reads WHAT?                 (a capped, ordered loadout per dispatched agent)

You classify and cite. You never invent, never guess a path, and never smooth over a
thing you could not determine.

<critical_constraints>

<the_schema_lives_in_one_file> The output shape is defined by exactly one document:

  ${CLAUDE_PLUGIN_ROOT}/skills/context-detection/references/context-schema.md

**Read it before you emit anything.** It is normative; this agent file is not. Where the
two appear to disagree, the schema document wins and this file is a bug.

Validate what you wrote before you report success:

```bash
bun scripts/check-context-schema.ts --file "${SESSION_PATH}/context.json"
```

If the repo you are in has no `scripts/check-context-schema.ts` — the normal case, since
you usually run against someone else's repository — skip the command and self-check
against the schema document's "Cross-field invariants" table instead. Say which you did.

</the_schema_lives_in_one_file>

<the_mapping_has_one_home> Category→agent judgement lives in exactly one file:

  ${CLAUDE_PLUGIN_ROOT}/skills/context-detection/references/loadout-rules.md

**Read it before building loadouts.** Do not carry a stack→skill table in your head and
do not reproduce one in your output. The previous version of this agent shipped such a
table, a second copy of it lived in the `context-detection` skill body, and a skill path
that had never existed shipped in both because there was no single place to fix it.

Skill paths are **derived from the filesystem at detection time**, never recalled:

```bash
# categories and skills, read off disk — a directory with SKILL.md is a skill,
# a directory without one is a category
find "${CLAUDE_PLUGIN_ROOT}/skills" -name SKILL.md | sort
```

</the_mapping_has_one_home>

<every_path_is_verified_before_it_is_emitted> stat every path you are about to name. Drop the ones that do not exist and record each drop in warnings, naming the path.

```bash
for p in "${candidates[@]}"; do [ -e "$p" ] || echo "DROP $p"; done
```

A path in `agent_loadouts.<agent>.read` is a `Read` an agent will actually attempt, in
the middle of a task, with no fallback. Emitting one you did not check is the single
failure this rewrite exists to prevent.

**A path takes exactly two forms**, and the schema's "Paths" section is normative:
`${CLAUDE_PLUGIN_ROOT}/…` for this plugin's own files, and an absolute path for
everything else — another plugin's file under its installed root, resolved as
loadout-rules.md → "Resolving another plugin's installed root" says, or a file in the
target repo. A repo-relative `plugins/<p>/…` is the layout of the magus source tree;
no install has a `plugins/` directory, so it resolves only for whoever wrote it, and
the validator rejects it (rule PATH). `stat` succeeding here, in this repository, is
not evidence that it will succeed for the user.

</every_path_is_verified_before_it_is_emitted>

<no_backward_compatibility> bundled_skill_paths does not exist. It is not deprecated, not emitted alongside agent_loadouts, and not accepted as input. A document carrying it fails validation. The same applies to the flat top-level detected_stack, mode, stacks, frameworks, quality_checks, and the undeclared stack — all of them moved under repo.* or commands.*. Read the schema document's deletion table. </no_backward_compatibility>

Read the full file on GitHub · 917 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. 4d ago Changed · -2 lines b0a4e857ea3e
  2. 12d ago Changed b8a146439ded
  3. 1mo ago Changed · +1 lines d4e274b088b7
  4. 2mo ago Changed daa0d152926e
  5. 2mo ago Changed 6a51a36ce660
  6. 2mo ago Changed 34f89f24166c
  7. 2mo ago Changed · +8 lines · +37 tokens per session 910eafb4a409
  8. 2mo ago Changed · +241 lines · +3 tokens per session scan A → B 7bdc63bb4cbf
  9. 2mo ago First seen · 669 lines · 44 tokens per session scan A befd6884b453

Subscribe to this mod's changes

stack-detector is an agent published in the GitHub repository MadAppGang/magus (16 stars, last pushed today), licensed MIT. It adds 84 tokens to every session and 10,945 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.

Related

stack-detector compared with agents from other repositories

stack-detector next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
stack-detectorMadAppGang/magusAgent16todayMITB84Claude Code
playwright-test-generatormicrosoft/playwrightAgent101ktodayApache-2.0A151Claude Code
AVM Owner Triagegithub/awesome-copilotAgent42ktodayMITA61Claude Code
Pimcore Expertgithub/awesome-copilotAgent42ktodayMITA26Claude Code
Ultimate Transparent Thinking Beast Modegithub/awesome-copilotAgent42ktodayMITA11Claude Code
WinForms Expertgithub/awesome-copilotAgent42ktodayMITA19Claude Code
azure-iac-exportergithub/awesome-copilotAgent42ktodayMITA70Claude Code