context-detection
Automatically detect project tech stack, frameworks, and development context
When & Why to Use This Skill
The Project Context Detection skill is an automated diagnostic tool designed to identify a project's technical DNA. It scans file systems for configuration files, lock files, and directory patterns to accurately detect programming languages (Node.js, Python, Go, etc.), frameworks (React, Next.js, Django), and testing suites. This enables AI agents to gain immediate situational awareness, ensuring that subsequent actions and code generations are perfectly aligned with the existing tech stack and development patterns.
Use Cases
- Instant Tech Stack Identification: Automatically detect if a project uses TypeScript, Go, or Python by analyzing root configuration files like tsconfig.json, go.mod, or requirements.txt.
- Framework-Specific Optimization: Identify the presence of frameworks like Next.js, FastAPI, or Rails to tailor code suggestions and architectural advice to specific framework best practices.
- Automated Agent Tooling: Feed detected context into orchestration layers to automatically fetch and enable relevant skills, such as specialized testing or deployment tools, based on the project's needs.
- Project Structure Analysis: Determine project types (e.g., fullstack, frontend, or API) by analyzing directory layouts, such as the presence of an 'app' directory or database schemas.
- Dependency and Tooling Audit: Quickly identify which package managers (pnpm, yarn, poetry) and testing frameworks (Jest, Playwright, Pytest) are in use to maintain environment consistency.
| name | context-detection |
|---|---|
| description | Automatically detect project tech stack, frameworks, and development context |
Project Context Detection
Automatically analyzes the current project to detect technologies, frameworks, and development patterns.
When to Use
This skill is invoked when:
- Running
/auto-skillscommand
Detection Methods
1. File System Analysis
Check for configuration files and lock files:
| Technology | Indicators |
|---|---|
| Node.js | package.json, package-lock.json, yarn.lock, pnpm-lock.yaml |
| Go | go.mod, go.sum, *.go files |
| Python | requirements.txt, pyproject.toml, Pipfile, poetry.lock |
| Ruby | Gemfile, Gemfile.lock |
| Rust | Cargo.toml, Cargo.lock |
| Java | pom.xml, build.gradle |
| TypeScript | tsconfig.json |
2. Framework Detection
| Framework | Indicators |
|---|---|
| Next.js | next.config.js, app/ directory with page.tsx |
| React | package.json contains react, JSX files |
| Vue | package.json contains vue, .vue files |
| GraphQL | .graphql files, schema.graphql, Apollo/GraphQL in deps |
| Express | express in dependencies |
| FastAPI | fastapi in dependencies |
| Django | django in dependencies, manage.py |
| Rails | rails in dependencies, config/routes.rb |
3. Testing Frameworks
| Framework | Indicators |
|---|---|
| Jest | jest.config.js, *.test.js, *.spec.js |
| Playwright | playwright.config.js, *.spec.ts |
| Pytest | pytest.ini, conftest.py, test_*.py |
| Go testing | *_test.go files |
4. Code Analysis
Analyze file extensions and imports:
- Count file types (
.go,.tsx,.py, etc.) - Analyze import statements for frameworks
- Check for API routes, database schemas
Output Format
Return a structured context object:
{
"languages": ["go", "javascript"],
"frameworks": ["nextjs", "graphql"],
"testing": ["playwright", "go-testing"],
"packageManager": "pnpm",
"hasApi": true,
"hasDatabase": true,
"projectType": "fullstack"
}
Example Workflow
When detecting context for a project:
- Scan root directory for config files
- Analyze
package.json,go.mod, or equivalent - Count file types in
src/or main directories - Check for test files and frameworks
- Return structured context for auto-installation decisions
Integration
This skill feeds into:
- scan: Determines which SkillsMP skills to fetch