ddt

Detect and correct over-encapsulation and thin wrapper code smells in TypeScript/JavaScript projects.

1|Updated Mar 14, 2025
One-click install
npx skills add https://github.com/JYbill/bullboard-nestjs --skill ddt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ddt
Source: https://github.com/JYbill/bullboard-nestjs/tree/main/.agents/skills/ddt
Command: npx skills add https://github.com/JYbill/bullboard-nestjs --skill ddt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

代码里常见的坏味道包括过度封装、薄函数/薄类型、实例属性沿用传参等,导致路径跳跃、可读性下降和维护成本上升。本 Skill 提供识别与纠正这类风格问题的规则与最佳实践,并在分析时参考仓库内的 CLAUDE.md 与 AGENTS.md 以确保符合项目规范。

Core Features & Use Cases

  • 识别过度封装、过度抽象、薄 helper、薄类型拆分等常见代码味道,并给出具体改进建议。
  • 提供内联、合并薄层、简化参数传递等重构指引,提升主流程可读性与维护性。
  • 在分析前读取并遵循仓库中的项目规范(如 CLAUDE.md、AGENTS.md),确保改动符合团队约定。
  • 适用于代码审查、重构和风格合规性检查等场景。

Quick Start

在你的代码库中运行此技能以识别过度封装并建议内联和合并策略,提升代码可读性与维护性。

Frequently Asked Questions about ddt

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

FAQPage Schema
How do I identify over-encapsulation and thin wrappers in TypeScript code?

To identify over-encapsulation and thin wrappers in TypeScript, run this Skill to detect code smells like thin helpers and unnecessary type splits. It analyzes modules to pinpoint readability issues and suggests concrete refactoring improvements.

What are common TypeScript code smells related to thin helpers and excessive abstraction?

Common TypeScript code smells include thin helpers, excessive abstraction, and instance properties mirroring parameters. These issues cause path jumping and reduced readability, which this Skill detects to enforce proper separation of concerns and stable types.

How do I refactor thin wrappers and consolidate types in JavaScript projects?

Refactor thin wrappers and consolidate types by applying this Skill's guidelines for inlining functions, merging thin layers, and simplifying parameter passing. This improves main flow readability and ensures proper separation of concerns during code reviews.

Does this code review tool follow project conventions defined in CLAUDE.md and AGENTS.md?

Yes, this code review tool follows project conventions by reading and adhering to repository specifications like CLAUDE.md and AGENTS.md before analysis. This ensures refactoring suggestions align with existing team guidelines and style compliance.

When should I preserve or merge thin wrappers during TypeScript refactoring?

When deciding to preserve or merge thin wrappers during TypeScript refactoring, this Skill applies specific guardrails to evaluate context. It checks JSDoc presence, parameter passing patterns, and separation of concerns to recommend safe consolidation.