Skip to content

docs: surface Claude Code plugin#286

Merged
peaktwilight merged 1 commit intomainfrom
docs/claude-code-plugin-readme
May 2, 2026
Merged

docs: surface Claude Code plugin#286
peaktwilight merged 1 commit intomainfrom
docs/claude-code-plugin-readme

Conversation

@peaktwilight
Copy link
Copy Markdown
Collaborator

@peaktwilight peaktwilight commented May 2, 2026

Summary

  • Mention the Claude Code plugin directly in the README install/editor section.
  • Rewrite the Claude Code integration doc around the shipped plugin instead of the old pre-commit-only hook guidance.
  • Link publishing/distribution work to Publish Claude Code plugin #285.

Verification

  • git diff --check

Refs #285

Summary by CodeRabbit

  • Documentation
    • Added Claude Code plugin integration guide with setup instructions
    • Updated integration documentation to describe automatic post-edit scanning behavior and exit-code handling
    • Documented plugin-scoped scanning, auditing, and security analysis capabilities

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 2, 2026

📝 Walkthrough

Walkthrough

This PR updates the README and documentation to describe integrating foxguard via a Claude Code plugin (plugins/claude-code) that runs automatically during agent sessions, replacing prior guidance on PreCommit hook configuration. The changes explain the plugin's hook behavior, available /foxguard:* skills, and local installation steps.

Changes

Claude Code Plugin Integration Documentation

Layer / File(s) Summary
Overview & Announcement
README.md (lines 113–122)
README's "Editors and agents" section introduces the Claude Code plugin with a setup command (claude --plugin-dir ./plugins/claude-code) and link to integration documentation.
Integration Concept
docs/claude-code-integration.md (lines 1–11)
Documentation overview explains that the plugin runs during agent sessions, provides session preamble coverage, and namespaces tools/skills under /foxguard:*.
Local Installation
docs/claude-code-integration.md (lines 12–35)
Describes the three-step local install workflow: install foxguard, load plugin via claude --plugin-dir ./plugins/claude-code, and run /foxguard:setup to verify configuration.
Plugin Hook Behavior
docs/claude-code-integration.md (lines 36–53)
Documents how the plugin reads Claude Code hook JSON from stdin, extracts tool_input.file_path, invokes foxguard --format json, returns exit code 2 for findings, and allows severity tuning via FOXGUARD_HOOK_SEVERITY.
Available Skills & Workflow Patterns
docs/claude-code-integration.md (lines 54–80)
Lists namespaced /foxguard:* skills (setup, scan, diff-scan, audit, secrets, triage), documents a model-invoked secure-coding skill for remediation, and reframes pre-commit composition using foxguard init or CLI patterns.
Distribution & Status
docs/claude-code-integration.md (lines 81–85), README.md (line 144)
Documents local plugin loading and marketplace publishing roadmap; updates CI integration guidance to reference the new plugin documentation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

  • Publish Claude Code plugin #285: The PR directly addresses publishing the Claude Code plugin and providing local-install instructions plus a publishing-status checklist for marketplace distribution.

Possibly related PRs

Poem

🐰 A plugin for Claude takes flight,
Agent sessions, now guarded tight,
/foxguard skills in namespaced grace,
Secure code runs its steady pace,
Local install, then scan with might! 🛡️

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: surface Claude Code plugin' directly and accurately reflects the main changes: updating documentation to highlight the Claude Code plugin as the primary integration method.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/claude-code-plugin-readme

Review rate limit: 9/10 reviews remaining, refill in 6 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/claude-code-integration.md`:
- Around line 40-42: Update the example and surrounding text to show that the
hook severity is controlled by the FOXGUARD_HOOK_SEVERITY environment variable
(defaulting to "medium") rather than a fixed flag; replace the hard-coded
command example `foxguard --format json --severity medium <edited-file>` with
one that indicates the env override (e.g.
`FOXGUARD_HOOK_SEVERITY=${FOXGUARD_HOOK_SEVERITY:-medium} foxguard --format json
<edited-file>`) and add a short note stating "uses FOXGUARD_HOOK_SEVERITY
(default: medium)". Ensure you reference the env var name FOXGUARD_HOOK_SEVERITY
in the explanatory sentence so readers understand runtime behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6788e094-682a-49c5-9ef7-4f1f4a809282

📥 Commits

Reviewing files that changed from the base of the PR and between 0cbaa69 and ca4a049.

📒 Files selected for processing (2)
  • README.md
  • docs/claude-code-integration.md

Comment on lines +40 to 42
```sh
foxguard --format json --severity medium <edited-file>
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Document the effective hook command with env override.

Line 40–Line 42 currently implies a fixed medium threshold, but the hook actually uses FOXGUARD_HOOK_SEVERITY (defaulting to medium). Please reflect that so operators don’t misread runtime behavior.

Suggested doc tweak
-foxguard --format json --severity medium <edited-file>
+foxguard --format json --severity "${FOXGUARD_HOOK_SEVERITY:-medium}" <edited-file>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```sh
foxguard --format json --severity medium <edited-file>
```
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/claude-code-integration.md` around lines 40 - 42, Update the example and
surrounding text to show that the hook severity is controlled by the
FOXGUARD_HOOK_SEVERITY environment variable (defaulting to "medium") rather than
a fixed flag; replace the hard-coded command example `foxguard --format json
--severity medium <edited-file>` with one that indicates the env override (e.g.
`FOXGUARD_HOOK_SEVERITY=${FOXGUARD_HOOK_SEVERITY:-medium} foxguard --format json
<edited-file>`) and add a short note stating "uses FOXGUARD_HOOK_SEVERITY
(default: medium)". Ensure you reference the env var name FOXGUARD_HOOK_SEVERITY
in the explanatory sentence so readers understand runtime behavior.

@peaktwilight peaktwilight merged commit 981de86 into main May 2, 2026
17 checks passed
@peaktwilight peaktwilight deleted the docs/claude-code-plugin-readme branch May 2, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant