ClawTrust LogoClawTrust
Clean Code (1)

Clean Code (1)

by wpank · v1.0.0

Programming
ClawHub
8.7
/ 10
1 evaluations
2.6k Downloads

Overview

Provides a concise, opinionated clean-code standard that the assistant can apply when writing, refactoring, or reviewing code, with a focus on naming, function design, structure, and pre-edit safety checks.

Key Advantages

1.Clear, concrete rules for naming, function size, abstraction levels, and code structure with many before/after examples.
2.Strong focus on readability and maintainability via SRP, DRY, KISS, YAGNI, and guard-clauses patterns.
3.Includes practical anti-pattern catalog (god functions, utils junk drawers, magic numbers, TODO sprawl, etc.) with explicit fixes.
4.Provides pre-edit and pre-completion checklists to reduce broken dependencies and half-finished refactors.
5.Opinionated “NEVER” rules give consistent behavior when the assistant is asked to enforce strict clean-code standards.

Use Cases

  • Reviewing existing TypeScript/JavaScript or similar code for readability, structure, and maintainability issues.
  • Guiding refactors of large or messy functions (god functions, deep nesting, duplicated logic) into smaller, composable units.
  • Establishing or enforcing team-level clean-code conventions around naming, function signatures, and file responsibilities.
  • Helping generate new code that follows guard-clauses, clear naming, and consistent return-type patterns from the start.
  • Using the pre-edit safety checklist when making multi-file changes to avoid broken imports and missed dependents.

Evaluation Scores

8.7
/ 10
Reliability
8.0
Functionality
8.7
Usability
9.3
Safety
8.8
Performance
9.0
Compatibility
8.0

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

Download Trend

Loading...

Evaluation History (1)

8.7/103/19/2026
▼
OS: darwin-x64LLM: z-ai/glm-4.5-air
**Judgement:** A strong, opinionated clean-code standard that works especially well for TypeScript/JavaScript and generally for modern, statically typed codebases. It’s well-suited for scenarios where you want the assistant to enforce clear, consistent, and relatively strict readability and structure conventions. **Strengths:** - Covers key aspects of maintainable code: naming, function design, structure, anti-patterns, and pre-edit checklists. - Provides concrete rules and examples (guard clauses, discriminated unions, composition over god functions) that an assistant can apply systematically. - Checklists for dependencies and tests help reduce accidental breakage during refactors. **Risks / Limitations:** - Rules are dogmatic in places (e.g., “NEVER write functions longer than 20 lines”, “NEVER nest deeper than 2 levels”), which can be inappropriate for legacy code, performance-critical sections, or frameworks that favor certain patterns. - Examples and guidance are biased toward TypeScript/JS; mapping to other paradigms (low-level C, highly functional code, or framework-driven architectures) may require adaptation. - Strict adherence could sometimes over-prioritize stylistic consistency over domain constraints or existing project conventions. **Recommended Scenarios:** - Use as the default guideline when asking the assistant to **review or refactor code for cleanliness, readability, and maintainability**. - Apply when **setting or documenting coding standards** for a project that values clarity and small, focused functions. - Use as a **refactoring aid** when breaking down god functions, flattening deep nesting, and eliminating magic numbers or junk-drawer utils. - Prefer a softer or customized approach when working in **heavily constrained legacy systems**, performance-critical hotspots, or when the project already has strong, differing conventions.

Comments (0)

Post a Comment

No comments yet. Be the first!