Files
claude-howto/ja/STYLE_GUIDE.md
Luong NGUYEN ac9ee17169 docs: make version stamps and Compatible Models footers true (#259)
Type: docs

Makes the version stamps, Compatible Models footers and locale README badges say only what has been checked. Every claim below was checked against `https://code.claude.com/docs/en/<page>.md` or the raw changelog (2.1.303–2.1.322), not written from memory.

## Part A: English footers at 2.1.310 / 2.1.302

Each file's behavioural claims were checked against every changelog entry after its stamp, up to 2.1.322, and against the current docs. A stamp moves only when every claim checks out.

| File | Claims checked | Fixes | Sources | New stamp |
|---|---|---|---|---|
| `INDEX.md` | ~75: AGENTS.md rule (v2.1.277); skill/agent/MCP install paths; `/mcp__github__list_prs`; 5 hook types, 33 events, task-tool model note; `--plugin-dir`; checkpoint menu (6 options); `/workflows`, ultracode (v2.1.284), size guideline; 6 permission modes; `/loop` and the cron tools; Chrome; Remote Control; `SendMessage`/`ListAgents`/`notify_when_idle`; CLI flags | 1. Workflow size: medium aims for fewer than 10 agents only since v2.1.271 (15 before), and the default is small on a Pro plan. 2. dontAsk: file reads inside the working directories also run, as do *most* calls a `permissions.allow` rule or a `PreToolUse` hook approves (neither can approve critical-path `rm`/`rmdir` or network-path reads), and an installed mod can approve some calls. No version is given: the changelog doesn't say when a mod's `tool.check` allow arrived (it is already referenced in 2.1.290, 2.1.292 and 2.1.299). 3. `SendMessage` also reaches sessions on other machines and in the cloud, from a session connected to Remote Control with a claude.ai sign-in; a cloud session can't answer with `SendMessage`. The L383 use-case column now says the same. 4. The `--model` list adds the Fable models. 5. Plan mode: "Read-only analysis" → researches and proposes, runs shell commands to explore, edits blocked until the plan is approved. | [workflows#set-a-size-guideline](https://code.claude.com/docs/en/workflows#set-a-size-guideline) ("The default is `medium`, or `small` when you're signed in on a Pro plan with Claude Code v2.1.271 or later"); CL 2.1.219 ("aim for fewer than 15 agents"), CL 2.1.271 ("lowered the medium size guideline from 15 to 10 agents"); [permission-modes](https://code.claude.com/docs/en/permission-modes#allow-only-pre-approved-tools-with-dontask-mode) ("a mod you installed can still approve some of those calls"; "Claude still runs … file reads inside your working directories and read-only Bash commands"; "It also denies the built-in `AskUserQuestion` tool even if your allow rules match it"; "An allow rule or `PreToolUse` hook can't approve these: Recognized `rm` and `rmdir` critical-path removals … Reads from a network path"); CL 2.1.292 ("Fixed a plugin's `tool.check` hook answering allow running a tool…"), CL 2.1.299 ("…that a `PreToolUse` hook or a mod's `tool.check` hook allowed"); [permission-modes#analyze-before-you-edit-with-plan-mode](https://code.claude.com/docs/en/permission-modes#analyze-before-you-edit-with-plan-mode) ("Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Except in interactive terminal sessions with bypass permissions available, edits stay blocked until you approve the plan."); [cross-session-messaging](https://code.claude.com/docs/en/cross-session-messaging) ("reach your sessions on other machines or in the cloud"; "from a session that is connected to Remote Control, which needs a claude.ai sign-in"; "A cloud session … can't use `SendMessage` to answer a message from another machine"); model-config. The "device card" line checked out against [whats-new/2026-w34](https://code.claude.com/docs/en/whats-new/2026-w34). | **2.1.322** |
| `LEARNING-ROADMAP.md` | 33 hook events / 5 types; 6 built-in subagents (Explore, Plan, General-purpose, claude, statusline-setup, claude-code-guide); 60+ commands (commands page has 121 rows); `/design` (v2.1.265); `/plan`, `/rewind`, `/loop 5m`, `/schedule`; 6 permission modes (Manual since v2.1.200); Alt+T; skill `effort`/`shell`; plugin `workflows`/`channels`/`dependencies`; agent-teams env var; `claude mcp add --transport http`; `-r`, `--max-turns`, `--output-format json`; all 17 source links resolve | 1. Remote Control: "generally available" → "out of research preview", the docs' own wording. 2. Extended thinking (L368, Exercise 3, checklist): Opus 5.5, Sonnet 5.5, Haiku 5.5 and the Fable models always use extended thinking, so the exercise uses `/effort` and scopes Alt+T / Option+T to models that allow turning thinking off. 3. Exercise 4: checkpoints are automatic and unnamed, so step 1 no longer creates a named "Clean state" checkpoint and step 5 says which one to `/rewind` to. | [whats-new/2026-w34](https://code.claude.com/docs/en/whats-new/2026-w34): "Any machine running `claude remote-control` now shows up as a device card at the top of the Code tab in the Claude app. Remote Control is also out of research preview."; [interactive-mode](https://code.claude.com/docs/en/interactive-mode): Alt+T "Has no effect on Opus 5.5, Sonnet 5.5, Haiku 5.5, or the Fable models, which always use extended thinking."; [model-config](https://code.claude.com/docs/en/model-config): "the effort level is the primary control for how much thinking happens"; [checkpointing](https://code.claude.com/docs/en/checkpointing): "Every prompt you send that starts a turn creates a new checkpoint" | **2.1.322** |
| `resources.md` | Adaptive reasoning on Opus 4.7+, Sonnet 5+, Haiku 5.5 and the Fable models; permission modes; 33 hook events; `/loop` and cron; 7 memory tiers; Chrome; keybinding chords; Code Review; Monitor (2.1.98); `/goal` and `claude agents` (2.1.139); `--json` (2.1.145); all links | none needed | model-config, hooks, memory, agent-view, changelog | **stays 2.1.310**: L253 gives `/run`, `/verify`, `/run-skill-generator` as "(v2.1.145+)". Neither the changelog, the v2.1.145 release notes, the skills/commands docs nor the what's-new pages for weeks 19–22 give a version. |
| `03-skills/claude-md/SKILL.md` | `name`/`description` frontmatter, `$ARGUMENTS`; CLAUDE.md locations and loading; "under 200 lines"; AGENTS.md gates (v2.1.277, v2.1.281), blocking files, `/config` Project instructions values and default; `@AGENTS.md`/symlink fallback; `.claude/agents/` | L196: the list of cases where AGENTS.md isn't read now includes a disabled built-in plugin, and limits the upgrade case to "in some cases" after upgrading from v2.1.276 or earlier | [memory#when-agents-md-support-is-unavailable](https://code.claude.com/docs/en/memory#when-agents-md-support-is-unavailable): "You used `/plugin` to disable the built-in plugin that reads `AGENTS.md`"; "In some cases, it's your first session after you upgrade from v2.1.276 or earlier" | **stays 2.1.302**: no primary source states L24 ("~150-200 instructions", "system prompt already uses ~50") or L214 (the system reminder says CLAUDE.md "may or may not be relevant") |
| `07-plugins/devops-automation/README.md` | `--plugin-dir` install; commands; agents; hooks; MCP; workflow; source URLs (all 200) | none: the stale claims need a design decision (below) | [plugins/components](https://code.claude.com/docs/en/plugins/components): "Save a command at `commands/<file>.md` and it becomes `/<plugin>:<file>`"; [plugins-reference](https://code.claude.com/docs/en/plugins-reference) standard layout: "Hooks \| `hooks/hooks.json`", "MCP servers \| `.mcp.json`" | **stays 2.1.302**: bare `/deploy`, `/rollback`, `/status` (`/status` is also a built-in), `/incident`; `hooks/*.js` are never registered (no `hooks/hooks.json`); `mcp/kubernetes-config.json` never loads (no `.mcp.json` or `mcpServers`) |
| `07-plugins/documentation/README.md` | same | none | same | **stays 2.1.302**: bare command names; `mcp/github-docs-config.json` never loads, so the `GITHUB_TOKEN` setup has no effect |
| `07-plugins/pr-review/README.md` | same | none | same | **stays 2.1.302**: bare command names; `hooks/pre-review.js` is not registered; `mcp/github-config.json` never loads |

No changelog entry from 2.1.303 to 2.1.322 touched the plugin READMEs or SKILL.md. Their problems predate the stamps, and #209 already listed the hook/MCP files that never load.

**Locale copies:** the same factual fixes went into every locale with the same sentence. That's dontAsk and plan mode in all six INDEX files; workflow size in fa and ko; `SendMessage` and the use-case column in fa and ko; the `--model` list in fa and ko; "generally available" in fa and ko LEARNING-ROADMAP; the extended-thinking exercise/checklist and the checkpoint exercise in all six LEARNING-ROADMAP copies; the AGENTS.md cases in all six SKILL.md copies. Locale stamps were not bumped. INDEX and LEARNING-ROADMAP stay at 2.1.310 in every locale, and the SKILL.md copies keep their footers.

## Part B: Compatible Models footers

The new list is **Claude Fable 5.2, Claude Fable 5.1, Claude Fable 5, Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 5.5, Claude Haiku 4.5**. It is used on root docs and module pages alike, and it's the README FAQ's list, so the footers and the FAQ no longer disagree.

Why one list for both file types: STYLE_GUIDE's footer rule ("List all compatible models") applies to both. A shorter "current models only" list on module pages would break that rule. Justification from [model-config](https://code.claude.com/docs/en/model-config):

- **Current models:** "| Anthropic API | Opus 5.5 | Sonnet 5.5 | Haiku 5.5 |"; "the `fable` alias resolves to Fable 5 in Claude apps gateway sessions and to Fable 5.2 everywhere else"; "Fable 5.2 requires Claude Code v2.1.321 or later".
- **Older models still in use:**
  - "**Fable 5.1 or Fable 5**: select it by model ID."
  - "| Claude Platform on AWS | Opus 5.5 | Sonnet 4.6 | Haiku 4.5 |".
  - "biology-flagged requests re-run on Opus 5, and cybersecurity-flagged requests re-run on Opus 4.8".
  - "**Sonnet 5.5**: cybersecurity-flagged requests re-run on Sonnet 5."
- **None are retired.** The [models overview](https://platform.claude.com/docs/en/about-claude/models/overview) that model-config links marks only Opus 4.1, Opus 4 and Sonnet 4 as "retired". All eleven listed models appear there without that mark.

Scope: 336 lines in 331 files. The changed lines are the `**Compatible Models**` lines (92, some of them in locale files) and every localized label (`호환 모델`, `مدل‌های سازگار`, `Các Mô Hình Tương Thích`, `Сумісні моделі`, `対応モデル`, `互換モデル`, `兼容模型`), plus the italic `*対応:…*` / `*Для …*` / `*适用于 …*` lines in the ja/uk/zh concepts guides. Labels, separators (`, ` `、` `، `) and locale stamps are unchanged. The README FAQ lines and the 05-mcp `tool_reference` note are not footers and were left alone. The footer lines of `CHANGELOG.md`, `fa/CHANGELOG.md` and `ko/CHANGELOG.md` also carry the new list; only the footer line changed, not the entries.

## Part C: locale README badges

Real state: the newest version that most (more than half) of the locale's ten module READMEs carry or exceed, backed by the sync commit that brought them there.

A badge is marked **(partial)** when one or more of the locale's module READMEs has no version footer (never synced since its first translation), or when the locale is a condensed translation. A module synced to an older version than the badge doesn't make it partial on its own; the majority rule above already covers that. Only zh meets the rule (02-memory and 05-mcp have no footer, and #247 calls zh condensed).

| Locale | Old badge / "latest" | Evidence | New |
|---|---|---|---|
| ja | 2.1.119 (badge, "latest", FAQ) | module footers: 3×2.1.322, 5×2.1.316, 1×2.1.310, 1×2.1.302; 8/10 ≥ 2.1.316 (#230); #247 carried only the sections ja has | **2.1.316** (Oct 2026) |
| uk | 2.1.112 (FAQ line; no badge) | 3×2.1.322, 4×2.1.316, 1×2.1.310, 2×2.1.302; 7/10 ≥ 2.1.316 (#230) | **2.1.316** (Oct 2026) |
| zh | 2.1.112 (badge, "latest", FAQ) | 2.1.316, 2.1.310 ×2, 2.1.302 ×2, 2.1.300 ×2, 2.1.278; 02 and 05 have no footer (untouched since the first translation); 7/10 ≥ 2.1.300 (#193); #247 was "condensed", model lists only | **2.1.300 (partial)** (Oct 2026): the badge, "latest" and FAQ lines say zh is condensed and that 02-memory and 05-mcp haven't been synced since the April 2026 translation |
| ko | 2.1.310 | 5×2.1.322, 5×2.1.310; #228 synced ko to 2.1.310, and #247 says 2.1.316 "was not backfilled" | **2.1.310** (unchanged) |
| fa | 2.1.310 | 5×2.1.322, 5×2.1.316; #241 "syncs the translation from v2.1.310 to v2.1.316"; #247 carried only the 2.1.322 P1 changes | **2.1.316** (Oct 2026) |
| vi | none (README has no badge or version line) | 4×2.1.322, 6×2.1.316 | no change |

Months come from the docs changelog: 2.1.300 was released October 14, 2026 and 2.1.316 October 31, 2026. The README *footers* in fa/ja/ko/uk/zh stay at 2.1.322: #247 checked those files themselves, while the badge describes the whole locale.

## Deliberately left

- **Stamps not bumped:** `resources.md` (2.1.310), `03-skills/claude-md/SKILL.md` and the three plugin READMEs (2.1.302), for the reasons in the Part A table.
- **Example plugins:** the fix is a design choice between wiring up `hooks/hooks.json` / `.mcp.json` and rewording the READMEs, and renaming commands to `/<plugin>:<name>` touches seven languages plus `07-plugins/README.md` (bare `/review-pr`). It needs a follow-up issue.
- **Same unverifiable version elsewhere:** `03-skills/README.md` also said `/run-skill-generator` is v2.1.145+. Handled by #262, now merged into this branch from `main`.
- **Older `--model` lists:** ja/uk/vi/zh INDEX have pre-5.x lists (e.g. "Sonnet 4.6, Opus 4.7, Haiku 4.5"). That isn't the English sentence, so it belongs to a locale sync.

## Follow-ups
- **LEARNING-ROADMAP `/effort` line (review r3 N13):** line 368 can read as if `/effort` applies only to the models that always use extended thinking; per model-config's effort table it also works on Opus 5, Sonnet 5 and Opus 4.8. Not wrong; clarify in the next pass.

- **Compatible Models scope (review S3):** Opus 4.6 is Microsoft Foundry's current `opus`, and Sonnet 4.5 is the current `sonnet` on Bedrock, Google Cloud's Agent Platform and Foundry (deprecated, retiring Nov 30, 2026), per model-config's alias table. Both are still in use, so either add them to the FAQ and every footer (Sonnet 4.5 marked deprecated), or define the list's scope in STYLE_GUIDE (e.g. the models the aliases resolve to on the Anthropic API plus older models in active use) and cite the deprecations table.
- **Model order (review N8):** the list puts Opus 4.8 after Sonnet 4.6. Grouping by family (Fable, Opus 5.5/5/4.8, Sonnet, Haiku) would read better; the order is shared by STYLE_GUIDE, the FAQ and every footer, so change it everywhere at once.
- **Example plugins:** the follow-up issue proposed above.

## Validation

- `SKIP=mermaid,vietnamese-mermaid,japanese-mermaid,korean-mermaid,persian-mermaid pre-commit run --files <338 changed files>`: every hook passes, including link-check (246 URLs per language). The Mermaid hooks can't install here (`language: node must have package.json or additional_dependencies`, the same failure #247 reported). `python scripts/check_mermaid.py --strict` was run directly instead: Pele 1.6.0 rendered all 416 blocks.
- `python scripts/check_cross_references.py`: all valid (674 files).
- Review fix round 1 (18 files): the same `pre-commit run --files` passes every hook (Mermaid hooks skipped as above; no Mermaid block was touched), and the cross-reference check is still valid after merging `main`.
- Review fix round 2 (14 files: the extended-thinking wording in all 7 LEARNING-ROADMAP files, the dontAsk line in all 7 INDEX files): `pre-commit run --files` passes every hook (Mermaid hooks skipped; no Mermaid block touched), and the cross-reference check is valid (674 files) after merging `main` again (#257).
- Pre-push secret scan: it flagged `06-hooks/README.md:1683` (en, fa, vi), a false positive. The `sk-…{20,}` pattern matches the docs anchor `hooks#pretooluse-ask-decisions-in-auto-mode`, which has been on `main` since 11b2ae3 (en), c2f92c8 (fa) and 8de1820 (vi), and is not on a line this PR changes. The PR's added lines have no secret-pattern matches.

Closes #256
2026-11-12 14:29:18 +01:00

21 KiB
Raw Permalink Blame History

Claude How To

スタイルガイド

Claude How To にコントリビュートする際の規約とフォーマットルール。コンテンツを一貫した、プロフェッショナルで保守しやすい状態に保つため、本ガイドに従うこと。

※日本語訳における文体・用語ルールについては TRANSLATION_NOTES.md も参照。


目次


ファイルとフォルダの命名

レッスンフォルダ

レッスンフォルダは 2 桁の番号プレフィックス に kebab-case の記述子を続ける:

01-slash-commands/
02-memory/
03-skills/
04-subagents/
05-mcp/

番号は初心者から上級者への学習パスの順序を反映する。

ファイル名

種別 規約 例
レッスン README README.md 01-slash-commands/README.md
機能ファイル kebab-case .md code-reviewer.md、generate-api-docs.md
シェルスクリプト kebab-case .sh format-code.sh、validate-input.sh
設定ファイル 標準名 .mcp.json、settings.json
メモリファイル スコーププレフィックス project-CLAUDE.md、personal-CLAUDE.md
トップレベル文書 UPPER_CASE .md CATALOG.md、QUICK_REFERENCE.md、CONTRIBUTING.md
画像アセット kebab-case pr-slash-command.png、claude-howto-logo.svg

ルール

  • すべてのファイル名・フォルダ名は 小文字 を使用する(README.md、CATALOG.md などのトップレベル文書を除く)
  • 単語区切りには ハイフン(-)を使い、アンダースコアやスペースは使わない
  • 名前は記述的かつ簡潔に保つ

ドキュメント構造

ルート README

ルート README.md は以下の順序に従う:

  1. ロゴ(ダーク/ライト両対応の <picture> 要素)
  2. H1 タイトル
  3. 導入のブロッククォート(1 行のバリュープロポジション)
  4. "Why This Guide?" セクションと比較テーブル
  5. 水平線(---)
  6. 目次
  7. 機能カタログ
  8. クイックナビゲーション
  9. 学習パス
  10. 機能セクション
  11. はじめに
  12. ベストプラクティス/トラブルシューティング
  13. コントリビュート/ライセンス

レッスン README

各レッスン README.md は以下の順序に従う:

  1. H1 タイトル(例:# Slash Commands)
  2. 簡潔な概要段落
  3. クイックリファレンステーブル(任意)
  4. アーキテクチャ図(Mermaid)
  5. 詳細セクション(H2)
  6. 実践例(番号付き、4〜6 個)
  7. ベストプラクティス(Do と Don't のテーブル)
  8. トラブルシューティング
  9. 関連ガイド/公式ドキュメント
  10. ドキュメントメタデータのフッタ

機能/サンプルファイル

個別の機能ファイル(例:optimize.md、pr.md):

  1. YAML フロントマター(該当する場合)
  2. H1 タイトル
  3. 目的/説明
  4. 使用方法
  5. コード例
  6. カスタマイズのヒント

セクション区切り

主要なドキュメント領域を区切るために水平線(---)を使う:

---

## 新しい主要セクション

導入のブロッククォートの後と、論理的に異なる部分の間に配置する。


見出し

階層

レベル 用途 例
# H1 ページタイトル(1 ドキュメントに 1 つ) # Slash Commands
## H2 主要セクション ## Best Practices
### H3 サブセクション ### Adding a Skill
#### H4 サブサブセクション(まれ) #### Configuration Options

ルール

  • 1 ドキュメントに H1 は 1 つ — ページタイトルだけ
  • レベルを飛ばさない — H2 から H4 へ飛ばない
  • 見出しは簡潔に — 2〜5 語が目安
  • センテンスケースを使う — 最初の単語と固有名詞のみ大文字(例外:機能名はそのまま)
  • 絵文字プレフィックスはルート README のセクションヘッダにのみ追加(絵文字の使い方を参照)

テキストフォーマット

強調

スタイル いつ使うか 例
ボールド(**text**) 重要な用語、テーブル内のラベル、重要概念 **Installation**:
イタリック(*text*) 専門用語の初出、書籍/文書のタイトル *frontmatter*
コード(`text`) ファイル名、コマンド、設定値、コード参照 `CLAUDE.md`

コールアウト用ブロッククォート

重要な注意にはボールドプレフィックス付きのブロッククォートを使う:

> **Note**: Custom slash commands have been merged into skills since v2.0.

> **Important**: Never commit API keys or credentials.

> **Tip**: Combine memory with skills for maximum effectiveness.

サポートするコールアウトの種類:Note、Important、Tip、Warning。

段落

  • 段落は短く保つ(2〜4 文)
  • 段落の間に空行を入れる
  • 重要点を先に、コンテキストは後に
  • 「何を」だけでなく「なぜ」を説明する

リスト

番号なしリスト

ダッシュ(-)と 2 スペースのインデントでネストする:

- 最初の項目
- 2 番目の項目
  - ネスト項目
  - もう 1 つのネスト項目
    - 深いネスト(3 階層より深くしない)
- 3 番目の項目

番号付きリスト

順序のあるステップ、手順、ランク付け項目には番号付きリストを使う:

1. 最初のステップ
2. 2 番目のステップ
   - サブポイントの詳細
   - もう 1 つのサブポイント
3. 3 番目のステップ

説明型リスト

キー・バリュー形式のリストにはボールドラベルを使う:

- **パフォーマンスのボトルネック** - O(n^2) の操作、非効率なループを特定する
- **メモリリーク** - 解放されていないリソース、循環参照を発見する
- **アルゴリズム改善** - よりよいアルゴリズムやデータ構造を提案する

ルール

  • 一貫したインデントを保つ(1 階層につき 2 スペース)
  • リストの前後に空行を入れる
  • リスト項目は構造を揃える(すべて動詞で始める、またはすべて名詞、など)
  • 3 階層より深いネストは避ける

テーブル

標準フォーマット

| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Data     | Data     | Data     |

よくあるテーブルパターン

機能比較(3〜4 列):

| Feature | Invocation | Persistence | Best For |
|---------|-----------|------------|----------|
| **Slash Commands** | Manual (`/cmd`) | Session only | Quick shortcuts |
| **Memory** | Auto-loaded | Cross-session | Long-term learning |

Do と Don't:

| Do | Don't |
|----|-------|
| Use descriptive names | Use vague names |
| Keep files focused | Overload a single file |

クイックリファレンス:

| Aspect | Details |
|--------|---------|
| **Purpose** | Generate API documentation |
| **Scope** | Project-level |
| **Complexity** | Intermediate |

ルール

  • テーブルヘッダをボールドにする — 行ラベル(最初の列)の場合
  • ソースの可読性のためにパイプを揃える(任意だが推奨)
  • セルの内容は簡潔に保つ。詳細はリンクで
  • セル内のコマンドやファイルパスには code formatting を使う

コードブロック

言語タグ

シンタックスハイライトのために必ず言語タグを指定する:

言語 タグ 用途
シェル bash CLI コマンド、スクリプト
Python python Python コード
JavaScript javascript JS コード
TypeScript typescript TS コード
JSON json 設定ファイル
YAML yaml フロントマター、設定
Markdown markdown Markdown の例
SQL sql データベースクエリ
プレーンテキスト (タグなし) 期待される出力、ディレクトリツリー

規約

# コマンドの動作を説明するコメント
claude mcp add notion --transport http https://mcp.notion.com/mcp
  • 自明でないコマンドの前に コメント行 を追加する
  • すべての例を コピー&ペースト可能 にする
  • 関連するときは シンプル版と高度版の両方 を示す
  • 理解の助けとなる場合は 期待される出力 を含める(タグなしのコードブロックを使う)

インストールブロック

インストール手順には以下のパターンを使う:

# プロジェクトにファイルをコピー
cp 01-slash-commands/*.md .claude/commands/

複数ステップのワークフロー

# Step 1: ディレクトリを作成
mkdir -p .claude/commands

# Step 2: テンプレートをコピー
cp 01-slash-commands/*.md .claude/commands/

# Step 3: インストールを確認
ls .claude/commands/

リンクと相互参照

内部リンク(相対)

すべての内部リンクは相対パスを使う:

[Slash Commands](01-slash-commands/)
[Skills Guide](03-skills/)
[Memory Architecture](02-memory/#memory-architecture)

レッスンフォルダからルートまたは兄弟へ:

[Back to main guide](../README.md)
[Related: Skills](../03-skills/)

外部リンク(絶対)

説明的なアンカーテキストを伴う完全 URL を使う:

[Anthropic's official documentation](https://code.claude.com/docs/en/overview)
  • アンカーテキストに「click here」「this link」を使わない
  • 文脈外でも意味が通る記述的なテキストを使う

セクションアンカー

GitHub スタイルのアンカーで同一文書内のセクションへリンクする:

[Feature Catalog](#-feature-catalog)
[Best Practices](#best-practices)

関連ガイドのパターン

レッスンの末尾に関連ガイドのセクションを置く:

## Related Guides

- [Slash Commands](../01-slash-commands/) - Quick shortcuts
- [Memory](../02-memory/) - Persistent context
- [Skills](../03-skills/) - Reusable capabilities

図

Mermaid

すべての図に Mermaid を使う。サポートする種類:

  • graph TB / graph LR — アーキテクチャ、階層、フロー
  • sequenceDiagram — インタラクションフロー
  • timeline — 時系列

GitHub は Mermaid をネイティブにレンダリングする。Web サイトと EPUB は同じソースを Pele(scripts/vendor_assets.py でバージョン固定)でレンダリングし、pre-commit の mermaid-syntax フックも同じバンドルですべてのブロックを検証する。そのため、フックを通過したブロックはどこでも表示される。

スタイル規約

スタイルブロックで一貫した色を適用する:

graph TB
    A["Component A"] --> B["Component B"]
    B --> C["Component C"]

    style A fill:#e1f5fe,stroke:#333,color:#333
    style B fill:#fce4ec,stroke:#333,color:#333
    style C fill:#e8f5e9,stroke:#333,color:#333

カラーパレット:

色 Hex 用途
ライトブルー #e1f5fe 主要コンポーネント、入力
ライトピンク #fce4ec 処理、ミドルウェア
ライトグリーン #e8f5e9 出力、結果
ライトイエロー #fff9c4 設定、任意
ライトパープル #f3e5f5 ユーザー向け、UI

ルール

  • ノードラベルには ["Label text"] を使う(特殊文字を許可)
  • ラベル内の改行には <br/> を使う
  • ラベルはプレーンテキストにし、番号付きラベルはそのまま書く(["1. Load file"]、ピリオドの前にバックスラッシュを付けない)
  • %%{init}%% ディレクティブや Mermaid のテーマに頼らない:Web サイトは独自のライト/ダーク配色を適用する
  • 図はシンプルに保つ(最大 10〜12 ノード)
  • アクセシビリティのため図の下に簡潔なテキスト説明を追加する
  • 階層には上から下(TB)、ワークフローには左から右(LR)を使う

絵文字の使い方

絵文字を使う場所

絵文字は 控えめかつ目的を持って 使う — 特定のコンテキストでのみ:

コンテキスト 絵文字 例
ルート README のセクションヘッダ カテゴリアイコン ## 📚 Learning Path
スキルレベル指標 色付き丸 🟢 初心者、🔵 中級者、🔴 上級者
Do と Don't チェック/クロスマーク ✅ こうする、❌ こうしない
複雑さ評価 星 ⭐⭐⭐

標準絵文字セット

絵文字 意味
📚 学習、ガイド、ドキュメント
⚡ はじめに、クイックリファレンス
🎯 機能、クイックリファレンス
🎓 学習パス
📊 統計、比較
🚀 インストール、クイックコマンド
🟢 初心者レベル
🔵 中級者レベル
🔴 上級者レベル
✅ 推奨される慣行
❌ 避ける/アンチパターン
⭐ 複雑さ評価の単位

ルール

  • 本文や段落で絵文字を使わない
  • ヘッダで絵文字を使うのは ルート README のみ(レッスン README では使わない)
  • 装飾的な絵文字を追加しない — どの絵文字も意味を伝えるべき
  • 絵文字の使い方は上記の表と一貫させる

YAML フロントマター

機能ファイル(スキル、コマンド、エージェント)

---
name: unique-identifier
description: What this feature does and when to use it
allowed-tools: Bash, Read, Grep
---

任意フィールド

---
name: my-feature
description: Brief description
argument-hint: "[file-path] [options]"
allowed-tools: Bash, Read, Grep, Write, Edit
model: opus                        # opus, sonnet, または haiku
disable-model-invocation: true     # ユーザー専用の起動
user-invocable: false              # ユーザーメニューから隠す
context: fork                      # 隔離されたサブエージェントで実行
agent: Explore                     # context: fork のエージェント種別
---

ルール

  • フロントマターはファイルの最上部に置く
  • name フィールドは kebab-case を使う
  • description は 1 文に保つ
  • 必要なフィールドのみを含める

画像とメディア

ロゴパターン

ロゴで始まる文書はすべて、ダーク/ライトモード対応のために <picture> 要素を使う:

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="resources/logos/claude-howto-logo-dark.svg">
  <img alt="Claude How To" src="resources/logos/claude-howto-logo.svg">
</picture>

スクリーンショット

  • 関連するレッスンフォルダに保存する(例:01-slash-commands/pr-slash-command.png)
  • ファイル名に kebab-case を使う
  • 説明的な alt テキストを含める
  • 図には SVG、スクリーンショットには PNG を優先する

ルール

  • 画像には常に alt テキストを提供する
  • 画像のファイルサイズを適切に保つ(PNG は 500KB 未満)
  • 画像参照には相対パスを使う
  • 画像は参照する文書と同じディレクトリ、または共有画像なら assets/ に保存する

トーンと声

執筆スタイル

  • プロフェッショナルだが親しみやすく — 専門用語の過多なしに技術的に正確
  • 能動態 — 「ファイルを作成する」(「ファイルが作成されるべき」ではない)
  • 直接的な指示 — 「このコマンドを実行する」(「このコマンドを実行したいかもしれない」ではない)
  • 初心者にやさしく — 読者は Claude Code に新しい人だが、プログラミングに新しい人ではないと仮定

コンテンツの原則

原則 例
見せる、語らない 抽象的な記述ではなく、動くサンプルを提供する
段階的な複雑さ シンプルから始め、後のセクションで深さを加える
「なぜ」を説明する 「メモリは…のために使う」だけでなく「メモリは…なぜなら…」
コピー&ペーストで動く すべてのコードブロックは貼り付けるだけで動くべき
実世界のコンテキスト わざとらしい例ではなく実用的なシナリオを使う

語彙

  • 「Claude Code」を使う(「Claude CLI」や「the tool」ではない)
  • 「skill」を使う(「custom command」ではない — 旧称)
  • 番号付きセクションには「lesson」または「guide」を使う
  • 個別の機能ファイルには「example」を使う

コミットメッセージ

Conventional Commits に従う:

type(scope): description

種別

種別 用途
feat 新機能、サンプル、ガイド
fix バグ修正、訂正、リンク切れ
docs ドキュメント改善
refactor 動作を変えない再構築
style フォーマット変更のみ
test テスト追加・変更
chore ビルド、依存関係、CI

スコープ

スコープにはレッスン名やファイル領域を使う:

feat(slash-commands): Add API documentation generator
docs(memory): Improve personal preferences example
fix(README): Correct table of contents link
docs(skills): Add comprehensive code review skill

ドキュメントメタデータのフッタ

レッスン README はメタデータブロックで終わる:

---
**Last Updated**: August 2026
**Claude Code Version**: 2.1.245
**Compatible Models**: Claude Fable 5.2, Claude Fable 5.1, Claude Fable 5, Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 5.5, Claude Haiku 4.5
  • 月+年の形式を使う(例:「August 2026」)
  • バージョンは、ここに示した値ではなく、現在の同期実行で取得したものを使う
  • 機能変更時にバージョンを更新する
  • 互換モデルをすべてリストする

著者向けチェックリスト

コンテンツを提出する前に確認する:

  • ファイル/フォルダ名が kebab-case
  • 文書が H1 タイトルで始まる(1 ファイルに 1 つ)
  • 見出し階層が正しい(レベルの飛ばしなし)
  • すべてのコードブロックに言語タグがある
  • コード例がコピー&ペーストで動く
  • 内部リンクは相対パス
  • 外部リンクには記述的なアンカーテキスト
  • テーブルが正しくフォーマットされている
  • 絵文字は標準セットに従う(使う場合)
  • Mermaid 図は標準カラーパレットを使う
  • 機微な情報(API キー、認証情報)が含まれない
  • YAML フロントマターが妥当(該当する場合)
  • 画像に alt テキストがある
  • 段落が短く焦点が絞られている
  • 関連ガイドのセクションが関連レッスンへリンクする
  • コミットメッセージが Conventional Commits 形式に従う

最終更新:2026 年 8 月 25 日 Claude Code バージョン:2.1.245 情報源: