stack-analyzer

Analyze project stack and recommend skills. Auto-detects frameworks, activates generic ai-dev-kit skills, and optionally scaffolds project-specific skills in the target repo.

242 stars

Best use case

stack-analyzer is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Analyze project stack and recommend skills. Auto-detects frameworks, activates generic ai-dev-kit skills, and optionally scaffolds project-specific skills in the target repo.

Analyze project stack and recommend skills. Auto-detects frameworks, activates generic ai-dev-kit skills, and optionally scaffolds project-specific skills in the target repo.

Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.

Practical example

Example input

Use the "stack-analyzer" skill to help with this workflow task. Context: Analyze project stack and recommend skills. Auto-detects frameworks, activates generic ai-dev-kit skills, and optionally scaffolds project-specific skills in the target repo.

Example output

A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.

When to use this skill

  • Use this skill when you want a reusable workflow rather than writing the same prompt again and again.

When not to use this skill

  • Do not use this when you only need a one-off answer and do not need a reusable workflow.
  • Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/stack-analyzer/SKILL.md --create-dirs "https://raw.githubusercontent.com/aiskillstore/marketplace/main/skills/consiliency/stack-analyzer/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/stack-analyzer/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How stack-analyzer Compares

Feature / Agentstack-analyzerStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Analyze project stack and recommend skills. Auto-detects frameworks, activates generic ai-dev-kit skills, and optionally scaffolds project-specific skills in the target repo.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Stack Analyzer Skill

A meta-skill that analyzes a project's technology stack and recommends or scaffolds appropriate skills for AI-assisted development. This skill runs automatically during `/ai-dev-kit:setup` but can also be invoked manually.

## Design Principles

### Plugin Isolation

**Leave No Trace**: The ai-dev-kit plugin must be completely removable without leaving artifacts. This skill enforces:

| Component | Location | On Uninstall |
|-----------|----------|--------------|
| Generic skills | `plugins/ai-dev-kit/skills/` | Removed with plugin |
| Project-specific skills | Target repo `.claude/skills/` | User's choice |
| Generated manifest | `.claude/skills/_generated.json` | User's choice |

### Generality

All ai-dev-kit skills are **framework-generic**, not tailored to any specific codebase:

| Pattern | Correct | Wrong |
|---------|---------|-------|
| BAML skill | Universal BAML patterns | CodeGraph-DE-specific DTOs |
| Supabase skill | General best practices | Book-Vetting-specific queries |
| Schema alignment | Works with any ORM | Assumes specific models |

## Variables

| Variable | Default | Description |
|----------|---------|-------------|
| AUTO_ACTIVATE | false | Automatically activate recommended generic skills |
| SCAFFOLD_SKILLS | false | Scaffold project-specific skills in target repo |
| OUTPUT_REPORT | true | Generate recommendation report |
| MANIFEST_PATH | .claude/skills/_generated.json | Path for generated manifest |

## Instructions

**MANDATORY** - Follow the Workflow steps below in order.

1. Run `library-detection` skill to get project stack
2. Match detected stack against skill recommendations
3. Report recommended generic skills
4. Optionally scaffold project-specific skills
5. Update generated manifest if skills were created

## Red Flags - STOP and Reconsider

If you're about to:
- Create a skill tailored to a specific codebase (vs generic pattern)
- Put project-specific skills in the plugin directory
- Skip the generated manifest update
- Recommend skills for undetected technologies

**STOP** -> Verify the detection results -> Use generic patterns -> Then proceed

## Workflow

### 1. Detect Project Stack

Invoke the `library-detection` skill first:

```markdown
Read and execute plugins/ai-dev-kit/skills/library-detection/SKILL.md

This returns:
- languages (typescript, python, etc.)
- frameworks (react, fastapi, etc.)
- test_frameworks (vitest, pytest, etc.)
- databases (postgresql, sqlite, etc.)
- build_tools (vite, uv, etc.)
```

### 2. Match Against Skill Recommendations

Load recommendations from `./config/recommendations.yaml` and match:

```yaml
For each detected technology:
  IF matches skill activation rule:
    Add to recommended_skills list
  IF matches scaffold template rule:
    Add to scaffold_candidates list
```

### 3. Generate Report

Create a recommendation report:

```markdown
# Stack Analysis Report

## Detected Stack
- **Languages**: TypeScript, Python
- **Frameworks**: Next.js, FastAPI
- **Database**: PostgreSQL (via Supabase)
- **Test**: Vitest, Pytest
- **AI/ML**: BAML

## Recommended Generic Skills (in plugin)

| Skill | Reason | Status |
|-------|--------|--------|
| baml-integration | BAML detected in baml_src/ | Active |
| supabase-patterns | Supabase dependency found | Active |
| schema-alignment | SQLAlchemy detected | Active |

## Project-Specific Skills (scaffoldable)

| Template | Trigger | Output |
|----------|---------|--------|
| project-research | 3 research subagents found | .claude/skills/{project}-research/ |
| project-domain | Models in src/models/ | .claude/skills/{project}-domain/ |
```

### 4. Scaffold Project-Specific Skills (if enabled)

For each scaffold candidate:

```bash
# 1. Copy template to target repo
cp -r ./templates/{template}/ ${TARGET_REPO}/.claude/skills/{project}-{template}/

# 2. Add generation header to SKILL.md
echo "<!-- Generated by ai-dev-kit:recommend-skills on $(date) -->" | \
  cat - ./templates/{template}/SKILL.md > temp && mv temp SKILL.md

# 3. Customize with project name
sed -i "s/{project}/${PROJECT_NAME}/g" SKILL.md
```

### 5. Update Generated Manifest

Create or update `.claude/skills/_generated.json`:

```json
{
  "generated_by": "ai-dev-kit:recommend-skills",
  "generated_at": "2025-12-24T10:00:00Z",
  "plugin_version": "1.0.0",
  "skills_created": [
    {
      "path": ".claude/skills/book-vetting-research/",
      "template": "project-research",
      "created_at": "2025-12-24T10:00:00Z"
    }
  ],
  "docs_created": [
    "ai-docs/libraries/baml/"
  ],
  "cleanup_instructions": "These files were generated by ai-dev-kit. You may delete them after uninstalling the plugin."
}
```

## Skill Recommendation Rules

### Generic Skills (Activate)

| Skill | Detection Criteria |
|-------|-------------------|
| `baml-integration` | `baml_src/**/*.baml` exists OR `baml-py`/`baml` dependency |
| `supabase-patterns` | `supabase` dependency OR `supabase/migrations/` exists |
| `schema-alignment` | `sqlalchemy`/`prisma`/`django`/`alembic` detected |
| `treesitter-patterns` | `tree-sitter`/`tree_sitter` dependency |
| `security-audit` | Always recommended for production codebases |

### Project-Specific Skills (Scaffold)

| Template | Detection Criteria |
|----------|-------------------|
| `project-research` | `.claude/commands/**/research/**` OR `subagent.*research` pattern |
| `project-domain` | `src/models/**` OR `services/domain/**` exists |
| `project-testing` | Custom test patterns beyond standard frameworks |

## Templates

### project-research

For projects with research-oriented subagents:

```
templates/project-research/
├── SKILL.md          # Customized research patterns
├── cookbook/
│   └── research-workflow.md
└── reference/
    └── source-types.md
```

### project-domain

For projects with rich domain models:

```
templates/project-domain/
├── SKILL.md          # Domain vocabulary and patterns
├── cookbook/
│   └── entity-relationships.md
└── reference/
    └── domain-glossary.md
```

### project-testing

For projects with custom testing requirements:

```
templates/project-testing/
├── SKILL.md          # Custom test patterns
├── cookbook/
│   └── test-fixtures.md
└── reference/
    └── coverage-requirements.md
```

## Integration

### With /ai-dev-kit:setup

Automatically runs during brownfield setup:

```markdown
1. User runs: /ai-dev-kit:setup
2. Setup invokes: stack-analyzer skill
3. Stack analyzer:
   - Detects stack
   - Displays recommendations
   - Prompts: "Activate recommended skills? [y/N]"
   - If yes: marks skills as active
   - Prompts: "Scaffold project-specific skills? [y/N]"
   - If yes: creates skills in target repo
4. Setup continues with remaining steps
```

### With /ai-dev-kit:recommend-skills

Direct invocation:

```bash
# Report only (no changes)
/ai-dev-kit:recommend-skills

# Auto-activate generic skills
/ai-dev-kit:recommend-skills --auto-activate

# Scaffold project-specific skills
/ai-dev-kit:recommend-skills --scaffold

# All options
/ai-dev-kit:recommend-skills --auto-activate --scaffold --output=report.md
```

## Output Schema

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "detected_stack": {
      "type": "object",
      "description": "Output from library-detection skill"
    },
    "recommended_skills": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "skill": {"type": "string"},
          "reason": {"type": "string"},
          "status": {"enum": ["recommended", "active", "not_applicable"]}
        }
      }
    },
    "scaffold_candidates": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "template": {"type": "string"},
          "trigger": {"type": "string"},
          "output_path": {"type": "string"},
          "created": {"type": "boolean"}
        }
      }
    },
    "manifest_updated": {"type": "boolean"},
    "manifest_path": {"type": "string"}
  }
}
```

## Cleanup on Uninstall

When ai-dev-kit plugin is removed, inform user:

```markdown
## ai-dev-kit Uninstall Notice

The following files were generated by ai-dev-kit and persist after uninstall:

**Project-specific skills:**
- .claude/skills/book-vetting-research/
- .claude/skills/book-vetting-domain/

**Documentation:**
- ai-docs/libraries/baml/
- ai-docs/libraries/supabase/

See .claude/skills/_generated.json for full list.

These files are safe to delete if no longer needed.
```

Related Skills

full-stack-orchestration-full-stack-feature

242
from aiskillstore/marketplace

Use when working with full stack orchestration full stack feature

fullstack-dev

242
from aiskillstore/marketplace

Full-stack backend architecture and frontend-backend integration guide. TRIGGER when: building a full-stack app, creating REST API with frontend, scaffolding backend service, building todo app, building CRUD app, building real-time app, building chat app, Express + React, Next.js API, Node.js backend, Python backend, Go backend, designing service layers, implementing error handling, managing config/auth, setting up API clients, implementing auth flows, handling file uploads, adding real-time features (SSE/WebSocket), hardening for production. DO NOT TRIGGER when: pure frontend UI work, pure CSS/styling, database schema only.

tanstack-query

242
from aiskillstore/marketplace

Manage server state in React with TanStack Query v5. Covers useMutationState, simplified optimistic updates, throwOnError, network mode (offline/PWA), and infiniteQueryOptions. Use when setting up data fetching, fixing v4→v5 migration errors (object syntax, gcTime, isPending, keepPreviousData), or debugging SSR/hydration issues with streaming server components.

health-trend-analyzer

242
from aiskillstore/marketplace

分析一段时间内健康数据的趋势和模式。关联药物、症状、生命体征、化验结果和其他健康指标的变化。识别令人担忧的趋势、改善情况,并提供数据驱动的洞察。当用户询问健康趋势、模式、随时间的变化或"我的健康状况有什么变化?"时使用。支持多维度分析(体重/BMI、症状、药物依从性、化验结果、情绪睡眠),相关性分析,变化检测,以及交互式HTML可视化报告(ECharts图表)。

when-optimizing-prompts-use-prompt-optimization-analyzer

242
from aiskillstore/marketplace

Active diagnostic tool for analyzing prompt quality, detecting anti-patterns, identifying token waste, and providing optimization recommendations

when-auditing-security-use-security-analyzer

242
from aiskillstore/marketplace

Comprehensive security auditing across static analysis, dynamic testing, dependency vulnerabilities, secrets detection, and OWASP compliance

when-analyzing-user-intent-use-intent-analyzer

242
from aiskillstore/marketplace

Advanced intent interpretation system using cognitive science principles and probabilistic intent mapping

when-analyzing-skill-gaps-use-skill-gap-analyzer

242
from aiskillstore/marketplace

Analyze skill library to identify coverage gaps, redundant overlaps, optimization opportunities, and provide recommendations for skill portfolio improvement

intent-analyzer

242
from aiskillstore/marketplace

Advanced intent interpretation system that analyzes user requests using cognitive science principles and extrapolates logical volition. Use when user requests are ambiguous, when deeper understanding would improve response quality, or when helping users clarify what they truly need. Applies probabilistic intent mapping, first principles decomposition, and Socratic clarification to transform vague requests into well-understood goals.

tanstack-integration

242
from aiskillstore/marketplace

Find opportunities to improve web application code using TanStack libraries (Query, Table, Form, Router, etc.). Avoid man-with-hammer syndrome by applying TanStack after vanilla implementation works.

global-tech-stack

242
from aiskillstore/marketplace

Understand and adhere to the project's technology stack including Laravel, PHP, React, PostgreSQL, Pest, Tailwind CSS, and all configured tools and services. Use this skill when making architectural decisions, when choosing libraries or packages, when configuring development tools, when setting up testing frameworks, when implementing authentication, when integrating third-party services, when configuring CI/CD pipelines, when setting up local development environments, or when ensuring consistency with the established tech stack across all parts of the application.

naming-analyzer

242
from aiskillstore/marketplace

Suggest better variable, function, and class names based on context and conventions.