🎯

code-style

🎯Skill

from bumgeunsong/daily-writing-friends

VibeIndex|
What it does

Enforces clean, readable code by providing guidelines for function design, naming conventions, and code clarity principles.

πŸ“¦

Part of

bumgeunsong/daily-writing-friends(12 items)

code-style

Installation

git cloneClone repository
git clone https://github.com/BumgeunSong/daily-writing-friends.git
npm runRun npm script
npm run dev
πŸ“– Extracted from docs: bumgeunsong/daily-writing-friends
1Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

Use when writing or modifying any code. Enforces naming conventions, function design, and code clarity principles.

Overview

# Code Style

Core Philosophy

Code should be self-explanatory. Comments explain WHY, not WHAT.

Function Design

Small and Focused

Each function should do one thing well. Split larger functions into smaller, independent methods.

Either Call Or Pass

A function should either:

  • Call other methods (high-level orchestration), OR
  • Pass data / perform low-level operations

Never mix abstraction levels in one function body. This is the Single Level of Abstraction (SLA) principle.

```typescript

// BAD - mixed abstraction levels

function processOrder(order: Order) {

validateOrder(order); // high-level call

const tax = order.total * 0.1; // low-level calculation

await sendConfirmation(order); // high-level call

db.insert('orders', { ...order, tax }); // low-level operation

}

// GOOD - consistent abstraction

function processOrder(order: Order) {

validateOrder(order);

const enrichedOrder = calculateTaxes(order);

await persistOrder(enrichedOrder);

await sendConfirmation(enrichedOrder);

}

```

Never Use If With Else

Prefer guard clauses or polymorphism over if-else blocks.

```typescript

// BAD

function getDiscount(user: User) {

if (user.isPremium) {

return 0.2;

} else {

return 0;

}

}

// GOOD - guard clause

function getDiscount(user: User) {

if (!user.isPremium) return 0;

return 0.2;

}

```

Avoid Flag Arguments

Flag arguments indicate a function is doing more than one thing.

```typescript

// BAD

function createUser(data: UserData, sendEmail: boolean) { ... }

// GOOD

function createUser(data: UserData) { ... }

function createUserAndNotify(data: UserData) { ... }

```

Naming

Expressive Over Comments

```typescript

// BAD

const d = 7; // days in recovery period

// GOOD

const daysInRecoveryPeriod = 7;

```

No Abbreviations

```typescript

// BAD

getUserCmt(), calcRecReq()

// GOOD

getUserComment(), calculateRecoveryRequirement()

```

Booleans Read Like Questions

```typescript

// BAD

eligible, recovery

// GOOD

isEligible, isRecovering, hasPassedDeadline

```

Collections Use Plurals

```typescript

// BAD

const post = getPosts();

// GOOD

const posts = getPosts();

```

Use Intermediate Variables

```typescript

const hasRequiredPostCount = posts.length >= 2;

const isWithinRecoveryWindow = new Date() <= recoveryDeadline;

const canStartRecovery = hasRequiredPostCount && isWithinRecoveryWindow;

```

Constants

No Magic Numbers

```typescript

// BAD

if (streak >= 21) { ... }

// GOOD

const GOLD_BADGE_STREAK_THRESHOLD = 21;

if (streak >= GOLD_BADGE_STREAK_THRESHOLD) { ... }

```

Comments

Sparingly and Meaningful

  • Code tells HOW, comments tell WHY
  • If you need a comment, first try better naming
  • Use TODO: for known limitations
  • Delete obsolete comments

More from this repository10

🎯
refactoring🎯Skill

Refactors code by extracting pure functions from side-effect-laden logic, enabling easier testing and maintainability.

🎯
testing🎯Skill

Enforces output-based testing of pure functions, guiding developers to write testable code by focusing on functional core transformations.

🎯
react-hook🎯Skill

I apologize, but I cannot generate a description without seeing the specific details about the "react-hook" skill from the repository. Could you provide more context or details about what this part...

🎯
pr-stacking🎯Skill

Enables developers to break large features into smaller, dependent PRs for incremental development and easier code reviews.

🎯
daily-writing-friends-design🎯Skill

Provides a comprehensive design system for Daily Writing Friends, ensuring consistent UI components, styling, and accessibility across the application.

🎯
api-layer🎯Skill

Manages API interactions and request handling for the Daily Writing Friends application, facilitating communication between frontend and backend services.

🎯
skill-creator🎯Skill

Guides developers in designing Claude Skills using progressive disclosure, optimizing skill architecture and content creation.

🎯
fetching-pr-comments🎯Skill

Retrieves and parses GitHub PR review comments for the current branch using GitHub CLI, enabling quick review of code-level feedback.

🎯
firebase-functions🎯Skill

Streamlines Firebase Cloud Functions development with structured TypeScript patterns, error handling, and organized function implementations.

🎯
commit🎯Skill

Stages and commits git changes following specific Korean commit message guidelines for clean, meaningful version control.