Skip to content

Commit a578e2e

Browse files
github-actions[bot]claude-yolo[bot]
authored andcommitted
docs: Claude Code v2.1.310 - Code Review includes skills from REVIEW.md, mod images draw inside tmux
Co-Authored-By: claude-yolo[bot] <claude-yolo@lroole.com>
1 parent 0a4cdcc commit a578e2e

65 files changed

Lines changed: 804 additions & 307 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎content/.metadata.json‎

Lines changed: 122 additions & 122 deletions
Large diffs are not rendered by default.

‎content/en/docs/claude-code/artifacts.md‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,7 @@ Open the published artifact in a desktop browser to review the artboards. Select
340340

341341
Claude Docs reaches Claude Code as a claude.ai [connector](https://code.claude.com/docs/en/mcp.md#use-mcp-servers-from-claude-ai) rather than a command. When it's connected, `/mcp` lists it as `claude.ai Claude Docs`. A request for a document meant for other people then goes to Claude Docs instead of an artifact page: a spec, a proposal, or a write-up of the plan you worked through in the session. Claude gives you the doc's link when it's drafted.
342342

343-
A document that belongs in the codebase, such as a README, stays a file. To get a file for something Claude would otherwise put in Claude Docs, name the format, such as `.docx` or a Markdown file in the repository.
344-
345-
To turn the connector off, add `claude.ai Claude Docs` to `deniedMcpServers` or use the `/mcp` toggle, both described in [Disable claude.ai connectors](https://code.claude.com/docs/en/mcp.md#disable-claude-ai-connectors).
343+
A document that belongs in the codebase, such as a README, stays a file. To get a file for something Claude would otherwise put in Claude Docs, name the format, such as `.docx` or a Markdown file in the repository. To turn off only the `claude.ai Claude Docs` connector, see [Disable claude.ai connectors](https://code.claude.com/docs/en/mcp.md#disable-claude-ai-connectors).
346344

347345
## Page constraints
348346

‎content/en/docs/claude-code/claude-apps-gateway.md‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,17 +458,19 @@ Under the default first-wins setting, an admin value blocks the parent's only wh
458458

459459
#### How hook and skill keys in parent settings take effect
460460

461-
If you pass `disableAllHooks: true` as a parent setting through the Agent SDK's `managedSettings` option, not every hook stops. Your [SDK hook callbacks](https://code.claude.com/docs/en/agent-sdk/hooks.md) still run, and so do the administrator's hooks, which your application can't switch off.
461+
Keys your application passes in the Agent SDK's [`managedSettings`](https://code.claude.com/docs/en/agent-sdk/typescript#options) option are parent settings. On a machine where an administrator deploys managed settings, Claude Code ignores parent settings unless the administrator [lets an embedding host add policy](https://code.claude.com/docs/en/managed-settings.md#let-an-embedding-host-add-policy).
462462

463-
On a machine where an administrator deploys managed settings, Claude Code ignores parent settings unless the administrator [lets an embedding host add policy](https://code.claude.com/docs/en/managed-settings.md#let-an-embedding-host-add-policy).
463+
If you pass [`disableAllHooks: true`](https://code.claude.com/docs/en/settings-reference#disableallhooks) in `managedSettings`:
464+
465+
* **Stop**: user, project, and local hooks, plus hooks declared in agent frontmatter or in the SDK's [`settings` option](https://code.claude.com/docs/en/agent-sdk/typescript#options).
466+
* **Keep running**: your application's [SDK hook callbacks](https://code.claude.com/docs/en/agent-sdk/hooks.md) and an administrator's hooks from managed settings. Your application can't turn the administrator's hooks off.
464467

465468
| What you pass | What happens |
466469
| :- | :- |
467-
| `disableAllHooks: true` | Treated as `allowManagedHooksOnly: true`, so the hooks listed as [blocked under `allowManagedHooksOnly`](https://code.claude.com/docs/en/settings-reference#what-runs-under-allowmanagedhooksonly) stop, and so do hooks in the SDK's [`settings` option](https://code.claude.com/docs/en/agent-sdk/typescript#options). |
468-
| [`disableSkillShellExecution: true`](https://code.claude.com/docs/en/settings-reference#disableskillshellexecution) | Takes effect. |
470+
| `hooks`, or `allowedHttpHookUrls` or `httpHookAllowedEnvVars` with entries | Claude Code ignores the key. Use the SDK `settings` option instead. |
469471
| `allowedHttpHookUrls: []` | Takes effect unless the administrator defines `hooks` or enables a plugin. No HTTP hook runs, except for URLs another settings source lists. |
470472
| `httpHookAllowedEnvVars: []` | Takes effect unless the administrator defines `hooks` or enables a plugin. HTTP hook headers can include only environment variables another settings source lists. |
471-
| `allowedHttpHookUrls` or `httpHookAllowedEnvVars` with entries | Claude Code ignores it, since merging would widen an administrator's list. Use the SDK `settings` option instead. |
473+
| [`disableSkillShellExecution: true`](https://code.claude.com/docs/en/settings-reference#disableskillshellexecution) | Takes effect. |
472474

473475
Passing these keys in `managedSettings` requires Claude Code v2.1.309 or later, or TypeScript Agent SDK v0.3.309 or later.
474476

‎content/en/docs/claude-code/claude-code-on-the-web.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
> [!NOTE]
1010
>
11-
> Cloud sessions are available on Pro, Max, and Team plans, and for Enterprise users with premium seats or Chat + Claude Code seats. If your Enterprise organization manages your access with [custom roles](https://support.claude.com/en/articles/13930452), you also need a role that includes the cloud sessions permission. Ask an Owner to check your roles and add it at [**Organization settings > Roles**](https://claude.ai/admin-settings/roles) if it's missing.
11+
> Cloud sessions are available on Pro, Max, and Team plans, and for Enterprise users with premium seats or Chat + Claude Code seats. If [custom roles](https://support.claude.com/en/articles/13930452) govern your access, you also need a role with the cloud sessions permission to start sessions on Anthropic's infrastructure from the browser, apps, or terminal. Ask an Owner to add it to one of your roles at [**Organization settings > Roles**](https://claude.ai/admin-settings/roles).
1212
1313
A cloud session is a Claude Code session that runs on cloud infrastructure instead of on your machine. By default it runs on infrastructure Anthropic manages, or on your organization's [self-hosted environment](https://code.claude.com/docs/en/self-hosted-environments) when routed there. The session keeps running after you close your laptop, and you can check on it or steer it from any device. It counts toward your plan's usage limits alongside the rest of your Claude and Claude Code usage, and there's no separate charge for the cloud VM.
1414

‎content/en/docs/claude-code/cloud-environments.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ These requirements decide whether you can add a secret and whether the agent pro
109109

110110
#### Add a secret
111111

112-
You add secrets one at a time, and you can't edit a secret after you add it. To change a secret's hosts or value, delete it and add it again.
112+
You add secrets one at a time. To change a secret's hosts or value, delete it and add it again.
113113

114114
To add a secret to a [shared environment](#organization-shared-environments), open it for editing from the **Cloud environments** page in [admin settings](https://claude.ai/admin-settings), then continue from step 2 in its **Network secrets** section. If you're on a Team plan and don't hold an [organization admin role](#requirements), follow step 1 on your own environment, then [fill in the shorter form](#add-a-secret-without-the-role).
115115

@@ -119,7 +119,7 @@ To add a secret to a [shared environment](#organization-shared-environments), op
119119

120120
**2. Add the secret**
121121

122-
Select **Add secret** and fill in the form. Keep the default **Secret type**, **Bearer**, for an API key that travels in a request header, and fill in these fields:
122+
Select **Add secret**, labeled **Add** in admin settings, and fill in the form. Keep the default **Secret type**, **Bearer**, for an API key that travels in a request header, and fill in these fields:
123123

124124
* **Name**: a label for the secret, such as `Internal billing API`
125125
* **Allowed websites**: the API's hosts, such as `api.example.com`. A leading `*.` matches every subdomain
@@ -443,11 +443,12 @@ apt update && apt install -y shellcheck
443443

444444
### Script requirements
445445

446-
A setup script has three constraints to write around:
446+
A setup script has four constraints to write around:
447447

448448
* **Exit zero**: if the script exits non-zero, the session fails to start. Append `|| true` to non-critical commands so an intermittent install failure doesn't block the session.
449449
* **Finish within five minutes**: keep the script's total runtime under roughly five minutes so the [environment cache](#environment-caching) can build. When setup takes longer than that, the environment isn't cached. Run independent installs in parallel with `&` and `wait`, and move any single download that won't fit into a [SessionStart hook](#setup-scripts-vs-sessionstart-hooks) that launches it in the background. If new sessions stall or fail during setup, see [New sessions hang or time out during setup](https://code.claude.com/docs/en/web-quickstart.md#new-sessions-hang-or-time-out-during-setup).
450450
* **Network access for installs**: package installs need to reach registries. The default **Trusted** level covers [common package registries](#default-allowed-domains) including npm, PyPI, RubyGems, and crates.io; with **None** network access, installs fail.
451+
* **The environment's variables aren't set yet**: the script runs before the session sets the environment's [environment variables](#set-environment-variables). Set any value the script needs in the script itself.
451452

452453
### Environment caching
453454

‎content/en/docs/claude-code/code-review-customize.md‎

Lines changed: 65 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,73 @@ Code Review includes the files when it reads `REVIEW.md` from a protected branch
123123

124124
When a review doesn't apply an included file, check each of these:
125125

126-
* **Location**: move the file to the repository root. A path into a subdirectory such as `@docs/review-rules.md` isn't included.
126+
* **Location**: move the file to the repository root. Except for a [skill file](#include-a-skill-file), a path into a subdirectory such as `@docs/review-rules.md` isn't included.
127127
* **Name**: match the file name exactly, including case, and use a name without spaces. A line whose name matches no file beside `REVIEW.md` stays in `REVIEW.md` as plain text, and the check run doesn't report it as a skipped include.
128-
* **One level**: list every file in the root `REVIEW.md`. An `@` line in an included file or in a subdirectory `REVIEW.md` stays as plain text, and a Markdown link to another file isn't an include.
128+
* **One level**: list every file in the root `REVIEW.md`. An `@` line in an included file or in a subdirectory `REVIEW.md` stays as plain text ([skill files differ](#include-a-skill-file)), and a Markdown link to another file isn't an include.
129129
* **Limits**: include at most eight different files, and keep `REVIEW.md` and the files it includes under 150,000 bytes combined. A file that would reach the byte limit is skipped whole, not cut short. The check run reports how many include lines it skipped for either limit.
130-
* **Links**: keep Markdown links at 64 or fewer across `REVIEW.md` and the files it includes. Links to `http`, `https`, or `mailto` addresses and to `#` anchors don't count. Past that limit, the review skips your whole root `REVIEW.md`, not only the included files. The check run then [says the instructions weren't applied](https://code.claude.com/docs/en/code-review-troubleshooting.md#the-check-run-mentions-review-md).
130+
* **Links**: keep Markdown links at 64 or fewer across `REVIEW.md` and the files it includes. Links to `http`, `https`, or `mailto` addresses and to `#` anchors don't count, and neither do links in a [skill file](#include-a-skill-file). Past that limit, the review skips your whole root `REVIEW.md`, not only the included files. The check run then [says the instructions weren't applied](https://code.claude.com/docs/en/code-review-troubleshooting.md#the-check-run-mentions-review-md).
131131
* **Merged copy**: merge the included file into the [branch `REVIEW.md` is read from](#which-branch-review-md-is-read-from). The review reads both from the same commit, never from the pull request's own changes.
132132

133+
### Include a skill file
134+
135+
To have reviews follow guidance you keep in a [skill](https://code.claude.com/docs/en/skills.md), include the skill's `SKILL.md` in your root `REVIEW.md`. Code Review doesn't run skills.
136+
137+
Add `@` and the path to `SKILL.md`, in the form `.claude/skills/<folder>/SKILL.md`, on a line of its own:
138+
139+
```markdown theme={null}
140+
# Review instructions
141+
142+
Report at most five Nits per review.
143+
144+
@.claude/skills/api-review/SKILL.md
145+
146+
Treat any change under `migrations/` as Important.
147+
```
148+
149+
Protect the [branch that `REVIEW.md` is read from](#which-branch-review-md-is-read-from), because Code Review includes a skill file only when it reads `REVIEW.md` from a protected branch. The skill file counts toward the limits of eight files and 150,000 bytes, and has its own limit of 30,000 bytes.
150+
151+
#### Write a skill line that Code Review includes
152+
153+
Use a folder name without spaces. A line with a space in its path stays in `REVIEW.md` as plain text, and the check run doesn't report it as a skipped include.
154+
155+
If the `@` line for a skill breaks one of the rules below, Code Review doesn't include the skill from that line:
156+
157+
* **Path**: write the path as `.claude/skills/<folder>/SKILL.md` from the repository root, with the skill's folder directly under `skills/`. Unlike a file name at the root, a path of this form that matches no file is skipped and counted.
158+
* **Source**: copy guidance from any other file under `.claude/`, or from a [bundled, personal, or plugin skill](https://code.claude.com/docs/en/skills.md#where-skills-live), into a file beside `REVIEW.md`. You can't include those directly.
159+
* **File**: commit `SKILL.md` as a regular text file. Code Review doesn't follow a symbolic link, whether the link is the file or a folder in its path.
160+
* **Size**: keep `SKILL.md` at 30,000 bytes or less, frontmatter included
161+
* **Count**: write at most eight skill lines. A repeated line counts again toward the eight.
162+
* **Blocks in `REVIEW.md`**: keep the `@` line out of code fences. Close every HTML comment and every `<pre>`, `<script>`, `<style>`, or `<textarea>` block above it.
163+
164+
When Code Review skips a skill line for breaking the File, Size, Count, or Blocks rule, the check run's [message about skipped include lines](https://code.claude.com/docs/en/code-review-troubleshooting.md#the-check-run-mentions-review-md) counts it. The message appears only when the review applies `REVIEW.md` from a protected branch.
165+
166+
#### Check what a review gets from a skill
167+
168+
When the skill is included, a review gets the body of `SKILL.md` and nothing else from the skill, so check the skill against the list below.
169+
170+
* **Frontmatter**: repeat in the body anything a review needs from the [frontmatter](https://code.claude.com/docs/en/skills.md#frontmatter-reference), for example the conditions that `description` gives for using the skill
171+
* **Injected commands**: write out what a [`!` command](https://code.claude.com/docs/en/skills#inject-dynamic-context) would supply. Code Review doesn't run the command, and replaces the whole line or block that holds it with a placeholder.
172+
* **Substitutions**: replace `$ARGUMENTS` and other [substitutions](https://code.claude.com/docs/en/skills.md#available-string-substitutions) with fixed text, because a review passes no arguments and leaves them as written
173+
* **Supporting files**: copy what a review needs into `SKILL.md`, because Code Review doesn't load scripts, linked files, or `@file` references
174+
* **Exclusions and Nit caps**: write instructions that exclude findings or cap Nits in `REVIEW.md` or a file beside it, not in the skill. Code Review doesn't accept a skill's text as the reason for either.
175+
* **Links to repository files**: state in words what a link or `@file` reference points to. The review sees the path as plain text or as a placeholder.
176+
177+
If you edit the skill's `!` commands, `$ARGUMENTS`, or links, you also change how it works in Claude Code. If your team relies on those, copy the guidance into a file beside `REVIEW.md` and include that file in place of the skill.
178+
179+
#### Characters that Code Review changes in skill text
180+
181+
Code Review changes some characters in the skill's text, so your code samples reach a review in the form below.
182+
183+
```text theme={null}
184+
In SKILL.md: Use `items[0]`, never `List<String>`.
185+
The review reads: Use ˋitems(0)ˋ, never ˋList< String>ˋ.
186+
187+
In SKILL.md: Run `ps | grep api` and ask @alice.
188+
The review reads: Run ˋps ¦ grep apiˋ and ask @ alice.
189+
```
190+
191+
Where a rule depends on one of those characters, state it in words too.
192+
133193
### Which branch REVIEW\.md is read from
134194

135195
Code Review reads `REVIEW.md` from the pull request's base branch or from the default branch, never from the pull request's own changes. To change review behavior, merge the `REVIEW.md` change first.
@@ -140,6 +200,8 @@ Keep `REVIEW.md` on your default branch and protect that branch. When a review r
140200
* Excluding paths, files, or classes of issue
141201
* Capping nit comments
142202

203+
Write exclusions and Nit caps in `REVIEW.md` or a file beside it, not in an [included skill](#include-a-skill-file).
204+
143205
#### What counts as branch protection
144206

145207
Code Review counts these settings as protection:

‎content/en/docs/claude-code/code-review-troubleshooting.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,15 @@ If the check run title says issues were found but you don't see inline review co
6767

6868
## The check run mentions REVIEW\.md
6969

70-
These are three of the messages a check run can carry about `REVIEW.md`:
70+
These are four of the messages a check run can carry about `REVIEW.md`:
7171

7272
* **"This review applied the repository's review instructions (REVIEW\.md) from its default branch, which is not protected against direct pushes."**: the review read the root file only. See [Which branch REVIEW.md is read from](https://code.claude.com/docs/en/code-review-customize.md#which-branch-review-md-is-read-from) for what protecting the branch changes.
7373
* **"were not applied to this review: branch protection could not be confirmed"**: the review read no `REVIEW.md`.
7474
* **"they link to a file this pull request modifies, or carry more links than the review checks"**: the review skipped the root `REVIEW.md`, or the number of subdirectory `REVIEW.md` files the message gives. Check the skipped file for each cause. For the root `REVIEW.md`, check the [files it includes](https://code.claude.com/docs/en/code-review-customize.md#include-other-files-in-review-md) too:
7575
* **Too many links**: it carries more than 64 Markdown links. Cut links to [64 or fewer](https://code.claude.com/docs/en/code-review-customize.md#include-other-files-in-review-md).
7676
* **A link the review can't parse**: it has a malformed Markdown link. Fix or remove the link.
7777
* **A link to a changed file**: it links to a file or folder this pull request changes, and the review couldn't leave out only the lines with that link. Write the rule in `REVIEW.md` itself.
78+
* **"include line(s) in the root REVIEW\.md were skipped on this review"**: your root `REVIEW.md` applied, but the files those lines name didn't. Check the lists under [Include other files in REVIEW.md](https://code.claude.com/docs/en/code-review-customize.md#include-other-files-in-review-md) and, for a skill, under [Include a skill file](https://code.claude.com/docs/en/code-review-customize.md#include-a-skill-file).
7879

7980
## Setup problems
8081

0 commit comments

Comments
 (0)