Loading...
Loading...
Set up Claude Code context for a project. Analyzes tech stack, installs relevant skills from skills.sh, generates custom skills, and configures MCP servers. Use when starting new project, setting up AI context, or asking "set up project", "configure AI", "what skills do I need".
npx skill4agent add lee-to/ai-factory ai-factory/ai-factory.skill-generatorpython3 ~/{{skills_dir}}/skill-generator/scripts/security-scan.py <installed-skill-path>rm -rf <skill-path>For each recommended skill:
1. Search: npx skills search <name>
2. If found → Install: npx skills install <name>
3. SECURITY: Scan installed skill → python security-scan.py <path>
- BLOCKED? → rm -rf <path>, warn user, skip this skill
- WARNINGS? → show to user, ask confirmation
4. If not found → Generate: /ai-factory.skill-generator <name>
5. Has reference URLs? → Learn: /ai-factory.skill-generator <url1> [url2]...Check $ARGUMENTS:
├── Has description? → Mode 2: New Project with Description
└── No arguments?
└── Check project files (package.json, composer.json, etc.)
├── Files exist? → Mode 1: Analyze Existing Project
└── Empty project? → Mode 3: Interactive New Project/ai-factorypackage.jsoncomposer.jsonrequirements.txtpyproject.tomlgo.modCargo.tomldocker-compose.ymlprisma/schema.prismasrc/app/api/| Detection | Skills | MCP |
|---|---|---|
| Next.js/React | | - |
| Express/Fastify/Hono | | - |
| Laravel/Symfony | | |
| Prisma/PostgreSQL | | |
| MongoDB | | - |
| GitHub repo (.git) | - | |
| Stripe/payments | | - |
npx skills search nextjs
npx skills search prisma## 🏭 Project Analysis
**Detected Stack:** Next.js 14, TypeScript, PostgreSQL (Prisma)
## Setup Plan
### Skills
**From skills.sh:**
- nextjs-app-router ✓
**Generate custom:**
- project-api (specific to this project's routes)
### MCP Servers
- [x] GitHub
- [x] Postgres
Proceed? [Y/n]mkdir -p .ai-factory.ai-factory/DESCRIPTION.mdnpx skills install <name>
# AUTO-SCAN: immediately after install
python3 ~/{{skills_dir}}/skill-generator/scripts/security-scan.py <installed-path>rm -rf <path>/ai-factory.skill-generator{{settings_file}}AGENTS.md/ai-factory e-commerce with Stripe paymentsBased on your project, I recommend:
1. Language:
- [ ] TypeScript (Recommended) — type safety, great tooling
- [ ] JavaScript — simpler, faster start
- [ ] Python — good for ML/data projects
- [ ] PHP — Laravel ecosystem
- [ ] Go — high performance APIs
- [ ] Other: ___
2. Framework:
- [ ] Next.js (Recommended) — full-stack React, great DX
- [ ] Express — minimal, flexible
- [ ] Fastify — fast, schema validation
- [ ] Hono — edge-ready, lightweight
- [ ] Laravel — batteries included (PHP)
- [ ] Django/FastAPI — Python web
- [ ] Other: ___
3. Database:
- [ ] PostgreSQL (Recommended) — reliable, feature-rich
- [ ] MySQL — widely supported
- [ ] MongoDB — flexible schema
- [ ] SQLite — simple, file-based
- [ ] Supabase — Postgres + auth + realtime
- [ ] Other: ___
4. ORM/Query Builder:
- [ ] Prisma (Recommended) — type-safe, great DX
- [ ] Drizzle — lightweight, SQL-like
- [ ] TypeORM — decorator-based
- [ ] Eloquent — Laravel default
- [ ] None — raw queries# Project: [Project Name]
## Overview
[Enhanced, clear description of the project in English]
## Core Features
- [Feature 1]
- [Feature 2]
- [Feature 3]
## Tech Stack
- **Language:** [user choice]
- **Framework:** [user choice]
- **Database:** [user choice]
- **ORM:** [user choice]
- **Integrations:** [Stripe, etc.]
## Architecture Notes
[High-level architecture decisions based on the stack]
## Non-Functional Requirements
- Logging: Configurable via LOG_LEVEL
- Error handling: Structured error responses
- Security: [relevant security considerations].ai-factory/DESCRIPTION.mdmkdir -p .ai-factoryAGENTS.md/ai-factoryI don't see an existing project here. Let's set one up!
What kind of project are you building?
(e.g., "e-commerce platform", "REST API for mobile app", "SaaS dashboard")
> ___AGENTS.md.git{
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_TOKEN": "${GITHUB_TOKEN}" }
}
}{
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": { "DATABASE_URL": "${DATABASE_URL}" }
}
}{
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
}
}AGENTS.md.ai-factory/DESCRIPTION.md# AGENTS.md
> Project map for AI agents. Keep this file up-to-date as the project evolves.
## Project Overview
[1-2 sentence description from DESCRIPTION.md]
## Tech Stack
- **Language:** [language]
- **Framework:** [framework]
- **Database:** [database]
- **ORM:** [orm]
## Project Structure
\`\`\`
[directory tree with inline comments explaining each directory]
\`\`\`
## Key Entry Points
| File | Purpose |
|------|---------|
| [main entry] | [description] |
| [config file] | [description] |
| [schema file] | [description] |
## Documentation
| Document | Path | Description |
|----------|------|-------------|
| README | README.md | Project landing page |
| [other docs if they exist] | | |
## AI Context Files
| File | Purpose |
|------|---------|
| AGENTS.md | This file — project structure map |
| .ai-factory/DESCRIPTION.md | Project specification and tech stack |
| CLAUDE.md | Claude Code instructions and preferences |/ai-factory.docs✅ Project context configured!
Project description: .ai-factory/DESCRIPTION.md
Project map: AGENTS.md
Skills installed: [list]
MCP configured: [list]
To start development:
- /ai-factory.feature <description> — Start a new feature (creates branch + plan)
- /ai-factory.task <description> — Create implementation plan only
- /ai-factory.implement — Execute existing plan
Ready when you are!Your project already has code. You might also want to set up:
- /ai-factory.docs — Generate project documentation
- /ai-factory.build-automation — Configure build scripts and automation
- /ai-factory.ci — Set up CI/CD pipeline
- /ai-factory.dockerize — Containerize the project
Would you like to run any of these now?AskUserQuestion/ai-factory.docs/ai-factory.build-automation/ai-factory.ci/ai-factory.dockerize