Works with the AI Agents you already use

    Oop Concepts

    by Maulana Ruhaedi Putra

    1

    Design object-oriented software from requirements: the 4 pillars, SOLID, GoF design patterns, composition vs inheritance, interface vs abstract class, coupling and cohesion, UML class diagrams, OOP anti-patterns, and when OOP fits vs procedural/functional.

    Free

    Security scanned
    Oop Concepts

    Oop Concepts

    Example session with this skill installed

    I need to design a library management system where members can borrow books, but some books are reference-only. Use CRC cards and favor composition.

    • Read your context and instructions
    • Compiled the oop concepts

    I have analyzed the library management requirements. By separating the borrowing logic from the book identity, we can handle reference-only constraints without complex inheritance.

    Library System Design (CRC & Composition)

    CRC Cards

    ClassResponsibilitiesCollaborators
    LibraryBookKnows its title, ISBN, and BorrowingPolicy. Delegates availability checks to policy.BorrowingPolicy
    MemberKnows its borrowing history and current limits. Can request a checkout.LibraryBook, Loan
    BorrowingPolicyInterface. Determines if a book can be checked out and for how long.-
    LoanTracks the due date and return status of a specific checkout event.Member, LibraryBook

    Composition Architecture (Python)

    from abc import ABC, abstractmethod
    from datetime import datetime, timedelta
    
    class BorrowingPolicy(ABC):
        @abstractmethod
        def is_eligible(self) -> bool:
            pass
    
    class ReferenceOnlyPolicy(BorrowingPolicy):
        def is_eligible(self) -> bool:
            return False
    
    class StandardBorrowingPolicy(BorrowingPolicy):
        def is_eligible(self) -> bool:
            return True
    
    class LibraryBook:
        def __init__(self, title: str, policy: BorrowingPolicy):
            self.title = title
            self._policy = policy # Composition: Policy is injected
    
        def can_be_borrowed(self) -> bool:
            return self._policy.is_eligible()
    
    # Usage
    ref_book = LibraryBook("Rare Manuscript", ReferenceOnlyPolicy())
    circulating_book = LibraryBook("Clean Code", StandardBorrowingPolicy())
    

    Next steps

    1. Define the Loan class to handle fine calculations for overdue items.
    2. Implement a Member repository to manage persistence.
    3. Create a Mermaid class diagram to visualize the Member to Loan multiplicity.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Design object-oriented software from requirements: the 4 pillars, SOLID, GoF design patterns, composition vs inheritance, interface vs abstract class, coupling and cohesion, UML class diagrams, OOP anti-patterns, and when OOP fits vs procedural/functional.

    Java code is illustrative only and not validated via compiler. Mermaid diagrams require external rendering support.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 5 days ago

    • Free with an Agensi account

    Software
    Python

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed5 days ago

    What's inside

    Frequently Asked Questions

    This skill eliminates common architectural debt like "god objects" and rigid inheritance by enforcing SOLID principles and composition-first design during the initial modeling phase.

    The skill is optimized for Python 3.12 and TypeScript/Node.js 24 environments, providing implementation-ready class structures and Mermaid UML diagrams for these languages.

    You receive the full architectural workflow, including CRC modeling templates, a SOLID design auditing checklist, and automated Mermaid UML generation for visualizing class relationships.

    Yes, the "Design Auditing" feature allows you to input existing code to identify anti-patterns like Primitive Obsession and receive specific refactoring recommendations.

    While the skill provides the architectural blueprints and interface definitions, the developer is responsible for implementing the specific business logic within the generated class structures.

    Unlike basic prompts, this skill uses a structured CRC (Class-Responsibility-Collaborator) framework to ensure logic is placed according to the Information Expert pattern rather than creating anemic data models.

    New in Agents & Orchestration

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.

    Free