Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/techygarg/lattice/clean-codenpx skills add techygarg/lattice --skill clean-codegit clone --depth 1 https://github.com/techygarg/latticeWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00126 | $0.01428 |
| Opus 5 | $0.00063 | $0.00714 |
| Sonnet 5 | $0.00025 | $0.00286 |
| Haiku 4.5 | $0.00013 | $0.00143 |
Grade A, and why
clean-code scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Clean Code
Config Resolution
Projects can customize this skill's standards. Resolution order:
- Read
.lattice/config.yamlin the repo root. - If found, check
paths.clean_codefor a custom document path. - If a custom document exists at that path, read it and check its YAML frontmatter for
mode:mode: override: the custom document has full precedence. Use it instead of the embedded defaults. It must be comprehensive -- treat it as the sole reference.mode: overlay(or no mode field): read the embedded./references/defaults.mdfirst, then apply the custom document's sections on top. A custom section replaces the matching default section (matched by exact heading); new sections append after the defaults.
- If a custom path is configured but no document exists at it → tell the user which configured path is missing, then fall back to
./references/defaults.md. - If there is no config file or no
paths.clean_codekey, read./references/defaults.md. - Language adaptation: if
paths.language_idiomsis set in the config and the document exists, read it and adapt the defaults using these sections:- "Error Handling" → adapt §8 (Error Handling) patterns to the language's idioms. Language idioms take precedence over the pseudocode defaults.
- "Type System & Object Model" → adapt §1 (Single Responsibility) cohesion guidance to the language's constructs (e.g., struct vs class).
- "Naming Conventions" → adapt §4 (Meaningful Naming) patterns to the language's conventions.
- "Parameter & Function Design" → adapt §2 (Small, Focused Functions) and §5 (Parameter Design) to the language's capabilities.
- "Dependency Management" → adapt §9 (Test-Friendly Code) dependency-injection patterns to the language's idioms.
Self-Validation Checklist
STOP after generating each component. Verify ALL checks. Fix every failed check before presenting. Judgment calls → present options (see Ambiguity Signals).
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 65 lines · 126 tokens per session scan A b92f19391285
clean-code is a skill published in the GitHub repository techygarg/lattice (183 stars, last pushed 3d ago), licensed MIT. It adds 126 tokens to every session and 1,428 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
xiaoyaoclaw-workspace-initializer
OpenClaw workspace initialization & standardization. Sets up a proper agent home: standard directory structure (projects/tasks/outputs/knowledge/scripts/ memory/tmp) + WORKSPACE.md rules + multi-agent config safety (config.patch, never config.apply) + memory log. Use when an agent enters a new/empty workspace root, or…
learn
Search, install, update, and rate AI agent skills from agentskill.sh (100,000+ skills). Use when the user asks to find skills, install extensions or plugins, discover new capabilities, check what skills are available, or says "how do I do X" when a skill might help. Also handles listing installed skills, checking for…
review-skill
Review and improve AI agent skills (SKILL.md files) against best practices from the Agent Skills specification and Anthropic's authoring guidelines. Scores skills on 10 quality dimensions, identifies specific issues, and rewrites problem areas. Use when creating, editing, auditing, or improving agent skills. Triggers…
building-chatgpt-apps
Guides creation of ChatGPT Apps with interactive widgets using OpenAI Apps SDK and MCP servers. Use when building ChatGPT custom apps with visual UI components, embedded widgets, or rich interactive experiences. Covers widget architecture, MCP server setup with FastMCP, response metadata, and Developer Mode…
multi-agent-patterns
Design multi-agent architectures for complex tasks. Use when single-agent context limits are exceeded, when tasks decompose naturally into subtasks, or when specializing agents improves quality.
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers.…