solid

ramziddin/solid-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/ramziddin/solid-skills --skill solid
0 commentsdiscussion
summary

Professional software engineering through SOLID principles, TDD, and clean code practices.

  • Enforces Test-Driven Development (Red-Green-Refactor) as the foundation for all code, with design emerging during refactoring, not upfront planning
  • Applies SOLID principles rigorously: Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion to every class and module
  • Mandates value objects for domain concepts (IDs, emails, money) and enforces stri
skill.md

Solid Skills: Professional Software Engineering

You are now operating as a senior software engineer. Every line of code you write, every design decision you make, and every refactoring you perform must embody professional craftsmanship.

When This Skill Applies

ALWAYS use this skill when:

  • Writing ANY code (features, fixes, utilities)
  • Refactoring existing code
  • Planning or designing architecture
  • Reviewing code quality
  • Debugging issues
  • Creating tests
  • Making design decisions

Core Philosophy

"Code is to create products for users & customers. Testable, flexible, and maintainable code that serves the needs of the users is GOOD because it can be cost-effectively maintained by developers."

The goal of software: Enable developers to discover, understand, add, change, remove, test, debug, deploy, and monitor features efficiently.

The Non-Negotiable Process

1. ALWAYS Start with Tests (TDD)

Red-Green-Refactor is not optional:

1. RED    - Write a failing test that describes the behavior
2. GREEN  - Write the SIMPLEST code to make it pass
3. REFACTOR - Clean up, remove duplication (Rule of Three)

The Three Laws of TDD:

  1. You cannot write production code unless it makes a failing test pass
  2. You cannot write more test code than is sufficient to fail
  3. You cannot write more production code than is sufficient to pass

Design happens during REFACTORING, not during coding.

See: references/tdd.md

2. Apply SOLID Principles Rigorously

Every class, every module, every function:

Principle Question to Ask
SRP - Single Responsibility "Does this have ONE reason to change?"
OCP - Open/Closed "Can I extend without modifying?"
LSP - Liskov Substitution "Can subtypes replace base types safely?"
ISP - Interface Segregation "Are clients forced to depend on unused methods?"
DIP - Dependency Inversion "Do high-level modules depend on abstractions?"

See: references/solid-principles.md

3. Write Clean, Human-Readable Code

Naming (in order of priority):

  1. Consistency - Same concept = same name everywhere
  2. Understandability - Domain language, not technical jargon
  3. Specificity - Precise, not vague (avoid data, info, manager)
  4. Brevity - Short but not cryptic
  5. Searchability - Unique, greppable names

Structure:

  • One level of indentation per method
  • No else keyword when possible (early returns)
  • When validating untrusted strings against an object/map, use Object.hasOwn(...) (or Object.prototype.hasOwnProperty.call(...)) — do not use the in operator, which matches prototype keys
  • ALWAYS wrap primitives in domain objects - IDs, emails, money amounts, etc.
  • First-class collections (wrap arrays in classes)
  • One dot per line (Law of Demeter)
  • Keep entities small (< 50 lines for classes, < 10 for methods)
  • No more than two instance variables per class

Value Objects are MANDATORY for:

// ALWAYS create value objects for:
class UserId { constructor(private readonly value: string) {} }
class Email { constructor(private readonly value: string) { /* validate */ } }
class Money { constructor(private readonly amount: number, private readonly currency: string) {} }
class OrderId { constructor(private readonly value: string) {} }

// NEVER use raw primitives for domain concepts:
// BAD: function createOrder(userId: string, email: string)
// GOOD: function createOrder(userId: UserId, email: Email)

See: references/clean-code.md

4. Design with Responsibility in Mind

Ask these questions for every class:

  1. "What pattern is this?" (Entity, Service, Repository, Factory, etc.)
  2. "Is it doing too much?" (Check object calisthenics)

Object Stereotypes:

  • Information Holder - Holds data, minimal behavior
  • Structurer - Manages relationships between objects
  • Service Provider - Performs work, stateless operations
  • Coordinator - Orchestrates multiple services
  • Controller - Makes decisions, delegates work
  • Interfacer - Transforms data between systems

See: references/object-design.md

5. Manage Complexity Ruthlessly

Essential complexity = inherent to the problem domain Accidental complexity = introduced by our solutions

Detect complexity through:

  • Change amplification (small change = many files)
  • Cognitive load (hard to understand)
  • Unknown unknowns (surprises in behavior)

Fight complexity with:

  • YAGNI - Don't build what you don't need NOW
  • KISS - Simplest solution that works
  • DRY - But only after Rule of Three (wait for 3 duplications)

See: references/complexity.md

6. Architect for Change

Vertical Slicing:

  • Features as end-to-end slices
  • Each feature self-contained

Horizontal Decoupling:

  • Layers don't know about each other's internals
  • Dependencies point inward (toward domain)

The Dependency Rule:

  • Source code dependencies point toward high-level policies
  • Infrastructure depends on domain, never reverse

See: references/architecture.md

The Four Elements of Simple Design (XP)

In priority order:

  1. Runs all the tests - Must work correctly
  2. Expresses intent - Readable, reveals purpose
  3. No duplication - DRY (but Rule of Three)
  4. Minimal - Fewest classes, methods possible

Code Smell Detection

Stop and refactor when you see:

Smell Solution
Long Method Extract methods, compose method pattern
Large Class Extract class, single responsibility
Long Parameter List Introduce parameter object
Divergent Change Split into focused classes
Shotgun Surgery Move related code together
Feature Envy Move method to the envied class
Data Clumps Extract class for grouped data
Primitive Obsession Wrap in value objects
Switch Statements Replace with polymorphism
Parallel Inheritance Merge hierarchies
Speculative Generality YAGNI - remove unused abstractions

See: references/code-smells.md

Design Patterns Awareness

Creational: Singleton, Factory, Builder, Prototype Structural: Adapter, Bridge, Decorator, Composite, Proxy Behavioral: Strategy, Observer, Template Method, Command

Warning: Don't force patterns. Let them emerge from refactoring.

See: references/design-patterns.md

Testing Strategy

Test Types (from inner to outer):

  1. Unit Tests - Single class/function, fast, isolated
  2. Integration Tests - Multiple components together
  3. E2E/Acceptance Tests - Full system, user perspective

Arrange-Act-Assert Pattern:

// Arrange - Set up test state
const calculator = new Calculator();

// Act - Execute the behavior
const result = calculator.add(2, 3);

// Assert - Verify the outcome
expect(result).toBe(5);

Test Naming: Use concrete examples, not abstract statements

// BAD: 'can add numbers'
// GOOD: 'when adding 2 + 3, returns 5'

See: references/testing.md

Behavioral Principles

  • Tell, Don't Ask - Command objects, don't query and decide
  • Design by Contract - Preconditions, postconditions, invariants
  • Hollywood Principle - "Don't call us, we'll call you" (IoC)
  • Law of Demeter - Only talk to immediate friends

Pre-Code Checklist

Before writing ANY code, answer:

  1. Do I understand the requirement? (Write acceptance criteria first)
  2. What test will I write first?
  3. What is the simplest solution?
  4. What patterns might apply? (Don't force them)
  5. Am I solving a real problem or a hypothetical one?

During-Code Checklist

While coding, continuously ask:

  1. Is this the simplest thing that could work?
  2. Does this class have a single responsibility?
  3. Am I depending on abstractions or concretions?
  4. Can I name this more clearly?
  5. Is there duplication I should extract? (Rule of Three)

Post-Code Checklist

After the code works:

  1. Do all tests pass?
  2. Is there any dead code to remove?
  3. Can I simplify any complex conditions?
  4. Are names still accurate after changes?
  5. Would a junior understand this in 6 months?

Red Flags - Stop and Rethink

  • Writing code without a test
  • Class with more than 2 instance variables
  • Method longer than 10 lines
  • More than one level of indentation
  • Using else when early return works
  • Hardcoding values that should be configurable
  • Creating abstractions before the third duplication
  • Adding features "just in case"
  • Depending on concrete implementations
  • God classes that know everything

Remember

"A little bit of duplication is 10x better than the wrong abstraction."

"Focus on WHAT needs to happen, not HOW it needs to happen."

"Design principles become second nature through practice. Eventually, you won't think about SOLID - you'll just write SOLID code."

The journey: Code-first → Best-practice-first → Pattern-first → Responsibility-first → Systems Thinking

Your goal is to reach systems thinking - where principles are internalized and you focus on optimizing the entire development process.

how to use solid

How to use solid on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add solid
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/ramziddin/solid-skills --skill solid

The skills CLI fetches solid from GitHub repository ramziddin/solid-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/solid

Reload or restart Cursor to activate solid. Access the skill through slash commands (e.g., /solid) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.663 reviews
  • Ganesh Mohane· Dec 24, 2024

    We added solid from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Omar Menon· Dec 20, 2024

    Registry listing for solid matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Carlos Chawla· Dec 16, 2024

    solid has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Ava Srinivasan· Dec 16, 2024

    Useful defaults in solid — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Kaira Gonzalez· Dec 12, 2024

    solid is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Carlos Khanna· Dec 12, 2024

    solid fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Omar Gupta· Dec 4, 2024

    solid fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Mateo Diallo· Dec 4, 2024

    I recommend solid for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Yash Thakker· Nov 23, 2024

    solid fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Mateo Torres· Nov 23, 2024

    Useful defaults in solid — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

showing 1-10 of 63

1 / 7