detect-stack

A project scanner that identifies the programming languages, frameworks, tests, coding conventions, and automated checks used in a codebase.

In plain words
What is it for?
Use it when opening an unfamiliar project, when the project setup changes, or when you need to know which tools and checks the codebase uses.
Why use it?
It gives the coding agent a shared summary of the project before changes are made, reducing guesses about how the code is organised and checked.

Skill for Claude CodeCodex

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 skills/jordancoin/codingskills/detect-stack
Any agent
npx skills add JordanCoin/codingskills --skill detect-stack
Clone the repo
git clone --depth 1 https://github.com/JordanCoin/codingskills

Made for: Claude Code, Codex.

Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 746 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.00063 $0.00746
Opus 5 $0.00032 $0.00373
Sonnet 5 $0.00013 $0.00149
Haiku 4.5 $0.00006 $0.00075

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

Security

Grade A, and why

detect-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 2d 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-stack/SKILL.md · 79 lines

How it starts

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

Detect Stack

Analyze the current codebase and generate .agents/stack-context.md. Run this on first use in a project, or when the stack context is missing or stale.

What to Detect

Scan the project root for these signals:

Language — Count file extensions (.rs, .py, .ts, .go, .swift, .java, .rb, .cs, .ex, etc.). Primary = most files. Note secondary languages.

Framework — Read the package manifest:

  • Cargo.toml → check [dependencies] for axum, actix, rocket, sqlx, diesel, tokio
  • package.json → check for react, next, svelte, express, fastify, prisma
  • go.mod → check for gin, echo, fiber, chi, sqlc
  • pyproject.toml / requirements.txt → check for django, flask, fastapi, sqlalchemy
  • Gemfile → check for rails, sinatra
  • Package.swift → check for Vapor; scan for SwiftUI imports
  • mix.exs → check for phoenix, ecto

Tests — Look for test directories, test file naming patterns, test config files.

CI gates — Scan .github/workflows/, .gitlab-ci.yml, etc. for blocking checks (format, lint, type check, test).

Conventions — Check for CLAUDE.md, AGENTS.md, CONTRIBUTING.md. Note directory structure and naming patterns.

Output

Write .agents/stack-context.md — keep it short (under 40 lines):

# Stack Context

Generated: YYYY-MM-DD

## Stack
- **Language**: [primary] [version if pinned]
- **Framework**: [web framework], [db layer]
- **Build**: [build tool]
- **Test**: [test command + framework]
- **Lint**: [linter] [CI gate: yes/no]
- **Format**: [formatter] [CI gate: yes/no]

## Secondary Languages
- [language] ([what it's used for])

## Conventions
- Error handling: [pattern]
- Module structure: [pattern]
- Naming: [pattern]
- Tests: [where they live, how they're organized]

## CI Gates
- [list of blocking checks]

Stack-Specific Principle Application

After writing the stack context, do not generate static reference files. Instead:

  1. Use your built-in knowledge of the detected language/framework to apply each coding principle idiomatically
  2. If you need specific framework API details, use context7 MCP (resolve-library-id then query-docs) to pull live documentation
  3. If context7 doesn't cover it, use web search as fallback

Read the full file on GitHub · 79 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. 2d ago First seen · 79 lines · 63 tokens per session scan A 2d6d3fc9d8ab

Subscribe to this mod's changes

detect-stack is a skill published in the GitHub repository JordanCoin/codingskills (7 stars, last pushed 6mo ago), licensed MIT. It adds 63 tokens to every session and 746 once invoked, about $0.0003 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

refactor

Automated iterative code refactoring with swarm-orchestrated specialist agents including deep codebase discovery, confidence-scored code review, and security analysis. Use this skill when the user wants to improve existing code quality, clean up messy code, restructure, simplify, reduce tech debt, or perform…

zircote-plugins/refactor · 112 tokens

refactoring

Improve code structure without changing behavior using proven refactoring patterns. Use when cleaning up code, reducing duplication, improving readability, or restructuring modules.

asgarovf/locusai · 31 tokens

feature-dev

Guided feature development with swarm-orchestrated codebase exploration, multi-perspective architecture design, implementation, and quality review.

zircote-plugins/refactor · 27 tokens

feature-dev

Guided feature development with swarm-orchestrated codebase exploration, multi-perspective architecture design, implementation, and quality review. Use this skill when the user wants to build a new feature, add new functionality, implement a capability, or create something that doesn't exist yet. Triggers on requests…

zircote-plugins/refactor · 101 tokens

refactoring-patterns

Use this skill when improving existing code without changing its behavior. It defines when and how to refactor safely.

ApexIQ/skillsmith · 27 tokens

delphi-rest-apis-horse

Desenvolvimento de microserviços e APIs REST com o framework minimalista Horse em Delphi. Rotas, controllers, middlewares, gerenciamento de memória e tratamento de parâmetros.

regyssilveira/AgentKit4D · 43 tokens