SkillsReviewed · techygarg

Lattice Clean Code Refiner

Clean Code Refiner is an AI assistant skill for developers and teams defining coding standards, but it creates a standards document rather than enforcing code quality itself. It guides a repository-informed conversation and produces either targeted replacements for Lattice's default standards or a complete replacement document.

Researched 17 Nov 2026

In short.

Clean Code Refiner is an AI assistant skill for developers and teams agreeing on coding standards, but applying those standards through Lattice depends on a separate clean-code component. Its interview covers ten areas, including function design, naming, error handling and testability. It writes .lattice/standards/clean-code.md or a configured alternative, using section replacements or a complete override. The skill and its integration were not run; generated-document correctness and improvements to code quality are not established.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage comprises the two supplied files in skills/clean-code-refiner, SKILL.md and assets/template.md, at commit a772470df20aebdbfd9fa32c435901a876a750f0, plus the repository-root LICENSE as a related notice outside the folder. Other Lattice components, the clean-code atom, its defaults.md and the separate architecture and domain-modeling skills are excluded. No skill execution, generated output, configuration mutation, consumer integration or code-quality outcome was tested.

The overview

Identity

Clean Code Refiner is a skill in techygarg/lattice. The selected resource consists of skills/clean-code-refiner/SKILL.md and assets/template.md. The first describes how an assistant should conduct the interview and assemble its output; the second supplies standards content and interview guidance. The original folder is [https://github.com/techygarg/lattice/tree/main/skills/clean-code-refiner].

Its intended output is a repository-specific clean-code specification consumed by Lattice's clean-code atom, a separate component described as having embedded default standards.

Assessment

The skill offers a concrete way to turn team preferences into a consistent specification. Its useful features include reviewing existing repository conventions, asking about one topic at a time and identifying decisions that affect other sections.

It is most suitable when a team wants to customize Lattice's coding guidance. The supplied files explain the intended document format, but do not establish that the separate consumer loads or applies it correctly.

Users

Beginners get explanations, examples and suggested defaults instead of starting with a blank standards document. Experienced developers can specify exceptions, language conventions, error-handling strategies and testing preferences.

The scope is how individual functions, classes and modules are written. Architecture and domain modeling are assigned to separate refiners, so this skill alone does not define system layers, dependency direction or domain boundaries.

Capabilities

The template covers single responsibility, function size, branching complexity, naming, parameters, duplication, comments, error handling, testability and a validation checklist. Suggested starting points include functions under roughly twenty lines, at most two indentation levels and cyclomatic complexity under roughly ten.

The skill describes inspecting linters, formatters, code style, test patterns and language before the conversation. It also supports revising an existing standards document, adding project-specific sections and reconciling dependent decisions, such as updating testing guidance when error handling changes.

Using it

Requirements

Following the documented process requires an AI assistant that can read the skill and template, inspect repository files, create a standards document and update YAML configuration. A developer or team must supply the policy decisions. For a new repository, the skill allows starting from defaults without existing code.

Using the output through Lattice requires the separate clean-code atom. Supported assistant products, installation mechanisms, model requirements and minimum software versions are not specified in these files.

Mechanism

Overlay mode keeps embedded defaults and replaces only selected sections. Each included section must be a complete replacement, with a heading that exactly matches the corresponding default heading. Additional sections are appended. The document declares mode: overlay in YAML frontmatter.

Override mode declares mode: override and supplies all ten standard sections, plus any additions, as a standalone specification. Both modes remove interview guidance comments and record final rules rather than conversation notes.

Setup

Keep assets/template.md available at the relative location referenced by SKILL.md. No installation command is supplied. The documented process begins by checking .lattice/config.yaml for paths.clean_code and reading any existing document before choosing whether to revise, replace or extend it.

The default destination is .lattice/standards/clean-code.md. A configured paths.clean_code takes precedence. The instructions call for creating or adding that configuration key while preserving existing configuration content. If all embedded defaults already fit, no custom document is needed.

Example

Consider a team that wants functions to return success or failure values instead of using exceptions. The skill identifies this as an error-handling customization. An intended overlay would replace the Error Handling section and revise affected Test-Friendly Code guidance and checklist items where necessary, leaving unrelated defaults inherited. This is an illustrative application of the instructions; no such document was generated or tested.

Assessment & evidence

Limitations

The clean-code atom and its defaults.md are outside the supplied scope. Although the template says it contains the default content, its agreement with the actual defaults and the consumer's section-matching behavior remain unverified. The skill was not executed, and no evidence establishes reliable configuration edits, successful loading or better generated code.

Some guidance needs careful interpretation. The function-size section treats thresholds as readability signals, while the checklist summarizes numerical expectations. The comments section allows explanations for complex algorithms and performance tradeoffs, while the checklist broadly rejects comments explaining what code does. Teams should preserve intended exceptions when finalizing their rules.

Reasoning

The design reduces repeated standards writing by allowing small customizations to inherit the rest of the defaults. Its dependency table also gives the conversation a way to catch inconsistent decisions across sections. The tradeoff is that an overlay is not self-contained: understanding its effective rules requires the matching defaults, and correct integration depends on exact section headings.

Alternatives

The simplest documented alternative is to keep the embedded defaults without creating a custom document. Teams needing a complete, independent specification can choose override mode, accepting the longer interview and larger output.

For automated enforcement, the source mentions existing linters such as ESLint and Pylint as repository context; it does not provide generated linter configuration or a CI integration. For architecture or domain-modeling policy, it points to architecture-refiner and ddd-refiner, whose contents and behavior are not assessed here.

Evidence

The skill instructions are captured at [https://raw.githubusercontent.com/techygarg/lattice/a772470df20aebdbfd9fa32c435901a876a750f0/skills/clean-code-refiner/SKILL.md]. The accompanying template is captured at [https://raw.githubusercontent.com/techygarg/lattice/a772470df20aebdbfd9fa32c435901a876a750f0/skills/clean-code-refiner/assets/template.md]. These support the described interview, document structure and configuration behavior as intended instructions.

The licence notice is captured at [https://raw.githubusercontent.com/techygarg/lattice/a772470df20aebdbfd9fa32c435901a876a750f0/LICENSE]. The supplied material contains no execution transcript, generated standards document, integration result or measured code-quality outcome.

Access & freshness

Costs

The supplied MIT licence permits use without a licence fee. Total operating cost is unknown: the files specify no assistant subscription, model pricing, token consumption, infrastructure requirement or expected interview duration. Permission to use the files does not establish that the surrounding assistant service is free.

Rights

The repository-root notice is the MIT License, copyright 2026 Rahul Garg. It permits use, modification, publication, distribution, sublicensing and sale of the software and associated documentation. Copies or substantial portions must retain the copyright and permission notice. The licence disclaims warranties and liability.

Freshness

The supplied snapshot identifies commit a772470df20aebdbfd9fa32c435901a876a750f0 and capture time 2026-11-16T23:59:42.338Z. These findings concern that revision. The capture time does not establish when the skill last changed; later upstream changes, current release status and continuing compatibility are unknown.

Actions

Before adopting it, confirm how your assistant loads the skill and how your Lattice installation consumes the standards document. Compare the installed defaults with the template, choose overlay or override, and review the resulting document for complete sections, exact headings and consistent checklist rules. Check configuration changes and the consumer's actual behavior before relying on the document to guide coding.

Evidence for this report

LICENSEnotice · checked 2026-11-16
skills/clean-code-refiner/SKILL.mdselected · checked 2026-11-16
skills/clean-code-refiner/assets/template.mdselected · checked 2026-11-16