| context | fork |
| user-invocable | false |
| name | coding-standards |
| description | Coding standards and style guide enforcing immutability, error handling, file organization, and naming conventions.
Auto-activates when: writing or modifying code, code review, creating new files or components.
Triggers: code, write, edit, implement, component, function, class, style, ์ฝ๋ ์์ฑ, ์ฝ๋ฉ ์คํ์ผ, ์ฝ๋ ๋ฆฌ๋ทฐ, ๊ตฌํ, ์ปดํฌ๋ํธ, ํจ์
|
| lang | ["en","ko"] |
| platforms | ["claude-code","gemini-cli","codex-cli","cursor"] |
| level | 3 |
| progressive_disclosure | {"enabled":true,"level1_tokens":100,"level2_tokens":4000} |
| triggers | ["code","write","implement","component","function","class","style","standards","์ฝ๋ ์์ฑ","์ฝ๋ฉ ์คํ์ผ","์ฝ๋ ๋ฆฌ๋ทฐ","๊ตฌํ","์ปดํฌ๋ํธ"] |
| allowed-tools | ["Read","Grep","Glob"] |
| agents | ["refactor-cleaner","backend-developer"] |
| tokens | ~3K |
| category | code-quality |
| version | 1.0.0 |
| lastVerified | 2026-06-08 |
| source_hash | 7a01304d |
| whenNotToUse | Do not apply Artibot-specific coding standards to code in vendor directories, generated files, or repositories you do not own. Do not enforce the 50-line function limit on data-heavy configuration objects or lookup tables where density is intentional. |
Coding Standards
When This Skill Applies
- Writing new code or modifying existing code
- Creating new files, components, or modules
- Code review and quality assessment
- Refactoring or restructuring code
Core Guidance
Immutability (CRITICAL)
ALWAYS create new objects. NEVER mutate existing ones.
user.name = newName
const updated = { ...user, name: newName }
See ${CLAUDE_SKILL_DIR}/references/immutability.md for comprehensive patterns.
Error Handling
- Fail fast with explicit, meaningful errors
- Never suppress errors silently
- Preserve full error context for debugging
- Use typed errors and structured error responses
See ${CLAUDE_SKILL_DIR}/references/error-handling.md for patterns.
File Organization
- Many small files > few large files
- 200-400 lines typical, 800 lines maximum
- Organize by feature/domain, not by type
- High cohesion within files, low coupling between files
See ${CLAUDE_SKILL_DIR}/references/file-organization.md for rules.
Naming Conventions
- Functions: verb + noun (
getUserById, validateInput)
- Booleans: is/has/can/should prefix (
isActive, hasPermission)
- Constants: UPPER_SNAKE_CASE
- Types/Interfaces: PascalCase
- Files: kebab-case for modules, PascalCase for components
Code Quality Checklist
Workflow Checklist
Copy this checklist and track progress:
Progress:
- [ ] Step 1: Read existing code and identify patterns in use
- [ ] Step 2: Apply immutability โ no mutations, spread/create new
- [ ] Step 3: Validate error handling โ fail fast, explicit, contextual
- [ ] Step 4: Check file organization โ <800 lines, feature-grouped
- [ ] Step 5: Enforce naming conventions โ verbs, prefixes, casing
- [ ] Step 6: Run code quality checklist (functions <50 lines, no console.log)
- [ ] Step 7: Validate input on all external data boundaries
Human Checkpoints
Checkpoint 1: ๊ธฐ์กด ํจํด ํ์ธ (After Step 1)
Context: ์ฝ๋ ์์ ์ ๊ธฐ์กด ์ฝ๋๋ฒ ์ด์ค์ ์ปจ๋ฒค์
๊ณผ ํจํด์ ํ์
ํ ์์ . ์๋ชป ์๋ณ๋ ํจํด ๊ธฐ๋ฐ์ผ๋ก ์์
ํ๋ฉด ์ผ๊ด์ฑ์ด ๊นจ์ง ์ ์๋ค.
Ask: "๊ธฐ์กด ์ฝ๋์์ [์๋ณ๋ ํจํด ๋ชฉ๋ก] ์ ํ์ธํ์ต๋๋ค. ์ด ํจํด๋ค์ด ์ฌ๋ฐ๋ฅด๊ฒ ํ์
๋์๋์?"
Options:
- Confirm patterns โ ํ์ธ๋ ํจํด๋๋ก ์์
์งํ
- Clarify conventions โ ํน์ ์ปจ๋ฒค์
์ ๋ํด ์ถ๊ฐ ์ค๋ช
ํ์
Default: 1 (์ฝ๋ ์์ฒด๋ฅผ ์ ๋ขฐ)
Skippable: No โ ์๋ชป๋ ํจํด ์๋ณ์ ์ฝ๋ ๋ถ์ผ๊ด์ฑ์ผ๋ก ์ด์ด์ง
Freedom: HIGH
Checkpoint 2: ํ์ผ ๋ถํ ์ ๋ต ์ ํ (After Step 4)
Context: ํ์ผ์ด 800์ค ํ๊ณ์ ๊ทผ์ ํ๊ฑฐ๋ ์ด๊ณผํ์ฌ ๋ถํ ์ด ํ์ํ ์์ . ๋ถํ ์ ๋ต์ ๋ฐ๋ผ ์ฝ๋ ๊ตฌ์กฐ์ ํฅํ ์ ์ง๋ณด์์ฑ์ด ๋ฌ๋ผ์ง๋ค.
Ask: "ํ์ผ ํฌ๊ธฐ๊ฐ ๊ธฐ์ค์ ์ด๊ณผํ์ฌ ๋ถํ ์ด ํ์ํฉ๋๋ค. ์ด๋ค ๋ฐฉ์์ผ๋ก ๋ถํ ํ ๊น์?"
Options:
- Split by feature โ ๊ธฐ๋ฅ/๋๋ฉ์ธ๋ณ๋ก ๋ถ๋ฆฌ (๊ถ์ฅ)
- Split by type โ ํ์
๋ณ๋ก ๋ถ๋ฆฌ (์ปดํฌ๋ํธ/ํ
/์ ํธ ๋ฑ)
- Keep as-is โ ํ์ฌ ํฌ๊ธฐ๋ฅผ ์ ์งํ๊ณ ๋ค์ ๊ธฐํ์ ์ฒ๋ฆฌ
Default: 1 (feature-first ์กฐ์ง ์์น์ ๋ฐ๋ฆ)
Skippable: Yes (use default) โ ๊ธฐ๋ณธ๊ฐ์ธ feature ๋ถํ ๋ก ์งํ
Freedom: MEDIUM
Checkpoint 3: ํ์ง ์๋ฐ ์ฒ๋ฆฌ ๋ฐฉํฅ ๊ฒฐ์ (After Step 6)
Context: ํ์ง ์ฒดํฌ๋ฆฌ์คํธ ์คํ ํ ์๋ฐ ์ฌํญ์ด ๋ฐ๊ฒฌ๋ ์์ . ๋ชจ๋ ์๋ฐ์ ์ฆ์ ์์ ํ ์ง, ์ฐ์ ์์๋ฅผ ์ ํ ์ง ๊ฒฐ์ ์ด ํ์ํ๋ค.
Ask: "ํ์ง ์๋ฐ [N๊ฑด] ์ด ๋ฐ๊ฒฌ๋์์ต๋๋ค. ์ง๊ธ ๋ชจ๋ ์์ ํ ๊น์?"
Options:
- Fix all โ ๋ชจ๋ ์๋ฐ์ ์ง๊ธ ์์ ํ๊ณ ์งํ
- Fix critical only โ ๋ฎคํ
์ด์
, ๋ฏธ์ฒ๋ฆฌ ์๋ฌ ๋ฑ ์น๋ช
์ ํญ๋ชฉ๋ง ์์
- Defer with ticket โ ๊ธฐ๋ก ํ ๋์ค์ ์ฒ๋ฆฌ (๊ธฐ์ ๋ถ์ฑ ๋ฑ๋ก)
Default: 1 (ํ์ง ๊ธฐ์ค์ ํํ ์์ด ์งํด)
Skippable: No โ ํ์ง ์๋ฐ์ ๋ฌด์ํ๋ฉด ์ฝ๋๋ฒ ์ด์ค ํ์ง ์ ํ
Freedom: LOW
Freedom Levels
| Step | Freedom | Guidance |
|---|
| Read existing patterns | HIGH | Exploratory, use judgment |
| Apply immutability | LOW | Zero mutations allowed, follow exactly |
| Error handling | MEDIUM | Patterns preferred, implementation details flexible |
| File organization | MEDIUM | 800-line limit strict, grouping strategy flexible |
| Naming conventions | LOW | Follow the convention table exactly |
| Quality checklist | LOW | All items must pass |
| Input validation | MEDIUM | Zod preferred, other schema libs acceptable |
Quick Reference
| Rule | Limit | Action on Violation |
|---|
| Function length | <50 lines | Extract helper functions |
| File length | <800 lines | Split by responsibility |
| Nesting depth | <4 levels | Early returns, extract methods |
| Mutation | 0 allowed | Spread/map/filter/reduce |
Project-Specific Rules
Auto-injected from conversation history. Do not edit manually.
- [auto-learned] Recurring fix pattern detected. Consider adding automated checks for: fix: resolve all ESLint errors and warnings (86 โ 0)
- [auto-learned] Recurring fix pattern detected. Consider adding automated checks for: fix(v1.14.3): statusline [object Object] bug fix + session token display
- [auto-learned] Recurring fix pattern detected. Consider adding automated checks for: fix(v1.14.1): auto-activation, platform compat, skill restore, zero-config learning
Rationalizations
The following table captures common excuses agents make to skip the rigor of this skill, paired with factual rebuttals.
| Excuse | Rebuttal |
|---|
| "style is subjective" | consistency reduces cognitive load during review; the standard matters more than which one |
| "the linter is too strict" | every suppressed rule is a bug waiting to happen โ disable with justification, not reflex |
| "naming does not matter if it works" | names are the primary API of your code; bad names cost hours in downstream debugging |
| "I will fix formatting in a follow-up" | follow-ups never happen โ format on save, not on promise |
| "mutating is faster than copying" | mutation hides race conditions and breaks time-travel debugging; copy unless profiled hot path |
Common Rationalizations
| Rationalization | Why it's wrong | What to do instead |
|---|
| "This file is already 900 lines, splitting it would disrupt everything" | Disruption is proportional to coupling, not file size; a well-structured 900-line file splits into two 450-line files with one import change | Identify the largest independent responsibility in the file and extract it โ one split, not a full refactor |
| "Naming conventions are team preferences, not correctness issues" | Inconsistent names force every reader to infer meaning from context; inference errors compound across files into real bugs | Follow the verb+noun and is/has/can prefix rules mechanically โ they are cheap to apply and expensive to ignore |
| "The no-mutation rule doesn't apply to this performance-critical path" | Until you have a profiler trace showing mutation is the bottleneck, this is speculation; most mutation in codebases exists for convenience, not performance | Add an inline comment with the profiler evidence if you must mutate in a hot path; bare mutation with no comment gets flagged |
| "console.log is fine for debugging, I'll remove it before the PR" | "Before the PR" is when you forget; console.log in production logs creates noise that masks real errors and may leak sensitive data | Use structured logging from day one; configure your editor to highlight console.log as a warning |
| "Input validation adds boilerplate that obscures the real logic" | Unvalidated input is the most common cause of runtime errors and security vulnerabilities; schema validation belongs at the boundary, not scattered through business logic | Add a single schema.parse call at the entry point of each handler; the boilerplate is one line |
Red Flags
- Functions over 50 lines with no extraction plan in the PR description
- Files over 800 lines with no split scheduled in the backlog
- Mutation of a parameter inside a function without an immutability comment
console.log statements committed to any branch except a dedicated debug branch
- Boolean variable names without is/has/can/should prefix
- Error thrown with
throw error without wrapping or enriching the error context