⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

version unknown

concise-code

nancheng-123@nancheng-123⭐ 1 stars· last commit 7mo ago· 0 open issues

Clean Code Quick Reference. Provides quick reference for 'Clean Code' by Robert C. Martin (Uncle Bob), including naming rules, function design, comments, formatting, testing, and code smells. Keywords: clean code, naming, functions, refactoring, code smells, best practices.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐ 1 on GitHubGitHub ↗

New / niche

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

Concise Code - Clean Code Quick Reference

A standardized OpenClaw Skill providing quick reference for "Clean Code" by Robert C. Martin (Uncle Bob).

Overview

This skill helps developers write clean, maintainable code by providing guidelines and checklists for:

  • Meaningful naming
  • Function design
  • Comments strategy
  • Code formatting
  • Unit testing
  • Code smells detection

Installation

For OpenClaw/QClaw Users

Copy the skill to your OpenClaw skills directory:

# Windows
xcopy /E /I concise-code %USERPROFILE%\.qclaw\workspace\skills\concise-code\

# Or manually copy SKILL.md to:
# D:\software\QClaw\resources\openclaw\config\skills\concise-code\

For SkillHub

skillhub install concise-code

Usage

Trigger this skill with keywords:

  • clean code
  • naming rules
  • function design
  • code smells
  • refactoring
  • best practices

Core Principles

The Boy Scout Rule

Leave the campground cleaner than you found it.

Simple Design Rules (Priority Order)

  1. Run all tests
  2. Eliminate duplication (DRY)
  3. Increase expressiveness
  4. Minimize classes and methods

Quick Reference

Naming

✅ Do❌ Don't
Reveal intentUse misleading names
Use pronounceable namesUse abbreviations
Class names are nounsClass names as verbs
Method names are verbsUnclear method names

Functions

  • Small: < 20 lines
  • Do one thing
  • Arguments: 0 best, avoid 3+
  • No side effects

Comments

  • Write: Legal info, intent explanation, warnings, TODO
  • Avoid: Redundant, misleading, commented-out code

Golden Rule: Use code to explain. Comments cannot beautify bad code.

File Structure

concise-code/
├── SKILL.md          # Main skill file (OpenClaw standard format)
└── README.md         # This file

Reference

  • Book: Clean Code: A Handbook of Agile Software Craftsmanship
  • Author: Robert C. Martin (Uncle Bob)
  • Publisher: Prentice Hall, 2008

License

MIT License - Feel free to use and distribute.

Contributing

Pull requests welcome! Please maintain the OpenClaw skill format.

// HOW IT'S BUILT

// FILES

3 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • SKILL.md6.4 KBb94f0883e53eupstream ↗
    ---
    name: concise-code
    description: "Clean Code Quick Reference. Provides quick reference for 'Clean Code' by Robert C. Martin (Uncle Bob), including naming rules, function design, comments, formatting, testing, and code smells. Keywords: clean code, naming, functions, refactoring, code smells, best practices."
    ---
    
    ## Overview
    
    Quick reference guide for writing clean, maintainable code based on "Clean Code" by Robert C. Martin.
    
    ## Applicable Scenarios
    
    **When to use:**
    - Naming variables, functions, or classes
    - Designing functions and their parameters
    - Deciding whether to write comments
    - Formatting code
    - Writing unit tests
    - Refactoring messy code
    - Reviewing code for cleanliness
    
    **When NOT to use:**
    - Learning programming basics (assumes you know how to code)
    - Language-specific syntax questions
    - Algorithm design
    - System architecture decisions
    
    **Trigger keywords**: clean code, naming, functions, refactoring, code smells, best practices, uncle bob
    
    ## Prerequisites
    
    None. This is a reference skill providing guidelines and checklists.
    
    ## Core Capabilities
    
    ### Capability 1: Naming Guidelines
    How to create meaningful, clear names for variables, functions, and classes.
    
    ### Capability 2: Function Design
    Rules for writing small, focused functions with proper parameters.
    
    ### Capability 3: Comments Strategy
    When to write comments and when to avoid them.
    
    ### Capability 4: Code Formatting
    Vertical and horizontal formatting rules for readability.
    
    ### Capability 5: Testing Principles
    TDD laws and F.I.R.S.T. principles for unit testing.
    
    ### Capability 6: Code Smells Detection
    Quick checklist for identifying and fixing common code problems.
    
    ## Quick Reference
    
    ### The Boy Scout Rule
    > Leave the campground cleaner than you found it.
    
    ### Simple Design Rules (Priority Order)
    1. Run all tests
    2. Eliminate duplication (DRY)
    3. Increase expressiveness
    4. Minimize classes and methods
    
    ---
    
    ## Chapter 2: Meaningful Names
    
    ### Naming Rules
    
    | ✅ Do | ❌ Don't |
    |-------|----------|
    | Reveal intent | Use misleading names |
    | Use pronounceable names | Use abbreviations |
    | Use searchable names | Use single-letter variables (except loops) |
    | Class names are nouns | Class names as verbs |
    | Method names are verbs | Unclear method names |
    | One word per concept | Mix fetch/retrieve/get |
    | Add meaningful context | Add gratuitous context |
    
    ### Quick Check
    - [ ] Name needs no comment to explain
    - [ ] Name can be pronounced
    - [ ] Name can be searched
    - [ ] Same concept uses same word
    
    ---
    
    ## Chapter 3: Functions
    
    ### Function Rules
    
    | Rule | Standard |
    |------|----------|
    | Small | < 20 lines |
    | Do one thing | Only one responsibility |
    | One abstraction level | No mixing high/low level |
    | Arguments | 0 best, 1 okay, 2 acceptable, avoid 3+ |
    | No side effects | Don't do hidden things |
    | Command/Query separation | Do OR ask, not both |
    
    ### Argument Guidelines
    - **Unary**: Ask question (isFileExists) or operate (file.open())
    - **Flag arguments**: Split into two functions
    - **Binary**: Try to make unary
    - **Many args**: Use parameter object
    
    ---
    
    ## Chapter 4: Comments
    
    ### Good Comments (Write These)
    - Legal information
    - Informative explanations
    - Intent explanation
    - Warnings about consequences
    - TODO markers
    - Public API documentation
    
    ### Bad Comments (Avoid These)
    - Mumbling (only you understand)
    - Redundant with code
    - Misleading
    - Mandated by policy
    - Journal/history (use version control)
    - Noise (// default constructor)
    - Commented-out code (delete it)
    
    ### Golden Rule
    > Use code to explain. Comments cannot beautify bad code.
    
    ---
    
    ## Chapter 5: Formatting
    
    ### Vertical Formatting
    - Separate concepts with blank lines
    - Related code stays close
    - Variable declarations near usage
    - Called functions below callers
    
    ### Horizontal Formatting
    - 80-120 characters per line
    - Spaces separate weakly related items
    - Indentation shows hierarchy
    
    ---
    
    ## Chapter 6: Objects and Data Structures
    
    ### Law of Demeter
    > A module should not know internal details of objects it manipulates.
    
    **Avoid Train Wrecks:**
    ```java
    // Bad
    String path = ctxt.getOptions().getScratchDir().getAbsolutePath();
    
    // Good
    String path = ctxt.getScratchDirAbsolutePath();
    ```
    
    ---
    
    ## Chapter 7: Error Handling
    
    ### Checklist
    - [ ] Use exceptions, not return codes
    - [ ] Write try-catch-finally first
    - [ ] Use unchecked exceptions
    - [ ] Provide context with exceptions
    - [ ] Don't return null
    - [ ] Don't pass null
    
    ---
    
    ## Chapter 9: Unit Testing
    
    ### Three Laws of TDD
    1. No production code without failing test first
    2. Write only enough test to fail
    3. Write only enough code to pass test
    
    ### F.I.R.S.T. Principles
    | Letter | Meaning |
    |--------|---------|
    | F | Fast |
    | I | Independent |
    | R | Repeatable |
    | S | Self-validating |
    | T | Timely |
    
    ---
    
    ## Chapter 10: Classes
    
    ### Key Principles
    - **SRP**: One reason to change
    - **OCP**: Open for extension, closed for modification
    - **Cohesion**: Methods operate on class variables
    - **Small**: Class name describes its responsibility
    
    ---
    
    ## Chapter 17: Code Smells
    
    ### Naming
    - [ ] Descriptive names
    - [ ] Appropriate abstraction level
    - [ ] Standard nomenclature
    - [ ] Unambiguous
    - [ ] Longer names for larger scopes
    
    ### Functions
    - [ ] Does one thing
    - [ ] One abstraction level
    - [ ] Name describes behavior
    - [ ] Few arguments
    
    ### Tests
    - [ ] Adequate coverage
    - [ ] Fast execution
    - [ ] Independent
    - [ ] Boundary conditions tested
    
    ---
    
    ## Decision Tree
    
    ```
    Start writing code
        |
        ▼
    Name clear? ──No──▶ Rename
        |Yes
        ▼
    Function does one thing? ──No──▶ Split
        |Yes
        ▼
    Function small (<20 lines)? ──No──▶ Extract
        |Yes
        ▼
    Duplicate code? ──Yes──▶ Eliminate
        |No
        ▼
    Needs comments? ──Yes──▶ Use code instead
        |No
        ▼
    Clean code! Commit.
    ```
    
    ---
    
    ## Output Format
    
    When helping with clean code, provide:
    
    ```markdown
    ## Clean Code Analysis
    
    ### Issue Identified
    [Specific problem with the code]
    
    ### Relevant Rule
    [Which clean code principle applies]
    
    ### Suggested Improvement
    ```
    [Improved code example]
    ```
    
    ### Checklist
    - [ ] Naming: [assessment]
    - [ ] Function size: [assessment]
    - [ ] Single responsibility: [assessment]
    - [ ] Comments: [assessment]
    - [ ] Tests: [assessment]
    ```
    
    ---
    
    ## References
    
    - **Book**: Clean Code: A Handbook of Agile Software Craftsmanship
    - **Author**: Robert C. Martin (Uncle Bob)
    - **Publisher**: Prentice Hall
    
    ## Notes
    
    - Guidelines are principles, not absolute rules
    - Context matters—use judgment
    - The goal is maintainable, readable code
    
  • README.md2.1 KB91fa0df2b254upstream ↗
    # Concise Code - Clean Code Quick Reference
    
    A standardized OpenClaw Skill providing quick reference for "Clean Code" by Robert C. Martin (Uncle Bob).
    
    ## Overview
    
    This skill helps developers write clean, maintainable code by providing guidelines and checklists for:
    - Meaningful naming
    - Function design
    - Comments strategy
    - Code formatting
    - Unit testing
    - Code smells detection
    
    ## Installation
    
    ### For OpenClaw/QClaw Users
    
    Copy the skill to your OpenClaw skills directory:
    
    ```bash
    # Windows
    xcopy /E /I concise-code %USERPROFILE%\.qclaw\workspace\skills\concise-code\
    
    # Or manually copy SKILL.md to:
    # D:\software\QClaw\resources\openclaw\config\skills\concise-code\
    ```
    
    ### For SkillHub
    
    ```bash
    skillhub install concise-code
    ```
    
    ## Usage
    
    Trigger this skill with keywords:
    - `clean code`
    - `naming rules`
    - `function design`
    - `code smells`
    - `refactoring`
    - `best practices`
    
    ## Core Principles
    
    ### The Boy Scout Rule
    > Leave the campground cleaner than you found it.
    
    ### Simple Design Rules (Priority Order)
    1. Run all tests
    2. Eliminate duplication (DRY)
    3. Increase expressiveness
    4. Minimize classes and methods
    
    ## Quick Reference
    
    ### Naming
    | ✅ Do | ❌ Don't |
    |-------|----------|
    | Reveal intent | Use misleading names |
    | Use pronounceable names | Use abbreviations |
    | Class names are nouns | Class names as verbs |
    | Method names are verbs | Unclear method names |
    
    ### Functions
    - Small: < 20 lines
    - Do one thing
    - Arguments: 0 best, avoid 3+
    - No side effects
    
    ### Comments
    - **Write**: Legal info, intent explanation, warnings, TODO
    - **Avoid**: Redundant, misleading, commented-out code
    
    > Golden Rule: Use code to explain. Comments cannot beautify bad code.
    
    ## File Structure
    
    ```
    concise-code/
    ├── SKILL.md          # Main skill file (OpenClaw standard format)
    └── README.md         # This file
    ```
    
    ## Reference
    
    - **Book**: Clean Code: A Handbook of Agile Software Craftsmanship
    - **Author**: Robert C. Martin (Uncle Bob)
    - **Publisher**: Prentice Hall, 2008
    
    ## License
    
    MIT License - Feel free to use and distribute.
    
    ## Contributing
    
    Pull requests welcome! Please maintain the OpenClaw skill format.
    
  • LICENSE1.0 KB9d6dd3b420fdupstream ↗
    MIT License
    
    Copyright (c) 2026
    
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:
    
    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.
    
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.

Plain-text copy, no login: /skill-bundles/nancheng-123-concise-code-skill.md

// REPO STATS

1 stars
0 open issues
Last commit: 7mo ago