Marketplace library-detection
Detect project stack from package manifests (package.json, pyproject.toml, go.mod, Cargo.toml, pubspec.yaml, CMakeLists.txt). Auto-identify frameworks, test tools, and build systems for onboarding.
git clone https://github.com/aiskillstore/marketplace
T=$(mktemp -d) && git clone --depth=1 https://github.com/aiskillstore/marketplace "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/consiliency/library-detection" ~/.claude/skills/aiskillstore-marketplace-library-detection && rm -rf "$T"
skills/consiliency/library-detection/SKILL.mdLibrary Detection Skill
Automatically detect the technology stack of a project by analyzing package manifests and configuration files. Returns structured data for use in onboarding, documentation discovery, and tool configuration.
Variables
| Variable | Default | Description |
|---|---|---|
| SCAN_DEPTH | 3 | Max directory depth to search for manifests |
| INCLUDE_DEV_DEPS | true | Include development dependencies in analysis |
| DETECT_FRAMEWORKS | true | Identify frameworks from dependencies |
| DETECT_TEST_TOOLS | true | Identify test frameworks and runners |
| OUTPUT_FORMAT | json | Output format: json, markdown, or toon |
Instructions
MANDATORY - Follow the Workflow steps below in order. Do not skip steps.
- Scan for package manifests in the project
- Parse each manifest to extract dependencies
- Classify dependencies into categories
- Detect frameworks and test tools from dependency patterns
- Output structured stack summary
Red Flags - STOP and Reconsider
If you're about to:
- Assume a framework without checking imports or config files
- Skip manifest files because "the project is simple"
- Hardcode framework versions instead of reading from manifests
- Report a library without verifying it's actually used
STOP -> Read the manifest files -> Verify with imports/configs -> Then report
Workflow
1. Discover Manifests
Scan for these files (in order of priority):
| File | Language | Parser |
|---|---|---|
| JavaScript/TypeScript | JSON |
| Python | TOML |
| Python | Line-based |
| Go | Go mod |
| Rust | TOML |
| Dart/Flutter | YAML |
| C/C++ | CMake |
| C/C++ | Meson |
| Bazel | Bazel |
| Java | XML |
| Java/Kotlin | Gradle DSL |
| Ruby | Ruby DSL |
| PHP | JSON |
Also check for:
- containerizationDockerfile
- container orchestrationdocker-compose.yml
- CI/CD.github/workflows/*.yml
- build systemMakefile
- TypeScript configtsconfig.json
/vite.config.*
- bundlerswebpack.config.*
2. Parse Dependencies
For each manifest, extract:
- Production dependencies: runtime requirements
- Development dependencies: build/test tools
- Peer dependencies: expected host environment
- Optional dependencies: feature flags
3. Classify Stack
Group findings into:
{ "languages": ["typescript", "python", "go", "rust", "dart", "cpp"], "frameworks": [ {"name": "react", "version": "^18.0.0", "category": "frontend"}, {"name": "fastapi", "version": "^0.100.0", "category": "backend"} ], "test_frameworks": [ {"name": "vitest", "version": "^1.0.0"}, {"name": "pytest", "version": "^7.0.0"} ], "build_tools": ["vite", "uv", "docker"], "databases": ["postgresql", "redis"], "cloud_providers": ["aws", "vercel"], "ci_cd": ["github-actions"] }
4. Framework Detection Patterns
Use the cookbook for specific detection logic:
- Read
for parsing rules./cookbook/manifest-parsing.md - Match dependency names against known framework patterns
5. Output
Return the structured stack summary in the requested format.
Cookbook
Manifest Parsing
- IF: Parsing any package manifest
- THEN: Read and execute
./cookbook/manifest-parsing.md
Quick Reference
Detection Patterns
| Dependency Pattern | Detected As |
|---|---|
, | React framework |
, | Vue framework |
| Next.js framework |
| FastAPI framework |
| Django framework |
| Flask framework |
| Express.js framework |
, | JavaScript test framework |
| Python test framework |
, , | C/C++ test framework |
, | Flutter framework |
| Testing utilities |
Category Mappings
| Category | Examples |
|---|---|
| frontend | react, vue, svelte, angular |
| backend | fastapi, django, express, gin |
| database | prisma, sqlalchemy, typeorm |
| testing | vitest, jest, pytest, playwright |
| build | vite, webpack, esbuild, rollup |
| linting | eslint, prettier, ruff, black |
| typing | typescript, mypy, pyright |
| build-native | cmake, meson, bazel |
Output Schema
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "project_root": {"type": "string"}, "scanned_at": {"type": "string", "format": "date-time"}, "languages": { "type": "array", "items": {"type": "string"} }, "frameworks": { "type": "array", "items": { "type": "object", "properties": { "name": {"type": "string"}, "version": {"type": "string"}, "category": {"type": "string"} } } }, "test_frameworks": { "type": "array", "items": { "type": "object", "properties": { "name": {"type": "string"}, "version": {"type": "string"} } } }, "build_tools": { "type": "array", "items": {"type": "string"} }, "databases": { "type": "array", "items": {"type": "string"} }, "cloud_providers": { "type": "array", "items": {"type": "string"} }, "ci_cd": { "type": "array", "items": {"type": "string"} }, "manifests_found": { "type": "array", "items": {"type": "string"} } } }
Integration
Other skills and commands can use this skill for:
- Documentation discovery: Map detected frameworks to doc sources
- Onboarding: Generate quickstart guides tailored to the stack
- Tool configuration: Auto-configure linters, formatters, test runners
- Agent routing: Select appropriate AI providers based on stack
Example usage in another skill:
## Prerequisites Before implementing, run the `library-detection` skill to identify: - Test frameworks (for writing tests) - Build tools (for verification) - Database libraries (for data layer work)