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.
What this skill does
# 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"},
"maniRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.