oop-principles

Evaluates TypeScript/JavaScript code for OO principles violations and anti-patterns.

1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/bsene/approvalsTypescript --skill oop-principles
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: oop-principles
Source: https://github.com/bsene/approvalsTypescript/tree/main/.agents/skills/oop-principles
Command: npx skills add https://github.com/bsene/approvalsTypescript --skill oop-principles

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill evaluates TypeScript/JavaScript code against Dave Thomas's object-oriented principles and the Tell Don't Ask rule, helping developers identify and refactor class-oriented anti-patterns.

Core Features & Use Cases

  • OO Principles Analysis: Analyze code for adherence to principles like single responsibility, open/closed, and Liskov substitution.
  • Tell Don't Ask Rule: Identify and suggest refactoring for code that violates the Tell Don't Ask rule.
  • Anti-Patterns Detection: Detect common anti-patterns such as data classes, invalid after construction classes, and over-inheritance.
  • Refactoring Guidance: Provide decision trees and checklists for refactoring classes into more efficient structures.

Quick Start

Use the oop-principles skill to analyze your TypeScript/JavaScript code and receive feedback on object-oriented design principles.

Frequently Asked Questions about oop-principles

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check my TypeScript code for object-oriented anti-patterns?

To check TypeScript code for object-oriented anti-patterns, analyze your classes against established OO principles. This process identifies structural issues like data classes and over-inheritance, then suggests targeted refactoring to improve code design.

What is the Tell Don't Ask rule in JavaScript object-oriented design?

The Tell Don't Ask rule in object-oriented design emphasizes instructing objects to perform actions rather than querying their data. Evaluating JavaScript against this rule identifies procedural code disguised as classes and suggests refactoring for better encapsulation.

Can I use this analysis to refactor JavaScript code violating the single responsibility principle?

Yes, you can use this analysis to refactor JavaScript code violating the single responsibility principle. It evaluates code structure against Dave Thomas's OO principles and provides decision trees and checklists to guide the refactoring process.

Does this object-oriented code analysis work with both JavaScript and TypeScript?

Yes, this object-oriented code analysis works with both JavaScript and TypeScript. It evaluates source code structure to detect anti-patterns like invalid after construction classes and over-inheritance, providing refactoring guidance for both languages.

What are common class-oriented anti-patterns detected during TypeScript refactoring?

Common class-oriented anti-patterns detected during TypeScript refactoring include data classes, invalid after construction classes, and over-inheritance. Identifying these structural violations helps developers apply design principles and refactor classes into efficient structures.