Skip to content
library-detection logo

Library Detection Skill

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.

SKILL.md

Full skill instructions

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

VariableDefaultDescription
SCAN_DEPTH3Max directory depth to search for manifests
INCLUDE_DEV_DEPStrueInclude development dependencies in analysis
DETECT_FRAMEWORKStrueIdentify frameworks from dependencies
DETECT_TEST_TOOLStrueIdentify test frameworks and runners
OUTPUT_FORMATjsonOutput 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):

FileLanguageParser
package.jsonJavaScript/​TypeScriptJSON
pyproject.tomlPythonTOML
requirements.txtPythonLine-based
go.modGoGo mod
Cargo.tomlRustTOML
pubspec.yamlDart/​FlutterYAML
CMakeLists.txtC/​C++CMake
meson.buildC/​C++Meson
WORKSPACEBazelBazel
pom.xmlJavaXML
build.gradleJava/​KotlinGradle DSL
GemfileRubyRuby DSL
composer.jsonPHPJSON

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 PatternDetected As
react, react-domReact framework
vue, @vue/​*Vue framework
nextNext.js framework
fastapiFastAPI framework
djangoDjango framework
flaskFlask framework
expressExpress.js framework
vitest, jestJavaScript test framework
pytestPython test framework
gtest, gmock, catch2C/​C++ test framework
flutter, flutter_testFlutter framework
@testing-library/​*Testing utilities

Category Mappings

CategoryExamples
frontendreact, vue, svelte, angular
backendfastapi, django, express, gin
databaseprisma, sqlalchemy, typeorm
testingvitest, jest, pytest, playwright
buildvite, webpack, esbuild, rollup
lintingeslint, prettier, ruff, black
typingtypescript, mypy, pyright
build-nativecmake, 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:

  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:

## 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)

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View