Code Design

Use when writing or reviewing functions that are deeply nested, do too many things, have unclear side effects, or are hard to follow linearly. Also when an agent produces code with high cognitive load — nested if-else pyramids, functions mixing validation+business logic+IO, mutable state leaks, or control flow that jumps around. Complements folder-architecture (file/dir level) with function-level design principles.

9 starsSoftware Development Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add Drakaniia/skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add Drakaniia/skills --skill code-design
Manual install
git clone --depth 1 https://github.com/Drakaniia/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/skills/code-design ~/.claude/skills/code-design

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Code Design

Use this skill as a **Code Design Auditor** — enforcing function-level design principles that make code predictable, readable, and maintainable. This skill pairs with `folder-architecture` (file/directory structure) and `audit-codebase` (structural health) to cover the **code quality** dimension those skills don't address.

> **Guidelines, not gates.** The numbers in this skill (nesting depth, parameter count, function length) are review heuristics. When the project configures its own limits — ESLint `complexity`/`max-depth`/`max-params`/`max-lines-per-function`, Ruff/Pylint `C901`/`PLR0913`, golangci-lint `gocyclo`/`nestif`, Clippy `too_many_arguments`, Sonar rules — those win, and the linter is the enforcement mechanism, not this skill. Apply the principles to the code you are writing or were asked to review; do not refactor untouched functions as a drive-by.

## Core Principles

### 1. Pure Functions — Predictable by Contract

A pure function:

- Returns the **same output** for the **same input** (referential transparency)
- Has **no side effects** (no mutation of external state, no I/O, no DB, no network)

**Benefit:** Testable without mocks, safe to parallelize, trivial to reason about.
Read the full skill on GitHub

Details

Skill name
code-design
Path
skills/code-design/SKILL.md
License
MIT
Repo updated
7 November 2026

FAQ

What does the Code Design skill do?

Use when writing or reviewing functions that are deeply nested, do too many things, have unclear side effects, or are hard to follow linearly. Also when an agent produces code with high cognitive load — nested if-else pyramids, functions mixing validation+business logic+IO, mutable state leaks, or control flow that jumps around. Complements folder-architecture (file/dir level) with function-level design principles.

How do I install the Code Design skill?

Claude Code plugin: /plugin marketplace add Drakaniia/skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Code Design popular?

It lives in Drakaniia/skills, which has 9 GitHub stars and 0 forks.

Related skills

Audit Codebase

9

Drakaniia/skills

Scan any codebase (language-agnostic) and flag structural health issues including folder bloat, oversized files, deep nesting, naming inconsistencies, orphaned files, doc sprawl, and empty directories. Generates a markdown report with ASCII tree diagrams for folder structure issues and Mermaid graphs for file-level diagrams. Use when a codebase feels cluttered, disorganized, or hard to navigate.

Software Development

Codebase Health

9

Drakaniia/skills

Use when starting any session, or when unsure which codebase-health skill applies. Routes to audit-codebase, folder-architecture, code-design, and implement-folder-architecture. Establishes that codebase health is continuous practice, not a one-time audit.

Software Development

Folder Architecture

9

Drakaniia/skills

Define and enforce best-practice folder architecture whenever creating or modifying files. Use whenever the AI adds or edits code to prevent structural clutter, directory bloat, misplaced files, naming inconsistencies, and deep nesting.

Software Development

Xrpl Dev

5

XRPL-Commons/xrpl-dev-skills

End-to-end XRPL development playbook. Covers XRP Ledger dApp development including project scaffolding (create-xrp), wallet integration (xrpl-connect), client SDKs, transactions, tokens, NFTs, DEX/AMM, cross-chain interoperability (Axelar), and security best practices.

Software Development

Graphql Expert Best Practices

9

wispbit-ai/skills

GraphQL performance optimization and best practices for building scalable APIs. This skill should be used when writing, reviewing, or refactoring GraphQL schemas, resolvers, or query execution code. Triggers on tasks involving GraphQL APIs, resolver optimization, query performance, or data fetching patterns.

Software Development

Workflow Debugger

9

duvoai/skills

Audit a Duvo Agent — or a multi-Agent workflow connected by a Queue — across many Runs to find systemic inefficiencies and quality issues, then recommend concrete AOP and architecture changes. Use when the user asks to "analyze this workflow", "audit my Agent", "why is this Agent slow / inconsistent / low quality across runs", "why does my queue keep backing up", or wants a health check over an Agent's recent Runs — as opposed to debugging one failed Run (that's run-debugger). Reads recent Runs, eval scores, the producer/consumer queue topology, and the AOPs those Runs actually ran against via

Software Development

Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.