Agent skill

Solid Knowledge

by dykyi-roman in dykyi-roman/awesome-claude-code

SOLID principles knowledge base for PHP 8.4 projects. An agent skill from dykyi-roman/awesome-claude-code.

MITAuto-check passedDevelopment

Install Solid Knowledge

skills CLI
$ npx skills add dykyi-roman/awesome-claude-code --skill solid-knowledge -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dykyi-roman/awesome-claude-code solid-knowledge --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/solid-knowledge .claude/skills/solid-knowledge && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
solid-knowledge
GitHub stars
103
Token cost
~2.4k tokens
SKILL.md length
357 words
Files
8 (incl. references, assets)
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

SOLID principles knowledge base for PHP 8.4 projects. An agent skill from dykyi-roman/awesome-claude-code.

  • Architecture audits and code quality reviews
  • SKILL.md covers Overview, Quick Detection Patterns, PHP 8.4 Patterns and SOLID & DDD Integration, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Design patterns

What it does

Solid Knowledge is an agent skill from dykyi-roman/awesome-claude-code. SOLID principles knowledge base for PHP 8.4 projects. Provides quick reference for SRP, OCP, LSP, ISP, DIP with detection patterns, PHP examples, and antipattern identification. Use for architecture audits and code quality reviews.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including reference files and assets (for example `assets/report-template.md`, `references/antipatterns.md` and `references/dip-patterns.md`).

It sits in Development, covering Design patterns, Knowledge bases and Code quality. It works with PHP. The repository describes itself as: PHP Architecture Toolkit for Claude Code (DDD, CQRS, Event Sourcing, Hexagonal, Clean Architecture, SOLID, GRASP, PSR, Design Patterns, Testing, Documentation, Code Review). The licence is MIT.

When your agent uses it

  • Architecture audits and code quality reviews
  • Tasks that involve Design patterns
  • Tasks that involve Knowledge bases

Example prompts

  • “/solid-knowledge”

What it can do on your machine

Read from SKILL.md and the folder at commit 7e1fea8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash and php).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Solid Knowledge loads about 2.4k tokens when it runs, and up to ~17k if it reads all its reference files. Until then it costs about 62 tokens; SKILL.md has 357 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~17k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from dykyi-roman/awesome-claude-code at commit 7e1fea8, republished under its MIT licence (© dykyi-roman). 357 words, ~2,382 tokens.

Download SKILL.mdSave it as .claude/skills/solid-knowledge/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
solid-knowledge
description
SOLID principles knowledge base for PHP 8.4 projects. Provides quick reference for SRP, OCP, LSP, ISP, DIP with detection patterns, PHP examples, and antipattern identification. Use for architecture audits and code quality reviews.

SOLID Principles Knowledge Base

Overview

SOLID is a set of five design principles for writing maintainable, extensible software.

PrincipleNameCore Idea
SSingle ResponsibilityOne class = one reason to change
OOpen/ClosedOpen for extension, closed for modification
LLiskov SubstitutionSubtypes must be substitutable for base types
IInterface SegregationMany specific interfaces > one general
DDependency InversionDepend on abstractions, not concretions

Quick Detection Patterns

SRP Violations
bash
# God classes (>500 lines)
find . -name "*.php" -exec wc -l {} \; | awk '$1 > 500 {print}'

# Classes with "And" in name
grep -rn "class.*And[A-Z]" --include="*.php"

# Classes with >7 dependencies
grep -rn "public function __construct" --include="*.php" -A 20 | grep -E "private|readonly" | wc -l

# Multiple responsibility indicators
grep -rn "class.*Manager\|class.*Handler\|class.*Processor" --include="*.php"

Signs of SRP Violation:

  • Class has >500 lines
  • Class has >7 dependencies
  • Class name contains "And", "Or", "Manager", "Handler"
  • Multiple unrelated public methods
  • Changes for multiple business reasons
OCP Violations
bash
# Switch on type
grep -rn "switch.*instanceof\|switch.*::class" --include="*.php"

# Type checking conditionals
grep -rn "if.*instanceof\|elseif.*instanceof" --include="*.php"

# Hardcoded type maps
grep -rn "\[.*::class.*=>" --include="*.php"

Signs of OCP Violation:

  • Switch statements on object types
  • instanceof chains in conditionals
  • Adding new types requires modifying existing code
  • Hardcoded type-to-behavior mappings
LSP Violations
bash
# Exception in overridden methods
grep -rn "throw.*NotImplemented\|throw.*NotSupported" --include="*.php"

# Empty overrides
grep -rn "public function.*\{[\s]*\}" --include="*.php"

# Type checks in child classes
grep -rn "if.*parent::" --include="*.php"

Signs of LSP Violation:

  • Child class throws NotImplementedException
  • Child class has empty method overrides
  • Parent type check in child class
  • Preconditions strengthened in subtype
  • Postconditions weakened in subtype
ISP Violations
bash
# Large interfaces (>5 methods)
grep -rn "interface\s" --include="*.php" -A 30 | grep -c "public function"

# Empty interface implementations
grep -rn "// TODO\|// not implemented\|// unused" --include="*.php"

Signs of ISP Violation:

  • Interface has >5 methods
  • Classes implement interfaces partially
  • Unused methods return null/throw
  • Interface name too generic ("Service", "Manager")
DIP Violations
bash
# Direct instantiation in constructors
grep -rn "new\s\+[A-Z]" --include="*.php" | grep -v "Exception\|DateTime\|stdClass"

# Static method calls
grep -rn "::[a-z].*(" --include="*.php" | grep -v "self::\|static::\|parent::"

# Concrete class type hints (not interfaces)
grep -rn "function.*([A-Z][a-z]*[A-Z]" --include="*.php"

Signs of DIP Violation:

  • new ConcreteClass() inside methods
  • Static calls to concrete classes
  • Type hints to concrete classes (not interfaces)
  • No constructor injection

PHP 8.4 Patterns

SRP Compliant
php
<?php

declare(strict_types=1);

// BAD: Multiple responsibilities
final class UserService
{
    public function register(UserData $data): User { /* ... */ }
    public function sendEmail(User $user): void { /* ... */ }
    public function generateReport(User $user): Report { /* ... */ }
}

// GOOD: Single responsibility each
final readonly class RegisterUserHandler
{
    public function __construct(
        private UserRepository $users,
        private EventDispatcher $events,
    ) {}

    public function __invoke(RegisterUserCommand $command): UserId
    {
        $user = User::register($command->email, $command->password);
        $this->users->save($user);
        $this->events->dispatch($user->releaseEvents());

        return $user->id;
    }
}
OCP Compliant
php
<?php

declare(strict_types=1);

// BAD: Modification required for new types
final class PaymentProcessor
{
    public function process(Payment $payment): void
    {
        match ($payment->type) {
            'card' => $this->processCard($payment),
            'paypal' => $this->processPaypal($payment),
            // Must modify for new payment types
        };
    }
}

// GOOD: Extension without modification
interface PaymentGateway
{
    public function supports(Payment $payment): bool;
    public function process(Payment $payment): PaymentResult;
}

final readonly class PaymentProcessor
{
    /** @param iterable<PaymentGateway> $gateways */
    public function __construct(
        private iterable $gateways,
    ) {}

    public function process(Payment $payment): PaymentResult
    {
        foreach ($this->gateways as $gateway) {
            if ($gateway->supports($payment)) {
                return $gateway->process($payment);
            }
        }
        throw new UnsupportedPaymentException($payment->type);
    }
}
LSP Compliant
php
<?php

declare(strict_types=1);

// BAD: Violates substitutability
abstract class Bird
{
    abstract public function fly(): void;
}

final class Penguin extends Bird
{
    public function fly(): void
    {
        throw new CannotFlyException(); // LSP violation!
    }
}

// GOOD: Proper abstraction hierarchy
interface Bird
{
    public function move(): void;
}

interface FlyingBird extends Bird
{
    public function fly(): void;
}

final readonly class Penguin implements Bird
{
    public function move(): void
    {
        $this->swim();
    }

    private function swim(): void { /* ... */ }
}

final readonly class Eagle implements FlyingBird
{
    public function move(): void
    {
        $this->fly();
    }

    public function fly(): void { /* ... */ }
}
ISP Compliant
php
<?php

declare(strict_types=1);

// BAD: Fat interface
interface UserRepository
{
    public function find(UserId $id): ?User;
    public function findByEmail(Email $email): ?User;
    public function save(User $user): void;
    public function delete(User $user): void;
    public function findAll(): array;
    public function count(): int;
    public function export(): string;
    public function import(string $data): void;
}

// GOOD: Segregated interfaces
interface UserReader
{
    public function find(UserId $id): ?User;
    public function findByEmail(Email $email): ?User;
}

interface UserWriter
{
    public function save(User $user): void;
    public function delete(User $user): void;
}

interface UserExporter
{
    public function export(): string;
    public function import(string $data): void;
}

// Compose as needed
interface UserRepository extends UserReader, UserWriter {}
DIP Compliant
php
<?php

declare(strict_types=1);

// BAD: Depends on concretions
final class OrderService
{
    public function process(Order $order): void
    {
        $mailer = new SmtpMailer();           // Concrete dependency
        $logger = Logger::getInstance();       // Static dependency
        $validator = new OrderValidator();     // Hidden dependency

        // ...
    }
}

// GOOD: Depends on abstractions
final readonly class OrderService
{
    public function __construct(
        private OrderRepository $orders,
        private Mailer $mailer,
        private LoggerInterface $logger,
        private OrderValidator $validator,
    ) {}

    public function process(Order $order): void
    {
        $this->validator->validate($order);
        $this->orders->save($order);
        $this->mailer->send(new OrderConfirmation($order));
        $this->logger->info('Order processed', ['id' => $order->id->value]);
    }
}
Show full SKILL.md (142 more words)Show less

SOLID & DDD Integration

SOLIDDDD Application
SRPAggregates have single consistency boundary
OCPDomain Events enable extension without modification
LSPValue Objects are substitutable (same type = same behavior)
ISPRepository interfaces segregated (Reader/Writer)
DIPDomain depends on Repository interfaces, not implementations

SOLID & Clean Architecture

LayerSOLID Focus
DomainSRP (Entities), LSP (Value Objects), ISP (Repository interfaces)
ApplicationSRP (Use Cases), DIP (Port interfaces)
InfrastructureOCP (Adapters), DIP (Implements ports)
PresentationSRP (Controllers), ISP (API contracts)

Severity Levels

LevelDescriptionExample
CRITICALFundamental violation affecting entire systemGod class, no DI
WARNINGLocalized violation, should be fixedinstanceof chains
INFOMinor issue, consider refactoringInterface with 6 methods

References

See detailed documentation in references/:

  • srp-patterns.md - Single Responsibility patterns
  • ocp-patterns.md - Open/Closed patterns
  • lsp-patterns.md - Liskov Substitution patterns
  • isp-patterns.md - Interface Segregation patterns
  • dip-patterns.md - Dependency Inversion patterns
  • antipatterns.md - Common SOLID violations

See assets/report-template.md for audit report format.

© dykyi-roman, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (references, assets) in skills/solid-knowledge of dykyi-roman/awesome-claude-code.

  • SKILL.md
  • assets/report-template.md
  • references/antipatterns.md
  • references/dip-patterns.md
  • references/isp-patterns.md
  • references/lsp-patterns.md
  • references/ocp-patterns.md
  • references/srp-patterns.md

Open the folder on GitHubat commit 7e1fea8

Compare with similar skills

Solid Knowledge next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Solid Knowledge compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Solid Knowledge this skilldykyi-roman/awesome-claude-code103—~2.4kAutomated safety check: PassMIT
Php Best PracticesHoangNguyen0403/agent-skills-standard571—~638Automated safety check: PassMIT
WooCommerce Code Reviewwoocommerce/woocommerce11k3 repos~1.1kAutomated safety check: PassCustom licence
Skill Doli Code ReviewDolibarr/dolibarr7.7k1 repos~1.1kAutomated safety check: PassMIT
Coding Best PracticesKartikLabhshetwar/better-shot2.4k2 repos~1.8kAutomated safety check: PassCustom licence
Solidramziddin/solid-skills606—~2.7kAutomated safety check: PassNone

Similar skills

  • Php Best Practices

    HoangNguyen0403/agent-skills-standard

    Write PHP following PSR coding standards, SOLID principles, and code-quality guidelines.

    571 GitHub stars~638 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • WooCommerce Code Review

    woocommerce/woocommerce

    Reviews WooCommerce code changes against the project's standards, flagging backend PHP architecture, naming, documentation, data integrity and testing violations.

    11k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Skill Doli Code Review

    Dolibarr/dolibarr

    Reviews Dolibarr PHP code for compliance with coding standards and security best practices, and fixes identified issues.

    7.7k GitHub starsUsed in 1 repo~1.1k tokens
    DevelopmentAuto-check passed
  • Coding Best Practices

    KartikLabhshetwar/better-shot

    Reviews macOS Swift 6+ code for modern idioms, SOLID principles, SwiftData patterns, and concurrency best practices.

    2.4k GitHub starsUsed in 2 repos~1.8k tokens
    DevelopmentAuto-check passed
  • Solid

    ramziddin/solid-skills

    A skill your agent uses when writing code, implementing features, refactoring, planning architecture, designing systems, reviewing code, or debugging.

    606 GitHub stars~2.7k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Code Style

    Automattic/wordpress-activitypub

    PHP coding standards and WordPress patterns for ActivityPub plugin.

    582 GitHub stars~2.2k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from dykyi-roman/awesome-claude-code

All 11 skills in this repo
  • Grasp Knowledge

    dykyi-roman/awesome-claude-code

    GRASP principles knowledge base for PHP 8.4 projects. An agent skill from dykyi-roman/awesome-claude-code.

    103 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Psr Autoloading Knowledge

    dykyi-roman/awesome-claude-code

    PSR-4 autoloading standard knowledge base for PHP 8.4 projects.

    103 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Psr Coding Style Knowledge

    dykyi-roman/awesome-claude-code

    PSR-1 and PSR-12 coding standards knowledge base for PHP 8.4 projects.

    103 GitHub stars~2.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Psr Overview Knowledge

    dykyi-roman/awesome-claude-code

    PHP Standards Recommendations (PSR) overview knowledge base.

    103 GitHub stars~2.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Claude Code Knowledge

    dykyi-roman/awesome-claude-code

    Comprehensive knowledge base for Claude Code formats, patterns, and configuration.

    103 GitHub stars~4k tokensUpdated 1 mo ago
    Auto-check passed
  • Adr Knowledge

    dykyi-roman/awesome-claude-code

    Action-Domain-Responder pattern knowledge base. An agent skill from dykyi-roman/awesome-claude-code.

    103 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Solid Knowledge

What does Solid Knowledge do?

SOLID principles knowledge base for PHP 8.4 projects. An agent skill from dykyi-roman/awesome-claude-code. Solid Knowledge is an agent skill from dykyi-roman/awesome-claude-code.4 projects.

When should I use Solid Knowledge?

Solid Knowledge fits situations like: architecture audits and code quality reviews; tasks that involve Design patterns; tasks that involve Knowledge bases.

How do I install Solid Knowledge in Claude Code?

Run `npx skills add dykyi-roman/awesome-claude-code --skill solid-knowledge -a claude-code`. Or copy the skill folder (skills/solid-knowledge in dykyi-roman/awesome-claude-code) into .claude/skills/solid-knowledge in your project. Claude Code loads it when a task matches its description.

How do I install Solid Knowledge in Codex?

Run `npx skills add dykyi-roman/awesome-claude-code --skill solid-knowledge -a codex`. Or copy the skill folder (skills/solid-knowledge in dykyi-roman/awesome-claude-code) into .agents/skills/solid-knowledge in your project. Codex loads it when a task matches its description.

Can I use Solid Knowledge in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dykyi-roman/awesome-claude-code --skill solid-knowledge -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/solid-knowledge, .gemini/skills/solid-knowledge, .github/skills/solid-knowledge and .opencode/skills/solid-knowledge in your project.

What does Solid Knowledge need to run?

SKILL.md names no scripts, command-line tools or credentials: Solid Knowledge is instructions for the agent only.

Does Solid Knowledge access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Solid Knowledge safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Solid Knowledge use?

Solid Knowledge is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Solid Knowledge use?

About 2.4k tokens (SKILL.md is roughly 9.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 14k tokens, read only when the agent opens those files.

What are the alternatives to Solid Knowledge?

Skills that share tags, products or a category with Solid Knowledge: Php Best Practices (HoangNguyen0403/agent-skills-standard, 571 stars), WooCommerce Code Review (woocommerce/woocommerce, 11k stars), Skill Doli Code Review (Dolibarr/dolibarr, 7.7k stars) and Coding Best Practices (KartikLabhshetwar/better-shot, 2.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Solid Knowledge?

dykyi-roman (a GitHub user) maintains it in dykyi-roman/awesome-claude-code, which has 103 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on August 16, 2026.

Source: dykyi-roman/awesome-claude-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.