About detect-stack
detect-stack is a coding skill that scans a project and writes a concise `.agents/stack-context.md` file. It helps coding agents understand the codebase’s languages, frameworks, tests, CI checks, and conventions, and can be rerun when the context becomes stale.
Key features
- 01Language and framework detection
- 02Test and CI check discovery
- 03Convention and structure review
- 04Stack context file generation
- 05Stale-context rerun guidance
Use cases
- 01Preparing an unfamiliar project for coding work
- 02Refreshing context after dependency changes
- 03Reviewing project checks and conventions
MCP support
It recommends using context7 MCP for framework documentation when specific API details are needed, with web search as a fallback.
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ jordancoin/ codingskills --skill detect-stackAfter installing, type/detect-stackin Claude Code to confirm it loaded.
Details
From the project READMEDetect 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, tokiopackage.json→ check for react, next, svelte, express, fastify, prismago.mod→ check for gin, echo, fiber, chi, sqlcpyproject.toml/requirements.txt→ check for django, flask, fastapi, sqlalchemyGemfile→ check for rails, sinatraPackage.swift→ check for Vapor; scan for SwiftUI importsmix.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:
- Use your built-in knowledge of the detected language/framework to apply each coding principle idiomatically
- If you need specific framework API details, use context7 MCP (
resolve-library-idthenquery-docs) to pull live documentation - If context7 doesn't cover it, use web search as fallback
The coding principle skills are language-agnostic by design. You are the bridge between the principles and the stack.
When to Re-Run
.agents/stack-context.mddoesn't exist- Major dependency changes (new framework, language version bump)
- Project structure significantly changes
- Context file is older than 30 days