ia-simplifying-code
Simplifies, polishes, and declutters code without changing behavior. Use when asked to simplify, clean up, refactor, declutter, remove dead code or AI slop, or improve readability, including analysis-only simplification reports. Skill: ia-simplifying-code Owner: iliaal Summary: Simplifies, polishes, and declutters code without changing behavior. Use when asked to simplify, clean up, refactor, declutter, remove dead code or AI slop, or improve readability, including analysis-only simplification reports. Tags: latest:5.0.1 Version history: v5.0.1 | 2026-10-03T17:07:44.569Z | user v5.0.1 v5.0.0 | 2026-09-26T23:21:47.727Z | user v5.0.0 v4.6.0 |
Rank
62
Safety
84
Downloads
2.0k
Updated
Oct 9, 2026
Version
5.0.1
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 2K downloads reported by the source. Last updated 10/9/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 9, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 9, 2026
- Adoption signal
- 2K downloadsadoption · observed Oct 9, 2026
- Latest release
- 5.0.1release · observed Oct 3, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s17bcar8wq0xhegs0ny6f57ypd8484bw:compound-eng-simplifying-code- Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-iliaal-compound-eng-simplifying-code/snapshot"
Documentation
CLAWHUB
144,390 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
--- name: ia-simplifying-code class: discipline description: >- Simplifies, polishes, and declutters code without changing behavior. Use when asked to simplify, clean up, refactor, declutter, remove dead code or AI slop, or improve readability, including analysis-only simplification reports. --- # Simplifying Code ## Working rules - Preserve behavior, interfaces, side effects, and domain intent; prove any unshipped-shape exception has no consumers outside scope. - Before removing a guard for an external hazard, reproduce its precondition and show the hazard is handled; otherwise retain it. - Verify standard-library substitutions on empty, null, no-match, ordering, and zero-value cases. - For analysis-only requests, identify targets and report proposed simplifications without editing code. ## Principles | Principle | Rule | |-----------|------| | **Preserve behavior** | Output must do exactly what the input did, with no silent feature additions or removals. Specifically preserve: async/sync boundaries (do not convert sync to async or reverse), error propagation paths (do not alter strategy), logging/telemetry/guards/retries that encode operational intent, and domain-specific steps (do not collapse into generic helpers that hide intent). One carve-out: a shape that existed only in an earlier iteration of the current unshipped scope is not protected behavior. Verify it has no deployed, persisted, public, external, dependent-branch, or in-repo caller outside the resolved scope, and that every required caller update fits inside the edit boundary; otherwise keep the compatibility path. This narrow exemption is about shapes with provably zero consumers; it never licenses removing a guard, which is governed by the evidence bar under AI Slop Removal | | **Explicit over clever** | Prefer explicit variables over nested expressions. Readable beats compact | | **Simplicity over cleanliness** | Prefer straightforward code over pattern-heavy "clean" code. Three similar lines beat a premature abstraction | | **Surgical changes** | Touch only what needs simplifying. Match existing style, naming conventions, and formatting of the surrounding code | | **Surface assumptions** | Before changing a block, identify what imports it, what it imports, and what tests cover it. Edit dependents in the same pass | | **Delete before simplifying** | Prefer deletion over simplification, simplification over optimization, and optimization over automation. A pass that finds nothing to change is a valid, complete result | Changing an interface, exported name, persisted format, or path reaches past the import graph. Enumerate the producers, consumers, schemas, fixtures, generators, manifests, scripts and CI recipes, config references, and documents that carry the old identifier, and migrate them in the same pass. Close out by searching for the old identifier: zero hits, or one line accounting for each intentional remainder. Renames rot in the fixture holding the old key an
_meta.json
{
"ownerId": "kn715jrbbh71q9zncr0bqdkr8n848q1a",
"slug": "compound-eng-simplifying-code",
"version": "5.0.1",
"publishedAt": 1791047264569
}references/orchestrated-simplification.md
# Orchestrated simplification ## Orchestrator Mode (When Chained With Other Skills) When this skill is invoked by an orchestrator that also runs `ia-code-review`, `ia-writing-tests`, or `ia-verification-before-completion` on the same scope, each sub-skill re-resolving scope independently wastes tokens and risks drift. Avoid this by resolving scope exactly once and passing a canonical block to every sub-skill. **Resolved scope format**: the orchestrator builds this once, before dispatching any sub-skill: ``` ## Resolved scope Files: - path/to/file-a.ts - path/to/file-b.ts Commit range: HEAD~3..HEAD (or "uncommitted") Intent: [one-sentence description pulled from the user request or PR description] Constraints: - Preserve public API - No behavior change - [other constraints specific to this run] ``` Pass this block verbatim to each chained sub-skill as the source of truth for scope. Reuse the block instead of independently resolving the request again. If later edits require a scope change, reconcile the block before continuing. Assign one final verification owner after all edits are integrated. Honor each sub-skill's documented checks; do not invent suppression flags. The final owner can be the orchestrator or a delegated verifier with access to the integrated files. Require a verification receipt with the checked revision and worktree identity, relevant file or diff fingerprints for uncommitted changes, executed commands, exit statuses, material output, and coverage gaps. Confirm that the receipt covers the final integrated state and the required checks. Fresh delegated evidence is valid when that correspondence holds; delegation alone does not require a duplicate parent suite. If files change after verification or the receipt is incomplete, rerun the affected checks against the new state. Produce one final report based on the receipt. This prevents two failure modes: scope drift (sub-skill A simplifies one set of files, sub-skill B reviews a different set) and double work (every sub-skill rediscovers the same facts).
references/simplification-patterns.md
# Simplification patterns ## Smell → Fix | Smell | Fix | |-------|-----| | Deep nesting (>2 levels) | Guard clauses with early returns | | Long function (>20 lines) | Extract into named functions by responsibility | | Too many parameters (>3) | Group into an options/config object | | Duplicated block (**3+** occurrences) | Extract shared function. Two copies = leave inline; wait for the third | | Magic numbers/strings | Named constants | | Complex conditional | Extract to descriptively-named boolean or function | | Boolean-returning `if/else` (each branch returns a literal `True`/`False`) | Preserve the boolean return type and truthiness evaluation: in Python use `return True if a and b else False`; use `return a and b` only when both operands are guaranteed booleans | | Dense transform chain (3+ chained methods) | Break into named intermediates for debuggability | | Dead code / unreachable branches | Delete entirely; no commented-out code | | Unnecessary `else` after return | Remove `else`, dedent | ## AI Slop Removal When simplifying AI-generated code, specifically target: - **Redundant comments** that restate the code (`// increment counter` above `counter++`): delete them. A comment that carries behavior is not redundant even when it sits beside a short line: keep one that says why the line exists, names a workaround or upstream bug, states an invariant, or pins an ordering constraint. Treat directive comments as code (`// @ts-expect-error`, `// eslint-disable-next-line`, `# noqa`, `# type: ignore[...]`, `# pragma: no cover`, `// phpcs:ignore`, `@phpstan-ignore-next-line`, docblock annotations a framework reads); remove one only after rerunning its tool without it and seeing the run stay clean. Keep license and legal headers; no tool rerun can clear their removal - **Wrong comments** on lines this pass touches (list others as follow-ups): fix or remove one when one of these holds. *Stale*: describes behavior the code no longer has. *Orphaned*: names a symbol, path, flag, or ticket that no longer exists. *Misleading*: states a claim the code contradicts. Rewrite when the correct claim is proven from the code; otherwise delete. Never change code to make a comment true - **Unnecessary defensive checks** for conditions that cannot occur in context: remove the guard. Where the guard, retry, workaround, or flag counters an *external* hazard (a harness default, an upstream bug, a race, a platform quirk), "cannot occur" needs evidence: demonstrate the hazard's precondition is present and handled. A green suite is not that evidence when the run may never have triggered the hazard at all; absence of failure and absence of the hazard look identical from the outside. If the precondition cannot be reproduced, keep the code and record the gap. Guards against conditions the type system already excludes need no such proof, provided the type is enforced at that boundary rather than merely declared; deserialized payloads, unchecked API responses, and any
skill-card.md
## Description: Guides behavior-preserving code simplification and produces analysis-only reports when edits are not requested. This skill is ready for commercial/non-commercial use. ## Publisher: [iliaal](https://clawhub.ai/user/iliaal) ### License/Terms of Use: MIT-0 ## Use Case: Developers use this skill to simplify code while preserving behavior, or to identify potential improvements without making edits. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: Simplifying sensitive code can unintentionally change behavior or remove protective checks. Mitigation: Review changes in authentication, protocol, financial, and public API code; retain guards unless their removal is supported by evidence. Risk: A proposed refactor may appear equivalent without covering edge cases. Mitigation: Require relevant tests or explicit confirmation when behavior parity is uncertain, and distinguish unimplemented proposals from verified edits. ## Reference(s): - [Simplification patterns](references/simplification-patterns.md) - [Orchestrated simplification](references/orchestrated-simplification.md) ## Skill Output: **Output Type(s):** [Code, Markdown, Guidance] **Output Format:** [Code edits or a Markdown analysis report] **Output Parameters:** [1D] **Other Properties Related to Output:** [Applied changes include verification results and residual risks; analysis-only reports label proposals as unimplemented.] ## Skill Version(s): 5.0.1 (source: ClawHub release metadata) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/iliaal/skills/compound-eng-simplifying-code",
"sourceUrl": "https://clawhub.ai/iliaal/skills/compound-eng-simplifying-code",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T20:20:15.593Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-iliaal-compound-eng-simplifying-code/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-iliaal-compound-eng-simplifying-code/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-09T20:20:15.593Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "2K downloads",
"href": "https://clawhub.ai/iliaal/compound-eng-simplifying-code",
"sourceUrl": "https://clawhub.ai/iliaal/compound-eng-simplifying-code",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T20:20:15.593Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "5.0.1",
"href": "https://clawhub.ai/iliaal/compound-eng-simplifying-code",
"sourceUrl": "https://clawhub.ai/iliaal/compound-eng-simplifying-code",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-10-03T17:07:44.569Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-iliaal-compound-eng-simplifying-code/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-iliaal-compound-eng-simplifying-code/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 5.0.1",
"description": "v5.0.1",
"href": "https://clawhub.ai/iliaal/compound-eng-simplifying-code",
"sourceUrl": "https://clawhub.ai/iliaal/compound-eng-simplifying-code",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-10-03T17:07:44.569Z",
"isPublic": true
}
]
}Record generated Oct 9, 2026.
