sdd-discover-stack

sdd-discover-stack is a command for Claude Code from zekiriabd/SDD-Pro. It costs 22 tokens per session (3,210 once invoked), scanned A, original, Apache-2.0.

A repository scanner that identifies the technologies used in an existing or new code project and prepares a draft stack file.

In plain words
What is it for?
Use it to inspect a repository, suggest matching SDD_Pro stack IDs, and prefill project configuration for later commands.
Why use it?
It avoids manually working out the project's languages, frameworks, and tools. The draft is kept separate until a tech lead confirms it.

Command for Claude Code

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.

agentmods
npx agentmods add commands/zekiriabd/sdd-pro/sdd-discover-stack
Clone the repo
git clone --depth 1 https://github.com/zekiriabd/SDD-Pro

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 sdd-discover-stack

README.md
[![agentmods](https://agentmods.dev/badge/commands/zekiriabd/sdd-pro/sdd-discover-stack.svg)](https://agentmods.dev/commands/zekiriabd/sdd-pro/sdd-discover-stack)
Your own site
<a href="https://agentmods.dev/commands/zekiriabd/sdd-pro/sdd-discover-stack"><img src="https://agentmods.dev/badge/commands/zekiriabd/sdd-pro/sdd-discover-stack.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,210 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00022 $0.03210
Opus 5 $0.00011 $0.01605
Sonnet 5 $0.00004 $0.00642
Haiku 4.5 $0.00002 $0.00321

Measured 4d ago against content hash 6fbd1f298f9f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sdd-discover-stack 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 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.

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/commands/sdd-discover-stack.md · 318 lines

How it starts

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

/sdd-discover-stack — Détection automatique du stack d'un repo existant

Scanne un repo (brownfield ou nouveau) et produit workspace/stack/stack.md.candidate avec les stack-ids SDD_Pro candidats + une ## Project Config pré-remplie. Le Tech Lead arbitre les ambiguïtés et renomme .candidatestack.md quand validé.

Usage : /sdd-discover-stack [--scope <path>] [--force]

Garanties non-régression :

  • Cette commande ne touche jamais au moteur SDD_Pro (build_loop, API Gate, phases auditor, file ownership). Elle ne fait que lire des fichiers manifestes et écrire un .candidate à côté.
  • Si stack.md existe déjà → écrit dans stack.md.candidate (jamais d'overwrite direct sauf --force).
  • Scripts Python déterministes (0 token LLM jusqu'à STEP 5).

STEP 1 — Args

Arg Défaut Sens
--scope <path> . Répertoire à scanner (relatif au repo root)
--force absent Autorise overwrite de workspace/stack/stack.md existant

Si l'arg --scope est absent → scan du repo root.


STEP 2 — Pré-check existence stack.md

STACK_MD = workspace/stack/stack.md
STACK_CANDIDATE = workspace/stack/stack.md.candidate
  • Si STACK_MD existe ET --force absent → cible de sortie = STACK_CANDIDATE
  • Si STACK_MD existe ET --force présent → cible de sortie = STACK_MD (overwrite)
  • Si STACK_MD absent → cible de sortie = STACK_MD directement

Informer l'utilisateur de la cible choisie :

🔍 /sdd-discover-stack: scanne {scope}, écrira → {target_path}

STEP 3 — Scan déterministe

Invoquer :

python .sdd/python/sdd_scripts/scan_repo.py \
  --scope {scope} \
  --output workspace/.sys/.audit/scan-report.json \
  --quiet

Le script écrit scan-report.json avec :

  • manifests[] : fichiers détectés (csproj, package.json, etc.) + leur contenu parsé
  • languages[], frameworks[], ui_indicators[], database_indicators[], auth_indicators[]
  • warnings[] : éventuels [SCAN_PARSE_ERROR]

Read the full file on GitHub · 318 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 First seen · 318 lines · 22 tokens per session scan A 6fbd1f298f9f

Subscribe to this mod's changes

sdd-discover-stack is a command published in the GitHub repository zekiriabd/SDD-Pro (190 stars, last pushed yesterday), licensed Apache-2.0. It adds 22 tokens to every session and 3,210 once invoked, about $0.0001 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.