<feed xmlns='http://www.w3.org/2005/Atom'>
<title>claude-plugins-official.git/plugins/security-guidance/hooks/diffstate.py, branch fix/theme-examples-command-description</title>
<subtitle>Official Claude Code plugin directory
</subtitle>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/'/>
<entry>
<title>Merge pull request #7093 from anthropics/mhegazy/sg-ordinary-checkouts</title>
<updated>2026-11-13T00:10:24+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>8000722+mhegazy@users.noreply.github.com</email>
</author>
<published>2026-11-13T00:10:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=ca69627d20f9c42ae6d10ae2aee8f3226d9e2e02'/>
<id>ca69627d20f9c42ae6d10ae2aee8f3226d9e2e02</id>
<content type='text'>
security-guidance: only run git in ordinary checkouts</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
security-guidance: only run git in ordinary checkouts</pre>
</div>
</content>
</entry>
<entry>
<title>Keep git out of folders without a .git entry on older git versions</title>
<updated>2026-11-12T22:18:36+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-11-12T22:18:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=141a7256071c54e00afaee4c9f6455ed745be841'/>
<id>141a7256071c54e00afaee4c9f6455ed745be841</id>
<content type='text'>
Git before 2.38 has no safe.bareRepository. Check before the prompt and
Stop hooks run git, following the same search git uses to find a
repository, and let a work tree kept elsewhere through core.worktree
through.

Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Git before 2.38 has no safe.bareRepository. Check before the prompt and
Stop hooks run git, following the same search git uses to find a
repository, and let a work tree kept elsewhere through core.worktree
through.

Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: open the review records and markers through one helper</title>
<updated>2026-11-12T15:01:04+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-11-12T15:01:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=052eeb00464b9db2079325ae538356c49494fb1b'/>
<id>052eeb00464b9db2079325ae538356c49494fb1b</id>
<content type='text'>
The commit and push reviews keep two small records (sg-reviewed-shas,
sg-reviewed-diffs) and one marker per commit under review
(sg-inflight-&lt;sha&gt;) in the git directory.

The plugin should only read and write files it made itself; the session
state file is already written in a similar way. All three are now opened
through one helper, which takes a regular file with no second hard link that
is no larger than a record can be. Anything else at that path is replaced by
a new file when the record is about to be written, and passed over when it
is only read. A folder is left alone. The open never waits, and reads from a
record are capped. Anything old at a marker's path that is not such a file,
other than a folder, is removed without being opened.

Three more fixes on the same lines:

- sg-reviewed-shas was locked with a blocking flock just before the findings
  go out, so the findings waited for the lock, up to the hook's timeout. The
  hook now waits half a second and then appends without the lock, as it does
  where there is no flock.
- Bytes in that record that are not text ended the push review with a
  traceback. They now cost only their own row.
- The rewritten record was still in the buffer when the lock was released, so
  rows written by several sessions at once were lost. It is flushed first.

Cost: in a repository copied with hard links (cp -al) the records have two
names, so neither copy reads them. The first copy to write starts them
afresh, and commits reviewed before the copy may be reviewed once more.

Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The commit and push reviews keep two small records (sg-reviewed-shas,
sg-reviewed-diffs) and one marker per commit under review
(sg-inflight-&lt;sha&gt;) in the git directory.

The plugin should only read and write files it made itself; the session
state file is already written in a similar way. All three are now opened
through one helper, which takes a regular file with no second hard link that
is no larger than a record can be. Anything else at that path is replaced by
a new file when the record is about to be written, and passed over when it
is only read. A folder is left alone. The open never waits, and reads from a
record are capped. Anything old at a marker's path that is not such a file,
other than a folder, is removed without being opened.

Three more fixes on the same lines:

- sg-reviewed-shas was locked with a blocking flock just before the findings
  go out, so the findings waited for the lock, up to the hook's timeout. The
  hook now waits half a second and then appends without the lock, as it does
  where there is no flock.
- Bytes in that record that are not text ended the push review with a
  traceback. They now cost only their own row.
- The rewritten record was still in the buffer when the lock was released, so
  rows written by several sessions at once were lost. It is flushed first.

Cost: in a repository copied with hard links (cp -al) the records have two
names, so neither copy reads them. The first copy to write starts them
afresh, and commits reviewed before the copy may be reviewed once more.

Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #7076 from anthropics/mhegazy/sg-powershell-commit-hooks</title>
<updated>2026-11-11T19:40:25+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>8000722+mhegazy@users.noreply.github.com</email>
</author>
<published>2026-11-11T19:40:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=acf6cc517bb9c83e992da0a057d07f31024920d2'/>
<id>acf6cc517bb9c83e992da0a057d07f31024920d2</id>
<content type='text'>
security-guidance: review commits and pushes made through the PowerShell tool</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
security-guidance: review commits and pushes made through the PowerShell tool</pre>
</div>
</content>
</entry>
<entry>
<title>Read more PowerShell command shapes</title>
<updated>2026-11-10T17:42:13+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-11-10T17:42:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=10f38ff12baced30013d482a9520373a0067b5c8'/>
<id>10f38ff12baced30013d482a9520373a0067b5c8</id>
<content type='text'>
Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: pack the custom rule counts into one telemetry key</title>
<updated>2026-11-10T02:52:01+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-11-10T02:52:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=fa2face5178e7c20f8d0195728056d8bdad82c2f'/>
<id>fa2face5178e7c20f8d0195728056d8bdad82c2f</id>
<content type='text'>
Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge main</title>
<updated>2026-11-09T23:02:54+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-11-09T23:02:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=252ccd72713b8967f4bdd213665ee1122ca9ac77'/>
<id>252ccd72713b8967f4bdd213665ee1122ca9ac77</id>
<content type='text'>
Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #7033 from anthropics/mhegazy/sg-unseen-commit-count</title>
<updated>2026-11-09T22:59:32+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>8000722+mhegazy@users.noreply.github.com</email>
</author>
<published>2026-11-09T22:59:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=ea686bae367e20a4092b2fd4327ffd299bb60f24'/>
<id>ea686bae367e20a4092b2fd4327ffd299bb60f24</id>
<content type='text'>
security-guidance: count commits that no commit hook saw</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
security-guidance: count commits that no commit hook saw</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: keep an incomplete edit record incomplete for the whole turn</title>
<updated>2026-11-07T02:01:32+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-11-07T02:01:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=a8fa1532035ddf875c8594dd4407cbe38ffbe99a'/>
<id>a8fa1532035ddf875c8594dd4407cbe38ffbe99a</id>
<content type='text'>
A record lost before one Stop was treated as whole by the next, and a prompt
that was never stored as having no edits, so the note could name the
session's own file. File names in the note are quoted as JSON.

Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A record lost before one Stop was treated as whole by the next, and a prompt
that was never stored as having no edits, so the note could name the
session's own file. File names in the note are quoted as JSON.

Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>security-guidance: count commits that no commit hook saw</title>
<updated>2026-11-07T02:01:31+00:00</updated>
<author>
<name>Mohamed Hegazy</name>
<email>mhegazy@anthropic.com</email>
</author>
<published>2026-11-07T02:01:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=5d1c0f596415311a60adc55d0c0fa1d5f4ac27d8'/>
<id>5d1c0f596415311a60adc55d0c0fa1d5f4ac27d8</id>
<content type='text'>
A commit review starts from a hook on the Bash tool, so a commit made any
other way starts none. The Stop row now carries turn_commits: how many
commits the turn made, how many have no review, and how many of those no
commit hook saw. Count only; what is reviewed does not change, and no hook
entry is added.

Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A commit review starts from a hook on the Bash tool, so a commit made any
other way starts none. The Stop row now carries turn_commits: how many
commits the turn made, how many have no review, and how many of those no
commit hook saw. Count only; what is reviewed does not change, and no hook
entry is added.

Co-authored-by: mhegazy &lt;mhegazy@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
