This skill should be used when the user asks to "detect technology stack", "identify frameworks", "analyze project languages", "what stack is this", or needs automatic detection of programming languages, frameworks, and tools in a repository.
From repo-structurenpx claudepluginhub nsalvacao/nsalvacao-claude-code-plugins --plugin repo-structureThis skill uses the workspace's default tool permissions.
references/detection-patterns.jsonExecutes pre-written implementation plans: critically reviews, follows bite-sized steps exactly, runs verifications, tracks progress with checkpoints, uses git worktrees, stops on blockers.
Guides idea refinement into designs: explores context, asks questions one-by-one, proposes approaches, presents sections for approval, writes/review specs before coding.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Intelligent detection of programming languages, frameworks, tools, and project type through file pattern analysis and dependency inspection.
Automatically identifies the complete technical stack of a repository to enable:
Detection uses multiple signals with confidence scoring to handle polyglot projects and ambiguous cases.
Identify languages by characteristic files:
Python:
requirements.txt, Pipfile, pyproject.toml, setup.py*.py filesJavaScript/TypeScript:
package.json, yarn.lock, pnpm-lock.yaml*.js, *.jsx, *.ts, *.tsx filesGo:
go.mod, go.sum*.go filesRust:
Cargo.toml, Cargo.lock*.rs filesJava:
pom.xml, build.gradle, build.gradle.kts*.java filesComplete patterns in: references/detection-patterns.json
Parse package manifests to identify frameworks:
Python frameworks:
# Parse requirements.txt or pyproject.toml
django → Django web framework
fastapi → FastAPI
flask → Flask
pytest → Testing framework
JavaScript frameworks:
// Parse package.json dependencies
"react": "..." → React
"vue": "..." → Vue
"next": "..." → Next.js
"express": "..." → Express
Complete framework patterns in: references/detection-patterns.json
Count file extensions to determine primary language:
# Example: Mixed repo
.py files: 45 (confidence: 75%)
.js files: 20 (confidence: 25%)
→ Primary: Python, Secondary: JavaScript
Each detection method contributes to confidence score:
File patterns: +40 pts
Dependency analysis: +30 pts
Extension count: +20 pts
Build config: +10 pts
----------------------------
Total: 100 pts
Threshold:
- High confidence: 80+ pts
- Medium confidence: 50-79 pts
- Low confidence: <50 pts
Main detection implemented in: scripts/detect-stack.sh
Usage:
cd /path/to/project
bash $CLAUDE_PLUGIN_ROOT/skills/tech-stack-detection/scripts/detect-stack.sh
Output format (JSON):
{
"languages": [
{
"name": "Python",
"confidence": 85,
"evidence": [
"requirements.txt found",
"45 .py files",
"pyproject.toml with [project]"
]
},
{
"name": "JavaScript",
"confidence": 60,
"evidence": [
"package.json found",
"20 .js files"
]
}
],
"frameworks": [
{
"name": "FastAPI",
"type": "web",
"confidence": 90,
"evidence": ["fastapi in requirements.txt", "main.py with FastAPI import"]
},
{
"name": "React",
"type": "frontend",
"confidence": 75,
"evidence": ["react in package.json", ".jsx files present"]
}
],
"tools": [
{
"name": "Docker",
"confidence": 100,
"evidence": ["Dockerfile found", "docker-compose.yml found"]
},
{
"name": "pytest",
"type": "testing",
"confidence": 90,
"evidence": ["pytest in requirements.txt", "tests/ directory with test_*.py"]
}
],
"project_type": "web-application",
"primary_language": "Python",
"is_monorepo": false
}
Classify project purpose:
Library:
setup.py or [project] in pyproject.toml"type": "module" or "main" in package.jsonfunc main() in root[lib] section in Cargo.tomlCLI Tool:
console_scripts in setup.py"bin" in package.jsonfunc main() in cmd/ directory[[bin]] in Cargo.tomlWeb Application:
Framework/Starter:
Identify monorepo structure:
Indicators:
package.json / pyproject.toml in subdirectoriesapps/, packages/, services/ directoriesMonorepo tools:
"workspaces" in root package.jsonlerna.json presentturbo.json present[tool.poetry.workspace] in pyproject.tomlgo.mod filesMonorepo output:
{
"is_monorepo": true,
"monorepo_tool": "npm-workspaces",
"packages": [
{
"path": "packages/frontend",
"language": "TypeScript",
"frameworks": ["React", "Vite"]
},
{
"path": "packages/backend",
"language": "Python",
"frameworks": ["FastAPI"]
}
]
}
When multiple languages have high confidence:
{
"languages": [
{"name": "Python", "confidence": 85},
{"name": "JavaScript", "confidence": 80}
],
"primary_language": "Python",
"secondary_languages": ["JavaScript"],
"recommendation": "Polyglot project - consider monorepo structure"
}
Selection criteria for primary:
If detection confidence is low:
{
"languages": [
{"name": "Unknown", "confidence": 30}
],
"fallback": "generic",
"recommendation": "Manual specification required"
}
Fallback behavior:
Detection results feed into template variable resolution:
# 1. Detect stack
STACK_JSON=$(bash detect-stack.sh)
# 2. Extract variables
PRIMARY_LANG=$(echo $STACK_JSON | jq -r '.primary_language')
FRAMEWORKS=$(echo $STACK_JSON | jq -r '.frameworks[].name' | paste -sd, -)
# 3. Pass to template generation
bash generate-template.sh \
--template "README.md" \
--var "PRIMARY_LANGUAGE=$PRIMARY_LANG" \
--var "TECH_STACK=$FRAMEWORKS"
Complete detection patterns defined in: references/detection-patterns.json
Structure:
{
"languages": {
"python": {
"files": ["requirements.txt", "pyproject.toml", "setup.py", "Pipfile"],
"extensions": [".py"],
"confidence_weights": {
"files": 40,
"extensions": 20,
"imports": 30,
"build_config": 10
}
}
},
"frameworks": {
"django": {
"language": "python",
"indicators": [
{"pattern": "django", "file": "requirements.txt", "weight": 40},
{"pattern": "manage.py", "file": "root", "weight": 30},
{"pattern": "settings.py", "file": "*/settings.py", "weight": 20}
]
}
}
}
Detect language/framework versions:
Python:
# From pyproject.toml
requires-python = ">=3.8"
# From runtime files
.python-version → 3.11.5
Node.js:
# From package.json
"engines": {"node": ">=18.0.0"}
# From runtime files
.nvmrc → 18.16.0
Output:
{
"languages": [
{
"name": "Python",
"version": "3.11",
"version_constraint": ">=3.8"
}
]
}
Verify detection accuracy:
# Test on known projects
bash scripts/detect-stack.sh /path/to/django-project
# Expected: Python, Django, pytest
bash scripts/detect-stack.sh /path/to/nextjs-project
# Expected: TypeScript, Next.js, React
# Validate against test corpus
bash scripts/validate-detection.sh
Test corpus in: examples/test-projects/
references/detection-patterns.json - Complete detection rulesreferences/framework-catalog.md - Supported frameworks documentationreferences/version-detection.md - Version detection strategiesscripts/detect-stack.sh - Main detection scriptscripts/lib/detect-language.sh - Language detection functionsscripts/lib/detect-framework.sh - Framework detection functionsscripts/validate-detection.sh - Test detection accuracyexamples/detection-output.json - Sample detection outputexamples/test-projects/ - Test corpus for validationThis skill integrates with:
Detection is orchestrated by structure-architect agent as the first step in repository analysis.