-
Notifications
You must be signed in to change notification settings - Fork 13
HOLD - Add Claude Code Plugin setup page #515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
samgutentag
wants to merge
6
commits into
main
Choose a base branch
from
samgutentag/claude-code-plugin-setup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+75
−1
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b244ae8
Add Claude Code Plugin setup page
samgutentag 937cc3a
Fix cross-links to use relative paths instead of absolute URLs
samgutentag 4bcc82e
Merge branch 'main' into samgutentag/claude-code-plugin-setup
samgutentag d1ec555
Update flaky-tests/use-mcp-server/configuration/claude-code-plugin.md
samgutentag 0fc7102
Update flaky-tests/use-mcp-server/configuration/claude-code-plugin.md
samgutentag fed036f
Update flaky-tests/use-mcp-server/configuration/claude-code-plugin.md
samgutentag File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| # Configuration | ||
|
|
||
| <table data-view="cards"><thead><tr><th align="center"></th><th data-hidden data-card-cover data-type="image">Cover image</th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td align="center"><strong>Claude Code</strong></td><td><a href="../../../../.gitbook/assets/claude.png">claude.png</a></td><td><a href="claude-code-cli.md">claude-code-cli.md</a></td></tr><tr><td align="center"><strong>Cursor</strong></td><td><a href="../../../../.gitbook/assets/cursor.png">cursor.png</a></td><td><a href="cursor-ide.md">cursor-ide.md</a></td></tr><tr><td align="center"><strong>GitHub Copilot</strong></td><td><a href="../../../../.gitbook/assets/github copilot.png">github copilot.png</a></td><td><a href="github-copilot-ide.md">github-copilot-ide.md</a></td></tr><tr><td align="center"><strong>Gemini</strong></td><td><a href="../../../../.gitbook/assets/gemini.png">gemini.png</a></td><td><a href="gemini-cli.md">gemini-cli.md</a></td></tr></tbody></table> | ||
| <table data-view="cards"><thead><tr><th align="center"></th><th data-hidden data-card-cover data-type="image">Cover image</th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td align="center"><strong>Claude Code</strong></td><td><a href="../../../../.gitbook/assets/claude.png">claude.png</a></td><td><a href="claude-code-cli.md">claude-code-cli.md</a></td></tr><tr><td align="center"><strong>Claude Code Plugin</strong></td><td><a href="../../../../.gitbook/assets/claude.png">claude.png</a></td><td><a href="claude-code-plugin.md">claude-code-plugin.md</a></td></tr><tr><td align="center"><strong>Cursor</strong></td><td><a href="../../../../.gitbook/assets/cursor.png">cursor.png</a></td><td><a href="cursor-ide.md">cursor-ide.md</a></td></tr><tr><td align="center"><strong>GitHub Copilot</strong></td><td><a href="../../../../.gitbook/assets/github copilot.png">github copilot.png</a></td><td><a href="github-copilot-ide.md">github-copilot-ide.md</a></td></tr><tr><td align="center"><strong>Gemini</strong></td><td><a href="../../../../.gitbook/assets/gemini.png">gemini.png</a></td><td><a href="gemini-cli.md">gemini-cli.md</a></td></tr></tbody></table> |
73 changes: 73 additions & 0 deletions
73
flaky-tests/use-mcp-server/configuration/claude-code-plugin.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| --- | ||
| description: Install the Trunk plugin for Claude Code | ||
| --- | ||
|
|
||
| # Claude Code Plugin | ||
|
|
||
| The Trunk plugin for Claude Code bundles the MCP server connection, slash commands, and skills into a single install. This is the recommended way to connect Trunk to Claude Code. | ||
|
|
||
| ## Install the Plugin | ||
|
|
||
| ```bash | ||
| /plugin install trunk@https://github.com/trunk-io/claude-code-plugin | ||
| ``` | ||
|
|
||
| This adds the Trunk MCP server and gives you access to slash commands and skills that activate automatically. | ||
|
|
||
| You can also install directly from the repo without waiting for directory approval: | ||
|
|
||
| ## Authentication | ||
|
|
||
| After installing, Claude Code will prompt you to authenticate with Trunk on first use. | ||
|
|
||
| 1. Run any Trunk command (e.g., `/trunk:fix-flaky`) or trigger an MCP tool call | ||
| 2. Claude Code will open a browser window for OAuth login | ||
| 3. Log in with your Trunk account and authorize the connection | ||
| 4. You'll see `Authentication successful. Connected to trunk.` back in the terminal | ||
|
|
||
| ## Slash Commands | ||
|
|
||
| | Command | What it does | | ||
| |---|---| | ||
| | `/trunk:fix-flaky <test_name>` | Retrieves root cause analysis for a flaky test and offers to apply the fix | | ||
| | `/trunk:why-flaky <test_name>` | Explains why a test is flaky without making changes — good for triage | | ||
| | `/trunk:setup-uploads` | Detects your test framework and CI provider, then generates the upload configuration | | ||
|
|
||
| ### Fix a flaky test | ||
|
|
||
| ``` | ||
| /trunk:fix-flaky test_user_login | ||
| ``` | ||
|
|
||
| Trunk analyzes the test, explains the root cause (race condition, shared state, time dependency, etc.), and shows a proposed fix with a diff. Say yes to apply the changes directly. | ||
|
|
||
| ### Understand why a test is flaky | ||
|
|
||
| ``` | ||
| /trunk:why-flaky test_payment_processing | ||
| ``` | ||
|
|
||
| Same analysis as `fix-flaky`, but read-only. Useful when you want to understand the problem before deciding how to handle it — especially for tests you didn't write. | ||
|
|
||
| ### Set up test uploads | ||
|
|
||
| ``` | ||
| /trunk:setup-uploads | ||
| ``` | ||
|
|
||
| Walks through configuring your repo to upload test results to Trunk. The plugin detects your CI provider and test framework automatically, then generates ready-to-paste config snippets. | ||
|
|
||
| ## Skills | ||
|
|
||
| The plugin includes two skills that activate automatically based on context: | ||
|
|
||
| **Flaky test patterns** — activates when you're debugging or writing tests. Provides common flaky test patterns and proven fixes so Claude Code can reference them without you asking. | ||
|
|
||
| **Trunk CI setup** — activates when you're editing CI configuration files (`.github/workflows/`, `.circleci/config.yml`, etc.). Provides best practices for test upload configuration. | ||
|
|
||
| ## Also Available For | ||
|
|
||
| - [Cursor](cursor-ide.md) (one-click install) | ||
| - [GitHub Copilot](github-copilot-ide.md) (one-click install) | ||
| - [Gemini CLI](gemini-cli.md) | ||
| - [Any MCP client](https://github.com/trunk-io/mcp-server) — manual configuration | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Say yes" is more casual than the rest of the document's tone. Consider something like: