project-detection

vanman2024's avatarfrom vanman2024

Comprehensive tech stack detection, framework identification, dependency analysis, and project.json generation. Use when analyzing project structure, detecting frameworks, identifying dependencies, discovering AI stack components, detecting databases, or when user mentions project detection, tech stack analysis, framework discovery, or project.json generation.

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 25, 2025

When & Why to Use This Skill

The Project Detection skill is a comprehensive analysis utility designed to automatically identify a codebase's tech stack, framework architecture, and dependency tree. It streamlines the development workflow by scanning project structures to detect frontend and backend frameworks, AI/ML components, and database configurations. By generating structured metadata (project.json), it provides AI agents with the essential context required for precise code generation, architectural auditing, and seamless project onboarding.

Use Cases

  • Automated Project Onboarding: Quickly analyze a new or legacy repository to understand its core architecture, languages, and frameworks without manual inspection.
  • AI Stack & RAG Configuration: Identify integrated AI SDKs (like Vercel AI or LangChain) and vector databases to optimize agentic workflows and context-aware responses.
  • Dependency & Version Auditing: Scan manifest files across multiple languages (Node.js, Python, Go, Rust) to detect library versions, identify conflicts, and manage technical debt.
  • Database & ORM Mapping: Automatically discover database providers and ORMs like Prisma or SQLAlchemy to ensure generated queries and schemas are compatible with the existing environment.
  • Contextual Code Generation: Provide AI models with precise framework versions and build tool information to ensure generated code follows the correct syntax and best practices.
nameProject Detection
descriptionComprehensive tech stack detection, framework identification, dependency analysis, and project.json generation. Use when analyzing project structure, detecting frameworks, identifying dependencies, discovering AI stack components, detecting databases, or when user mentions project detection, tech stack analysis, framework discovery, or project.json generation.

Project Detection Skill

CRITICAL: The description field above controls when Claude auto-loads this skill.

Overview

Provides comprehensive project analysis capabilities including framework detection, dependency analysis, AI stack identification, database detection, and automatic .claude/project.json generation.

Instructions

Framework Detection

  1. Use scripts/detect-frameworks.sh <project-path> to identify all frameworks
  2. Detects frontend frameworks: Next.js, React, Vue, Svelte, Angular, Solid.js
  3. Detects backend frameworks: FastAPI, Django, Flask, Express, NestJS, Go frameworks, Rust frameworks
  4. Identifies meta-frameworks and build tools
  5. Returns structured JSON output with versions and confidence scores

Dependency Analysis

  1. Use scripts/detect-dependencies.sh <project-path> to analyze all dependencies
  2. Scans package.json, requirements.txt, go.mod, Cargo.toml, Gemfile, composer.json
  3. Categorizes dependencies: production, development, peer
  4. Identifies version ranges and exact versions
  5. Detects dependency conflicts and outdated packages

AI Stack Identification

  1. Use scripts/detect-ai-stack.sh <project-path> to discover AI components
  2. Detects: Vercel AI SDK, Claude Agent SDK, LangChain, Mem0, OpenAI SDK
  3. Identifies AI model providers and API integrations
  4. Discovers RAG systems and vector databases
  5. Finds agent frameworks and orchestration tools

Database Detection

  1. Use scripts/detect-database.sh <project-path> to identify databases
  2. Detects: Supabase, PostgreSQL, MongoDB, Redis, MySQL, SQLite
  3. Identifies ORMs: Prisma, TypeORM, SQLAlchemy, GORM, Diesel
  4. Finds connection strings and configuration files
  5. Discovers database migration tools

Project.json Generation

  1. Use scripts/generate-project-json.sh <project-path> to create complete project.json
  2. Aggregates all detection results into structured format
  3. Generates .claude/project.json with complete tech stack information
  4. Includes framework versions, dependencies, AI stack, databases
  5. Adds metadata: language, build tools, test frameworks, deployment targets

Available Scripts

  • detect-frameworks.sh: Comprehensive framework detection across all languages
  • detect-dependencies.sh: Dependency analysis from all package managers
  • detect-ai-stack.sh: AI/ML stack component identification
  • detect-database.sh: Database and ORM detection
  • generate-project-json.sh: Master script that generates complete project.json
  • validate-detection.sh: Validates detection accuracy and completeness

Templates

  • project.json.template: Complete project.json structure with all fields
  • framework-patterns.json: Detection patterns for 30+ frameworks
  • dependency-patterns.json: Dependency identification patterns
  • ai-stack-patterns.json: AI/ML component detection patterns
  • database-patterns.json: Database detection patterns
  • detection-report.md: Human-readable detection report template

Examples

See examples/ directory for detailed usage examples:

  • basic-usage.md - Simple project detection workflow
  • advanced-detection.md - Complex multi-framework projects
  • ai-stack-discovery.md - AI stack identification patterns
  • database-analysis.md - Database and ORM detection
  • project-json-generation.md - Complete project.json generation

Detection Strategies

Frontend Detection

  • Check for framework-specific config files (next.config.js, vite.config.ts)
  • Scan package.json for framework dependencies
  • Identify build tool configurations
  • Detect UI component libraries (shadcn, Material-UI, Tailwind UI)

Backend Detection

  • Identify web framework imports and decorators
  • Scan for framework-specific file structures
  • Detect API route patterns
  • Find server configuration files

AI Stack Detection

  • Search for AI SDK imports and usage
  • Identify model provider API keys in env files
  • Detect vector database configurations
  • Find agent and tool definitions

Database Detection

  • Scan for database client imports
  • Find ORM schema definitions
  • Identify connection string patterns
  • Detect migration directories

Output Format

All detection scripts output JSON in this format:

{
  "detected": true,
  "confidence": "high|medium|low",
  "type": "framework|database|ai-stack",
  "name": "Framework Name",
  "version": "1.0.0",
  "files": ["list", "of", "evidence", "files"],
  "metadata": {}
}

Requirements

  • Support 30+ frameworks across 8+ languages
  • Provide confidence scores for all detections
  • Include file paths as evidence
  • Generate valid project.json schema
  • Handle monorepos and multi-framework projects
  • Detect framework versions accurately
  • Identify both direct and transitive dependencies

Integration

This skill is used by:

  • foundation:init command - Initial project analysis
  • foundation:analyze command - Deep project structure analysis
  • All code generation skills - Framework-specific code templates
  • All deployment commands - Framework-specific deployment configs

Purpose: Comprehensive project analysis and tech stack detection Used by: All agents requiring project context and framework information