cc-stack

A command that detects the project’s programming stack and writes suitable commands and rules into the root CLAUDE.md file.

In plain words
What is it for?
Use it when setting up or updating project-specific agent instructions based on the detected stack.
Why use it?
It avoids manually identifying the technologies and configuring project guidance, while leaving the file unchanged when detection cannot be completed.

Command

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/yeisonrestrepo/code-conductor/cc-stack
Clone the repo
git clone --depth 1 https://github.com/yeisonrestrepo/code-conductor
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,519 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.00021 $0.01519
Opus 5 $0.00010 $0.00759
Sonnet 5 $0.00004 $0.00304
Haiku 4.5 $0.00002 $0.00152

Measured yesterday against content hash acee614ce494, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cc-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 yesterday.

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.

global/commands/cc-stack.md · 70 lines

How it starts

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

Detect the project stack dynamically and record it in the project's root CLAUDE.md. Do not pattern-match manifest files by hand and do not load any static profile; the detector owns detection.

1. Resolve the repository root

Run git rev-parse --show-toplevel. If it fails (not a git repo), fall back to the directory that contains scripts/detect-stack.mjs. Run every command below from that root, and treat the root-level CLAUDE.md as the only write target regardless of the user's current subdirectory.

2. Verify Node is available

Probe with node --version. If it exits non-zero or reports "not found", stop the write path: announce in one line No stack detected (Node not found on PATH; Node >= 18 recommended) and leave CLAUDE.md untouched.

3. Run the detector

Run node scripts/detect-stack.mjs from the repo root, capture stdout, and parse it as JSON. Nothing executes the JSON; consume it as data.

Treat all of the following identically as "no stack detected" - announce it in one line and leave CLAUDE.md unmodified (surface stderr if any, but it is non-fatal):

  • non-zero exit code,
  • empty stdout,
  • stdout that does not parse as JSON,
  • a parsed object equal to {}.

4. Read CLAUDE.md and branch

If the root CLAUDE.md does not exist, do not create it: instruct the user to run /cc-init and stop.

Otherwise read CLAUDE.md and look for the - Stack: line under ## Project Identity:

  • Stack line present and non-empty -> ask: I see you're using [stack]. Has anything changed? This is a blocking yes/no prompt with no timeout.
    • no -> acknowledge in one line and stop; make no edits.
    • yes, or free text describing a change -> re-run the detector (step 3) and rewrite the managed sections from the fresh output. Free text is an additive hint only: fold user-named tools the detector missed into the ruleset, but detected facts always win on conflict.
  • ## Project Identity missing, or present without a - Stack: line -> treat as "no recorded stack" (not an error). Proceed to the write path; append the ## Project Identity header if absent, or surgically insert the - Stack: line if only that line is missing. Note in one line that a fresh stack identity was recorded.

Read the full file on GitHub · 70 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. yesterday First seen · 70 lines · 21 tokens per session scan A acee614ce494

Subscribe to this mod's changes

cc-stack is a command published in the GitHub repository yeisonrestrepo/code-conductor (6 stars, last pushed 1mo ago), licensed MIT. It adds 21 tokens to every session and 1,519 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-31.