Skilllibrary stack-profile-detector

Detect a project's language, framework, runtime, testing setup, and deployment target from repository contents and produce a structured STACK-PROFILE.md. Use when scaffolding a new project and need to determine stack from code evidence, onboarding to an existing repo with unknown stack, or generating stack-specific skills. Do not use when stack is already documented in STACK-PROFILE.md or for repos with no code (infer from specs instead).

install
source · Clone the upstream repo
git clone https://github.com/merceralex397-collab/skilllibrary
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/merceralex397-collab/skilllibrary "$T" && mkdir -p ~/.claude/skills && cp -r "$T/01-package-scaffolding/stack-profile-detector" ~/.claude/skills/merceralex397-collab-skilllibrary-stack-profile-detector && rm -rf "$T"
manifest: 01-package-scaffolding/stack-profile-detector/SKILL.md
source content

Stack Profile Detector

Detects a project's stack profile from repository contents and produces a structured document.

Procedure

1. Scan for manifest files

ls -la package.json Cargo.toml pyproject.toml setup.py go.mod pom.xml \
       build.gradle *.csproj Gemfile composer.json 2>/dev/null

Priority (if multiple exist): package.json > Cargo.toml > pyproject.toml > go.mod > pom.xml

2. Detect primary language

EvidenceLanguageConfidence
package.json + tsconfig.jsonTypeScriptHigh
package.json (no tsconfig)JavaScriptHigh
Cargo.tomlRustHigh
pyproject.toml / requirements.txtPythonHigh
go.modGoHigh
pom.xml / build.gradleJava/KotlinHigh
*.csproj / *.slnC#High
Only source files, no manifest(inferred)Medium

3. Detect framework

Node.js/TypeScript:

deps=$(cat package.json 2>/dev/null | jq -r '(.dependencies + .devDependencies) | keys[]')
# next → Next.js, react → React, express → Express, fastify → Fastify, etc.

Python: Check for fastapi, django, flask in requirements/pyproject.

Rust: Check for axum, actix, rocket in Cargo.toml.

4. Detect testing, build, and deployment

CategoryEvidenceResult
Test frameworkvitest/jest/pytest/cargo test in configNamed framework
Build toolNext.js/Vite/Webpack/Cargo in configNamed tool
Cloud targetvercel.json/serverless.yml/DockerfileNamed platform
Package managerpnpm-lock/yarn.lock/Cargo.lockNamed manager

5. Generate STACK-PROFILE.md

# Stack Profile
Generated: [ISO date]
Confidence: [HIGH | MEDIUM | LOW]

## Primary Stack
- **Language:** [detected]
- **Runtime:** [detected]
- **Framework:** [detected]
- **Package Manager:** [detected]

## Testing
- **Framework:** [detected]
- **Command:** [detected]

## Build
- **Tool:** [detected]
- **Command:** [detected]

## Deployment
- **Target:** [detected or "unknown"]

## Evidence
Detection based on: [list of files examined]

6. Handle ambiguous cases

If detection is uncertain (confidence LOW):

## Unresolved
- [Question 1]: [Options found]
- [Question 2]: [Options found]

## Action Required
Please confirm: [specific questions]

Output contract

File:

docs/STACK-PROFILE.md
(or path specified by scaffolding flow)

Contains: language, runtime, framework, package manager, test setup, build config, deployment target, confidence level, and evidence list.

Failure handling

  • No manifest files: Check for source files (.ts, .py, .rs), infer language, mark confidence LOW
  • Multiple conflicting manifests: Likely monorepo — detect per package/workspace
  • Empty repository: Cannot detect. Require specs from user or canonical brief.
  • Unusual setup: Document what was found, flag for manual review