mcpField
S
solid-detection

solid-detection

github.com/fusengineDevelopment3440 installsUpdated 2w ago
Repository

About solid-detection

solid-detection identifies a project's language and framework from configuration files, then selects the corresponding SOLID skill and sets project environment variables. It is for workflows that need language-specific interface-location and file-limit checks.

Key features

  1. 01Detects project type by configuration-file priority
  2. 02Maps stacks to matching SOLID skills
  3. 03Sets project type and structure variables
  4. 04Blocks misplaced interfaces
  5. 05Warns about file limits and missing documentation

Use cases

  1. 01Choose stack-specific rules before coding
  2. 02Check interface file placement
  3. 03Apply project-specific file limits

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/fusengine/claude-plugins --skill solid-detection

After installing, type/solid-detectionin Claude Code to confirm it loaded.

Details

From the project README
SOLID Detection identifies a project's language/framework from its config files (package.json + next/@tanstack/react-start/astro/react, tsconfig.json/bun files, composer.json + laravel, Package.swift/*.xcodeproj, pom.xml/build.gradle, *.csproj/*.sln, go.mod, Gemfile+Rakefile, Cargo.toml, pyproject.toml/requirements.txt) in a fixed priority order, then maps it to the matching SOLID skill and sets `SOLID_PROJECT_TYPE`, `SOLID_FILE_LIMIT`, `SOLID_INTERFACE_DIR`, and `SOLID_STRUCTURE` environment variables via `detect-project.sh`.

An interface found in the wrong location is a hard BLOCK; exceeding the file-size limit or missing documentation is a WARNING only. See language-rules.md for the full per-language interface-location, forbidden-zone, and line-counting rules.

SOLID Detection Skill

References

  • language-rules.md - Load when: resolving the exact interface directory, file-limit, or pattern-detection regex for a specific language (Next.js, React, Generic TS, Laravel, Swift, Java, Go, Ruby, Rust, Python), or counting lines while excluding comments/blanks

Project Detection

Detect project type from configuration files:

# Next.js (priority over React)
[ -f "package.json" ] && grep -q '"next"' package.json

# TanStack Start (priority over React)
[ -f "package.json" ] && grep -q '"@tanstack/react-start"' package.json

# Astro (priority over React)
[ -f "package.json" ] && grep -q '"astro"' package.json

# React (no next / TanStack Start / astro in package.json)
[ -f "package.json" ] && grep -q '"react"' package.json && ! grep -q '"next"' package.json

# Generic TypeScript (no react/next, has .ts files)
[ -f "package.json" ] && ! grep -q '"react"' package.json && ! grep -q '"next"' package.json
[ -f "tsconfig.json" ] || [ -f "bun.lock" ] || [ -f "bun.lockb" ] || [ -f "bunfig.toml" ]

# Laravel
[ -f "composer.json" ] && grep -q '"laravel' composer.json

# Swift
[ -f "Package.swift" ] || ls *.xcodeproj

# Java
[ -f "pom.xml" ] || [ -f "build.gradle" ] || [ -f "build.gradle.kts" ]

# C# / .NET
ls *.csproj *.sln *.slnx 2>/dev/null | grep -q .

# Go
[ -f "go.mod" ]

# Ruby
[ -f "Gemfile" ] && [ -f "Rakefile" ]

# Rust
[ -f "Cargo.toml" ]

# Python
[ -f "pyproject.toml" ] || [ -f "requirements.txt" ]

Priority order: Next.js > TanStack Start > Astro > React > Generic TS > Laravel > Swift > Java > C# > Go > Ruby > Rust > Python

For the full per-language rule tables (interface location, forbidden zones, pattern-detection regex) and line-counting rules, see language-rules.md.

Validation Actions

SeverityAction
Interface in wrong locationBLOCK (exit 2)
File over limitWARNING (exit 0)
Missing documentationWARNING

Skill Mapping

Project TypeSOLID SkillSkill Path
nextjssolid-nextjsnextjs-expert/skills/solid-nextjs/
tanstack-startsolid-tanstack-starttanstack-start-expert/skills/solid-tanstack-start/
astrosolid-astroastro-expert/skills/solid-astro/
reactsolid-reactreact-expert/skills/solid-react/
genericsolid-genericsolid/skills/solid-generic/
laravelsolid-phplaravel-expert/skills/solid-php/
swiftsolid-swiftswift-apple-expert/skills/solid-swift/
javasolid-javasolid/skills/solid-java/
csharpsolid-csharpsolid/skills/solid-csharp/
gosolid-gosolid/skills/solid-go/
rubysolid-rubysolid/skills/solid-ruby/
rustsolid-rustsolid/skills/solid-rust/
pythonsolid-pythonsolid/skills/solid-python/

Each solid-<stack> skill defines that stack's own shared locations (DRY "Check shared locations" step) — load it before writing new code; never apply another stack's directories.

Environment Variables

Set by detect-project.sh:

SOLID_PROJECT_TYPE=nextjs|tanstack-start|astro|react|generic|laravel|swift|java|csharp|go|ruby|rust|python|unknown
SOLID_FILE_LIMIT=100|150
SOLID_INTERFACE_DIR=path/to/interfaces
SOLID_STRUCTURE=modular

Comments

Markdown supported