detect-stack skill
Analyzes a codebase to identify languages, frameworks, testing patterns, CI gates, and conventions to generate a stack context file.
- GitHub stars
- 14
- Files
- 1
- Last commit
- Feb 28, 2026
- License
- MIT
- Allowed tools
- —
What does the detect-stack skill do?
detect-stack analyzes a codebase to identify languages, frameworks, testing patterns, CI gates, and conventions to generate a stack context file.
Summary generated from the skill's SKILL.md.
About the detect-stack skill
Identifying the specific languages, frameworks, and development patterns within a repository is what this tool enables. Developers use it at the start of a project or when dependencies change to create a structured reference file. By scanning file extensions, package manifests like Cargo.toml or package.json, and CI configuration files, it builds a comprehensive profile of the technical environment.
An agent should load this skill when a user asks to analyze a project or when the .agents/stack-context.md file is missing or outdated. The process produces a concise markdown file that details the primary and secondary languages, build tools, testing frameworks, and linting requirements. This file serves as a foundation for other coding principle skills to ensure their suggestions remain idiomatic to the specific codebase.
Unlike manual documentation, this tool automates the discovery of CI gates and directory conventions. It looks for specific signals in GitHub workflows or GitLab files to determine which checks are blocking. It provides a bridge between general coding principles and the actual implementation details found in the project root.
What an agent can do with it
- 1Initialize project environment knowledgeRun an analysis on a new repository to establish a baseline of the technology stack.
- 2Identify framework and dependency detailsDetermine which web frameworks and database layers are being used by inspecting manifest files.
- 3Update stale project contextRefresh the stack documentation when major dependency changes or structural shifts occur.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the detect-stack skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the detect-stack skill in Plugin
/plugin marketplace add JordanCoin/codingskills /plugin install coding-skills@codingskills
Install the detect-stack skill in Claude Code
~/.claude/skills/detect-stack/SKILL.md
$ npx degit JordanCoin/codingskills/skills/detect-stack ~/.claude/skills/detect-stackInstall the detect-stack skill in Claude Code (project)
.claude/skills/detect-stack/SKILL.md
$ npx degit JordanCoin/codingskills/skills/detect-stack .claude/skills/detect-stackInstall the detect-stack skill in Codex
~/.agents/skills/detect-stack/SKILL.md
$ npx degit JordanCoin/codingskills/skills/detect-stack ~/.agents/skills/detect-stackInstall the detect-stack skill in Gemini CLI
~/.gemini/skills/detect-stack/SKILL.md
$ npx degit JordanCoin/codingskills/skills/detect-stack ~/.gemini/skills/detect-stackInstall the detect-stack skill in Claude.ai
npx degit JordanCoin/codingskills/skills/detect-stack detect-stack && zip -r detect-stack.zip detect-stack # claude.ai → Customize → Skills → + → Create skill → Upload a skill → detect-stack.zip
SKILL.md
View on GitHubDetect 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
Files in this skill
1detect-stack skill questions
How do I install the detect-stack skill in Claude Code?
Run npx degit JordanCoin/codingskills/skills/detect-stack ~/.claude/skills/detect-stack. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the detect-stack skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
What information does the stack detection process capture?
It scans for primary and secondary languages, web frameworks, testing configurations, CI gates, and project conventions.
When should I re-run the stack detection?
You should re-run it if the stack context file is missing, if there are major dependency changes, if the project structure changes significantly, or if the file is older than 30 days.
Where is the generated stack context saved?
The analysis results are written to a file located at .agents/stack-context.md.