Back to Skills

solid-detection

verified

Multi-language SOLID detection rules. Project type detection, interface locations, file size limits per language.

View on GitHub

Marketplace

fusengine-plugins

fusengine/agents

Plugin

fuse-solid

productivity

Repository

fusengine/agents

plugins/solid/skills/solid-detection/SKILL.md

Last Verified

January 22, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/fusengine/agents/blob/main/plugins/solid/skills/solid-detection/SKILL.md -a claude-code --skill solid-detection

Installation paths:

Claude
.claude/skills/solid-detection/
Powered by add-skill CLI

Instructions

# SOLID Detection Skill

## Project Detection

Detect project type from configuration files:

```bash
# Next.js
[ -f "package.json" ] && grep -q '"next"' package.json

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

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

# Go
[ -f "go.mod" ]

# Rust
[ -f "Cargo.toml" ]

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

## Language Rules

### Next.js / TypeScript

| Rule | Value |
|------|-------|
| File limit | 150 lines |
| Interface location | `modules/cores/interfaces/` |
| Forbidden | Interfaces in `components/`, `app/` |

**Pattern detection**:
```regex
^(export )?(interface|type) \w+
```

### Laravel / PHP

| Rule | Value |
|------|-------|
| File limit | 100 lines |
| Interface location | `app/Contracts/` |
| Forbidden | Interfaces outside Contracts |

**Pattern detection**:
```regex
^interface \w+
```

### Swift

| Rule | Value |
|------|-------|
| File limit | 150 lines |
| Interface location | `Protocols/` |
| Forbidden | Protocols outside Protocols/ |

**Pattern detection**:
```regex
^protocol \w+
```

### Go

| Rule | Value |
|------|-------|
| File limit | 100 lines |
| Interface location | `internal/interfaces/` |
| Forbidden | Interfaces outside interfaces/ |

**Pattern detection**:
```regex
^type \w+ interface \{
```

### Python

| Rule | Value |
|------|-------|
| File limit | 100 lines |
| Interface location | `src/interfaces/` |
| Forbidden | ABC outside interfaces/ |

**Pattern detection**:
```regex
class \w+\(.*ABC.*\)
```

### Rust

| Rule | Value |
|------|-------|
| File limit | 100 lines |
| Interface location | `src/traits/` |
| Forbidden | Traits outside traits/ |

**Pattern detection**:
```regex
^pub trait \w+
```

## 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

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
2431 chars