Adding Presets & Plugins
Adding a new preset
Section titled “Adding a new preset”1. Create a setup action
Section titled “1. Create a setup action”If the preset needs dev environment setup, create a new composite action at .github/actions/setup-<name>/action.yml:
name: Setup <Name>description: Set up <name> development environment
inputs: # your inputs here
runs: using: composite steps: # your setup steps2. Update presets.json
Section titled “2. Update presets.json”Add the new preset to presets.json at the repo root:
{ "mypreset": { "setup_action": "setup-mypreset", "plugins": [ "common@buck-bronson", "mypreset@buck-bronson" ], "secrets": { "sourcegraph-token": "SOURCEGRAPH_TOKEN", "rollbar-token": "ROLLBAR_TOKEN" } }}Set setup_action to null if no dev environment setup is needed.
3. Add detection logic
Section titled “3. Add detection logic”Update cli/src/detect.rs to detect the new project type by checking for a marker file.
4. Update the CLI preset enum
Section titled “4. Update the CLI preset enum”Add the new preset to the Preset enum in cli/src/preset.rs.
5. Add conditional setup in shared workflows
Section titled “5. Add conditional setup in shared workflows”Update the shared workflows (.github/workflows/bucky-dispatch.yml, etc.) to add a conditional step for the new setup action:
- name: Setup mypreset if: steps.preset.outputs.setup-action == 'setup-mypreset' uses: fetch-rewards/buck-bronson/.github/actions/setup-mypreset@v1 with: # inputs6. Update documentation
Section titled “6. Update documentation”- Update
CLAUDE.mdwith the new preset details - Update
README.mdpresets table - Update the Presets docs page
Adding a new plugin
Section titled “Adding a new plugin”1. Create the plugin directory
Section titled “1. Create the plugin directory”plugins/<name>/├── .claude-plugin/│ └── plugin.json├── .mcp.json└── README.md2. Write plugin.json
Section titled “2. Write plugin.json”{ "name": "<name>", "version": "1.0.0", "description": "Description of what this plugin provides"}3. Configure MCP servers in .mcp.json
Section titled “3. Configure MCP servers in .mcp.json”{ "mcpServers": { "server-name": { "command": "npx", "args": ["-y", "@some/mcp-server"], "env": { "API_TOKEN": "{{SOME_TOKEN}}" } } }}4. Add to presets
Section titled “4. Add to presets”Update presets.json to include the new plugin in the relevant preset(s):
{ "web": { "plugins": [ "common@buck-bronson", "web@buck-bronson", "myPlugin@buck-bronson" ] }}5. Add secrets if needed
Section titled “5. Add secrets if needed”If the plugin requires secrets:
- Add the secret mapping to the preset in
presets.json - Document the new secret in Configuring Secrets
- Add the secret injection in the shared workflows
6. Update documentation
Section titled “6. Update documentation”- Update
CLAUDE.mdwith the new plugin details - Update
README.mdplugins table - Update the Plugins docs page