damianwrooby/javascript-clean-code-skills

clean-codejs-functions

Function design patterns emphasizing single responsibility and clarity.

First seen Feb 7, 2026

Installation

$ npx skills add damianwrooby/javascript-clean-code-skills --skill clean-codejs-functions

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from damianwrooby/javascript-clean-code-skills.

npx skills add damianwrooby/javascript-clean-code-skills

Browse all from damianwrooby/javascript-clean-code-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

License LICENSE
Default branch main
Open issues 0
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 811 B
  • docs SUMMARY.md 101 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 130 installs

SKILL.md

Clean Code JavaScript – Function Patterns

Table of Contents

  • Single Responsibility
  • Function Size
  • Parameters
  • Side Effects

Single Responsibility

// ❌ Bad
function handleUser(user) {
  saveUser(user);
  sendEmail(user);
}

// ✅ Good
function saveUser(user) {}
function notifyUser(user) {}

Function Size

Keep functions small (ideally < 20 lines).

Parameters

// ❌ Bad
function createUser(name, age, city, zip) {}

// ✅ Good
function createUser({ name, age, address }) {}

Side Effects

// ❌ Bad
let total = 0;
function add(value) {
  total += value;
}

// ✅ Good
function add(total, value) {
  return total + value;
}