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.
Best use case
library-detection is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. 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.
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.
Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.
Practical example
Example input
Use the "library-detection" skill to help with this workflow task. Context: 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.
Example output
A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.
When to use this skill
- Use this skill when you want a reusable workflow rather than writing the same prompt again and again.
When not to use this skill
- Do not use this when you only need a one-off answer and do not need a reusable workflow.
- Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/library-detection/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How library-detection Compares
| Feature / Agent | library-detection | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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.
1. Scan for package manifests in the project
2. Parse each manifest to extract dependencies
3. Classify dependencies into categories
4. Detect frameworks and test tools from dependency patterns
5. 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:
```json
{
"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
```json
{
"$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:
1. **Documentation discovery**: Map detected frameworks to doc sources
2. **Onboarding**: Generate quickstart guides tailored to the stack
3. **Tool configuration**: Auto-configure linters, formatters, test runners
4. **Agent routing**: Select appropriate AI providers based on stack
Example usage in another skill:
```markdown
## 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)
```Related Skills
zlibrary-to-notebooklm
自动从 Z-Library 下载书籍并上传到 Google NotebookLM。支持 PDF/EPUB 格式,自动转换,一键创建知识库。
pattern-detection
Detect patterns, anomalies, and trends in code and data. Use when identifying code smells, finding security vulnerabilities, or discovering recurring patterns. Handles regex patterns, AST analysis, and statistical anomaly detection.
terraform-module-library
Build reusable Terraform modules for AWS, Azure, and GCP infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.
prompt-library
Curated collection of high-quality prompts for various use cases. Includes role-based prompts, task-specific templates, and prompt refinement techniques. Use when user needs prompt templates, role-play prompts, or ready-to-use prompt examples for coding, writing, analysis, or creative tasks.
when-detecting-fake-code-use-theater-detection
Detects non-functional "theater" code that appears complete but doesn't actually work. Use this skill to identify code that looks correct in static analysis but fails during execution, preventing fake implementations from reaching production. Scans for suspicious patterns, validates actual functionality, and reports findings with recommendations.
theater-detection-audit
Performs comprehensive audits to detect placeholder code, mock data, TODO markers, and incomplete implementations in codebases. Use this skill when you need to find all instances of "theater" in code such as hardcoded mock responses, stub functions, commented-out production logic, or fake data that needs to be replaced with real implementations. The skill systematically identifies these instances, reads their full context, and completes them with production-quality code.
fetching-library-docs
Token-efficient library API documentation fetcher using Context7 MCP with 77% token savings. Fetches code examples, API references, and usage patterns for published libraries (React, Next.js, Prisma, etc). Use when users ask "how do I use X library", need code examples, want API syntax, or are learning a framework's official API. Triggers: "Show me React hooks", "Prisma query syntax", "Next.js routing API". NOT for exploring repo internals/source code (use researching-with-deepwiki) or local files.
detection-sigma
Generic detection rule creation and management using Sigma, the universal SIEM rule format. Sigma provides vendor-agnostic detection logic for log analysis across multiple SIEM platforms. Use when: (1) Creating detection rules for security monitoring, (2) Converting rules between SIEM platforms (Splunk, Elastic, QRadar, Sentinel), (3) Threat hunting with standardized detection patterns, (4) Building detection-as-code pipelines, (5) Mapping detections to MITRE ATT&CK tactics, (6) Implementing compliance-based monitoring rules.
azure-quotas
Check/manage Azure quotas and usage across providers. For deployment planning, capacity validation, region selection. WHEN: "check quotas", "service limits", "current usage", "request quota increase", "quota exceeded", "validate capacity", "regional availability", "provisioning limits", "vCPU limit", "how many vCPUs available in my subscription".
raindrop-io
Manage Raindrop.io bookmarks with AI assistance. Save and organize bookmarks, search your collection, manage reading lists, and organize research materials. Use when working with bookmarks, web research, reading lists, or when user mentions Raindrop.io.
discover-skills
当你发现当前可用的技能都不够合适(或用户明确要求你寻找技能)时使用。本技能会基于任务目标和约束,给出一份精简的候选技能清单,帮助你选出最适配当前任务的技能。
web-performance-seo
Fix PageSpeed Insights/Lighthouse accessibility "!" errors caused by contrast audit failures (CSS filters, OKLCH/OKLAB, low opacity, gradient text, image backgrounds). Use for accessibility-driven SEO/performance debugging and remediation.