Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

solid-principles扎实的原则

Agent Skill

solid-principles 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

388

周安装

16

GitHub Stars

9

下载量

127
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:solid-principles(扎实的原则)
来源仓库:https://github.com/florianbuetow/claude-code
仓库路径:skills/solid-principles
安装命令:
npx skills add https://github.com/florianbuetow/claude-code --skill solid-principles
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/florianbuetow/claude-code --skill solid-principles

简介

solid-principles 用于检测代码对 SOLID 原则的遵循情况,提供优先级修复建议。

  • 适合分析 SRP、开闭原则等违规点,输出高、中、低优先级问题列表。
  • 通过 github 安装后,结合附件代码进行分析并生成重构示例。
  • 实用主义为准则,小型脚本或原型可适当放宽标准,需结合上下文判断权衡理由。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

SOLID Principles

Analyze source code for violations of Robert C. Martin's SOLID principles of object-oriented design. Produce actionable findings with severity ratings, code locations, and concrete refactoring suggestions.

Subcommands

Request a full audit or focus on a single principle:

Command PatternPrincipleReference
solid all / solid check / solidAll five principlesAll references
solid srpSingle Responsibilityreferences/srp.md
solid ocpOpen/Closedreferences/ocp.md
solid lspLiskov Substitutionreferences/lsp.md
solid ispInterface Segregationreferences/isp.md
solid dipDependency Inversionreferences/dip.md

When no subcommand is specified, default to checking all five principles. When a principle is mentioned by name (even without saying "solid"), match it to the appropriate subcommand.

Workflow

1. Identify Target Code

Determine what code to analyze:

  • When files or a directory are provided, use those.
  • When a class/module is referenced by name, locate it.
  • When ambiguous, ask which files or directories to scan.

Supported languages: any OO language (Python, Java, TypeScript, C#, C++, Kotlin, Go with struct methods, Rust with impl blocks, etc.). Adapt the principle checks to the idioms of the target language — not every principle manifests identically across languages.

2. Load Principle References

Before analyzing, read the reference file(s) for the requested principle(s):

For a full audit (solid all), read all five.

3. Analyze

For each target file/class, apply the violation patterns from the loaded references. Think carefully about each pattern — not every heuristic match is a true violation. Consider context, project size, and pragmatism. A 50-line script doesn't need the same architectural rigor as a large production system.

4. Report Findings

Present findings using this structure:

Per Violation

**[PRINCIPLE] Violation — Severity: HIGH | MEDIUM | LOW**
Location: `filename.py`, class `ClassName`, lines ~XX-YY
Issue: Clear description of what violates the principle and why it matters.
Suggestion: Concrete refactoring approach with brief code sketch if helpful.

Severity guidelines:

  • HIGH: Active maintenance pain, bug risk, or blocks extensibility.
  • MEDIUM: Code smell that will cause problems as the codebase grows.
  • LOW: Minor design impurity, worth noting but fine to defer.

Summary

After all findings, provide:

  • A count table: | Principle | HIGH | MEDIUM | LOW |
  • Top 3 priorities: which violations to fix first and why.
  • Overall assessment: one paragraph on the code's structural health.

5. Refactor Mode (Optional)

When a fix or refactoring is requested (e.g., "fix this", "refactor it", "show me the clean version"), produce refactored code that resolves the identified violations. Explain each change briefly.

Pragmatism Guidelines

These are guidelines, not laws. Apply judgment:

  • Small utility scripts and prototypes get a lighter touch. Don't flag a 30-line script for lacking dependency injection.
  • Some "violations" are conscious trade-offs. When a rationale is provided for a trade-off, acknowledge it rather than insisting on purity.
  • Language idioms matter. A Python module with top-level functions isn't violating SRP just because it's not a class. Go interfaces are implicitly satisfied, so ISP looks different there.
  • Prefer actionable findings over exhaustive catalogs. Five important findings beat twenty trivial ones.

Example Interaction

User: solid srp (with a file attached)

Claude:

  1. Reads references/srp.md
  2. Analyzes the attached file for SRP violations
  3. Reports findings with locations, severity, and suggestions
  4. Provides a summary with priorities

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.7%
按下载量换算48

Claude

29.54%
按下载量换算38

Cursor

18.07%
按下载量换算23

Gemini CLI

9.07%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills