[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71G2JQHYBYYHV4DRK5DPCYK":3,"skill-same:01M71G2JQHYBYYHV4DRK5DPCYK":81},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":6,"ownerHtmlUrl":59,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":60,"install":61,"resources":74},"01M71G2JQHYBYYHV4DRK5DPCYK","context-detection",null,"Use when detecting project technology stack from files\u002Fconfigs\u002Fdirectory structure, auto-loading framework-specific skills, or analyzing multi-stack fullstack projects (e.g., React + Go).","JSGforever\u002Fskillguard","JSGforever","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F85541948?v=4","01M71FQD3E132VMR5F4TAYX3YS","01M71FQD4DYW0XJ4XQ4YQH75Y9",2,"GPL-3.0","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__MadAppGang--context-detection\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"context detection","detection","context","2026","directory","stack","structure","react","skill discovery","analysis","Bash","framework-specific","when","dev commands","auto","files","project","loading","detecting","projects","2026-11-10 10:12:30",false,"---\nname: context-detection\nversion: 1.1.0\ndescription: Use when detecting project technology stack from files\u002Fconfigs\u002Fdirectory structure, auto-loading framework-specific skills, or analyzing multi-stack fullstack projects (e.g., React + Go).\nkeywords:\n  - context detection\n  - stack detection\n  - technology stack\n  - project analysis\n  - auto-detection\n  - framework detection\n  - skill discovery\nplugin: dev\nupdated: 2026-02-03\nused_by: stack-detector agent, all dev commands\nallowed-tools: Bash(node *)\n---\n\n# Context Detection Skill\n\n## Quick Start: Skill Discovery Script\n\nRun the helper script to discover ALL skills available to a project:\n\n```bash\nnode \"${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fcontext-detection\u002Fscripts\u002Fdiscover-skills.js\" \"$(pwd)\"\n```\n\nThis searches all 7 official Claude Code skill locations:\n1. Personal: `~\u002F.claude\u002Fskills\u002F`\n2. Project: `.claude\u002Fskills\u002F`\n3. Nested (monorepos): `**\u002F.claude\u002Fskills\u002F`\n4. Legacy commands: `.claude\u002Fcommands\u002F`\n5. Marketplace plugins: `~\u002F.claude\u002Fplugins\u002Fmarketplaces\u002F{m}\u002Fplugins\u002F{p}\u002Fskills\u002F`\n6. Local plugins: `.claude-plugin\u002Fskills\u002F`, `plugins\u002F*\u002Fskills\u002F`\n7. Enterprise (managed settings)\n\n**Output:** JSON with summary stats and full skill metadata.\n\nFor detailed documentation on the script, see [scripts\u002Fdiscover-skills.js](scripts\u002Fdiscover-skills.js).\n\n---\n\n## Overview\n\nThe 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.\n\n**Key Innovation:** Multi-stack detection for fullstack projects (e.g., React + Go).\n\n---\n\n## Detection Priority\n\nDetection follows a priority order from most explicit to most inferred:\n\n### 1. Explicit User Preference (Highest Priority)\n\n**Source:** `.claude\u002Fsettings.json`\n\n```json\n{\n  \"pluginSettings\": {\n    \"dev\": {\n      \"stack\": [\"react-typescript\", \"golang\"],\n      \"features\": {\n        \"testing\": \"vitest\",\n        \"api\": \"rest\"\n      }\n    }\n  }\n}\n```\n\n**When to use:**\n- User wants to override auto-detection\n- Project has ambiguous structure\n- Custom stack combinations\n\n### 2. Current File Context\n\n**Source:** File extension of current editing context\n\n```yaml\nextension_mappings:\n  \".tsx\": [\"react-typescript\", \"testing-frontend\"]\n  \".vue\": [\"vue-typescript\", \"testing-frontend\"]\n  \".go\": [\"golang\", \"testing-strategies\"]\n  \".dingo\": [\"dingo\", \"golang\", \"testing-strategies\"]\n  \".rs\": [\"rust\", \"testing-strategies\"]\n  \".py\": [\"python\", \"testing-strategies\"]\n```\n\n**When to use:**\n- User is editing a specific file\n- Immediate context for implementation\n- Quick detection without full project scan\n\n### 3. Configuration Files (Primary Detection)\n\n**Source:** Project configuration files\n\n```yaml\nconfig_file_patterns:\n  package.json:\n    check: \"dependencies.react exists\"\n    skills: [\"react-typescript\", \"state-management\", \"testing-frontend\"]\n    mode: \"frontend\"\n\n  package.json:\n    check: \"dependencies.vue exists\"\n    skills: [\"vue-typescript\", \"state-management\", \"testing-frontend\"]\n    mode: \"frontend\"\n\n  go.mod:\n    check: \"file exists\"\n    skills: [\"golang\", \"api-design\", \"database-patterns\"]\n    mode: \"backend\"\n\n  go.mod + *.dingo:\n    check: \"go.mod exists AND any .dingo files present\"\n    skills: [\"dingo\", \"golang\", \"api-design\", \"database-patterns\"]\n    mode: \"backend\"\n    note: \"Dingo projects always include golang skill since Dingo transpiles to Go\"\n\n  Cargo.toml:\n    check: \"file exists\"\n    skills: [\"rust\", \"api-design\"]\n    mode: \"backend\"\n\n  pyproject.toml:\n    check: \"file exists\"\n    skills: [\"python\", \"api-design\"]\n    mode: \"backend\"\n\n  bun.lockb:\n    check: \"file exists AND no react\u002Fvue in package.json\"\n    skills: [\"bunjs\", \"api-design\"]\n    mode: \"backend\"\n```\n\n**When to use:**\n- First time analyzing a project\n- Most reliable detection method\n- Determine versions and dependencies\n\n### 4. Directory Structure Patterns (Supporting Evidence)\n\n**Source:** Common directory layouts\n\n```yaml\ndirectory_patterns:\n  \"src\u002Froutes\u002F\":\n    indicator: \"React Router structure\"\n    skills: [\"react-typescript\"]\n\n  \"src\u002Fcomponents\u002F\":\n    indicator: \"Component-based frontend\"\n    skills: [\"react-typescript\", \"vue-typescript\"]\n\n  \"cmd\u002F\":\n    indicator: \"Go standard project layout\"\n    skills: [\"golang\"]\n\n  \"src\u002Fmain.rs\":\n    indicator: \"Rust binary crate\"\n    skills: [\"rust\"]\n\n  \"frontend\u002F\":\n    indicator: \"Separate frontend directory (fullstack)\"\n    note: \"Check for backend\u002F as well\"\n\n  \"backend\u002F\":\n    indicator: \"Separate backend directory (fullstack)\"\n    note: \"Check for frontend\u002F as well\"\n```\n\n**When to use:**\n- Confirming config file detection\n- Identifying fullstack projects\n- Disambiguating multi-purpose projects\n\n---\n\n## Multi-Stack Detection Algorithm\n\n**CRITICAL:** Always check for MULTIPLE stacks. Projects can be fullstack.\n\n```bash\n# Step 1: Find ALL config files (not just first match)\nfind_all_configs() {\n  configs=()\n  [ -f \"package.json\" ] && configs+=(\"package.json\")\n  [ -f \"go.mod\" ] && configs+=(\"go.mod\")\n  [ -f \"Cargo.toml\" ] && configs+=(\"Cargo.toml\")\n  [ -f \"pyproject.toml\" ] && configs+=(\"pyproject.toml\")\n  [ -f \"bun.lockb\" ] && configs+=(\"bun.lockb\")\n\n  # Check for Dingo files (go.mod must also exist)\n  # Note: \"dingo\" is a detection indicator, not an actual config file name\n  if [ -f \"go.mod\" ] && find . -name \"*.dingo\" -type f ! -path \".\u002F.git\u002F*\" ! -path \".\u002Fnode_modules\u002F*\" ! -path \".\u002Fvendor\u002F*\" -print -quit | grep -q .; then\n    configs+=(\"dingo\")\n  fi\n\n  echo \"${configs[@]}\"\n}\n\n# Step 2: Analyze EACH config file\nanalyze_all_configs() {\n  local detected_stacks=()\n\n  # Check package.json\n  if [ -f \"package.json\" ]; then\n    if grep -q '\"react\"' package.json; then\n      detected_stacks+=(\"react-typescript\")\n    elif grep -q '\"vue\"' package.json; then\n      detected_stacks+=(\"vue-typescript\")\n    fi\n  fi\n\n  # Check go.mod (and optionally Dingo)\n  if [ -f \"go.mod\" ]; then\n    # Check if this is a Dingo project\n    if find . -name \"*.dingo\" -type f ! -path \".\u002F.git\u002F*\" ! -path \".\u002Fnode_modules\u002F*\" ! -path \".\u002Fvendor\u002F*\" -print -quit | grep -q .; then\n      detected_stacks+=(\"dingo\")\n      # Dingo always co-loads golang\n      detected_stacks+=(\"golang\")\n    else\n      detected_stacks+=(\"golang\")\n    fi\n  fi\n\n  # Check Cargo.toml\n  if [ -f \"Cargo.toml\" ]; then\n    detected_stacks+=(\"rust\")\n  fi\n\n  # Check pyproject.toml\n  if [ -f \"pyproject.toml\" ]; then\n    detected_stacks+=(\"python\")\n  fi\n\n  # Check bun.lockb (only if NOT frontend)\n  if [ -f \"bun.lockb\" ] && ! grep -q '\"react\"\\|\"vue\"' package.json 2>\u002Fdev\u002Fnull; then\n    detected_stacks+=(\"bunjs\")\n  fi\n\n  echo \"${detected_stacks[@]}\"\n}\n\n# Step 3: Determine mode\ndetermine_mode() {\n  local stacks=(\"$@\")\n  local has_frontend=false\n  local has_backend=false\n\n  for stack in \"${stacks[@]}\"; do\n    case \"$stack\" in\n      react-typescript|vue-typescript)\n        has_frontend=true\n        ;;\n      golang|rust|python|bunjs|dingo)\n        has_backend=true\n        ;;\n    esac\n  done\n\n  if [ \"$has_frontend\" = true ] && [ \"$has_backend\" = true ]; then\n    echo \"fullstack\"\n  elif [ \"$has_frontend\" = true ]; then\n    echo \"frontend\"\n  elif [ \"$has_backend\" = true ]; then\n    echo \"backend\"\n  else\n    echo \"unknown\"\n  fi\n}\n\n# Step 4: Map stacks to skills\nmap_stacks_to_skills() {\n  local stacks=(\"$@\")\n  local skills=(\n    # Core skills (ALWAYS included)\n    \"universal-patterns\"\n    \"testing-strategies\"\n    \"debugging-strategies\"\n  )\n\n  for stack in \"${stacks[@]}\"; do\n    case \"$stack\" in\n      react-typescript)\n        skills+=(\"react-typescript\" \"state-management\" \"testing-frontend\")\n        ;;\n      vue-typescript)\n        skills+=(\"vue-typescript\" \"state-management\" \"testing-frontend\")\n        ;;\n      golang)\n        skills+=(\"golang\" \"api-design\" \"database-patterns\")\n        ;;\n      dingo)\n        skills+=(\"dingo\" \"golang\" \"api-design\" \"database-patterns\")\n        ;;\n      rust)\n        skills+=(\"rust\" \"api-design\")\n        ;;\n      python)\n        skills+=(\"python\" \"api-design\")\n        ;;\n      bunjs)\n        skills+=(\"bunjs\" \"api-design\")\n        ;;\n    esac\n  done\n\n  # Deduplicate\n  echo \"${skills[@]}\" | tr ' ' '\\n' | sort -u\n}\n\n# Step 5: Complete detection\ndetect_project_stack() {\n  # Check explicit preference first\n  local explicit_stack=$(jq -r '.pluginSettings.dev.stack \u002F\u002F empty' .claude\u002Fsettings.json 2>\u002Fdev\u002Fnull)\n  if [ -n \"$explicit_stack\" ]; then\n    echo \"Using explicit stack from .claude\u002Fsettings.json\"\n    return\n  fi\n\n  # Auto-detect all stacks\n  local detected_stacks=($(analyze_all_configs))\n\n  if [ ${#detected_stacks[@]} -eq 0 ]; then\n    echo \"ERROR: No stack detected\"\n    return 1\n  fi\n\n  # Determine mode\n  local mode=$(determine_mode \"${detected_stacks[@]}\")\n\n  # Map to skills\n  local skills=($(map_stacks_to_skills \"${detected_stacks[@]}\"))\n\n  # Output result\n  echo \"Detected: ${detected_stacks[*]}\"\n  echo \"Mode: $mode\"\n  echo \"Skills: ${skills[*]}\"\n}\n```\n\n---\n\n## Framework-Specific Detection\n\n### React Detection\n\n```bash\ndetect_react() {\n  # Check package.json\n  if [ -f \"package.json\" ]; then\n    # React in dependencies or devDependencies\n    if jq -e '.dependencies.react \u002F\u002F .devDependencies.react' package.json >\u002Fdev\u002Fnull 2>&1; then\n      # Check for TypeScript\n      local has_typescript=false\n      if jq -e '.dependencies[\"@types\u002Freact\"] \u002F\u002F .devDependencies[\"@types\u002Freact\"]' package.json >\u002Fdev\u002Fnull 2>&1; then\n        has_typescript=true\n      fi\n\n      # Get version\n      local react_version=$(jq -r '.dependencies.react \u002F\u002F .devDependencies.react' package.json | sed 's\u002F[^0-9.]\u002F\u002Fg')\n\n      echo \"react-typescript\"\n      echo \"version: $react_version\"\n      echo \"typescript: $has_typescript\"\n      return 0\n    fi\n  fi\n\n  return 1\n}\n```\n\n### Vue Detection\n\n```bash\ndetect_vue() {\n  if [ -f \"package.json\" ]; then\n    if jq -e '.dependencies.vue' package.json >\u002Fdev\u002Fnull 2>&1; then\n      local vue_version=$(jq -r '.dependencies.vue' package.json | sed 's\u002F[^0-9.]\u002F\u002Fg')\n      echo \"vue-typescript\"\n      echo \"version: $vue_version\"\n      return 0\n    fi\n  fi\n\n  return 1\n}\n```\n\n### Go Detection\n\n```bash\ndetect_go() {\n  if [ -f \"go.mod\" ]; then\n    local go_version=$(grep '^go ' go.mod | awk '{print $2}')\n    local module_name=$(grep '^module ' go.mod | awk '{print $2}')\n\n    echo \"golang\"\n    echo \"version: $go_version\"\n    echo \"module: $module_name\"\n    return 0\n  fi\n\n  return 1\n}\n```\n\n### Rust Detection\n\n```bash\ndetect_rust() {\n  if [ -f \"Cargo.toml\" ]; then\n    local package_name=$(grep '^\\[package\\]' -A 5 Cargo.toml | grep '^name' | cut -d'\"' -f2)\n    local edition=$(grep '^\\[package\\]' -A 5 Cargo.toml | grep '^edition' | cut -d'\"' -f2)\n\n    echo \"rust\"\n    echo \"edition: $edition\"\n    echo \"package: $package_name\"\n    return 0\n  fi\n\n  return 1\n}\n```\n\n### Python Detection\n\n```bash\ndetect_python() {\n  if [ -f \"pyproject.toml\" ]; then\n    local has_fastapi=$(grep -i 'fastapi' pyproject.toml)\n    local has_django=$(grep -i 'django' pyproject.toml)\n\n    echo \"python\"\n    [ -n \"$has_fastapi\" ] && echo \"framework: fastapi\"\n    [ -n \"$has_django\" ] && echo \"framework: django\"\n    return 0\n  fi\n\n  return 1\n}\n```\n\n### Bun Detection\n\n```bash\ndetect_bun() {\n  # Bun backend (NOT frontend with Bun runtime)\n  if [ -f \"bun.lockb\" ]; then\n    # Check if this is a frontend project\n    if [ -f \"package.json\" ]; then\n      if jq -e '.dependencies.react \u002F\u002F .dependencies.vue' package.json >\u002Fdev\u002Fnull 2>&1; then\n        # This is frontend using Bun runtime, not Bun backend\n        return 1\n      fi\n    fi\n\n    # This is a Bun backend project\n    echo \"bunjs\"\n    return 0\n  fi\n\n  return 1\n}\n```\n\n---\n\n## Quality Checks by Stack\n\nQuality checks are automatically determined based on detected stack(s):\n\n### Frontend Quality Checks\n\n```yaml\nreact-typescript:\n  - command: \"bun run format\"\n    tool: \"Biome\"\n    purpose: \"Code formatting\"\n  - command: \"bun run lint\"\n    tool: \"Biome\"\n    purpose: \"Linting\"\n  - command: \"bun run typecheck\"\n    tool: \"TypeScript\"\n    purpose: \"Type checking\"\n  - command: \"bun test\"\n    tool: \"Vitest\"\n    purpose: \"Unit tests\"\n\nvue-typescript:\n  - command: \"bun run format\"\n    tool: \"Biome\"\n  - command: \"bun run lint\"\n    tool: \"Biome\"\n  - command: \"bun run typecheck\"\n    tool: \"TypeScript\"\n  - command: \"bun test\"\n    tool: \"Vitest\"\n```\n\n### Backend Quality Checks\n\n```yaml\ngolang:\n  - command: \"go fmt .\u002F...\"\n    purpose: \"Format Go code\"\n  - command: \"go vet .\u002F...\"\n    purpose: \"Static analysis\"\n  - command: \"golangci-lint run\"\n    purpose: \"Comprehensive linting\"\n  - command: \"go test .\u002F...\"\n    purpose: \"Run tests\"\n\ndingo:\n  - command: \"dingo fmt\"\n    purpose: \"Format Dingo source files\"\n  - command: \"dingo go\"\n    purpose: \"Transpile Dingo to Go\"\n  - command: \"go vet .\u002F.dingo\u002F...\"\n    purpose: \"Static analysis on generated Go\"\n  - command: \"golangci-lint run .\u002F.dingo\u002F...\"\n    purpose: \"Comprehensive linting on generated Go\"\n  - command: \"go test .\u002F.dingo\u002F...\"\n    purpose: \"Run tests on generated Go\"\n\nrust:\n  - command: \"cargo fmt --check\"\n    purpose: \"Check formatting\"\n  - command: \"cargo clippy -- -D warnings\"\n    purpose: \"Linting\"\n  - command: \"cargo test\"\n    purpose: \"Run tests\"\n\npython:\n  - command: \"black --check .\"\n    purpose: \"Check formatting\"\n  - command: \"ruff check .\"\n    purpose: \"Linting\"\n  - command: \"mypy .\"\n    purpose: \"Type checking\"\n  - command: \"pytest\"\n    purpose: \"Run tests\"\n\nbunjs:\n  - command: \"bun run format\"\n    tool: \"Biome\"\n  - command: \"bun run lint\"\n    tool: \"Biome\"\n  - command: \"bun run typecheck\"\n    tool: \"TypeScript\"\n  - command: \"bun test\"\n    tool: \"Bun test runner\"\n```\n\n### Fullstack Quality Checks\n\nFor fullstack projects, run checks for BOTH stacks:\n\n```yaml\nfullstack (react + go):\n  frontend:\n    directory: \".\u002Ffrontend\"\n    checks:\n      - \"cd frontend && bun run format\"\n      - \"cd frontend && bun run lint\"\n      - \"cd frontend && bun run typecheck\"\n      - \"cd frontend && bun test\"\n  backend:\n    directory: \".\"\n    checks:\n      - \"go fmt .\u002F...\"\n      - \"go vet .\u002F...\"\n      - \"golangci-lint run\"\n      - \"go test .\u002F...\"\n```\n\n---\n\n## Skill Path Generation\n\nConvert detected stacks to skill file paths using ${PLUGIN_ROOT} placeholder:\n\n```bash\ngenerate_skill_paths() {\n  local stacks=(\"$@\")\n  local skill_paths=(\n    # Core skills (ALWAYS)\n    '${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Funiversal-patterns\u002FSKILL.md'\n    '${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Ftesting-strategies\u002FSKILL.md'\n    '${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Fdebugging-strategies\u002FSKILL.md'\n  )\n\n  for stack in \"${stacks[@]}\"; do\n    case \"$stack\" in\n      react-typescript)\n        skill_paths+=(\n          '${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Freact-typescript\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Fstate-management\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Ftesting-frontend\u002FSKILL.md'\n        )\n        ;;\n      vue-typescript)\n        skill_paths+=(\n          '${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Fvue-typescript\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Fstate-management\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Ftesting-frontend\u002FSKILL.md'\n        )\n        ;;\n      golang)\n        skill_paths+=(\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fgolang\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fapi-design\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fdatabase-patterns\u002FSKILL.md'\n        )\n        ;;\n      dingo)\n        skill_paths+=(\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fdingo\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fgolang\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fapi-design\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fdatabase-patterns\u002FSKILL.md'\n        )\n        ;;\n      rust)\n        skill_paths+=(\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Frust\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fapi-design\u002FSKILL.md'\n        )\n        ;;\n      python)\n        skill_paths+=(\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fpython\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fapi-design\u002FSKILL.md'\n        )\n        ;;\n      bunjs)\n        skill_paths+=(\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fbunjs\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fapi-design\u002FSKILL.md'\n        )\n        ;;\n    esac\n  done\n\n  # Print unique paths\n  printf '%s\\n' \"${skill_paths[@]}\" | sort -u\n}\n```\n\n**CRITICAL:** Always use `${PLUGIN_ROOT}` placeholder, NOT hardcoded paths. This placeholder is expanded at runtime to the actual plugin directory.\n\n---\n\n## Error Handling\n\n### No Stack Detected\n\n```yaml\nerror: \"no_stack_detected\"\ntrigger: \"No config files found AND no recognizable directory structure\"\nrecovery:\n  1. Prompt user for manual stack selection\n  2. Offer generic \"unknown\" stack with only core skills\n  3. Save user choice to ${SESSION_PATH}\u002Fcontext.json\n  4. Proceed with core skills only\n```\n\n### Ambiguous Detection\n\n```yaml\nerror: \"ambiguous_stack\"\ntrigger: \"Multiple possible interpretations\"\nrecovery:\n  1. Present all possibilities to user\n  2. Ask for confirmation\n  3. Save confirmed stack to context\n```\n\n### Incomplete Detection\n\n```yaml\nerror: \"incomplete_detection\"\ntrigger: \"Found some indicators but missing key files\"\nrecovery:\n  1. Report partial detection\n  2. Load available skills\n  3. Warn user about potential missing skills\n```\n\n---\n\n## Usage Examples\n\n### Example 1: React Frontend\n\n**Project Structure:**\n```\nproject\u002F\n├── package.json (with react: \"^19.0.0\")\n├── src\u002F\n│   ├── routes\u002F\n│   └── components\u002F\n└── .tsx files\n```\n\n**Detection Result:**\n```json\n{\n  \"detected_stack\": \"react-typescript\",\n  \"mode\": \"frontend\",\n  \"stacks\": [\"react-typescript\"],\n  \"skill_paths\": [\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Funiversal-patterns\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Ftesting-strategies\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Freact-typescript\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Fstate-management\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Ftesting-frontend\u002FSKILL.md\"\n  ]\n}\n```\n\n### Example 2: Go Backend\n\n**Project Structure:**\n```\nproject\u002F\n├── go.mod\n├── cmd\u002F\n│   └── server\u002F\n└── internal\u002F\n```\n\n**Detection Result:**\n```json\n{\n  \"detected_stack\": \"golang\",\n  \"mode\": \"backend\",\n  \"stacks\": [\"golang\"],\n  \"skill_paths\": [\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Funiversal-patterns\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Ftesting-strategies\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fgolang\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fapi-design\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fdatabase-patterns\u002FSKILL.md\"\n  ]\n}\n```\n\n### Example 3: Fullstack (React + Go)\n\n**Project Structure:**\n```\nproject\u002F\n├── frontend\u002F\n│   ├── package.json (with react)\n│   └── src\u002F\n├── go.mod\n├── cmd\u002F\n└── internal\u002F\n```\n\n**Detection Result:**\n```json\n{\n  \"detected_stack\": \"react-typescript + golang\",\n  \"mode\": \"fullstack\",\n  \"stacks\": [\"react-typescript\", \"golang\"],\n  \"skill_paths\": [\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Funiversal-patterns\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Ftesting-strategies\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Freact-typescript\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Fstate-management\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Ftesting-frontend\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fgolang\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fapi-design\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fdatabase-patterns\u002FSKILL.md\"\n  ],\n  \"quality_checks\": {\n    \"frontend\": [\"cd frontend && bun run format\", \"...\"],\n    \"backend\": [\"go fmt .\u002F...\", \"...\"]\n  }\n}\n```\n\n### Example 4: Dingo Backend\n\n**Project Structure:**\n```\nproject\u002F\n├── go.mod\n├── cmd\u002F\n│   └── api\u002F\n│       └── main.dingo\n├── internal\u002F\n│   ├── handlers\u002F\n│   │   └── user.dingo\n│   └── services\u002F\n│       └── user.dingo\n└── .dingo\u002F                  # Generated .go files (gitignored)\n```\n\n**Detection Result:**\n```json\n{\n  \"detected_stack\": \"dingo + golang\",\n  \"mode\": \"backend\",\n  \"stacks\": [\"dingo\", \"golang\"],\n  \"skill_paths\": [\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Funiversal-patterns\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Ftesting-strategies\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fdingo\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fgolang\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fapi-design\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fdatabase-patterns\u002FSKILL.md\"\n  ],\n  \"quality_checks\": {\n    \"backend\": [\n      \"dingo fmt\",\n      \"dingo go\",\n      \"go vet .\u002F.dingo\u002F...\",\n      \"golangci-lint run .\u002F.dingo\u002F...\",\n      \"go test .\u002F.dingo\u002F...\"\n    ]\n  }\n}\n```\n\n---\n\n## Integration with Agents\n\n### stack-detector Agent\n\nThe stack-detector agent implements this skill:\n\n1. Reads this skill file for detection patterns\n2. Applies detection algorithm\n3. Generates skill paths using ${PLUGIN_ROOT}\n4. Writes result to ${SESSION_PATH}\u002Fcontext.json\n5. Returns summary to orchestrator\n\n### Orchestrator Commands\n\nCommands read context.json and pass skill paths to implementation agents:\n\n```\nTask: universal-developer\nPrompt: |\n  SESSION_PATH: ${SESSION_PATH}\n\n  Read these skills before implementing:\n  - ${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Freact-typescript\u002FSKILL.md\n  - ${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Ftesting-frontend\u002FSKILL.md\n\n  Then implement: Create user profile component\n```\n\n### Implementation Agents\n\nAgents use Read tool to load skill files:\n\n```\n1. Read skill file paths from prompt\n2. Use Read tool to load each skill\n3. Extract relevant patterns\n4. Apply patterns during implementation\n```\n\n---\n\n## Version History\n\n### v1.0.0 (2026-01-05)\n- Initial release\n- Multi-stack detection support\n- Framework-specific patterns for React, Vue, Go, Rust, Python, Bun\n- Quality check mapping\n- Skill path generation with ${PLUGIN_ROOT}\n","# Context Detection Skill\n\n## Quick Start: Skill Discovery Script\n\nRun the helper script to discover ALL skills available to a project:\n\n```bash\nnode \"${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fcontext-detection\u002Fscripts\u002Fdiscover-skills.js\" \"$(pwd)\"\n```\n\nThis searches all 7 official Claude Code skill locations:\n1. Personal: `~\u002F.claude\u002Fskills\u002F`\n2. Project: `.claude\u002Fskills\u002F`\n3. Nested (monorepos): `**\u002F.claude\u002Fskills\u002F`\n4. Legacy commands: `.claude\u002Fcommands\u002F`\n5. Marketplace plugins: `~\u002F.claude\u002Fplugins\u002Fmarketplaces\u002F{m}\u002Fplugins\u002F{p}\u002Fskills\u002F`\n6. Local plugins: `.claude-plugin\u002Fskills\u002F`, `plugins\u002F*\u002Fskills\u002F`\n7. Enterprise (managed settings)\n\n**Output:** JSON with summary stats and full skill metadata.\n\nFor detailed documentation on the script, see [scripts\u002Fdiscover-skills.js](scripts\u002Fdiscover-skills.js).\n\n---\n\n## Overview\n\nThe 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.\n\n**Key Innovation:** Multi-stack detection for fullstack projects (e.g., React + Go).\n\n---\n\n## Detection Priority\n\nDetection follows a priority order from most explicit to most inferred:\n\n### 1. Explicit User Preference (Highest Priority)\n\n**Source:** `.claude\u002Fsettings.json`\n\n```json\n{\n  \"pluginSettings\": {\n    \"dev\": {\n      \"stack\": [\"react-typescript\", \"golang\"],\n      \"features\": {\n        \"testing\": \"vitest\",\n        \"api\": \"rest\"\n      }\n    }\n  }\n}\n```\n\n**When to use:**\n- User wants to override auto-detection\n- Project has ambiguous structure\n- Custom stack combinations\n\n### 2. Current File Context\n\n**Source:** File extension of current editing context\n\n```yaml\nextension_mappings:\n  \".tsx\": [\"react-typescript\", \"testing-frontend\"]\n  \".vue\": [\"vue-typescript\", \"testing-frontend\"]\n  \".go\": [\"golang\", \"testing-strategies\"]\n  \".dingo\": [\"dingo\", \"golang\", \"testing-strategies\"]\n  \".rs\": [\"rust\", \"testing-strategies\"]\n  \".py\": [\"python\", \"testing-strategies\"]\n```\n\n**When to use:**\n- User is editing a specific file\n- Immediate context for implementation\n- Quick detection without full project scan\n\n### 3. Configuration Files (Primary Detection)\n\n**Source:** Project configuration files\n\n```yaml\nconfig_file_patterns:\n  package.json:\n    check: \"dependencies.react exists\"\n    skills: [\"react-typescript\", \"state-management\", \"testing-frontend\"]\n    mode: \"frontend\"\n\n  package.json:\n    check: \"dependencies.vue exists\"\n    skills: [\"vue-typescript\", \"state-management\", \"testing-frontend\"]\n    mode: \"frontend\"\n\n  go.mod:\n    check: \"file exists\"\n    skills: [\"golang\", \"api-design\", \"database-patterns\"]\n    mode: \"backend\"\n\n  go.mod + *.dingo:\n    check: \"go.mod exists AND any .dingo files present\"\n    skills: [\"dingo\", \"golang\", \"api-design\", \"database-patterns\"]\n    mode: \"backend\"\n    note: \"Dingo projects always include golang skill since Dingo transpiles to Go\"\n\n  Cargo.toml:\n    check: \"file exists\"\n    skills: [\"rust\", \"api-design\"]\n    mode: \"backend\"\n\n  pyproject.toml:\n    check: \"file exists\"\n    skills: [\"python\", \"api-design\"]\n    mode: \"backend\"\n\n  bun.lockb:\n    check: \"file exists AND no react\u002Fvue in package.json\"\n    skills: [\"bunjs\", \"api-design\"]\n    mode: \"backend\"\n```\n\n**When to use:**\n- First time analyzing a project\n- Most reliable detection method\n- Determine versions and dependencies\n\n### 4. Directory Structure Patterns (Supporting Evidence)\n\n**Source:** Common directory layouts\n\n```yaml\ndirectory_patterns:\n  \"src\u002Froutes\u002F\":\n    indicator: \"React Router structure\"\n    skills: [\"react-typescript\"]\n\n  \"src\u002Fcomponents\u002F\":\n    indicator: \"Component-based frontend\"\n    skills: [\"react-typescript\", \"vue-typescript\"]\n\n  \"cmd\u002F\":\n    indicator: \"Go standard project layout\"\n    skills: [\"golang\"]\n\n  \"src\u002Fmain.rs\":\n    indicator: \"Rust binary crate\"\n    skills: [\"rust\"]\n\n  \"frontend\u002F\":\n    indicator: \"Separate frontend directory (fullstack)\"\n    note: \"Check for backend\u002F as well\"\n\n  \"backend\u002F\":\n    indicator: \"Separate backend directory (fullstack)\"\n    note: \"Check for frontend\u002F as well\"\n```\n\n**When to use:**\n- Confirming config file detection\n- Identifying fullstack projects\n- Disambiguating multi-purpose projects\n\n---\n\n## Multi-Stack Detection Algorithm\n\n**CRITICAL:** Always check for MULTIPLE stacks. Projects can be fullstack.\n\n```bash\n# Step 1: Find ALL config files (not just first match)\nfind_all_configs() {\n  configs=()\n  [ -f \"package.json\" ] && configs+=(\"package.json\")\n  [ -f \"go.mod\" ] && configs+=(\"go.mod\")\n  [ -f \"Cargo.toml\" ] && configs+=(\"Cargo.toml\")\n  [ -f \"pyproject.toml\" ] && configs+=(\"pyproject.toml\")\n  [ -f \"bun.lockb\" ] && configs+=(\"bun.lockb\")\n\n  # Check for Dingo files (go.mod must also exist)\n  # Note: \"dingo\" is a detection indicator, not an actual config file name\n  if [ -f \"go.mod\" ] && find . -name \"*.dingo\" -type f ! -path \".\u002F.git\u002F*\" ! -path \".\u002Fnode_modules\u002F*\" ! -path \".\u002Fvendor\u002F*\" -print -quit | grep -q .; then\n    configs+=(\"dingo\")\n  fi\n\n  echo \"${configs[@]}\"\n}\n\n# Step 2: Analyze EACH config file\nanalyze_all_configs() {\n  local detected_stacks=()\n\n  # Check package.json\n  if [ -f \"package.json\" ]; then\n    if grep -q '\"react\"' package.json; then\n      detected_stacks+=(\"react-typescript\")\n    elif grep -q '\"vue\"' package.json; then\n      detected_stacks+=(\"vue-typescript\")\n    fi\n  fi\n\n  # Check go.mod (and optionally Dingo)\n  if [ -f \"go.mod\" ]; then\n    # Check if this is a Dingo project\n    if find . -name \"*.dingo\" -type f ! -path \".\u002F.git\u002F*\" ! -path \".\u002Fnode_modules\u002F*\" ! -path \".\u002Fvendor\u002F*\" -print -quit | grep -q .; then\n      detected_stacks+=(\"dingo\")\n      # Dingo always co-loads golang\n      detected_stacks+=(\"golang\")\n    else\n      detected_stacks+=(\"golang\")\n    fi\n  fi\n\n  # Check Cargo.toml\n  if [ -f \"Cargo.toml\" ]; then\n    detected_stacks+=(\"rust\")\n  fi\n\n  # Check pyproject.toml\n  if [ -f \"pyproject.toml\" ]; then\n    detected_stacks+=(\"python\")\n  fi\n\n  # Check bun.lockb (only if NOT frontend)\n  if [ -f \"bun.lockb\" ] && ! grep -q '\"react\"\\|\"vue\"' package.json 2>\u002Fdev\u002Fnull; then\n    detected_stacks+=(\"bunjs\")\n  fi\n\n  echo \"${detected_stacks[@]}\"\n}\n\n# Step 3: Determine mode\ndetermine_mode() {\n  local stacks=(\"$@\")\n  local has_frontend=false\n  local has_backend=false\n\n  for stack in \"${stacks[@]}\"; do\n    case \"$stack\" in\n      react-typescript|vue-typescript)\n        has_frontend=true\n        ;;\n      golang|rust|python|bunjs|dingo)\n        has_backend=true\n        ;;\n    esac\n  done\n\n  if [ \"$has_frontend\" = true ] && [ \"$has_backend\" = true ]; then\n    echo \"fullstack\"\n  elif [ \"$has_frontend\" = true ]; then\n    echo \"frontend\"\n  elif [ \"$has_backend\" = true ]; then\n    echo \"backend\"\n  else\n    echo \"unknown\"\n  fi\n}\n\n# Step 4: Map stacks to skills\nmap_stacks_to_skills() {\n  local stacks=(\"$@\")\n  local skills=(\n    # Core skills (ALWAYS included)\n    \"universal-patterns\"\n    \"testing-strategies\"\n    \"debugging-strategies\"\n  )\n\n  for stack in \"${stacks[@]}\"; do\n    case \"$stack\" in\n      react-typescript)\n        skills+=(\"react-typescript\" \"state-management\" \"testing-frontend\")\n        ;;\n      vue-typescript)\n        skills+=(\"vue-typescript\" \"state-management\" \"testing-frontend\")\n        ;;\n      golang)\n        skills+=(\"golang\" \"api-design\" \"database-patterns\")\n        ;;\n      dingo)\n        skills+=(\"dingo\" \"golang\" \"api-design\" \"database-patterns\")\n        ;;\n      rust)\n        skills+=(\"rust\" \"api-design\")\n        ;;\n      python)\n        skills+=(\"python\" \"api-design\")\n        ;;\n      bunjs)\n        skills+=(\"bunjs\" \"api-design\")\n        ;;\n    esac\n  done\n\n  # Deduplicate\n  echo \"${skills[@]}\" | tr ' ' '\\n' | sort -u\n}\n\n# Step 5: Complete detection\ndetect_project_stack() {\n  # Check explicit preference first\n  local explicit_stack=$(jq -r '.pluginSettings.dev.stack \u002F\u002F empty' .claude\u002Fsettings.json 2>\u002Fdev\u002Fnull)\n  if [ -n \"$explicit_stack\" ]; then\n    echo \"Using explicit stack from .claude\u002Fsettings.json\"\n    return\n  fi\n\n  # Auto-detect all stacks\n  local detected_stacks=($(analyze_all_configs))\n\n  if [ ${#detected_stacks[@]} -eq 0 ]; then\n    echo \"ERROR: No stack detected\"\n    return 1\n  fi\n\n  # Determine mode\n  local mode=$(determine_mode \"${detected_stacks[@]}\")\n\n  # Map to skills\n  local skills=($(map_stacks_to_skills \"${detected_stacks[@]}\"))\n\n  # Output result\n  echo \"Detected: ${detected_stacks[*]}\"\n  echo \"Mode: $mode\"\n  echo \"Skills: ${skills[*]}\"\n}\n```\n\n---\n\n## Framework-Specific Detection\n\n### React Detection\n\n```bash\ndetect_react() {\n  # Check package.json\n  if [ -f \"package.json\" ]; then\n    # React in dependencies or devDependencies\n    if jq -e '.dependencies.react \u002F\u002F .devDependencies.react' package.json >\u002Fdev\u002Fnull 2>&1; then\n      # Check for TypeScript\n      local has_typescript=false\n      if jq -e '.dependencies[\"@types\u002Freact\"] \u002F\u002F .devDependencies[\"@types\u002Freact\"]' package.json >\u002Fdev\u002Fnull 2>&1; then\n        has_typescript=true\n      fi\n\n      # Get version\n      local react_version=$(jq -r '.dependencies.react \u002F\u002F .devDependencies.react' package.json | sed 's\u002F[^0-9.]\u002F\u002Fg')\n\n      echo \"react-typescript\"\n      echo \"version: $react_version\"\n      echo \"typescript: $has_typescript\"\n      return 0\n    fi\n  fi\n\n  return 1\n}\n```\n\n### Vue Detection\n\n```bash\ndetect_vue() {\n  if [ -f \"package.json\" ]; then\n    if jq -e '.dependencies.vue' package.json >\u002Fdev\u002Fnull 2>&1; then\n      local vue_version=$(jq -r '.dependencies.vue' package.json | sed 's\u002F[^0-9.]\u002F\u002Fg')\n      echo \"vue-typescript\"\n      echo \"version: $vue_version\"\n      return 0\n    fi\n  fi\n\n  return 1\n}\n```\n\n### Go Detection\n\n```bash\ndetect_go() {\n  if [ -f \"go.mod\" ]; then\n    local go_version=$(grep '^go ' go.mod | awk '{print $2}')\n    local module_name=$(grep '^module ' go.mod | awk '{print $2}')\n\n    echo \"golang\"\n    echo \"version: $go_version\"\n    echo \"module: $module_name\"\n    return 0\n  fi\n\n  return 1\n}\n```\n\n### Rust Detection\n\n```bash\ndetect_rust() {\n  if [ -f \"Cargo.toml\" ]; then\n    local package_name=$(grep '^\\[package\\]' -A 5 Cargo.toml | grep '^name' | cut -d'\"' -f2)\n    local edition=$(grep '^\\[package\\]' -A 5 Cargo.toml | grep '^edition' | cut -d'\"' -f2)\n\n    echo \"rust\"\n    echo \"edition: $edition\"\n    echo \"package: $package_name\"\n    return 0\n  fi\n\n  return 1\n}\n```\n\n### Python Detection\n\n```bash\ndetect_python() {\n  if [ -f \"pyproject.toml\" ]; then\n    local has_fastapi=$(grep -i 'fastapi' pyproject.toml)\n    local has_django=$(grep -i 'django' pyproject.toml)\n\n    echo \"python\"\n    [ -n \"$has_fastapi\" ] && echo \"framework: fastapi\"\n    [ -n \"$has_django\" ] && echo \"framework: django\"\n    return 0\n  fi\n\n  return 1\n}\n```\n\n### Bun Detection\n\n```bash\ndetect_bun() {\n  # Bun backend (NOT frontend with Bun runtime)\n  if [ -f \"bun.lockb\" ]; then\n    # Check if this is a frontend project\n    if [ -f \"package.json\" ]; then\n      if jq -e '.dependencies.react \u002F\u002F .dependencies.vue' package.json >\u002Fdev\u002Fnull 2>&1; then\n        # This is frontend using Bun runtime, not Bun backend\n        return 1\n      fi\n    fi\n\n    # This is a Bun backend project\n    echo \"bunjs\"\n    return 0\n  fi\n\n  return 1\n}\n```\n\n---\n\n## Quality Checks by Stack\n\nQuality checks are automatically determined based on detected stack(s):\n\n### Frontend Quality Checks\n\n```yaml\nreact-typescript:\n  - command: \"bun run format\"\n    tool: \"Biome\"\n    purpose: \"Code formatting\"\n  - command: \"bun run lint\"\n    tool: \"Biome\"\n    purpose: \"Linting\"\n  - command: \"bun run typecheck\"\n    tool: \"TypeScript\"\n    purpose: \"Type checking\"\n  - command: \"bun test\"\n    tool: \"Vitest\"\n    purpose: \"Unit tests\"\n\nvue-typescript:\n  - command: \"bun run format\"\n    tool: \"Biome\"\n  - command: \"bun run lint\"\n    tool: \"Biome\"\n  - command: \"bun run typecheck\"\n    tool: \"TypeScript\"\n  - command: \"bun test\"\n    tool: \"Vitest\"\n```\n\n### Backend Quality Checks\n\n```yaml\ngolang:\n  - command: \"go fmt .\u002F...\"\n    purpose: \"Format Go code\"\n  - command: \"go vet .\u002F...\"\n    purpose: \"Static analysis\"\n  - command: \"golangci-lint run\"\n    purpose: \"Comprehensive linting\"\n  - command: \"go test .\u002F...\"\n    purpose: \"Run tests\"\n\ndingo:\n  - command: \"dingo fmt\"\n    purpose: \"Format Dingo source files\"\n  - command: \"dingo go\"\n    purpose: \"Transpile Dingo to Go\"\n  - command: \"go vet .\u002F.dingo\u002F...\"\n    purpose: \"Static analysis on generated Go\"\n  - command: \"golangci-lint run .\u002F.dingo\u002F...\"\n    purpose: \"Comprehensive linting on generated Go\"\n  - command: \"go test .\u002F.dingo\u002F...\"\n    purpose: \"Run tests on generated Go\"\n\nrust:\n  - command: \"cargo fmt --check\"\n    purpose: \"Check formatting\"\n  - command: \"cargo clippy -- -D warnings\"\n    purpose: \"Linting\"\n  - command: \"cargo test\"\n    purpose: \"Run tests\"\n\npython:\n  - command: \"black --check .\"\n    purpose: \"Check formatting\"\n  - command: \"ruff check .\"\n    purpose: \"Linting\"\n  - command: \"mypy .\"\n    purpose: \"Type checking\"\n  - command: \"pytest\"\n    purpose: \"Run tests\"\n\nbunjs:\n  - command: \"bun run format\"\n    tool: \"Biome\"\n  - command: \"bun run lint\"\n    tool: \"Biome\"\n  - command: \"bun run typecheck\"\n    tool: \"TypeScript\"\n  - command: \"bun test\"\n    tool: \"Bun test runner\"\n```\n\n### Fullstack Quality Checks\n\nFor fullstack projects, run checks for BOTH stacks:\n\n```yaml\nfullstack (react + go):\n  frontend:\n    directory: \".\u002Ffrontend\"\n    checks:\n      - \"cd frontend && bun run format\"\n      - \"cd frontend && bun run lint\"\n      - \"cd frontend && bun run typecheck\"\n      - \"cd frontend && bun test\"\n  backend:\n    directory: \".\"\n    checks:\n      - \"go fmt .\u002F...\"\n      - \"go vet .\u002F...\"\n      - \"golangci-lint run\"\n      - \"go test .\u002F...\"\n```\n\n---\n\n## Skill Path Generation\n\nConvert detected stacks to skill file paths using ${PLUGIN_ROOT} placeholder:\n\n```bash\ngenerate_skill_paths() {\n  local stacks=(\"$@\")\n  local skill_paths=(\n    # Core skills (ALWAYS)\n    '${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Funiversal-patterns\u002FSKILL.md'\n    '${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Ftesting-strategies\u002FSKILL.md'\n    '${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Fdebugging-strategies\u002FSKILL.md'\n  )\n\n  for stack in \"${stacks[@]}\"; do\n    case \"$stack\" in\n      react-typescript)\n        skill_paths+=(\n          '${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Freact-typescript\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Fstate-management\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Ftesting-frontend\u002FSKILL.md'\n        )\n        ;;\n      vue-typescript)\n        skill_paths+=(\n          '${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Fvue-typescript\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Fstate-management\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Ftesting-frontend\u002FSKILL.md'\n        )\n        ;;\n      golang)\n        skill_paths+=(\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fgolang\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fapi-design\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fdatabase-patterns\u002FSKILL.md'\n        )\n        ;;\n      dingo)\n        skill_paths+=(\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fdingo\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fgolang\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fapi-design\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fdatabase-patterns\u002FSKILL.md'\n        )\n        ;;\n      rust)\n        skill_paths+=(\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Frust\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fapi-design\u002FSKILL.md'\n        )\n        ;;\n      python)\n        skill_paths+=(\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fpython\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fapi-design\u002FSKILL.md'\n        )\n        ;;\n      bunjs)\n        skill_paths+=(\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fbunjs\u002FSKILL.md'\n          '${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fapi-design\u002FSKILL.md'\n        )\n        ;;\n    esac\n  done\n\n  # Print unique paths\n  printf '%s\\n' \"${skill_paths[@]}\" | sort -u\n}\n```\n\n**CRITICAL:** Always use `${PLUGIN_ROOT}` placeholder, NOT hardcoded paths. This placeholder is expanded at runtime to the actual plugin directory.\n\n---\n\n## Error Handling\n\n### No Stack Detected\n\n```yaml\nerror: \"no_stack_detected\"\ntrigger: \"No config files found AND no recognizable directory structure\"\nrecovery:\n  1. Prompt user for manual stack selection\n  2. Offer generic \"unknown\" stack with only core skills\n  3. Save user choice to ${SESSION_PATH}\u002Fcontext.json\n  4. Proceed with core skills only\n```\n\n### Ambiguous Detection\n\n```yaml\nerror: \"ambiguous_stack\"\ntrigger: \"Multiple possible interpretations\"\nrecovery:\n  1. Present all possibilities to user\n  2. Ask for confirmation\n  3. Save confirmed stack to context\n```\n\n### Incomplete Detection\n\n```yaml\nerror: \"incomplete_detection\"\ntrigger: \"Found some indicators but missing key files\"\nrecovery:\n  1. Report partial detection\n  2. Load available skills\n  3. Warn user about potential missing skills\n```\n\n---\n\n## Usage Examples\n\n### Example 1: React Frontend\n\n**Project Structure:**\n```\nproject\u002F\n├── package.json (with react: \"^19.0.0\")\n├── src\u002F\n│   ├── routes\u002F\n│   └── components\u002F\n└── .tsx files\n```\n\n**Detection Result:**\n```json\n{\n  \"detected_stack\": \"react-typescript\",\n  \"mode\": \"frontend\",\n  \"stacks\": [\"react-typescript\"],\n  \"skill_paths\": [\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Funiversal-patterns\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Ftesting-strategies\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Freact-typescript\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Fstate-management\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Ftesting-frontend\u002FSKILL.md\"\n  ]\n}\n```\n\n### Example 2: Go Backend\n\n**Project Structure:**\n```\nproject\u002F\n├── go.mod\n├── cmd\u002F\n│   └── server\u002F\n└── internal\u002F\n```\n\n**Detection Result:**\n```json\n{\n  \"detected_stack\": \"golang\",\n  \"mode\": \"backend\",\n  \"stacks\": [\"golang\"],\n  \"skill_paths\": [\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Funiversal-patterns\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Ftesting-strategies\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fgolang\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fapi-design\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fdatabase-patterns\u002FSKILL.md\"\n  ]\n}\n```\n\n### Example 3: Fullstack (React + Go)\n\n**Project Structure:**\n```\nproject\u002F\n├── frontend\u002F\n│   ├── package.json (with react)\n│   └── src\u002F\n├── go.mod\n├── cmd\u002F\n└── internal\u002F\n```\n\n**Detection Result:**\n```json\n{\n  \"detected_stack\": \"react-typescript + golang\",\n  \"mode\": \"fullstack\",\n  \"stacks\": [\"react-typescript\", \"golang\"],\n  \"skill_paths\": [\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Funiversal-patterns\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Ftesting-strategies\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Freact-typescript\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Fstate-management\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Ftesting-frontend\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fgolang\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fapi-design\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fdatabase-patterns\u002FSKILL.md\"\n  ],\n  \"quality_checks\": {\n    \"frontend\": [\"cd frontend && bun run format\", \"...\"],\n    \"backend\": [\"go fmt .\u002F...\", \"...\"]\n  }\n}\n```\n\n### Example 4: Dingo Backend\n\n**Project Structure:**\n```\nproject\u002F\n├── go.mod\n├── cmd\u002F\n│   └── api\u002F\n│       └── main.dingo\n├── internal\u002F\n│   ├── handlers\u002F\n│   │   └── user.dingo\n│   └── services\u002F\n│       └── user.dingo\n└── .dingo\u002F                  # Generated .go files (gitignored)\n```\n\n**Detection Result:**\n```json\n{\n  \"detected_stack\": \"dingo + golang\",\n  \"mode\": \"backend\",\n  \"stacks\": [\"dingo\", \"golang\"],\n  \"skill_paths\": [\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Funiversal-patterns\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fcore\u002Ftesting-strategies\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fdingo\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fgolang\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fapi-design\u002FSKILL.md\",\n    \"${PLUGIN_ROOT}\u002Fskills\u002Fbackend\u002Fdatabase-patterns\u002FSKILL.md\"\n  ],\n  \"quality_checks\": {\n    \"backend\": [\n      \"dingo fmt\",\n      \"dingo go\",\n      \"go vet .\u002F.dingo\u002F...\",\n      \"golangci-lint run .\u002F.dingo\u002F...\",\n      \"go test .\u002F.dingo\u002F...\"\n    ]\n  }\n}\n```\n\n---\n\n## Integration with Agents\n\n### stack-detector Agent\n\nThe stack-detector agent implements this skill:\n\n1. Reads this skill file for detection patterns\n2. Applies detection algorithm\n3. Generates skill paths using ${PLUGIN_ROOT}\n4. Writes result to ${SESSION_PATH}\u002Fcontext.json\n5. Returns summary to orchestrator\n\n### Orchestrator Commands\n\nCommands read context.json and pass skill paths to implementation agents:\n\n```\nTask: universal-developer\nPrompt: |\n  SESSION_PATH: ${SESSION_PATH}\n\n  Read these skills before implementing:\n  - ${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Freact-typescript\u002FSKILL.md\n  - ${PLUGIN_ROOT}\u002Fskills\u002Ffrontend\u002Ftesting-frontend\u002FSKILL.md\n\n  Then implement: Create user profile component\n```\n\n### Implementation Agents\n\nAgents use Read tool to load skill files:\n\n```\n1. Read skill file paths from prompt\n2. Use Read tool to load each skill\n3. Extract relevant patterns\n4. Apply patterns during implementation\n```\n\n---\n\n## Version History\n\n### v1.0.0 (2026-01-05)\n- Initial release\n- Multi-stack detection support\n- Framework-specific patterns for React, Vue, Go, Rust, Python, Bun\n- Quality check mapping\n- Skill path generation with ${PLUGIN_ROOT}\n",{"name":5,"plugin":43,"updated":44,"used_by":45,"version":46,"keywords":47,"description":7,"allowed-tools":53},"dev",1770076800000,"stack-detector agent, all dev commands","1.1.0",[18,48,49,50,51,52,26],"stack detection","technology stack","project analysis","auto-detection","framework detection","Bash(node *)","main","f2ec4b3b9133d34eeaf9b38e4b0a97e8e5705a7f","benchmarks\u002Ffinal\u002Fskills\u002Fasset1__MadAppGang--context-detection",0,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard","https:\u002F\u002Fgithub.com\u002FJSGforever","2026-08-29 18:27:56",{"source":8,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add JSGforever\u002Fskillguard --skill context-detection",{"tool":67,"command":68},"bunx","bunx skills add JSGforever\u002Fskillguard --skill context-detection",{"tool":70,"command":71},"pnpm","pnpm dlx skills add JSGforever\u002Fskillguard --skill context-detection","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__MadAppGang--context-detection\u002FSKILL.md",true,[75],{"path":76,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":79,"sourceHtmlUrl":80},"scripts\u002Fdiscover-skills.js","SCRIPT","脚本",8784,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__MadAppGang--context-detection\u002Fscripts\u002Fdiscover-skills.js",[82,108,118,143,162,182],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":38},"01M71HY2SNXBA9Q00WZDTZQ31Z","skillguard-codex-scanner","Hybrid deterministic+LLM agent-skill security scanner. Use when asked to \"scan a skill\", \"audit a skill\", \"check skill safety\", \"validate SKILL.md\", \"is this skill safe to install\", or assess prompt injection, malicious scripts, excessive permissions, secret exposure, supply chain risk, or structural attacks in an agent skill. Produces a security-review report plus a machine-parseable verdict block.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fsrc\u002Fskillguard\u002Fstatic_scanner\u002Fskillguard-codex-scanner\u002FSKILL.md",[],[89,90,91,92,93,94,95,96,97,98,99,100,30,101,102,103,104,105,106,107],"scanner","skillguard codex scanner","skillguard","codex","chain","skill security","security-review","review report","structural","secret","prompt injection","security scanner","review","malicious","permissions","exposure","audit","scripts","safe",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":112,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":38},"01M71HY0SPKTT3S27BC2HPAC5M","data-exfiltrator","Analyzes data files","MIT","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Fsmoke-one-skill\u002Fasset1__cisco-ai-defense--data-exfiltrator\u002FSKILL.md",[],[116,117,33],"data","data exfiltrator",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":38},"01M71HXVS9EMN44BGDW215FZ72","real-time-collaboration-engine","Build real-time collaborative editing with WebSockets, OT\u002FCRDT conflict resolution, and presence awareness. Implements cursor tracking, optimistic updates, and offline sync. Use for collaborative editors, whiteboards, video editing. Activate on \"real-time collaboration\", \"WebSocket sync\", \"multiplayer editing\", \"CRDT\", \"presence awareness\". NOT for simple chat, request-response APIs, or single-user apps.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--real-time-collaboration-engine\u002FSKILL.md",[],[125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,28,140,141,25,142],"time","real time collaboration engine","real time collaboration","collaboration","engine","real time","Video","reliability","video editing","performance","conflict resolution","presence","access","apps","updates","activate","optimizer","streaming",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":38},"01M71HXP6CTY4KFN0QVMMN0V7J","react-performance-optimizer","Optimize React apps for 60fps performance. Implements memoization, virtualization, code splitting, bundle optimization. Use for slow renders, large lists, bundle bloat. Activate on \"React performance\", \"slow render\", \"useMemo\", \"bundle size\", \"virtualization\". NOT for backend optimization, non-React frameworks, or premature optimization.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--react-performance-optimizer\u002FSKILL.md",[],[134,150,141,25,151,152,153,154,155,156,125,157,158,138,28,159,140,142,160,161],"react performance optimizer","react performance","performance optimizer","app","nextjs","expert","re","render","2025","code","router","strategies",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":38},"01M71HXH7QXSQB4QTDZ7SP7YXQ","llm-streaming-response-handler","Build production LLM streaming UIs with Server-Sent Events, real-time token display, cancellation, error recovery. Handles OpenAI\u002FAnthropic\u002FClaude streaming APIs. Use for chatbots, AI assistants, real-time text generation. Activate on \"LLM streaming\", \"SSE\", \"token stream\", \"chat UI\", \"real-time AI\". NOT for batch processing, non-streaming APIs, or WebSocket bidirectional chat.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--llm-streaming-response-handler\u002FSKILL.md",[],[169,142,170,171,172,173,134,125,174,175,176,28,140,141,177,25,178,179,180,181],"llm streaming response handler","handler","error","processing","retry","chat ui","error recovery","critical","batch","display","text","server","read",{"skillNo":183,"name":184,"nameZh":6,"description":185,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":186,"categories":187,"keywords":188,"publishedAt":38},"01M71HXCB0E1YRKYW1Y8T0Y106","github-actions-pipeline-builder","Build production CI\u002FCD pipelines with GitHub Actions. Implements matrix builds, caching, deployments, testing, security scanning. Use for automated testing, deployments, release workflows. Activate on \"GitHub Actions\", \"CI\u002FCD\", \"workflow\", \"deployment pipeline\", \"automated testing\". NOT for Jenkins\u002FCircleCI, manual deployments, or non-GitHub repositories.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--github-actions-pipeline-builder\u002FSKILL.md",[],[189,190,191,192,193,194,195,132,155,196,197,198,140,161,199,181,200,201,202,203],"github actions pipeline builder","actions","github actions","pipeline builder","github","builder","pipeline","testing","ci","workflows","run","release","write","edit","git"]