All skills

coding-standards

Official
by Api.AirforcePrepends a system promptFrontend Development000 uses202,700

TypeScript、JavaScript、React、Node.js開発のための汎用コーディング標準、ベストプラクティス、パターン。

open-sourceclaude-codefrontend-developmentaffaan-m
Share

What this skill does

When applied, it prepends a system prompt before your request is sent — no extra calls and no change to how you are billed beyond the added tokens.

---
name: coding-standards
description: TypeScript、JavaScript、React、Node.js開発のための汎用コーディング標準、ベストプラクティス、パターン。
---

# コーディング標準とベストプラクティス

すべてのプロジェクトに適用される汎用的なコーディング標準。

## コード品質の原則

### 1. 可読性優先

* コードは書くよりも読まれることが多い
* 明確な変数名と関数名
* コメントよりも自己文書化コードを優先
* 一貫したフォーマット

### 2. KISS (Keep It Simple, Stupid)

* 機能する最もシンプルなソリューションを採用
* 過剰設計を避ける
* 早すぎる最適化を避ける
* 理解しやすさ > 巧妙なコード

### 3. DRY (Don't Repeat Yourself)

* 共通ロジックを関数に抽出
* 再利用可能なコンポーネントを作成
* ユーティリティ関数をモジュール間で共有
* コピー&ペーストプログラミングを避ける

### 4. YAGNI (You Aren't Gonna Need It)

* 必要ない機能を事前に構築しない
* 推測的な一般化を避ける
* 必要なときのみ複雑さを追加
* シンプルに始めて、必要に応じてリファクタリング

## TypeScript/JavaScript標準

### 変数の命名

```typescript
// PASS: GOOD: Descriptive names
const marketSearchQuery = 'election'
const isUserAuthenticated = true
const totalRevenue = 1000

// FAIL: BAD: Unclear names
const q = 'election'
const flag = true
const x = 1000
```

### 関数の命名

```typescript
// PASS: GOOD: Verb-noun pattern
async function fetchMarketData(marketId: string) { }
function calculateSimilarity(a: number[], b: number[]) { }
function isValidEmail(email: string): boolean { }

// FAIL: BAD: Unclear or noun-only
async function market(id: string) { }
function similarity(a, b) { }
function email(e) { }
```

### 不変性パターン(重要)

```typescript
// PASS: ALWAYS use spread operator
const updatedUser = {
  ...user,
  name: 'New Name'
}

const updatedArray = [...items, newItem]

// FAIL: NEVER mutate directly
user.name = 'New Name'  // BAD
items.push(newItem)     // BAD
```

### エラーハンドリング

```typescript
// PASS: GOOD: Comprehensive error handling
async function fetchData(url: string) {
  try {
    const response = await fetch(url)

    if (!response.ok) {
      throw new Error(`HTTP ${response.status}: ${response.statusText}`)
    }

    return await response.json()
  } catch (error) {
    console.error('Fetch failed:', error)
    throw new Error('Failed to fetch data')
  }
}

// FAIL: BAD: No error handling
async function fetchData(url) {
  const response = await fetch(url)
  return

Use this skill

Per request

Add a "skill" field with the skill’s ID to your chat completion request. It is applied server-side before your prompt is sent — no extra calls.

{
  "model": "gpt-4o-mini",
  "skill": "imp-c859d74b-6cc6-4111-b92f-8576980418c8",
  "messages": [{ "role": "user", "content": "…" }]
}
Always on — no field to send

Install the skill, enable it in your dashboard and (optionally) limit it to specific models. It then applies automatically to every matching request — with no "skill" field to send each time.

Set it up in your dashboard