スキル一覧に戻る
aimskr

code-conventions

by aimskr

AIMS Claude Code Skils Plugin

0🍴 0📅 2026年1月9日
GitHubで見るManusで実行

SKILL.md


name: code-conventions description: "코드 컨벤션, 코딩 스타일, 코드 스타일, 네이밍, 컨벤션 - Always apply when writing code. Code style, naming rules, function/file size limits for TypeScript, Python, and Java."

Code Conventions - Code Style Persona

Role

Guide how to write code:

  • Maintain consistent code style
  • Write readable code
  • Create maintainable structure

General Principles

Early Return Pattern

Prefer early returns over nested conditions for better readability.

Size Limits

TargetLimitWhen Exceeded
Function/Method50 linesSplit
File/Class200 linesSplit into modules
Nesting depth3 levelsApply early return

TypeScript Conventions

Naming

TypePatternExample
Class/Interface/TypePascalCaseOrderService, UserEntity
Function/VariablecamelCasecalculateTotal, userName
ConstantSCREAMING_SNAKEMAX_RETRY_COUNT
Filekebab-case or camelCaseorder-service.ts
Booleanis/has/can prefixisActive, hasPermission

Best Practices

  • Use arrow functions when possible
  • Prefer const over let, avoid var
  • Always declare explicit types
  • Use interface for object shapes, type for unions/intersections
  • Prefer unknown over any

Avoid

❌ utils.ts, helpers.ts, common.ts, shared.ts

Python Conventions (PEP-8)

Naming

TypePatternExample
ClassPascalCaseOrderService, UserEntity
Function/Variablesnake_casecalculate_total, user_name
ConstantSCREAMING_SNAKEMAX_RETRY_COUNT
Module/Filesnake_caseorder_service.py
Privateleading underscore_internal_method

Best Practices

  • Maximum line length: 79 characters (code), 72 (docstrings)
  • Use 4 spaces for indentation (no tabs)
  • Two blank lines between top-level definitions
  • One blank line between method definitions
  • Use type hints (PEP 484)
  • Use docstrings for public modules, functions, classes, methods

Import Order (PEP-8)

# 1. Standard library
import os
import sys

# 2. Third-party
import requests
import numpy as np

# 3. Local application
from myapp import utils

Avoid

❌ utils.py, helpers.py, common.py, shared.py

Java Conventions

Naming

TypePatternExample
Class/InterfacePascalCaseOrderService, UserEntity
Method/VariablecamelCasecalculateTotal, userName
ConstantSCREAMING_SNAKEMAX_RETRY_COUNT
Packagelowercasecom.example.order
FileSame as class nameOrderService.java

Best Practices

  • One public class per file
  • Use final for immutable variables
  • Prefer composition over inheritance
  • Use interfaces for abstraction
  • Follow JavaDoc conventions for documentation
  • Use Optional instead of null for return values

Avoid

❌ Utils.java, Helpers.java, Common.java, Shared.java

Checklist

When Writing Code

  • Is function/method under 50 lines?
  • Is file/class under 200 lines?
  • Is nesting under 3 levels?
  • Is early return applied?
  • Is naming following language conventions?
  • Are types/type hints declared?

Before PR

  • Consistent code style maintained
  • Unnecessary comments removed
  • Error handling appropriate
  • Linter/formatter passed

Anti-Patterns

  • Magic Numbers: Using meaningless numbers directly
  • God Function/Class: Giant function/class that does everything
  • Callback Hell / Nested Conditionals: Deep nesting
  • Copy-Paste Code: Duplicated code
  • Generic Naming: utils, helpers, common, shared, misc

スコア

総合スコア

45/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

0/5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です