context-detection
БесплатноЗапускает вложенные скриптыНе проверенUse when detecting project technology stack from files/configs/directory structure, auto-loading framework-specific skills, or analyzing multi-stack fullstack…
от MadAppGang★ 290 звёзд на GitHubОб этом скилле
Context Detection Skill
Quick Start: Skill Discovery Script
Run the helper script to discover ALL skills available to a project:
node "${CLAUDE_PLUGIN_ROOT}/skills/context-detection/scripts/discover-skills.js" "$(pwd)"
This searches all 7 official Claude Code skill locations:
- Personal:
~/.claude/skills/ - Project:
.claude/skills/ - Nested (monorepos):
**/.claude/skills/ - Legacy commands:
.claude/commands/ - Marketplace plugins:
~/.claude/plugins/marketplaces/{m}/plugins/{p}/skills/ - Local plugins:
.claude-plugin/skills/,plugins/*/skills/ - Enterprise (managed settings)
Output: JSON with summary stats and full skill metadata.
For detailed documentation on the script, see scripts/discover-skills.js.
Overview
The context detection skill provides systematic patterns for analyzing any project to determine its technology stack(s). It enables the dev plugin to auto-load appropriate framework-specific skills based on what's actually in the project.
Key Innovation: Multi-stack detection for fullstack projects (e.g., React + Go).
Detection Priority
Detection follows a priority order from most explicit to most inferred:
1. Explicit User Preference (Highest Priority)
Source: .claude/settings.json
{
"pluginSettings": {
"dev": {
"stack": ["react-typescript", "golang"],
"features": {
"testing": "vitest",
"api": "rest"
}
}
}
}
When to use:
- User wants to override auto-detection
- Project has ambiguous structure
- Custom stack combinations
2. Current File Context
Source: File extension of current editing context
extension_mappings:
".tsx": ["react-typescript", "testing-frontend"]
".vue": ["vue-typescript", "testing-frontend"]
".go": ["golang", "testing-strategies"]
".dingo": ["dingo", "golang", "testing-strategies"]
".rs": ["rust", "testing-strategies"]
".py": ["python", "testing-strategies"]
When to use:
- User is editing a specific file
- Immediate context for implementation
- Quick detection without full project scan
3. Configuration Files (Primary Detection)
Source: Project configuration files
config_file_patterns:
package.json:
check: "dependencies.react exists"
skills: ["react-typescript", "state-management", "testing-frontend"]
mode: "frontend"
package.json:
check: "dependencies.vue exists"
skills: ["vue-typescript", "state-management", "testing-frontend"]
mode: "frontend"
go.mod:
check: "file exists"
skills: ["golang", "api-design", "database-patterns"]
mode: "backend"
go.mod + *.dingo:
check: "go.mod exists AND any .dingo files present"
skills: ["dingo", "golang", "api-design", "database-patterns"]
mode: "backend"
note: "Dingo projects always include golang skill since Dingo transpiles to Go"
Cargo.toml:
check: "file exists"
skills: ["rust", "api-design"]
mode: "backend"
pyproject.toml:
check: "file exists"
skills: ["python", "api-design"]
mode: "backend"
bun.lockb:
check: "file exists AND no react/vue in package.json"
skills: ["bunjs", "api-design"]
mode: "backend"
When to use:
- First time analyzing a project
- Most reliable detection method
- Determine versions and dependencies
4. Directory Structure Patterns (Supporting Evidence)
Source: Common directory layouts
directory_patterns:
"src/routes/":
indicator: "React Router structure"
skills: ["react-typescript"]
"src/components/":
indicator: "Component-based frontend"
skills: ["react-typescript", "vue-typescript"]
"cmd/":
indicator: "Go standard project layout"
skills: ["golang"]
"src/main.rs":
indicator: "Rust binary crate"
skills: ["rust"]
"frontend/":
indicator: "Separate frontend directory (fullstack)"
note: "Check for backend/ as well"
"backend/":
indicator: "Separate backend directory (fullstack)"
note: "Check for frontend/ as well"
When to use:
- Confirming config file detection
- Identifying fullstack projects
- Disambiguating multi-purpose projects
Multi-Stack Detection Algorithm
CRITICAL: Always check for MULTIPLE stacks. Projects can be fullstack.
# Step 1: Find ALL config files (not just first match)
find_all_configs() {
configs=()
[ -f "package.json" ] && configs+=("package.json")
[ -f "go.mod" ] && configs+=("go.mod")
[ -f "Cargo.toml" ] && configs+=("Cargo.toml")
[ -f "pyproject.toml" ] && configs+=("pyproject.toml")
[ -f "bun.lockb" ] && configs+=("bun.lockb")
# Check for Dingo files (go.mod must also exist)
# Note: "dingo" is a detection indicator, not an actual config file name
if [ -f "go.mod" ] && find . -name "*.dingo" -type f ! -path "./.git/*" ! -path "./node_modules/*" ! -path "./vendor/*" -print -quit | grep -q .; then
configs+=("dingo")
fi
ec
Установить context-detection в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(node *)Вложенные файлы
FAQ
Что делает скилл context-detection?
Use when detecting project technology stack from files/configs/directory structure, auto-loading framework-specific skills, or analyzing multi-stack fullstack projects (e.g., React + Go).
Как установить скилл context-detection?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл context-detection запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic