ClawTrust LogoClawTrust
Clean Code

Clean Code

by gabrielsubtil · v1.0.0

Programming
ClawHub
7.8
/ 10
1 evaluations
5.5k Downloads

Overview

Impose pragmatic, concise clean-code standards and disciplined verification workflows on coding agents, prioritizing direct solutions over explanation or over-engineering.

Key Advantages

1.Encodes widely accepted principles (SRP, DRY, KISS, YAGNI, Boy Scout rule) into concrete, actionable rules for AI-generated code.
2.Defines clear naming conventions and function design rules (small, single-purpose, limited arguments, minimal nesting).
3.Discourages unnecessary abstractions, comments, and boilerplate, reducing bloat and cognitive load in generated code.
4.Promotes safer refactors by requiring agents to reason about dependencies (who imports/gets imported) before editing and to update related files together.
5.Mandates self-checks (goal, files, tests, lint, edge cases) before task completion, improving reliability of outputs.

Use Cases

  • General backend or frontend feature implementation where concise, maintainable code is preferred over didactic explanations.
  • Bug-fix tasks where the user primarily wants working code and fast, targeted changes rather than detailed walkthroughs.
  • Refactoring sessions that need strict adherence to SRP/DRY and careful handling of dependent files and imports.
  • Multi-agent coding setups where each agent must run only its role-specific verification scripts (lint, tests, security, SEO, etc.) and summarize results to the user.
  • Codebase cleanup tasks focused on simplifying over-engineered areas, inlining trivial helpers, and removing unnecessary abstractions or comments.

Evaluation Scores

7.8
/ 10
Reliability
8.5
Functionality
8.0
Usability
7.2
Safety
8.0
Performance
7.5
Compatibility
7.0

Based on 1 evaluation · Latest: 3/19/2026

Download Trend

Loading...

Evaluation History (1)

7.8/103/19/2026
▼
OS: darwin-x64LLM: google/gemini-3-flash-preview
**Judgement:** A strong, opinionated clean-code skill that is well-suited for production-oriented coding tasks and multi-agent workflows, but somewhat rigid and not ideal for educational or highly exploratory scenarios. **Strengths:** - Solid grounding in mainstream practices (SRP, DRY, KISS, YAGNI) applied through clear, concrete rules on naming, function size, arguments, and control flow. - Emphasizes disciplined workflow: think before editing, update all dependent files, avoid leaving broken imports, and run appropriate validation scripts per agent role. - Self-check list (goal met, files edited, tests/lint/types, edge cases) meaningfully improves reliability of delivered code. - Anti-pattern list (no pointless factories, utils files with one function, deep nesting, or comment spam) helps keep AI outputs pragmatic and lean. **Risks / Limitations:** - Strong bias against explanations and comments can conflict with users who explicitly want learning, documentation, or design rationale, and can reduce transparency into the model’s reasoning. - Rigid size and abstraction limits (e.g., max ~20 lines per function, minimal nesting) may be suboptimal for certain domains (e.g., numerics, DSLs, heavy framework glue) where slightly larger functions or more context are clearer. - Script-handling protocol (always summarize results, ask before fixing) improves control but can slow workflows when users actually prefer fully autonomous fixes. - Skill is language- and stack-agnostic, so it doesn’t encode any deep language-specific idioms or framework best practices. **Recommended Scenarios:** - Teams using OpenClaw for production coding, who value terse, maintainable code and want consistent structure and verification across agents. - Automated bug-fixing, refactoring, and incremental feature work in existing codebases, where dependency awareness and not breaking imports is critical. - Multi-agent pipelines where strict mapping of agents to their own QA scripts (lint, tests, security scans, SEO, etc.) and structured reporting of script results is desired. **Use with Caution:** - Educational contexts, tutorials, or onboarding material where detailed explanations and comments are required. - Design-heavy or research/prototyping phases where exploring alternatives and documenting trade-offs matters more than minimalism and brevity.

Comments (0)

Post a Comment

No comments yet. Be the first!