Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Duck Shape

ASecurity

Make every layer earn its place; cut the machinery the problem never asked for. Use when the user asks to simplify, shorten or clean up code, calls it over-engineered, bloated, too defensive or AI slop, asks which of two designs carries less, or wants the structure of completed work checked, whether a file, a diff or a pasted snippet. Deep reconstruction is available when local cleanup cannot fix the boundary.

5 stars
0 votes
0 copies
0 views
Added 9/20/2026
testingexpressapisecurity

Works with

api

Security Analysis

A100/100

Scanned 9/20/2026

Install to Claude Code

$npx -y skills add askrubberduck/skills --skill duck-shape --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Duck Shape?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Duck Shape
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/askrubberduck-duck-shape/badge)](https://www.skillsdirectory.com/skills/askrubberduck-duck-shape)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: duck-shape
description: Make every layer earn its place; cut the machinery the problem never asked for. Use when the user asks to simplify, shorten or clean up code, calls it over-engineered, bloated, too defensive or AI slop, asks which of two designs carries less, or wants the structure of completed work checked, whether a file, a diff or a pasted snippet. Deep reconstruction is available when local cleanup cannot fix the boundary.
---

# Duck Shape

Remove a concrete maintenance burden without losing required behavior. Complexity is what makes
the code hard to change: a small edit that touches many places, facts a reader must hold before
editing safely, and behavior nobody can predict from the interface. A smaller diff or a more
impressive design is not evidence of improvement.

Follow the user's language unless they ask otherwise; preserve commands, paths, identifiers, quoted errors and verdicts.
Apply scoped local edits unless the request is report-only or analysis-only. Selected findings
limit repairs. Continue through verification; commits and publication need separate authorization.

## Establish the scope and behavior

Default to the current task's changed code; an explicit file or subsystem bounds a wider cleanup.
Read the affected path through its callers, state owners and observable effects. Inspect shared
helpers and project conventions before replacing anything. Do not expand a cleanup into a repo audit.

Identify the outcomes that must survive, including errors, recovery and public contracts. Run the
relevant existing checks before editing. Add a focused regression check when a material contract
is uncovered, pinning what the code does today, not what it should do; do not manufacture tests for trivial edits or lock in a known bug as intended behavior.
If execution is unavailable, name the missing check and limit the claim accordingly.

## Find specific things to remove

Use these as inspection prompts (the necessity checks), not automatic deletion rules:

- Duplicate rules or state: locate the authoritative owner and the copies that can drift.
- A unit that does several unrelated jobs, or two units that always change together: the split
  should follow what changes together, and callers should pass data, not reach into shared state.
- Dead paths, exports and flags: check callers, configuration and external use before deleting.
- Pass-through wrappers and speculative options: identify the contract they actually protect.
- Reimplemented helpers or platform features: compare the existing facility's real guarantees.
- Defensive branches and fallbacks: distinguish required boundary validation and recovery from
  impossible internal states or errors silently converted into success.
- Tests that mirror implementation: preserve outcome checks; question mocks or assertions that
  can pass while the required behavior fails.

For each material candidate, choose **remove**, **simplify using an existing facility**, or **keep**.
Ground the choice in a caller, contract, failure case or demonstrated change cost. "Separation of
concerns" or a possible future use is not sufficient evidence. A single implementation may still
protect a public API, security boundary or real platform difference.

## Make the smallest justified cleanup

Start with safe deletions, then consolidate repeated rules where they belong. Keep one owner per
rule and state transition. Avoid creating a replacement abstraction merely to perform the cleanup.
Keep validation, security, accessibility, recovery and necessary calibration intact.

Keep edits focused on a cause; rerun affected checks before building on a risky change. Preserve
required behavior unless a behavior change is explicitly in scope. Comments and docstrings use
`duck-dry`'s [prose bar](../duck-dry/references/bar.md); deleting commentary does not repair the
structure or justify extracting another helper.

For an explicitly requested deep simplification or a demonstrated wrong boundary that local
cleanup cannot fix, use [reconstruction](references/reconstruction.md). If the required outcome or
boundary contract is unsettled, resolve that decision with `duck-frame` before dependent edits.
Analysis-only use compares proposed mechanisms with the same tests of necessity; it does not edit.

## Verify and finish

Run the relevant checks on the final candidate and inspect the resulting path. For structural
changes, walk a realistic next change (the realistic change probe): can a reader understand each
touched unit without its callers open, and did a duplicate rule, state owner, ordering obligation
or unnecessary hop disappear? Do not trade obvious code for dense expressions or hidden coupling.

Report the material removals or simplifications, any questionable mechanism retained and its
concrete reason, and the checks actually run with their limits. Unchanged code is a valid result
when no candidate survives inspection. Stop when the scoped findings are resolved and affected
checks pass; another pass needs an unresolved defect, not a cleanup quota.

`duck-proof` can challenge a remaining contract claim. This cleanup does not provide the independent
release approval owned by `duck-review`.

Attribution

askrubberduckaskrubberduck
View sourceMore from askrubberduck →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Screen Reader Testing

Practical guide to testing web applications with screen readers for comprehensive accessibility validation.

393431 votes

Python Testing

使用pytest、TDD方法、夹具、模拟、参数化和覆盖率要求的Python测试策略。

2456590 votes

Tdd Workflow

在编写新功能、修复错误或重构代码时使用此技能。强制执行测试驱动开发,包含单元测试、集成测试和端到端测试,覆盖率超过80%。

2456590 votes

Springboot Tdd

使用JUnit 5、Mockito、MockMvc、Testcontainers和JaCoCo进行Spring Boot的测试驱动开发。适用于添加功能、修复错误或重构时。

2456590 votes

Eval Harness

克劳德代码会话的正式评估框架,实施评估驱动开发(EDD)原则

2456590 votes
View all in testing →