Install any skill in seconds. Free to start, no credit card required.
Get Started Free →检测项目技术栈的通用方法,通过分析配置文件识别语言、框架、工具链
.claude/skills/echovic-shared-tech-stack-detection/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-14 | ✗→✓ | ▲ Improved | 1497% | 0% |
| case-24 | ✗→✓ | ▲ Improved | 133% | 0% |
| case-11 | ✓→✗ | ▼ Worse | 13% | 0% |
| case-19 | ✓→✗ | ▼ Worse | -29% | 0% |
| case-23 | ✓→✗ | ▼ Worse | 5% | 0% |
在进行技术选型、架构设计、代码生成前,需要先了解项目当前使用的技术栈,以便:
使用 Read 或 Glob 工具检测项目根目录的配置文件:
| 文件 | 说明 | 检测内容 | |------|------|----------| | package.json | Node.js 项目配置 | dependencies, devDependencies, scripts | | tsconfig.json | TypeScript 配置 | 确认使用 TypeScript | | next.config.js | Next.js 配置 | 确认使用 Next.js | | vite.config.js | Vite 配置 | 确认使用 Vite | | nuxt.config.js | Nuxt 配置 | 确认使用 Nuxt |
检测命令:
bash# 检测是否存在 ls package.json tsconfig.json next.config.js vite.config.js 2>/dev/null # 读取 package.json Read(file_path: "package.json")
关键依赖识别:
react: React 项目vue: Vue 项目next: Next.js 项目@angular/core: Angular 项目express: Express 后端fastify: Fastify 后端prisma: Prisma ORMtypeorm: TypeORM| 文件 | 说明 | 检测内容 | |------|------|----------| | requirements.txt | pip 依赖 | 依赖列表 | | pyproject.toml | Poetry/PDM 配置 | 依赖和项目配置 | | Pipfile | Pipenv 配置 | 依赖 | | setup.py | 包配置 | 项目元数据 |
关键依赖识别:
django: Django 项目flask: Flask 项目fastapi: FastAPI 项目sqlalchemy: SQLAlchemy ORMpytest: 使用 pytest 测试| 文件 | 说明 | 检测内容 | |------|------|----------| | go.mod | Go 模块配置 | 依赖和 Go 版本 | | go.sum | 依赖校验和 | 确认依赖锁定 |
关键依赖识别:
github.com/gin-gonic/gin: Gin 框架github.com/gofiber/fiber: Fiber 框架gorm.io/gorm: GORM ORM| 文件 | 说明 | 检测内容 | |------|------|----------| | Cargo.toml | Cargo 配置 | 依赖和项目配置 | | Cargo.lock | 依赖锁定 | 确认依赖版本 |
关键依赖识别:
actix-web: Actix Web 框架axum: Axum 框架tokio: 异步运行时| 文件 | 说明 | 检测内容 | |------|------|----------| | pom.xml | Maven 配置 | 依赖和插件 | | build.gradle | Gradle 配置 | 依赖和任务 |
关键依赖识别:
spring-boot-starter: Spring Boot 项目quarkus: Quarkus 项目micronaut: Micronaut 项目| 文件 | 说明 | 检测内容 | |------|------|----------| | Gemfile | Bundler 配置 | 依赖 | | Gemfile.lock | 依赖锁定 | 确认依赖版本 |
关键依赖识别:
rails: Ruby on Rails 项目sinatra: Sinatra 项目| 文件/目录 | 说明 | |-----------|------| | prisma/schema.prisma | Prisma 数据库配置 | | drizzle.config.ts | Drizzle ORM 配置 | | ormconfig.json | TypeORM 配置 | | alembic/ | Python Alembic 迁移 | | migrations/ | 数据库迁移目录 |
数据库类型识别:
postgresql://: PostgreSQLmysql://: MySQLmongodb://: MongoDBsqlite:: SQLiteredis://: Redis| 文件 | 说明 | |------|------| | Dockerfile | Docker 容器化 | | docker-compose.yml | Docker Compose 多容器 | | vercel.json | Vercel 部署 | | .github/workflows/ | GitHub Actions CI/CD | | netlify.toml | Netlify 部署 | | railway.json | Railway 部署 |
| 文件/依赖 | 框架 | |-----------|------| | jest.config.js | Jest | | vitest.config.js | Vitest | | playwright.config.js | Playwright | | cypress.json | Cypress |
| 依赖 | 框架 | |------|------| | pytest | pytest | | unittest | unittest (内置) |
| 文件 | 框架 | |------|------| | *_test.go | Go 内置测试 |
bash# 使用 Glob 查找配置文件 Glob(pattern: "{package.json,go.mod,Cargo.toml,pom.xml,requirements.txt,Gemfile}")
bash# 读取主配置文件 Read(file_path: "package.json") # 或其他检测到的文件
从配置文件中提取:
以结构化格式输出:
markdown## 技术栈检测结果 ### 语言和运行时 - **语言**:TypeScript - **运行时**:Node.js 20.x - **包管理器**:pnpm ### 前端框架 - **框架**:Next.js 14 (App Router) - **UI 库**:React 18 - **样式**:Tailwind CSS - **状态管理**:Zustand ### 后端框架 - **框架**:Next.js API Routes - **ORM**:Prisma - **数据库**:PostgreSQL ### 测试 - **单元测试**:Vitest - **E2E 测试**:Playwright ### 部署 - **容器化**:Docker - **CI/CD**:GitHub Actions - **托管**:Vercel
bash# 1. 检测配置文件 Glob(pattern: "package.json") # 2. 读取 package.json Read(file_path: "package.json") # 3. 分析依赖 # 发现: "next": "14.0.0", "react": "18.2.0", "prisma": "5.0.0" # 4. 输出结果 技术栈:Next.js 14 + React 18 + Prisma + PostgreSQL
bash# 1. 检测配置文件 Glob(pattern: "{requirements.txt,pyproject.toml}") # 2. 读取配置 Read(file_path: "pyproject.toml") # 3. 分析依赖 # 发现: fastapi, sqlalchemy, pytest # 4. 输出结果 技术栈:FastAPI + SQLAlchemy + PostgreSQL + pytest
❌ 不检测就假设:直接假设项目使用某技术,而不检测配置文件 ❌ 忽略版本:只检测框架名称,不检测版本号 ❌ 混淆生态:在 Node.js 项目中推荐 Python 工具 ❌ 重复检测:在同一个任务中多次检测相同的配置文件
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-17 | pass→pass | 11,087 | 10,072 | -9% | 1 | 1 | 0% | 1,689 | 3,592 | +113% | 0 | 0 | — |
case-16 | fail→fail | 6,291 | 2,605 | -59% | 1 | 1 | 0% | 909 | 2,312 | +154% | 0 | 0 | — |
case-01 | fail→fail | 2,066 | 4,792 | +132% | 1 | 1 | 0% | 311 | 2,317 | +645% | 0 | 0 | — |
case-02 | fail→fail | 2,057 | 4,109 | +100% | 1 | 1 | 0% | 311 | 2,433 | +682% | 0 | 0 | — |
case-03 | fail→fail | 5,875 | 6,582 | +12% | 1 | 1 | 0% | 1,028 | 2,279 | +122% | 0 | 0 | — |
case-04 | pass→pass | 17,457 | 13,826 | -21% | 1 | 1 | 0% | 2,611 | 4,145 | +59% | 0 | 0 | — |
case-10 | fail→fail | 2,003 | 2,196 | +10% | 1 | 1 | 0% | 279 | 2,141 | +667% | 0 | 0 | — |
case-05 | pass→pass | 14,702 | 12,748 | -13% | 1 | 1 | 0% | 2,517 | 4,269 | +70% | 0 | 0 | — |
case-06 | pass→pass | 11,911 | 8,877 | -25% | 1 | 1 | 0% | 2,175 | 3,632 | +67% | 0 | 0 | — |
case-07 | fail→fail | 3,776 | 4,850 | +28% | 1 | 1 | 0% | 435 | 2,221 | +411% | 0 | 0 | — |
case-08 | fail→fail | 2,632 | 9,346 | +255% | 1 | 1 | 0% | 358 | 2,223 | +521% | 0 | 0 | — |
case-09 | fail→fail | 5,082 | 4,671 | -8% | 1 | 1 | 0% | 947 | 2,163 | +128% | 0 | 0 | — |
case-11 | pass→fail | 11,494 | 2,717 | -76% | 1 | 1 | 0% | 1,997 | 2,253 | +13% | 0 | 0 | — |
case-12 | fail→fail | 2,883 | 4,971 | +72% | 1 | 1 | 0% | 421 | 2,354 | +459% | 0 | 0 | — |
case-13 | pass→pass | 13,454 | 11,616 | -14% | 1 | 1 | 0% | 2,386 | 4,095 | +72% | 0 | 0 | — |
case-14 | fail→pass | 2,155 | 17,841 | +728% | 1 | 1 | 0% | 301 | 4,808 | +1497% | 0 | 0 | — |
case-15 | fail→fail | 3,898 | 3,097 | -21% | 1 | 1 | 0% | 677 | 2,297 | +239% | 0 | 0 | — |
case-18 | pass→pass | 10,117 | 8,370 | -17% | 1 | 1 | 0% | 1,730 | 3,451 | +99% | 0 | 0 | — |
case-19 | pass→fail | 19,863 | 11,373 | -43% | 1 | 1 | 0% | 3,318 | 2,350 | -29% | 0 | 0 | — |
case-20 | pass→pass | 11,053 | 10,341 | -6% | 1 | 1 | 0% | 1,868 | 3,890 | +108% | 0 | 0 | — |
case-21 | pass→pass | 4,172 | 7,952 | +91% | 1 | 1 | 0% | 596 | 3,289 | +452% | 0 | 0 | — |
case-22 | pass→pass | 8,121 | 3,978 | -51% | 1 | 1 | 0% | 1,550 | 2,797 | +80% | 0 | 0 | — |
case-23 | pass→fail | 11,576 | 1,750 | -85% | 1 | 1 | 0% | 2,140 | 2,249 | +5% | 0 | 0 | — |
case-24 | fail→pass | 6,368 | 2,999 | -53% | 1 | 1 | 0% | 1,002 | 2,332 | +133% | 0 | 0 | — |
case-25 | pass→pass | 6,929 | 3,743 | -46% | 1 | 1 | 0% | 1,015 | 2,581 | +154% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted, and 19 counted toward the lift figure. The other 6 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of -4 percentage points is the difference between those two pass rates over the 19 comparable cases. 3 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.