solid-detection
Multi-language SOLID detection rules. Project type detection, interface locations, file size limits per language.
What this skill does
# SOLID Detection Skill
## Project Detection
Detect project type from configuration files:
```bash
# 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
## Language Rules
### Next.js / TypeScript
| Rule | Value |
|------|-------|
| File limit | 100 lines |
| Interface location | `modules/[feature]/src/interfaces/` |
| Shared interfaces | `modules/cores/interfaces/` |
| Forbidden | Interfaces in `components/`, `app/` |
| SOLID skill | `solid-nextjs` |
**Pattern detection**:
```regex
^(export )?(interface|type) \w+
```
### React / TypeScript
| Rule | Value |
|------|-------|
| File limit | 100 lines |
| Interface location | `modules/[feature]/src/interfaces/` |
| Shared interfaces | `modules/cores/interfaces/` |
| Forbidden | Interfaces in `components/` files |
| SOLID skill | `solid-react` |
**Pattern detection**:
```regex
^(export )?(interface|type) \w+
```
### Generic TypeScript / Bun / Node.js
| Rule | Value |
|------|-------|
| File limit | 100 lines |
| Interface location | `modules/[feature]/src/interfaces/` |
| Shared interfaces | `modules/cores/interfaces/` |
| Structure | **Modular MANDATORY** |
| Forbidden | Interfaces in service/lib files |
| SOLID skill | `solid-generic` |
**Pattern detection**:
```regex
^(export )?(interface|type) \w+
```
### Laravel / PHP
| Rule | Value |
|------|-------|
| File limit | 100 lines |
| Interface location | `FuseCore/[Module]/App/Contracts/` |
| Shared interfaces | `FuseCore/Core/App/Contracts/` |
| Structure | **FuseCore Modular MANDATORY** |
| Forbidden | Interfaces outside Contracts/ |
| SOLID skill | `solid-php` |
**Pattern detection**:
```regex
^interface \w+
```
### Swift
| Rule | Value |
|------|-------|
| File limit | 100 lines |
| Interface location | `Features/[Feature]/Protocols/` |
| Shared interfaces | `Core/Protocols/` |
| Structure | **Features Modular MANDATORY** |
| Forbidden | Protocols outside Protocols/ |
| SOLID skill | `solid-swift` |
**Pattern detection**:
```regex
^protocol \w+
```
### Java
| Rule | Value |
|------|-------|
| File limit | 100 lines |
| Interface location | `modules/[feature]/interfaces/` |
| Shared interfaces | `modules/core/interfaces/` |
| Structure | **Modular MANDATORY** |
| Forbidden | Interfaces in impl files |
| SOLID skill | `solid-java` |
**Pattern detection**:
```regex
^(public )?(interface) \w+
```
### Go
| Rule | Value |
|------|-------|
| File limit | 100 lines |
| Interface location | `internal/modules/[feature]/ports/` |
| Shared interfaces | `internal/core/ports/` |
| Structure | **Modular MANDATORY** |
| Forbidden | Interfaces in impl files |
| SOLID skill | `solid-go` |
**Pattern detection**:
```regex
^type \w+ interface \{
```
### Ruby
| Rule | Value |
|------|-------|
| File limit | 100 lines |
| Interface location | `app/modules/[feature]/contracts/` |
| Shared interfaces | `app/modules/core/contracts/` |
| Structure | **Modular MANDATORY** |
| Forbidden | Contracts in model files |
| SOLID skill | `solid-ruby` |
**Pattern detection**:
```regex
^module \w+Contract
```
### Rust
| Rule | Value |
|------|-------|
| File limit | 100 lines |
| Interface location | `src/modules/[feature]/traits.rs` |
| Shared interfaces | `src/core/traits.rs` |
| Structure | **Modular MANDATORY** |
| Forbidden | Traits in impl files |
| SOLID skill | `solid-rust` |
**Pattern detection**:
```regex
^pub trait \w+
```
### Python
| Rule | Value |
|------|-------|
| File limit | 100 lines |
| Interface location | `src/interfaces/` |
| Forbidden | ABC outside interfaces/ |
**Pattern detection**:
```regex
class \w+\(.*ABC.*\)
```
## Line Counting
Exclude from count:
- Blank lines
- Comments (`//`, `/* */`, `#`, `"""`)
- Import statements (optional)
```bash
# TypeScript/Go/Rust/Swift
grep -v '^\s*$\|^\s*//\|^\s*/\*\|^\s*\*' file
# PHP
grep -v '^\s*$\|^\s*//\|^\s*#\|^\s*/\*\|^\s*\*' file
# Python
grep -v '^\s*$\|^\s*#\|^\s*"""' file
```
## 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`:
```bash
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
```
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.