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
# React (no "next" 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.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" ]
# Go
[ -f "go.mod" ]
# Ruby
[ -f "Gemfile" ] && [ -f "Rakefile" ]
# Rust
[ -f "Cargo.toml" ]
# Python
[ -f "pyproject.toml" ] || [ -f "requirements.txt" ]
Priority order: Next.js > React > Generic TS > Laravel > Swift > Java > 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
| Severity |
Action |
| Interface in wrong location |
BLOCK (exit 2) |
| File over limit |
WARNING (exit 0) |
| Missing documentation |
WARNING |
Skill Mapping
| Project Type |
SOLID Skill |
Skill Path |
nextjs |
solid-nextjs |
nextjs-expert/skills/solid-nextjs/ |
react |
solid-react |
react-expert/skills/solid-react/ |
generic |
solid-generic |
solid/skills/solid-generic/ |
laravel |
solid-php |
laravel-expert/skills/solid-php/ |
swift |
solid-swift |
swift-apple-expert/skills/solid-swift/ |
java |
solid-java |
solid/skills/solid-java/ |
go |
solid-go |
solid/skills/solid-go/ |
ruby |
solid-ruby |
solid/skills/solid-ruby/ |
rust |
solid-rust |
solid/skills/solid-rust/ |
python |
(no skill yet) |
- |
Environment Variables
Set by detect-project.sh:
SOLID_PROJECT_TYPE=nextjs|react|generic|laravel|swift|java|go|ruby|rust|python|unknown
SOLID_FILE_LIMIT=100|150
SOLID_INTERFACE_DIR=path/to/interfaces
SOLID_STRUCTURE=modular
1---2name: solid-detection3description: "Use when determining which language-specific SOLID skill to load, detecting project type from config files, or resolving interface directory conventions."4argument-hint: "[file-or-directory] [--language]"5user-invocable: false6metadata:7 source: https://skillmd.com/skills/fusengine/solid-detection8---910<objective>11SOLID Detection identifies a project's language/framework from its config files (package.json + next/react, tsconfig.json/bun files, composer.json + laravel, Package.swift/*.xcodeproj, pom.xml/build.gradle, 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`.1213An 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.14</objective>1516# SOLID Detection Skill1718## References1920- [language-rules.md](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/blanks2122## Project Detection2324Detect project type from configuration files:2526```bash27# Next.js (priority over React)28[ -f "package.json" ] && grep -q '"next"' package.json2930# React (no "next" in package.json)31[ -f "package.json" ] && grep -q '"react"' package.json && ! grep -q '"next"' package.json3233# Generic TypeScript (no react/next, has .ts files)34[ -f "package.json" ] && ! grep -q '"react"' package.json && ! grep -q '"next"' package.json35[ -f "tsconfig.json" ] || [ -f "bun.lockb" ] || [ -f "bunfig.toml" ]3637# Laravel38[ -f "composer.json" ] && grep -q '"laravel' composer.json3940# Swift41[ -f "Package.swift" ] || ls *.xcodeproj4243# Java44[ -f "pom.xml" ] || [ -f "build.gradle" ] || [ -f "build.gradle.kts" ]4546# Go47[ -f "go.mod" ]4849# Ruby50[ -f "Gemfile" ] && [ -f "Rakefile" ]5152# Rust53[ -f "Cargo.toml" ]5455# Python56[ -f "pyproject.toml" ] || [ -f "requirements.txt" ]57```5859**Priority order:** Next.js > React > Generic TS > Laravel > Swift > Java > Go > Ruby > Rust > Python6061For the full per-language rule tables (interface location, forbidden zones, pattern-detection regex) and line-counting rules, see [language-rules.md](references/language-rules.md).6263## Validation Actions6465| Severity | Action |66|----------|--------|67| Interface in wrong location | **BLOCK** (exit 2) |68| File over limit | **WARNING** (exit 0) |69| Missing documentation | **WARNING** |7071## Skill Mapping7273| Project Type | SOLID Skill | Skill Path |74|--------------|-------------|------------|75| `nextjs` | solid-nextjs | `nextjs-expert/skills/solid-nextjs/` |76| `react` | solid-react | `react-expert/skills/solid-react/` |77| `generic` | solid-generic | `solid/skills/solid-generic/` |78| `laravel` | solid-php | `laravel-expert/skills/solid-php/` |79| `swift` | solid-swift | `swift-apple-expert/skills/solid-swift/` |80| `java` | solid-java | `solid/skills/solid-java/` |81| `go` | solid-go | `solid/skills/solid-go/` |82| `ruby` | solid-ruby | `solid/skills/solid-ruby/` |83| `rust` | solid-rust | `solid/skills/solid-rust/` |84| `python` | _(no skill yet)_ | - |8586## Environment Variables8788Set by `detect-project.sh`:8990```bash91SOLID_PROJECT_TYPE=nextjs|react|generic|laravel|swift|java|go|ruby|rust|python|unknown92SOLID_FILE_LIMIT=100|15093SOLID_INTERFACE_DIR=path/to/interfaces94SOLID_STRUCTURE=modular95```