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` since11b2ae3(en),c2f92c8(fa) and8de1820(vi), and is not on a line this PR changes. The PR's added lines have no secret-pattern matches. Closes #256
26 KiB
راهنمای سبک
قواعد و قوانین قالببندی برای مشارکت در Claude How To. این راهنما را دنبال کنید تا محتوا یکدست، حرفهای و آسان برای نگهداری بماند.
فهرست مطالب
- نامگذاری فایل و پوشه
- ساختار سند
- سرفصلها
- قالببندی متن
- فهرستها
- جدولها
- بلوکهای کد
- پیوندها و ارجاعات متقابل
- نمودارها
- استفاده از ایموجی
- فرانتمتر YAML
- تصاویر و رسانه
- لحن و بیان
- پیامهای کامیت
- چکلیست برای نویسندگان
نامگذاری فایل و پوشه
پوشههای درس
پوشههای درس از یک پیشوند شمارهای دو رقمی و سپس یک توصیفگر 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 ریشه این ترتیب را دنبال میکند:
- لوگو (عنصر
<picture>با گونههای تیره/روشن) - عنوان H1
- نقلقول آغازین (ارزش پیشنهادی یکخطی)
- بخش «چرا این راهنما؟» همراه با جدول مقایسه
- خط افقی (
---) - فهرست مطالب
- کاتالوگ ویژگیها
- پیمایش سریع
- مسیر یادگیری
- بخشهای ویژگی
- شروع به کار
- بهترین شیوهها / عیبیابی
- مشارکت / مجوز
README درس
هر README.md درس این ترتیب را دنبال میکند:
- عنوان H1 (مثلاً
# Slash Commands) - پاراگراف مرور مختصر
- جدول مرجع سریع (اختیاری)
- نمودار معماری (Mermaid)
- بخشهای تفصیلی (H2)
- نمونههای کاربردی (شمارهدار، ۴ تا ۶ نمونه)
- بهترین شیوهها (جدولهای بایدها و نبایدها)
- عیبیابی
- راهنماهای مرتبط / مستندات رسمی
- پانوشت فراداده سند
فایل ویژگی/نمونه
فایلهای ویژگی مستقل (مثلاً optimize.md، pr.md):
- فرانتمتر YAML (در صورت وجود)
- عنوان H1
- هدف / توضیح
- دستورالعملهای استفاده
- نمونههای کد
- نکات سفارشیسازی
جداکنندههای بخش
از خطوط افقی (---) برای جدا کردن نواحی اصلی سند استفاده کنید:
---
## بخش اصلی جدید
آنها را پس از نقلقول آغازین و بین بخشهای منطقاً متمایز سند قرار دهید.
سرفصلها
سلسلهمراتب
| سطح | کاربرد | نمونه |
|---|---|---|
# H1 |
عنوان صفحه (یکی در هر سند) | # Slash Commands |
## H2 |
بخشهای اصلی | ## Best Practices |
### H3 |
زیربخشها | ### Adding a Skill |
#### H4 |
زیرزیربخشها (نادر) | #### Configuration Options |
قواعد
- یک H1 در هر سند — فقط عنوان صفحه
- هرگز سطوح را رد نکنید — از H2 به H4 نپرید
- سرفصلها را مختصر نگه دارید — هدف ۲ تا ۵ کلمه
- از sentence case استفاده کنید — فقط کلمه اول و اسمهای خاص را با حرف بزرگ بنویسید (استثنا: نام ویژگیها همانطور که هست بماند)
- پیشوند ایموجی فقط روی سرصفحههای بخش README اصلی اضافه کنید (به استفاده از ایموجی مراجعه کنید)
قالببندی متن
تأکید
| سبک | زمان استفاده | نمونه |
|---|---|---|
پررنگ (**text**) |
اصطلاحات کلیدی، برچسبها در جدولها، مفاهیم مهم | **Installation**: |
مورب (*text*) |
نخستین کاربرد یک اصطلاح فنی، عناوین کتاب/سند | *frontmatter* |
Code (`text`) |
نام فایلها، دستورها، مقادیر پیکربندی، ارجاعات کد | `CLAUDE.md` |
نقلقول برای هشدارها
از نقلقولها با پیشوند پررنگ برای نکات مهم استفاده کنید:
> **توجه**: دستورهای اسلش سفارشی از نسخه v2.0 در مهارتها ادغام شدهاند.
> **مهم**: هرگز کلیدهای API یا اطلاعات احراز هویت را کامیت نکنید.
> **نکته**: حافظه را با مهارتها ترکیب کنید تا حداکثر اثربخشی را بگیرید.
انواع هشدار پشتیبانیشده: توجه، مهم، نکته، هشدار.
پاراگرافها
- پاراگرافها را کوتاه نگه دارید (۲ تا ۴ جمله)
- بین پاراگرافها یک خط خالی اضافه کنید
- با نکته کلیدی شروع کنید، سپس زمینه را ارائه دهید
- «چرا» را توضیح دهید، نه فقط «چه».
فهرستها
فهرستهای نامرتب
از خط تیره (-) با تورفتگی ۲ فاصله برای تودرتویی استفاده کنید:
- آیتم اول
- آیتم دوم
- آیتم تودرتو
- آیتم تودرتوی دیگر
- تودرتوی عمیق (از عمیقتر از ۳ سطح پرهیز کنید)
- آیتم سوم
فهرستهای مرتب
از فهرستهای شمارهدار برای مراحل متوالی، دستورالعملها و آیتمهای رتبهبندیشده استفاده کنید:
1. مرحله اول
2. مرحله دوم
- جزئیات زیرنکته
- زیرنکته دیگر
3. مرحله سوم
فهرستهای توصیفی
از برچسبهای پررنگ برای فهرستهای کلید-مقدار استفاده کنید:
- **گلوگاههای عملکرد** - شناسایی عملیات O(n^2)، حلقههای ناکارآمد
- **نشت حافظه** - یافتن منابع آزادنشده، ارجاعات چرخهای
- **بهبود الگوریتم** - پیشنهاد الگوریتمها یا ساختارهای داده بهتر
قواعد
- تورفتگی یکدست را حفظ کنید (۲ فاصله در هر سطح)
- قبل و بعد از فهرست یک خط خالی اضافه کنید
- آیتمهای فهرست را از نظر ساختار موازی نگه دارید (همه با فعل شروع شوند، یا همه اسم باشند و غیره)
- از تودرتویی عمیقتر از ۳ سطح پرهیز کنید
جدولها
قالب استاندارد
| ستون ۱ | ستون ۲ | ستون ۳ |
|----------|----------|----------|
| داده | داده | داده |
الگوهای رایج جدول
مقایسه ویژگیها (۳ تا ۴ ستون):
| ویژگی | فراخوانی | ماندگاری | مناسب برای |
|---------|-----------|------------|----------|
| **دستورهای اسلش** | دستی (`/cmd`) | فقط نشست | میانبرهای سریع |
| **حافظه** | بارگذاری خودکار | بیننشستی | یادگیری بلندمدت |
بایدها و نبایدها:
| باید | نباید |
|----|-------|
| از نامهای توصیفی استفاده کنید | از نامهای مبهم استفاده کنید |
| فایلها را متمرکز نگه دارید | یک فایل واحد را بیش از حد بار کنید |
مرجع سریع:
| جنبه | جزئیات |
|--------|---------|
| **هدف** | تولید مستندات API |
| **دامنه** | سطح پروژه |
| **پیچیدگی** | متوسط |
قواعد
- سرصفحههای جدول را پررنگ کنید وقتی برچسب سطر هستند (ستون اول)
- خطوط لوله را برای خوانایی در منبع تراز کنید (اختیاری اما ترجیحدادهشده)
- محتوای خانهها را مختصر نگه دارید؛ برای جزئیات از پیوند استفاده کنید
- از
code formattingبرای دستورها و مسیرهای فایل داخل خانهها استفاده کنید
بلوکهای کد
برچسبهای زبان
همیشه یک برچسب زبان برای برجستهسازی نحوی مشخص کنید:
| زبان | برچسب | کاربرد |
|---|---|---|
| Shell | bash |
دستورهای CLI، اسکریپتها |
| 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/
جریانهای کاری چندمرحلهای
# مرحله ۱: پوشه را ایجاد کنید
mkdir -p .claude/commands
# مرحله ۲: قالبها را کپی کنید
cp 01-slash-commands/*.md .claude/commands/
# مرحله ۳: نصب را تأیید کنید
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)
- هرگز از «اینجا کلیک کنید» یا «این پیوند» بهعنوان متن لنگر استفاده نکنید
- از متنی توصیفی استفاده کنید که بیرون از بافت هم معنادار باشد
لنگرهای بخش
با استفاده از لنگرهای سبک 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 را رندر میکند. وبسایت و EPUB همان منبع را با Pele رندر میکنند که در scripts/vendor_assets.py پین شده است، و هوک پیش از کامیت mermaid-syntax هر بلوک را با همان بستهٔ کامل اعتبارسنجی میکند، بنابراین بلوکی که از هوک عبور کند همهجا رندر میشود.
قراردادهای سبک
با استفاده از بلوکهای style رنگهای یکدست اعمال کنید:
graph TB
A["مؤلفه A"] --> B["مؤلفه B"]
B --> C["مؤلفه 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
پالت رنگ:
| رنگ | هگز | کاربرد |
|---|---|---|
| آبی روشن | #e1f5fe |
مؤلفههای اصلی، ورودیها |
| صورتی روشن | #fce4ec |
پردازش، میانافزار |
| سبز روشن | #e8f5e9 |
خروجیها، نتایج |
| زرد روشن | #fff9c4 |
پیکربندی، اختیاری |
| بنفش روشن | #f3e5f5 |
کاربرمحور، رابط کاربری |
قواعد
- برای برچسب گرهها از
["Label text"]استفاده کنید (نویسههای ویژه را ممکن میکند) - برای شکستن خط درون برچسبها از
<br/>استفاده کنید - برچسبها را متن ساده نگه دارید و برچسبهای شمارهدار را همانگونه بنویسید (
["1. Load file"]، بدون بکاسلش پیش از نقطه) - به دستورهای
%%{init}%%یا تمهای Mermaid تکیه نکنید: وبسایت پالت روشن و تاریک خودش را اعمال میکند - نمودارها را ساده نگه دارید (حداکثر ۱۰ تا ۱۲ گره)
- برای دسترسپذیری، توضیح متنی کوتاهی زیر نمودار بیفزایید
- برای سلسلهمراتب از بالا به پایین (
TB) و برای جریانهای کاری از چپ به راست (LR) استفاده کنید
استفاده از ایموجی
ایموجیها کجا استفاده میشوند
ایموجیها بهندرت و هدفمند استفاده میشوند — فقط در بافتهای مشخص:
| بافت | ایموجیها | نمونه |
|---|---|---|
| سرصفحههای بخش در README ریشه | آیکونهای دسته | ## 📚 Learning Path |
| نشانگرهای سطح مهارت | دایرههای رنگی | 🟢 مبتدی، 🔵 متوسط، 🔴 پیشرفته |
| بایدها و نبایدها | علامت تأیید/ضربدر | ✅ این کار را بکنید، ❌ این کار را نکنید |
| امتیازهای پیچیدگی | ستارهها | ⭐⭐⭐ |
مجموعهٔ استاندارد ایموجی
| ایموجی | معنا |
|---|---|
| 📚 | یادگیری، راهنماها، مستندات |
| ⚡ | شروع به کار، مرجع سریع |
| 🎯 | قابلیتها، مرجع سریع |
| 🎓 | مسیرهای یادگیری |
| 📊 | آمار، مقایسهها |
| 🚀 | نصب، دستورهای سریع |
| 🟢 | سطح مبتدی |
| 🔵 | سطح متوسط |
| 🔴 | سطح پیشرفته |
| ✅ | رویهٔ توصیهشده |
| ❌ | پرهیز / الگوی نادرست |
| ⭐ | واحد امتیاز پیچیدگی |
قواعد
- هرگز در متن اصلی یا پاراگرافها از ایموجی استفاده نکنید
- فقط در سرصفحههای 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را در یک جمله نگه دارید- فقط فیلدهایی را بگنجانید که لازم هستند
تصاویر و رسانه
الگوی لوگو
همهٔ اسنادی که با لوگو شروع میشوند برای پشتیبانی از حالت تاریک/روشن از عنصر <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 استفاده کنید
- متن جایگزین توصیفی را بگنجانید
- برای نمودارها SVG و برای اسکرینشاتها PNG را ترجیح دهید
قواعد
- همیشه برای تصاویر متن جایگزین ارائه دهید
- حجم فایل تصاویر را معقول نگه دارید (کمتر از 500KB برای PNGها)
- برای ارجاع به تصاویر از مسیرهای نسبی استفاده کنید
- تصاویر را در همان پوشهای ذخیره کنید که سند ارجاعدهنده در آن قرار دارد، یا برای تصاویر مشترک در
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 25, 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
- از نسخهای استفاده کنید که در اجرای همگامسازی فعلی ثبت شده است، نه مقدار نشاندادهشده در اینجا
- از قالب ماه + روز + سال استفاده کنید (مثلاً «۲۰ مه ۲۰۲۶»)
- هنگام تغییر قابلیتها نسخه را بهروزرسانی کنید
- همهٔ مدلهای سازگار را فهرست کنید
چکلیست نویسندگان
پیش از ارسال محتوا بررسی کنید:
- نام فایل/پوشه با kebab-case باشد
- سند با عنوان H1 شروع شود (یکی در هر فایل)
- سلسلهمراتب عنوانها درست باشد (سطحی جا نیفتاده باشد)
- همهٔ بلوکهای کد برچسب زبان داشته باشند
- مثالهای کد آمادهٔ کپی-پیست باشند
- پیوندهای داخلی از مسیرهای نسبی استفاده کنند
- پیوندهای خارجی متن لنگر توصیفی داشته باشند
- جدولها درست قالببندی شده باشند
- ایموجیها از مجموعهٔ استاندارد پیروی کنند (اگر اصلاً استفاده شدهاند)
- نمودارهای Mermaid از پالت رنگ استاندارد استفاده کنند
- هیچ اطلاعات حساسی نباشد (کلیدهای API، اعتبارنامهها)
- فرادادهٔ YAML معتبر باشد (در صورت کاربرد)
- تصاویر متن جایگزین داشته باشند
- پاراگرافها کوتاه و متمرکز باشند
- بخش راهنماهای مرتبط به درسهای مربوطه پیوند بدهد
- پیام کامیت از قالب conventional commits پیروی کند
آخرین بهروزرسانی: ۲۵ اوت ۲۰۲۶ نسخهٔ Claude Code: 2.1.245 منابع:
- https://code.claude.com/docs/en/overview
- https://code.claude.com/docs/en/changelog
- https://code.claude.com/docs/en/model-config
- https://github.com/anthropics/claude-code/releases/tag/v2.1.154 مدلهای سازگار: 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