Token导航 LogoToken导航

Agent Skill · 前端设计

clean-code-developer(干净的代码开发人员)

clean-code-developer 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

clean-code-developer 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 4,614。

总安装 840周安装 35GitHub Stars 7下载 280核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:clean-code-developer(干净的代码开发人员)
来源仓库:https://github.com/d-o-hub/rust-self-learning-memory
仓库路径:skills/clean-code-developer
安装命令:
npx skills add https://github.com/d-o-hub/rust-self-learning-memory --skill clean-code-developer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/d-o-hub/rust-self-learning-memory --skill clean-code-developer

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

clean-code-developer 记录任务执行中的错误与经验,帮助持续改进编码实践。适合在 Codex、Claude、Cursor、Gemini CLI 中沉淀最佳实践与能力缺口时使用。

通过 GitHub 安装,命令为 npx skills add https://github.com/d-o-hub/rust-self-learning-memory --skill clean-code-developer。使用前需确认本地存储路径与日志格式,注意隐私与数据安全。

建议结合来源仓库和 README 文档进一步核验具体功能和使用细节。

来源仓库内路径:skills/clean-code-developer

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/d-o-hub/rust-self-learning-memory --skill clea…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

clean-code-developer 怎么安装?

在终端执行 npx skills add https://github.com/d-o-hub/rust-self-learning-memory --skill clean-code-dev…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

clean-code-developer 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

clean-code-developer 需要什么权限?

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

clean-code-developer 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

clean-code-developer 用的人多吗?

公开数据是累计安装 840 次,近一周安装 35 次,下载 280 次,GitHub 7 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

clean-code-developer 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
clean-code-developer

干净的代码开发人员 · 本页

8407只读未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Clean Code Development

Systematic approach to writing clean, maintainable code through software engineering best practices.

Purpose

Apply SOLID principles, eliminate code duplication, maintain simplicity, and write code that reads like well-written prose.

When to Use

Use this skill when:

  • Code Reviews: Reviewing code for adherence to clean code principles
  • Refactoring: Improving existing code structure and maintainability
  • Coding Standards: Enforcing consistent coding practices and conventions
  • Clean Code Guidance: Seeking advice on clean code principles and patterns
  • Quality Checks: Integrating automated quality checks into workflows

Core Principles

SOLID Principles

Single Responsibility Principle
  • Each function/module has one reason to change
  • Clear, focused purpose
  • Easy to test and maintain
Open-Closed Principle
  • Open for extension, closed for modification
  • Use interfaces/traits for abstraction
  • New behavior through composition, not modification
Liskov Substitution Principle
  • Subtypes must be substitutable for base types
  • Derived classes should enhance functionality
  • Don't break expected behavior
Interface Segregation Principle
  • Clients shouldn't depend on interfaces they don't use
  • Small, focused interfaces
  • Prefer composition over large interfaces
Dependency Inversion Principle
  • Depend on abstractions, not concretions
  • High-level modules shouldn't depend on low-level modules
  • Use dependency injection

Other Key Principles

DRY (Don't Repeat Yourself)
  • Extract common code into reusable functions/modules
  • Avoid duplication through abstraction
  • One source of truth for each piece of logic
KISS (Keep It Simple, Stupid)
  • Simple solutions over complex ones
  • Avoid over-engineering
  • Clear, straightforward code
YAGNI (You Aren't Gonna Need It)
  • Don't build for hypothetical future requirements
  • Implement what's needed now
  • Defer complexity until necessary
Boy Scout Rule
  • Leave code better than you found it
  • Small improvements add up
  • Prevent technical debt accumulation

Code Quality Assessment

Readability

  • Self-documenting code
  • Clear, descriptive names
  • Logical flow
  • Appropriate comments

Maintainability

  • Easy to understand
  • Easy to modify
  • Easy to test
  • Clear structure

Testability

  • Dependencies easily mocked
  • Pure functions where possible
  • Clear inputs and outputs
  • Testable in isolation

Extensibility

  • Open for extension
  • Closed for modification
  • Plugin points where appropriate
  • Flexible design

Refactoring Techniques

Extract Method/Function

  • Replace duplicated code with method call
  • Name methods by what they do
  • Keep methods small and focused

Extract Class/Module

  • Group related functionality
  • Create coherent abstractions
  • Separate concerns

Replace Conditional with Polymorphism

  • Use strategy pattern for conditionals
  • Eliminate type checking
  • Improve extensibility

Introduce Parameter Object

  • Reduce parameter count
  • Group related parameters
  • Improve method signatures

Decompose Conditional

  • Simplify complex conditions
  • Extract boolean expressions
  • Improve readability

Anti-Patterns to Avoid

Code Smells

  • Long Method: Break into smaller methods
  • Long Parameter List: Use parameter objects
  • Duplicate Code: Extract to reusable functions
  • Large Class: Split into smaller classes
  • God Class: Reduce responsibilities
  • Feature Envy: Move methods to appropriate classes
  • Data Clumps: Group related data
  • Primitive Obsession: Use value objects
  • Switch Statements: Use polymorphism/strategy pattern
  • Temporary Field: Eliminate through parameter passing
  • Refused Bequest: Pass parameters explicitly

Rust-Specific Issues

  • Excessive Clone: Use borrowing or Arc
  • Unnecessary Unwrap: Use proper error handling with ?
  • Deep Nesting: Extract methods to flatten
  • Large Functions: Split into smaller, focused functions (< 50 LOC)
  • Unsafe Code: Only when necessary, well-documented
  • Memory Leaks: Proper ownership and borrowing
  • Deadlocks: Release locks before .await

Integration with Development Workflows

Pre-Commit Hooks

  • Run formatting (rustfmt)
  • Run linting (clippy)
  • Run basic tests
  • Check for common anti-patterns

CI/CD Integration

  • Automated formatting checks
  • Linting with warnings as errors
  • Test coverage requirements
  • Code quality metrics

Code Review Checklist

  • Follows SOLID principles
  • No code duplication
  • Appropriate naming conventions
  • Proper error handling
  • Comprehensive tests
  • Clear documentation

Best Practices

DO:

✓ Apply SOLID principles consistently ✓ Extract common code into reusable functions ✓ Keep functions small and focused (< 50 LOC) ✓ Use descriptive names that reveal intent ✓ Write tests before refactoring (TDD) ✓ Document complex business logic, not obvious code ✓ Use static analysis tools (clippy, SonarQube) ✓ Leave code better than you found it ✓ Prefer composition over inheritance ✓ Keep dependencies minimal and explicit

DON'T:

✗ Violate SOLID principles ✗ Duplicate code "for now" - fix immediately ✗ Write functions longer than 50 lines without strong justification ✗ Use abbreviations or unclear names ✗ Refactor without adequate test coverage ✗ Over-document obvious code ✗ Skip static analysis warnings ✗ Over-engineer simple problems ✗ Create tight coupling between modules

Metrics

Track these metrics to assess code quality:

  • Cyclomatic Complexity: Average < 10 per function
  • Lines of Code: < 500 per file (project standard)
  • Function Length: < 50 lines average
  • Test Coverage: > 90% line coverage
  • Code Duplication: < 5%
  • Technical Debt Ratio: Trend downward over time

Examples

Example 1: Extract Method

// BEFORE - Code smell: duplicate logic
fn process_data_a(data: &Data) -> Result<Output> {
    // Validation
    if data.id.is_empty() {
        return Err(anyhow!("ID is required"));
    }
    if data.value < 0 {
        return Err(anyhow!("Value must be positive"));
    }
    // Processing
    let result = calculate(data);
    Ok(result)
}

fn process_data_b(data: &Data) -> Result<Output> {
    // Same validation code duplicated
    if data.id.is_empty() {
        return Err(anyhow!("ID is required"));
    }
    if data.value < 0 {
        return Err(anyhow!("Value must be positive"));
    }
    // Processing
    let result = calculate(data);
    Ok(result)
}
// AFTER - Applied DRY principle
fn validate_data(data: &Data) -> Result<()> {
    if data.id.is_empty() {
        return Err(anyhow!("ID is required"));
    }
    if data.value < 0 {
        return Err(anyhow!("Value must be positive"));
    }
    Ok(())
}

fn process_data_a(data: &Data) -> Result<Output> {
    validate_data(data)?;
    let result = calculate(data);
    Ok(result)
}

fn process_data_b(data: &Data) -> Result<Output> {
    validate_data(data)?;
    let result = calculate(data);
    Ok(result)
}

Example 2: Single Responsibility Principle

// BEFORE - Single function doing too much
pub fn handle_user_request(data: UserData) -> Result<UserResult> {
    // Validate
    validate_user(&data)?;
    // Store in database
    db::save_user(&data)?;
    // Send email
    email::send_welcome(&data.email)?;
    // Calculate recommendations
    let recs = calculate_recommendations(&data)?;
    Ok(UserResult {
        saved: true,
        recommendations: recs,
    })
}
// AFTER - Split responsibilities
pub struct UserHandler {
    db: Arc<Database>,
    email: Arc<EmailService>,
    recommender: Arc<RecommenderService>,
}

impl UserHandler {
    pub async fn handle_user_request(&self, data: UserData) -> Result<UserResult> {
        // Each function has single responsibility
        self.validate_user(&data)?;
        self.save_user(&data).await?;
        self.send_welcome_email(&data.email).await?;
        let recs = self.get_recommendations(&data).await?;

        Ok(UserResult {
            saved: true,
            recommendations: recs,
        })
    }

    fn validate_user(&self, data: &UserData) -> Result<()> {
        // Validation logic
        Ok(())
    }

    async fn save_user(&self, data: &UserData) -> Result<()> {
        self.db.save_user(data).await
    }

    async fn send_welcome_email(&self, email: &str) -> Result<()> {
        self.email.send_welcome(email).await
    }

    async fn get_recommendations(&self, data: &UserData) -> Result<Vec<Recommendation>> {
        self.recommender.calculate(data).await
    }
}

Integration with Skills

Complements:

  • rust-code-quality: For Rust-specific quality checks
  • code-reviewer: For comprehensive code review workflows
  • test-runner: For testing refactored code

Invokes:

  • quality-unit-testing: For testing best practices

Tools and Commands

Static Analysis

# Clippy - Rust linter
./scripts/code-quality.sh clippy --workspace

# Check for specific issues
cargo clippy -- -W clippy::too_many_arguments
cargo clippy -- -W clippy::unwrap_used

Complexity Analysis

# Install complexity tool
cargo install cargo-complexity

# Analyze complexity
cargo complexity

Duplication Detection

# Use tools like jscpd, SonarQube, or custom scripts
# Find duplicated code blocks

Quality Gates

Ensure code passes these quality gates:

  • Formatting: 100% rustfmt compliant
  • Linting: Zero clippy warnings
  • Complexity: Cyclomatic complexity < 10 per function
  • Test Coverage: > 90% line coverage
  • Duplication: < 5% duplicate code
  • Documentation: All public APIs documented

Continuous Improvement

Weekly Reviews

  • Review code quality metrics
  • Identify trends and issues
  • Update coding standards if needed
  • Refactor technical debt

Retrospectives

  • Analyze what worked well
  • Identify common issues
  • Improve guidelines
  • Share learnings with team

Summary

Clean code development produces software that is:

  • Readable: Easy to understand by others
  • Maintainable: Easy to modify and extend
  • Testable: Easy to write tests for
  • Efficient: Minimal technical debt
  • Reliable: Fewer bugs and issues

Apply these principles systematically to write code that stands the test of time.

平台分布

Codex

38.11%
按下载量换算107

Claude

28.85%
按下载量换算81

Cursor

16.92%
按下载量换算47

Gemini CLI

10.32%
按下载量换算29

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

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

继续浏览同类 Skills