CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

code-simplification

Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity. Use when asked to simplify, clean up, or reduce the nesting of a function or module that already works, even when the code is pasted inline and nothing else needs to change.

Quality

87%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

77%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The process content is excellent — a clearly sequenced workflow with real validation loops and unusually concrete, actionable pattern tables. Its weaknesses are token efficiency (basic language examples that restate what Claude already knows) and the absence of any progressive disclosure: a 330-line monolith where language-specific patterns should live in reference files.

Suggestions

Move the Language-Specific Guidance (TypeScript/Python/React before-after examples) into a references/ file (e.g., references/language-patterns.md) and keep a one-line pointer per language in SKILL.md, cutting roughly 100 lines from the always-loaded context.

Deduplicate the scope discipline guidance, which currently appears in Principle 5 ("Scope to What Changed"), the Common Rationalizations row ("I'll just quickly simplify this unrelated code too"), and the Red Flags bullet ("Refactoring code outside the scope") — state it once.

Trim the elementary transformations ("||" fallback assignment, dict comprehension, filter vs. loop) that mirror knowledge Claude already has, keeping only skill-specific calibration like the Rule of 500 and the pattern tables.

DimensionReasoningScore

Conciseness

The body is mostly efficient and free of fluff, but roughly 100 lines of language-specific examples (e.g., "const displayName = user.nickname || user.fullName", dict comprehensions, guard-clause flattening) demonstrate refactoring moves Claude already knows, and scope discipline is repeated three times (Principle 5, the "unrelated code too" rationalization, and the Red Flags bullet). This is more than the "minor instances" of the anchor above, so it fits the 'could be tightened' anchor.

3 / 5

Actionability

Guidance is fully concrete: pattern→signal→simplification tables, executable before/after code, explicit thresholds ("3+ levels", "50+ lines", "The Rule of 500"), and the "ASK BEFORE EVERY CHANGE" checklist. The one truncated React example is explicitly justified as a judgment call ("flag it, don't auto-refactor"), which the rubric permits.

5 / 5

Workflow Clarity

The four-step process has explicit validation checkpoints ("Run the test suite" after each change, "If tests fail → revert and reconsider"), a final comparison checklist, and a rule to revert failed simplifications — a complete validate→fix→retry feedback loop. This is not a destructive/batch skill, so no cap applies, and the sequence matches the top anchor.

5 / 5

Progressive Disclosure

The body is a well-organized single file with no bundle files and no references at all, so everything loads into context. The ~100 lines of language-specific guidance and the Common Rationalizations table are exactly the content that belongs in one-level-deep reference files, matching the 'content that should be separate is inline' anchor. It is above a 2 because section structure, headers, and tables make it genuinely navigable.

3 / 5

Total

16

/

20

Passed

Description

91%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong description that clearly states a single concrete capability, distinguishes itself from adjacent skills via the behavior-preservation constraint, and provides unusually thorough, natural "Use when…" triggers including the inline-paste edge case. The only weakness is that its capability verbs are variations on one action rather than a breadth of distinct operations.

DimensionReasoningScore

Specificity

The description lists several concrete actions — "Simplifies code for clarity", "reduce the nesting of a function or module", "clean up" — but they are near-synonymous variations of a single capability rather than the multiple distinct operations of the top anchor, and coverage has minor gaps (e.g., no mention of renaming or deduplication).

4 / 5

Completeness

It clearly answers "what" ("Simplifies code for clarity" with the behavior-preservation constraint) and "when" via four explicit "Use when…" clauses with concrete trigger phrases. This matches the top anchor exactly; the anchor below (4) applies when the "when" is only generically stated, which is not the case here.

5 / 5

Trigger Term Quality

Phrases like "refactoring code for clarity", "harder to read, maintain, or extend", "simplify, clean up, or reduce the nesting", and "even when the code is pasted inline" comprehensively cover the natural synonyms a user would say when they need this skill. It is not below 5 because no common natural phrasing for this domain (simplify / clean up / refactor / reduce nesting / hard to read / complexity) is missing.

5 / 5

Distinctiveness Conflict Risk

The "without changing behavior" and "already works" qualifiers carve a clear niche apart from bug-fixing or writing skills, but "Use when reviewing code that has accumulated unnecessary complexity" invites overlap with general code-review skills. It is mostly distinct with minor overlap risk against closely related skills, fitting anchor 4 rather than the minimal-conflict anchor 5.

4 / 5

Total

18

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository

addyosmani/agent-skills

Path

skills/code-simplification/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.