# Stack Detection

> Detects project technology stacks by analyzing package manifests, config files, directory structures, and code patterns. Produces a structured stack profile for agent adaptation. Covers technology detection, framework identification, project type analysis. Use when this capability is needed.

- Skill: `tomevault-io/stack-detection` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/stack-detection`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/stack-detection/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/stack-detection

---


## Current Stack Profile
!`cat .blueprint/stack-profile.json 2>/dev/null || echo "No stack profile detected yet. Run /bp:discover first."`

# Stack Detection

This skill provides comprehensive technology stack detection for any project. It goes beyond simple file-existence checks to analyze actual configurations, versions, and usage patterns.

## When to Use

- At the start of any blueprint-dev workflow (`/blueprint-dev:bp:discover`)
- When agents need to adapt their output to the project's specific stack
- When generating CLAUDE.md suggestions based on detected technologies

## How It Works

### Detection Layers

1. **Manifest Analysis**: Read package managers (package.json, composer.json, Gemfile, etc.) for declared dependencies
2. **Config File Analysis**: Read framework configs for specific settings (e.g., Next.js app router vs pages router)
3. **Code Pattern Analysis**: Grep source files for usage patterns that confirm or refine detections
4. **Infrastructure Analysis**: Check for Docker, CI/CD, deployment configs

### Fingerprint Matching

Use the fingerprints in `references/fingerprints.md` to match specific technologies. Each fingerprint has:
- **Primary signal**: File or pattern that strongly indicates the technology
- **Confirming signals**: Additional evidence that increases confidence
- **Version detection**: How to determine the specific version in use
- **Variant detection**: Sub-variants (e.g., Next.js App Router vs Pages Router)

### Output

Results go to `.blueprint/stack-profile.json` using the template in `references/profile-template.md`.

## Key Principles

- **Verify, don't guess**: Only report technologies you can confirm through multiple signals
- **Version matters**: `react@18` and `react@19` may need different agent behavior
- **Conventions matter more than dependencies**: How the project *uses* a technology is more valuable than knowing it's installed
- **Fast by default**: The SessionStart hook does a quick scan; deep analysis happens only when `/discover` is explicitly run

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/dlabs) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-15 -->

