VIRIM Infotech
Your AI Assisted Product Developers

vm-codebase-analyzer

Skill detail with category, linked agents, and source metadata.

vm-codebase-analyzer

Detect project structure, programming languages, frameworks, and project type from codebase analysis. Identifies tech stack by scanning package managers, config files, and source code patterns. Use when understanding project composition before security validation. Returns project profile with technology inventory.

Category: Security & Compliance Used by 4 agents

Source: .github/skills/code-generation/vm-codebase-analyzer/SKILL.md

Used By Agents

Preview

View source preview (first 3000 chars)

# Codebase Analyzer Skill

Detects project structure, languages, frameworks, and technology stack from codebase analysis.

## When to Use This Skill

- Understanding project composition before security scans
- Detecting programming languages and frameworks
- Identifying project type (web, mobile, API, desktop)
- Discovering entry points and main modules
- Building technology inventory for security assessment
- Preparing context for intelligent check selection

## Unitary Function

**ONE RESPONSIBILITY:** Analyze codebase structure and detect technology stack

**NOT RESPONSIBLE FOR:**
- Security vulnerability scanning (see vm-vulnerability-scanner)
- Dependency vulnerability checking (see vm-dependency-scanner)
- Configuration security review (see vm-config-detector)
- Running security checks (see security validation skills)
- Fixing code issues (read-only skill)

## Input

```json
{
  "repository_path": "/path/to/codebase",
  "scan_depth": "standard",
  "include_tests": false,
  "excluded_paths": ["node_modules", "vendor", ".git"]
}
```

**Parameters:**
- **repository_path** (required): Path to codebase root
- **scan_depth** (optional): `quick` | `standard` | `deep` (default: `standard`)
- **include_tests** (optional): Include test directories in analysis (default: `false`)
- **excluded_paths** (optional): Directories to skip (default: common ignore patterns)

## Output

Project profile with technology inventory (JSON format):

```json
{
  "project_name": "my-web-app",
  "project_type": "web_api",
  "structure": {
    "root_path": "/path/to/codebase",
    "total_files": 342,
    "code_files": 187,
    "config_files": 23,
    "test_files": 89,
    "documentation_files": 43
  },
  "languages": {
    "primary": ["Python", "JavaScript"],
    "secondary": ["HTML", "CSS"],
    "detected": {
      "Python": {"files": 87, "lines": 12453, "percentage": 68.2},
      "JavaScript": {"files": 45, "lines": 5821, "percentage": 31.8}
    }
  },
  "frameworks": [
    {
      "name": "Flask",
      "type": "web_framework",
      "version": "2.3.0",
      "confidence": "high",
      "evidence": ["requirements.txt", "app.py imports"]
    },
    {
      "name": "React",
      "type": "frontend_framework",
      "version": "18.2.0",
      "confidence": "high",
      "evidence": ["package.json", "jsx files"]
    }
  ],
  "package_managers": {
    "python": {
      "type": "pip",
      "files": ["requirements.txt", "setup.py"],
      "dependencies_count": 45
    },
    "javascript": {
      "type": "npm",
      "files": ["package.json", "package-lock.json"],
      "dependencies_count": 312
    }
  },
  "entry_points": [
    "app.py",
    "src/index.js",
    "manage.py"
  ],
  "project_patterns": {
    "has_api": true,
    "has_database": true,
    "has_authentication": true,
    "has_frontend": true,
    "has_docker": true,
    "has_tests": true,
    "has_ci_cd": true
  },
  "confidence_score": 0.92
}
```

## Detection Methods

### Language Detection
- **File extensio