Library 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 |
package.json |
JavaScript/TypeScript |
JSON |
pyproject.toml |
Python |
TOML |
requirements.txt |
Python |
Line-based |
go.mod |
Go |
Go mod |
Cargo.toml |
Rust |
TOML |
pubspec.yaml |
Dart/Flutter |
YAML |
CMakeLists.txt |
C/C++ |
CMake |
meson.build |
C/C++ |
Meson |
WORKSPACE |
Bazel |
Bazel |
pom.xml |
Java |
XML |
build.gradle |
Java/Kotlin |
Gradle DSL |
Gemfile |
Ruby |
Ruby DSL |
composer.json |
PHP |
JSON |
Also check for:
Dockerfile - containerization
docker-compose.yml - container orchestration
.github/workflows/*.yml - CI/CD
Makefile - build system
tsconfig.json - TypeScript config
vite.config.* / webpack.config.* - bundlers
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
./cookbook/manifest-parsing.md for parsing rules
- 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, react-dom |
React framework |
vue, @vue/* |
Vue framework |
next |
Next.js framework |
fastapi |
FastAPI framework |
django |
Django framework |
flask |
Flask framework |
express |
Express.js framework |
vitest, jest |
JavaScript test framework |
pytest |
Python test framework |
gtest, gmock, catch2 |
C/C++ test framework |
flutter, flutter_test |
Flutter framework |
@testing-library/* |
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)
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: library-detection3description: 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. Use when this capability is needed.4---56# Library Detection Skill78Automatically 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.910## Variables1112| Variable | Default | Description |13|----------|---------|-------------|14| SCAN_DEPTH | 3 | Max directory depth to search for manifests |15| INCLUDE_DEV_DEPS | true | Include development dependencies in analysis |16| DETECT_FRAMEWORKS | true | Identify frameworks from dependencies |17| DETECT_TEST_TOOLS | true | Identify test frameworks and runners |18| OUTPUT_FORMAT | json | Output format: json, markdown, or toon |1920## Instructions2122**MANDATORY** - Follow the Workflow steps below in order. Do not skip steps.23241. Scan for package manifests in the project252. Parse each manifest to extract dependencies263. Classify dependencies into categories274. Detect frameworks and test tools from dependency patterns285. Output structured stack summary2930## Red Flags - STOP and Reconsider3132If you're about to:33- Assume a framework without checking imports or config files34- Skip manifest files because "the project is simple"35- Hardcode framework versions instead of reading from manifests36- Report a library without verifying it's actually used3738**STOP** -> Read the manifest files -> Verify with imports/configs -> Then report3940## Workflow4142### 1. Discover Manifests4344Scan for these files (in order of priority):4546| File | Language | Parser |47|------|----------|--------|48| `package.json` | JavaScript/TypeScript | JSON |49| `pyproject.toml` | Python | TOML |50| `requirements.txt` | Python | Line-based |51| `go.mod` | Go | Go mod |52| `Cargo.toml` | Rust | TOML |53| `pubspec.yaml` | Dart/Flutter | YAML |54| `CMakeLists.txt` | C/C++ | CMake |55| `meson.build` | C/C++ | Meson |56| `WORKSPACE` | Bazel | Bazel |57| `pom.xml` | Java | XML |58| `build.gradle` | Java/Kotlin | Gradle DSL |59| `Gemfile` | Ruby | Ruby DSL |60| `composer.json` | PHP | JSON |6162Also check for:63- `Dockerfile` - containerization64- `docker-compose.yml` - container orchestration65- `.github/workflows/*.yml` - CI/CD66- `Makefile` - build system67- `tsconfig.json` - TypeScript config68- `vite.config.*` / `webpack.config.*` - bundlers6970### 2. Parse Dependencies7172For each manifest, extract:73- **Production dependencies**: runtime requirements74- **Development dependencies**: build/test tools75- **Peer dependencies**: expected host environment76- **Optional dependencies**: feature flags7778### 3. Classify Stack7980Group findings into:8182```json83{84 "languages": ["typescript", "python", "go", "rust", "dart", "cpp"],85 "frameworks": [86 {"name": "react", "version": "^18.0.0", "category": "frontend"},87 {"name": "fastapi", "version": "^0.100.0", "category": "backend"}88 ],89 "test_frameworks": [90 {"name": "vitest", "version": "^1.0.0"},91 {"name": "pytest", "version": "^7.0.0"}92 ],93 "build_tools": ["vite", "uv", "docker"],94 "databases": ["postgresql", "redis"],95 "cloud_providers": ["aws", "vercel"],96 "ci_cd": ["github-actions"]97}98```99100### 4. Framework Detection Patterns101102Use the cookbook for specific detection logic:103- Read `./cookbook/manifest-parsing.md` for parsing rules104- Match dependency names against known framework patterns105106### 5. Output107108Return the structured stack summary in the requested format.109110## Cookbook111112### Manifest Parsing113- IF: Parsing any package manifest114- THEN: Read and execute `./cookbook/manifest-parsing.md`115116## Quick Reference117118### Detection Patterns119120| Dependency Pattern | Detected As |121|--------------------|-------------|122| `react`, `react-dom` | React framework |123| `vue`, `@vue/*` | Vue framework |124| `next` | Next.js framework |125| `fastapi` | FastAPI framework |126| `django` | Django framework |127| `flask` | Flask framework |128| `express` | Express.js framework |129| `vitest`, `jest` | JavaScript test framework |130| `pytest` | Python test framework |131| `gtest`, `gmock`, `catch2` | C/C++ test framework |132| `flutter`, `flutter_test` | Flutter framework |133| `@testing-library/*` | Testing utilities |134135### Category Mappings136137| Category | Examples |138|----------|----------|139| frontend | react, vue, svelte, angular |140| backend | fastapi, django, express, gin |141| database | prisma, sqlalchemy, typeorm |142| testing | vitest, jest, pytest, playwright |143| build | vite, webpack, esbuild, rollup |144| linting | eslint, prettier, ruff, black |145| typing | typescript, mypy, pyright |146| build-native | cmake, meson, bazel |147148## Output Schema149150```json151{152 "$schema": "http://json-schema.org/draft-07/schema#",153 "type": "object",154 "properties": {155 "project_root": {"type": "string"},156 "scanned_at": {"type": "string", "format": "date-time"},157 "languages": {158 "type": "array",159 "items": {"type": "string"}160 },161 "frameworks": {162 "type": "array",163 "items": {164 "type": "object",165 "properties": {166 "name": {"type": "string"},167 "version": {"type": "string"},168 "category": {"type": "string"}169 }170 }171 },172 "test_frameworks": {173 "type": "array",174 "items": {175 "type": "object",176 "properties": {177 "name": {"type": "string"},178 "version": {"type": "string"}179 }180 }181 },182 "build_tools": {183 "type": "array",184 "items": {"type": "string"}185 },186 "databases": {187 "type": "array",188 "items": {"type": "string"}189 },190 "cloud_providers": {191 "type": "array",192 "items": {"type": "string"}193 },194 "ci_cd": {195 "type": "array",196 "items": {"type": "string"}197 },198 "manifests_found": {199 "type": "array",200 "items": {"type": "string"}201 }202 }203}204```205206## Integration207208Other skills and commands can use this skill for:2092101. **Documentation discovery**: Map detected frameworks to doc sources2112. **Onboarding**: Generate quickstart guides tailored to the stack2123. **Tool configuration**: Auto-configure linters, formatters, test runners2134. **Agent routing**: Select appropriate AI providers based on stack214215Example usage in another skill:216```markdown217## Prerequisites218219Before implementing, run the `library-detection` skill to identify:220- Test frameworks (for writing tests)221- Build tools (for verification)222- Database libraries (for data layer work)223```224225---226> Converted and distributed by [TomeVault](https://tomevault.io/claim/consiliency) — claim your Tome and manage your conversions.227<!-- tomevault:4.0:skill_md:2026-04-13 -->