Platform Detection
Automatically detect project type and recommend optimal deployment platforms based on project characteristics, frameworks, and hosting requirements.
Overview
This skill provides comprehensive project detection and platform recommendation capabilities:
- Project Type Detection: Identifies MCP servers, REST APIs, GraphQL APIs, frontend apps, static sites, monorepos
- Framework Detection: Recognizes Next.js, React, Vue, Astro, FastAPI, Express, FastMCP, and more
- Platform Recommendation: Maps projects to optimal hosting platforms (FastMCP Cloud, DigitalOcean, Vercel, Hostinger, Netlify, Cloudflare)
- Configuration Analysis: Examines package.json, requirements.txt, Dockerfile, and other config files
- Multi-Service Detection: Handles monorepos and projects with multiple deployment targets
Available Scripts
Detection Scripts
scripts/detect-project-type.sh
- Analyzes project structure to identify project type
- Checks for package.json, requirements.txt, MCP manifest, Dockerfile
- Detects frameworks and dependencies
- Returns:
mcp-server, api, frontend, static-site, or monorepo
- Usage:
bash scripts/detect-project-type.sh <project-path>
scripts/detect-framework.sh
- Identifies specific framework used in project
- Scans dependencies and configuration files
- Detects: FastMCP, Next.js, React, Vue, Astro, FastAPI, Express, etc.
- Returns: Framework name and version
- Usage:
bash scripts/detect-framework.sh <project-path>
scripts/recommend-platform.sh
- Recommends deployment platform based on project characteristics
- Considers project type, framework, scalability needs, budget
- Returns: Platform name with justification
- Usage:
bash scripts/recommend-platform.sh <project-path>
Validation Scripts
scripts/validate-platform-requirements.sh
- Validates project meets requirements for target platform
- Checks for required configuration files
- Verifies deployment scripts and build commands
- Reports missing dependencies or configuration
- Usage:
bash scripts/validate-platform-requirements.sh <project-path> <platform>
scripts/analyze-deployment-config.sh
- Analyzes existing deployment configuration
- Detects Docker, CI/CD pipelines, deployment scripts
- Identifies optimization opportunities
- Usage:
bash scripts/analyze-deployment-config.sh <project-path>
Available Templates
Detection Rules Templates
templates/detection-rules.json
- Complete ruleset for project type detection
- File patterns, dependency patterns, framework signatures
- Extensible JSON structure for adding new detection rules
templates/platform-routing-rules.json
- Platform recommendation logic
- Maps project characteristics to optimal platforms
- Includes scoring weights for multi-criteria decisions
templates/framework-signatures.json
- Framework detection patterns
- Dependencies, file structures, config patterns
- Supports TypeScript and Python frameworks
Configuration Templates
templates/platform-config/fastmcp-cloud.json
- FastMCP Cloud deployment configuration template
- Server configuration, environment variables, scaling settings
templates/platform-config/digitalocean.json
- DigitalOcean App Platform configuration template
- Build settings, resource allocation, environment setup
templates/platform-config/vercel.json
- Vercel deployment configuration template
- Build commands, output directory, serverless functions
Available Examples
examples/basic-detection.md
- Simple project type detection workflow
- Single-service project examples
- Common detection scenarios
examples/advanced-monorepo-detection.md
- Complex monorepo detection with multiple services
- Handling projects with API + frontend
- Multi-platform deployment recommendations
examples/platform-recommendation-flow.md
- Complete platform recommendation workflow
- Decision tree examples
- Platform comparison matrices
examples/error-handling.md
- Edge cases and error scenarios
- Ambiguous project structures
- Missing configuration handling
- Fallback strategies
examples/integration-with-deploy-commands.md
- Using platform-detection in deployment workflows
- Integration with
/deployment:deploy command
- Automated platform selection in CI/CD
Usage Instructions
1. Detect Project Type
# Detect project type
PROJECT_TYPE=$(bash scripts/detect-project-type.sh /path/to/project)
echo "Detected: $PROJECT_TYPE"
2. Detect Framework
# Detect framework and version
FRAMEWORK=$(bash scripts/detect-framework.sh /path/to/project)
echo "Framework: $FRAMEWORK"
3. Recommend Platform
# Get platform recommendation
PLATFORM=$(bash scripts/recommend-platform.sh /path/to/project)
echo "Recommended: $PLATFORM"
4. Validate Platform Requirements
# Validate project for specific platform
bash scripts/validate-platform-requirements.sh /path/to/project vercel
5. Complete Detection Workflow
# Full detection and recommendation
cd /path/to/project
# Step 1: Detect type
PROJECT_TYPE=$(bash scripts/detect-project-type.sh .)
echo "Project Type: $PROJECT_TYPE"
# Step 2: Detect framework
FRAMEWORK=$(bash scripts/detect-framework.sh .)
echo "Framework: $FRAMEWORK"
# Step 3: Recommend platform
PLATFORM=$(bash scripts/recommend-platform.sh .)
echo "Recommended Platform: $PLATFORM"
# Step 4: Validate requirements
bash scripts/validate-platform-requirements.sh . "$PLATFORM"
Detection Logic
Project Type Detection Rules
MCP Server
- Has
.mcp.json or MCP manifest
- Contains FastMCP dependencies
- Has MCP server initialization code
API
- Has REST/GraphQL endpoints
- Contains FastAPI, Express, or similar framework
- Has API routing configuration
Frontend
- Has Next.js, React, Vue, or Astro
- Contains client-side routing
- Has build process for static assets
Static Site
- No server-side code
- Contains only HTML/CSS/JS
- Has static site generator (Hugo, Jekyll, etc.)
Monorepo
- Contains multiple services
- Has workspace configuration (pnpm, yarn, lerna)
- Multiple package.json files
Platform Recommendation Logic
FastMCP Cloud
- Project Type: MCP Server
- Framework: FastMCP (Python or TypeScript)
- Best for: MCP server hosting with automatic scaling
DigitalOcean App Platform
- Project Type: API, MCP Server (non-FastMCP)
- Languages: Any (Docker support)
- Best for: Containerized applications, custom backends
Vercel
- Project Type: Frontend, Static Site, Full-stack (Next.js)
- Frameworks: Next.js, React, Vue, Astro
- Best for: Frontend apps, serverless functions, edge computing
Hostinger / Netlify / Cloudflare Pages
- Project Type: Static Site, Frontend
- Best for: Static hosting, CDN distribution, simple sites
Requirements
- Project must have identifiable configuration files (package.json, requirements.txt, etc.)
- For accurate framework detection, dependencies must be installed or listed
- Platform recommendations assume standard project structures
- Validation requires target platform's deployment requirements
Integration Points
This skill integrates with:
/deployment:deploy - Automatic platform selection
/deployment:validate - Pre-deployment validation
/deployment:configure - Platform-specific configuration
- Deployment agents for automated decision-making
Skill Location: /home/gotime2022/.claude/plugins/marketplaces/ai-dev-marketplace/plugins/deployment/skills/platform-detection/
Version: 1.0.0
1---2name: platform-detection3description: Detect project type and recommend deployment platform. Use when deploying projects, choosing hosting platforms, analyzing project structure, or when user mentions deployment, platform selection, MCP servers, APIs, frontend apps, static sites, FastMCP Cloud, DigitalOcean, Vercel, Hostinger, Netlify, or Cloudflare.4---56# Platform Detection78Automatically detect project type and recommend optimal deployment platforms based on project characteristics, frameworks, and hosting requirements.910## Overview1112This skill provides comprehensive project detection and platform recommendation capabilities:1314- **Project Type Detection**: Identifies MCP servers, REST APIs, GraphQL APIs, frontend apps, static sites, monorepos15- **Framework Detection**: Recognizes Next.js, React, Vue, Astro, FastAPI, Express, FastMCP, and more16- **Platform Recommendation**: Maps projects to optimal hosting platforms (FastMCP Cloud, DigitalOcean, Vercel, Hostinger, Netlify, Cloudflare)17- **Configuration Analysis**: Examines package.json, requirements.txt, Dockerfile, and other config files18- **Multi-Service Detection**: Handles monorepos and projects with multiple deployment targets1920## Available Scripts2122### Detection Scripts2324**`scripts/detect-project-type.sh`**25- Analyzes project structure to identify project type26- Checks for package.json, requirements.txt, MCP manifest, Dockerfile27- Detects frameworks and dependencies28- Returns: `mcp-server`, `api`, `frontend`, `static-site`, or `monorepo`29- Usage: `bash scripts/detect-project-type.sh <project-path>`3031**`scripts/detect-framework.sh`**32- Identifies specific framework used in project33- Scans dependencies and configuration files34- Detects: FastMCP, Next.js, React, Vue, Astro, FastAPI, Express, etc.35- Returns: Framework name and version36- Usage: `bash scripts/detect-framework.sh <project-path>`3738**`scripts/recommend-platform.sh`**39- Recommends deployment platform based on project characteristics40- Considers project type, framework, scalability needs, budget41- Returns: Platform name with justification42- Usage: `bash scripts/recommend-platform.sh <project-path>`4344### Validation Scripts4546**`scripts/validate-platform-requirements.sh`**47- Validates project meets requirements for target platform48- Checks for required configuration files49- Verifies deployment scripts and build commands50- Reports missing dependencies or configuration51- Usage: `bash scripts/validate-platform-requirements.sh <project-path> <platform>`5253**`scripts/analyze-deployment-config.sh`**54- Analyzes existing deployment configuration55- Detects Docker, CI/CD pipelines, deployment scripts56- Identifies optimization opportunities57- Usage: `bash scripts/analyze-deployment-config.sh <project-path>`5859## Available Templates6061### Detection Rules Templates6263**`templates/detection-rules.json`**64- Complete ruleset for project type detection65- File patterns, dependency patterns, framework signatures66- Extensible JSON structure for adding new detection rules6768**`templates/platform-routing-rules.json`**69- Platform recommendation logic70- Maps project characteristics to optimal platforms71- Includes scoring weights for multi-criteria decisions7273**`templates/framework-signatures.json`**74- Framework detection patterns75- Dependencies, file structures, config patterns76- Supports TypeScript and Python frameworks7778### Configuration Templates7980**`templates/platform-config/fastmcp-cloud.json`**81- FastMCP Cloud deployment configuration template82- Server configuration, environment variables, scaling settings8384**`templates/platform-config/digitalocean.json`**85- DigitalOcean App Platform configuration template86- Build settings, resource allocation, environment setup8788**`templates/platform-config/vercel.json`**89- Vercel deployment configuration template90- Build commands, output directory, serverless functions9192## Available Examples9394**`examples/basic-detection.md`**95- Simple project type detection workflow96- Single-service project examples97- Common detection scenarios9899**`examples/advanced-monorepo-detection.md`**100- Complex monorepo detection with multiple services101- Handling projects with API + frontend102- Multi-platform deployment recommendations103104**`examples/platform-recommendation-flow.md`**105- Complete platform recommendation workflow106- Decision tree examples107- Platform comparison matrices108109**`examples/error-handling.md`**110- Edge cases and error scenarios111- Ambiguous project structures112- Missing configuration handling113- Fallback strategies114115**`examples/integration-with-deploy-commands.md`**116- Using platform-detection in deployment workflows117- Integration with `/deployment:deploy` command118- Automated platform selection in CI/CD119120## Usage Instructions121122### 1. Detect Project Type123124```bash125# Detect project type126PROJECT_TYPE=$(bash scripts/detect-project-type.sh /path/to/project)127echo "Detected: $PROJECT_TYPE"128```129130### 2. Detect Framework131132```bash133# Detect framework and version134FRAMEWORK=$(bash scripts/detect-framework.sh /path/to/project)135echo "Framework: $FRAMEWORK"136```137138### 3. Recommend Platform139140```bash141# Get platform recommendation142PLATFORM=$(bash scripts/recommend-platform.sh /path/to/project)143echo "Recommended: $PLATFORM"144```145146### 4. Validate Platform Requirements147148```bash149# Validate project for specific platform150bash scripts/validate-platform-requirements.sh /path/to/project vercel151```152153### 5. Complete Detection Workflow154155```bash156# Full detection and recommendation157cd /path/to/project158159# Step 1: Detect type160PROJECT_TYPE=$(bash scripts/detect-project-type.sh .)161echo "Project Type: $PROJECT_TYPE"162163# Step 2: Detect framework164FRAMEWORK=$(bash scripts/detect-framework.sh .)165echo "Framework: $FRAMEWORK"166167# Step 3: Recommend platform168PLATFORM=$(bash scripts/recommend-platform.sh .)169echo "Recommended Platform: $PLATFORM"170171# Step 4: Validate requirements172bash scripts/validate-platform-requirements.sh . "$PLATFORM"173```174175## Detection Logic176177### Project Type Detection Rules1781791. **MCP Server**180 - Has `.mcp.json` or MCP manifest181 - Contains FastMCP dependencies182 - Has MCP server initialization code1831842. **API**185 - Has REST/GraphQL endpoints186 - Contains FastAPI, Express, or similar framework187 - Has API routing configuration1881893. **Frontend**190 - Has Next.js, React, Vue, or Astro191 - Contains client-side routing192 - Has build process for static assets1931944. **Static Site**195 - No server-side code196 - Contains only HTML/CSS/JS197 - Has static site generator (Hugo, Jekyll, etc.)1981995. **Monorepo**200 - Contains multiple services201 - Has workspace configuration (pnpm, yarn, lerna)202 - Multiple package.json files203204### Platform Recommendation Logic205206**FastMCP Cloud**207- Project Type: MCP Server208- Framework: FastMCP (Python or TypeScript)209- Best for: MCP server hosting with automatic scaling210211**DigitalOcean App Platform**212- Project Type: API, MCP Server (non-FastMCP)213- Languages: Any (Docker support)214- Best for: Containerized applications, custom backends215216**Vercel**217- Project Type: Frontend, Static Site, Full-stack (Next.js)218- Frameworks: Next.js, React, Vue, Astro219- Best for: Frontend apps, serverless functions, edge computing220221**Hostinger / Netlify / Cloudflare Pages**222- Project Type: Static Site, Frontend223- Best for: Static hosting, CDN distribution, simple sites224225## Requirements226227- Project must have identifiable configuration files (package.json, requirements.txt, etc.)228- For accurate framework detection, dependencies must be installed or listed229- Platform recommendations assume standard project structures230- Validation requires target platform's deployment requirements231232## Integration Points233234This skill integrates with:235- `/deployment:deploy` - Automatic platform selection236- `/deployment:validate` - Pre-deployment validation237- `/deployment:configure` - Platform-specific configuration238- Deployment agents for automated decision-making239240---241242**Skill Location**: /home/gotime2022/.claude/plugins/marketplaces/ai-dev-marketplace/plugins/deployment/skills/platform-detection/243**Version**: 1.0.0