Skip to content

feat(claude): add safety-net plugin from cc-marketplace - #512

Merged
shunkakinoki merged 2 commits into
mainfrom
feat/add-safety-net-plugin
Jan 7, 2026
Merged

feat(claude): add safety-net plugin from cc-marketplace#512
shunkakinoki merged 2 commits into
mainfrom
feat/add-safety-net-plugin

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Jan 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add safety-net@cc-marketplace plugin to Claude Code configuration
  • Add known_marketplaces.json to manage custom marketplace registry via Nix
  • The safety-net plugin prevents destructive git and filesystem commands during development

Test plan

  • Run make switch to apply configuration
  • Restart Claude Code to load the plugin
  • Verify safety-net plugin is active

🤖 Generated with Claude Code


Summary by cubic

Enable the safety-net plugin in Claude Code to block destructive git and filesystem actions during development. Adds a Nix-managed custom marketplace registry to source the plugin from cc-marketplace.

  • New Features

    • Enable safety-net@cc-marketplace in settings.json.
    • Add known_marketplaces.json and link it via default.nix to merge custom registries.
  • Migration

    • Run make switch to apply changes.
    • Restart Claude Code to load the plugin.

Written for commit 2d5da24. Summary will update on new commits.

- Add safety-net@cc-marketplace to enabled plugins
- Add known_marketplaces.json with cc-marketplace registry
- Configure Nix to manage marketplace configuration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 7, 2026 12:43
@coderabbitai

coderabbitai Bot commented Jan 7, 2026

Copy link
Copy Markdown
📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added support for known marketplaces in Claude configuration with four pre-configured sources, including official repository sources and community marketplace integrations.
    • Enabled safety-net plugin from cc-marketplace for extended capabilities.
  • Chores

    • Updated Claude plugin configuration and home settings files to support new marketplace sources and plugin entitlements.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

This PR introduces Claude plugin marketplace configuration by adding a new known_marketplaces.json file defining four plugin sources, exporting it via Nix configuration, and enabling a new marketplace plugin in Claude's settings.

Changes

Cohort / File(s) Summary
Plugin Marketplace Infrastructure
config/claude/default.nix, config/claude/known_marketplaces.json
Adds a new Nix home.file entry exporting .claude/plugins/known_marketplaces.json. Defines four marketplace sources: claude-code-plugins (git), claude-plugins-official (GitHub), anthropic-agent-skills (GitHub), and cc-marketplace (git).
Plugin Enablement
config/claude/settings.json
Enables "safety-net@cc-marketplace" plugin in the enabledPlugins list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 Hop, hop, hooray! New marketplaces arrive,
Four sources spring forth where Claude plugins thrive,
Safety-net stands ready in cc-marketplace's keep,
Configuration complete, our plugin dreams run deep! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly describes the main change: adding the safety-net plugin from cc-marketplace to Claude configuration.
Description check ✅ Passed The PR description comprehensively explains the changes, including adding the safety-net plugin, the known_marketplaces.json file, and provides a clear test plan.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/add-safety-net-plugin

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @shunkakinoki, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request integrates the safety-net plugin into the Claude Code environment, a crucial step towards enhancing developer safety. The plugin is designed to prevent destructive git and filesystem commands, thereby mitigating risks during development. This integration is facilitated by introducing a new mechanism for managing custom plugin marketplaces through a known_marketplaces.json file, which is configured via Nix.

Highlights

  • Safety-Net Plugin Integration: The safety-net@cc-marketplace plugin has been added to the Claude Code configuration to prevent destructive git and filesystem commands during development.
  • Custom Marketplace Management: A new file, known_marketplaces.json, has been introduced to manage custom plugin registries via Nix, allowing for flexible marketplace definitions.
  • Enhanced Development Safety: The primary goal of this change is to enhance developer safety by actively blocking potentially harmful operations, ensuring a more secure development environment.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@mesa-dot-dev

mesa-dot-dev Bot commented Jan 7, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Added the safety-net plugin from cc-marketplace to Claude Code, which prevents destructive git and filesystem commands.

What changed?

  • config/claude/default.nix: Introduced a new home file configuration for ".claude/plugins/known_marketplaces.json", enabling custom plugin marketplace definitions for Claude Code.
  • config/claude/known_marketplaces.json: A new configuration file, known_marketplaces.json, has been added to define various marketplaces, such as "claude-code-plugins" and "anthropic-agent-skills", along with their corresponding Git/GitHub source URLs.
  • config/claude/settings.json: The settings.json file was updated to include a new plugin entry for "safety-net@cc-marketplace" and corrected the JSON formatting by adding a comma after the preceding plugin entry.

Description generated by Mesa. Update settings

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds the safety-net plugin from a custom marketplace to the Claude Code configuration. The changes are well-structured, introducing a known_marketplaces.json file managed by Nix to define the custom marketplace, and then enabling the plugin in settings.json. This is a good approach for managing custom plugins. I have one suggestion to improve the consistency of the marketplace definitions.

Comment on lines +21 to +24
"source": {
"source": "git",
"url": "https://github.com/kenryu42/cc-marketplace.git"
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

For consistency with other marketplace definitions in this file, such as claude-plugins-official and anthropic-agent-skills, consider using the github source type instead of git. This would make the configuration more uniform and easier to read. The github source type is likely a shorthand for public GitHub repositories and should work for this marketplace as well.

Suggested change
"source": {
"source": "git",
"url": "https://github.com/kenryu42/cc-marketplace.git"
}
"source": {
"source": "github",
"repo": "kenryu42/cc-marketplace"
}

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 3 files

@mesa-dot-dev mesa-dot-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Performed full review of 9d4a240...61d894d

Analysis

  1. Supply Chain Security Risk: The PR introduces a third-party marketplace (cc-marketplace from github.com/kenryu42) without proper security vetting, verification of the maintainer's trustworthiness, or documentation explaining why this external source is necessary.

  2. Non-Deterministic Configuration: The git URL references a default branch without pinning to a specific commit or tag, violating Nix's deterministic build philosophy and potentially pulling different plugin versions at different times.

  3. Redundant Configuration: The known_marketplaces.json file duplicates built-in marketplace definitions that are already provided by Claude Code, creating unnecessary maintenance overhead and potential for configuration drift.

Tip

Help

Slash Commands:

  • /review - Request a full code review
  • /review latest - Review only changes since the last review
  • /describe - Generate PR description. This will update the PR body or issue comment depending on your configuration
  • /help - Get help with Mesa commands and configuration options

0 files reviewed | 2 comments | Edit Agent SettingsRead Docs

@@ -0,0 +1,26 @@
{
"claude-code-plugins": {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Medium

This file appears to duplicate built-in marketplace definitions. Lines 2-19 define 'claude-code-plugins', 'claude-plugins-official', and 'anthropic-agent-skills' which are likely already known to Claude Code internally. According to the comment in default.nix (line 27), Claude Code 'will merge with built-in ones', suggesting these duplicated definitions may be unnecessary. Consider removing the built-in marketplace definitions and only defining the custom 'cc-marketplace' to reduce maintenance burden and potential for configuration drift.

Agent: 🏛 Architecture • Fix in Cursor • Fix in Claude

Prompt for Agent
Task: Address review feedback left on GitHub.
Repository: shunkakinoki/dotfiles#512
File: config/claude/known_marketplaces.json#L2
Action: Open this file location in your editor, inspect the highlighted code, and resolve the issue described below.

Feedback:
This file appears to duplicate built-in marketplace definitions. Lines 2-19 define 'claude-code-plugins', 'claude-plugins-official', and 'anthropic-agent-skills' which are likely already known to Claude Code internally. According to the comment in default.nix (line 27), Claude Code 'will merge with built-in ones', suggesting these duplicated definitions may be unnecessary. Consider removing the built-in marketplace definitions and only defining the custom 'cc-marketplace' to reduce maintenance burden and potential for configuration drift.

},
"cc-marketplace": {
"source": {
"source": "git",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Medium

The git URL for cc-marketplace should be pinned to a specific commit SHA or tag for reproducibility and security. Using the default branch means the plugin behavior could change unexpectedly between builds. Consider using a format like: "url": "https://github.com/kenryu42/cc-marketplace.git", "ref": "" to ensure deterministic builds, which aligns with Nix philosophy.

Agent: 🏛 Architecture • Fix in Cursor • Fix in Claude

Prompt for Agent
Task: Address review feedback left on GitHub.
Repository: shunkakinoki/dotfiles#512
File: config/claude/known_marketplaces.json#L22
Action: Open this file location in your editor, inspect the highlighted code, and resolve the issue described below.

Feedback:
The git URL for cc-marketplace should be pinned to a specific commit SHA or tag for reproducibility and security. Using the default branch means the plugin behavior could change unexpectedly between builds. Consider using a format like: "url": "https://github.com/kenryu42/cc-marketplace.git", "ref": "<commit-sha>" to ensure deterministic builds, which aligns with Nix philosophy.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds the safety-net plugin from the custom cc-marketplace to the Claude Code configuration to prevent destructive git and filesystem commands during development.

  • Enables the safety-net@cc-marketplace plugin in Claude settings
  • Creates a known_marketplaces.json file to register the cc-marketplace custom plugin source
  • Configures Nix to deploy the marketplace registry file to the Claude plugins directory

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
config/claude/settings.json Adds the safety-net plugin from cc-marketplace to the enabled plugins list
config/claude/known_marketplaces.json Defines the cc-marketplace plugin source along with other known marketplaces (claude-code-plugins, claude-plugins-official, anthropic-agent-skills)
config/claude/default.nix Configures Nix home-manager to deploy the known_marketplaces.json file to ~/.claude/plugins/

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
config/claude/known_marketplaces.json (2)

1-26: Add ES5 trailing commas for consistency.

Per coding guidelines, JSON files should use ES5 trailing commas. Add trailing commas after lines 6, 12, 18, and 24.

♻️ Proposed fix
 {
   "claude-code-plugins": {
     "source": {
       "source": "git",
       "url": "https://github.com/anthropics/claude-code.git"
     }
-  },
+  },
   "claude-plugins-official": {
     "source": {
       "source": "github",
       "repo": "anthropics/claude-plugins-official"
     }
-  },
+  },
   "anthropic-agent-skills": {
     "source": {
       "source": "github",
       "repo": "anthropics/skills"
     }
-  },
+  },
   "cc-marketplace": {
     "source": {
       "source": "git",
       "url": "https://github.com/kenryu42/cc-marketplace.git"
     }
-  }
+  }
 }

1-26: Consider sorting marketplace keys alphabetically.

For improved maintainability, the coding guidelines recommend alphabetically sorting keys in configuration files. The current order is: claude-code-plugins, claude-plugins-official, anthropic-agent-skills, cc-marketplace. Alphabetically, they should be: anthropic-agent-skills, cc-marketplace, claude-code-plugins, claude-plugins-official.

config/claude/default.nix (2)

27-29: Add documentation for the marketplace configuration.

Per learnings, complex Nix configurations should be documented with comments. Add a comment explaining the purpose of the known_marketplaces.json configuration and its relationship to the safety-net plugin.

Based on learnings, document all major changes in Nix configurations.

📝 Proposed fix
+  # Claude plugin marketplace configuration
+  # Defines known plugin sources including cc-marketplace for safety-net plugin
   home.file.".claude/plugins/known_marketplaces.json" = {
     source = ./known_marketplaces.json;
   };

27-29: Consider sorting home.file entries alphabetically.

Per coding guidelines, attribute sets in Nix files should be sorted alphabetically. The new .claude/plugins/known_marketplaces.json entry should be placed before .claude/pushover.sh to maintain alphabetical order.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9d4a240 and 2d5da24.

📒 Files selected for processing (3)
  • config/claude/default.nix
  • config/claude/known_marketplaces.json
  • config/claude/settings.json
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{js,ts,jsx,tsx,json}

📄 CodeRabbit inference engine (CLAUDE.md)

Use Biome with 2-space indentation, 80-character line width, double quotes, and trailing commas (ES5) for JSON/JavaScript/TypeScript files

Files:

  • config/claude/settings.json
  • config/claude/known_marketplaces.json
**/*.{json,yaml,yml,toml}

📄 CodeRabbit inference engine (.cursor/rules/formatting.mdc)

**/*.{json,yaml,yml,toml}: Use consistent indentation (2 spaces) in configuration files
Sort keys alphabetically when possible in configuration files
Use clear, descriptive names in configuration files

Files:

  • config/claude/settings.json
  • config/claude/known_marketplaces.json
**/*.{js,jsx,ts,tsx,json}

📄 CodeRabbit inference engine (.cursor/rules/formatting.mdc)

**/*.{js,jsx,ts,tsx,json}: Format JavaScript/TypeScript/JSON files using Biome with 2-space indentation and 80 character line width
Enable Biome linter with recommended rules for JavaScript/TypeScript/JSON files

Files:

  • config/claude/settings.json
  • config/claude/known_marketplaces.json
**/*.{js,jsx,ts,tsx,json,jsonc,md}

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Use Biome for code formatting as configured in biome.json

Files:

  • config/claude/settings.json
  • config/claude/known_marketplaces.json
**/*.nix

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.nix: Use nixfmt for formatting all Nix files
Document complex configurations with comments in Nix files

**/*.nix: Use 2 spaces for indentation in Nix files
Keep line length under 100 characters in Nix files
Sort attribute sets alphabetically in Nix files
Use consistent spacing around operators in Nix files
Format lists and sets consistently in Nix files

Use treefmt.toml for formatting Nix files

**/*.nix: Use mkOption for configurable options in Nix modules
Implement proper typing for all options in Nix modules
Follow the Nix expression language style guide

Files:

  • config/claude/default.nix
**/default.nix

📄 CodeRabbit inference engine (CLAUDE.md)

Use default.nix files for module exports

Files:

  • config/claude/default.nix
🧠 Learnings (3)
📚 Learning: 2025-11-25T09:34:40.062Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-11-25T09:34:40.062Z
Learning: Document all major changes in Nix configurations

Applied to files:

  • config/claude/default.nix
📚 Learning: 2025-11-25T09:34:55.014Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/home-manager.mdc:0-0
Timestamp: 2025-11-25T09:34:55.014Z
Learning: Applies to home-manager/**/*.nix : Document all configuration options in Nix modules and programs

Applied to files:

  • config/claude/default.nix
📚 Learning: 2025-11-25T09:34:23.224Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T09:34:23.224Z
Learning: Applies to **/*.nix : Document complex configurations with comments in Nix files

Applied to files:

  • config/claude/default.nix
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: shell-test
  • GitHub Check: shell-lint
  • GitHub Check: lua-neovim-test
  • GitHub Check: lua-hammerspoon
  • GitHub Check: lua-neovim
  • GitHub Check: e2e-run (NixOS, ubuntu-latest)
  • GitHub Check: e2e-run (Ubuntu, ubuntu-latest)
  • GitHub Check: e2e-run (MacOS, macos-latest)
  • GitHub Check: docker-build-push (linux/amd64, amd64, ubuntu-latest)
  • GitHub Check: docker-build-push (linux/arm64, arm64, ubuntu-24.04-arm)
  • GitHub Check: nix-nixos
  • GitHub Check: nix-linux
  • GitHub Check: nix-darwin
🔇 Additional comments (2)
config/claude/settings.json (1)

12-13: LGTM with verification needed.

The safety-net plugin is correctly added to the enabledPlugins list with proper formatting and alphabetical ordering. The trailing comma on line 12 correctly follows ES5 conventions.

However, verify that the safety-net plugin provides the intended protection against destructive git and filesystem commands, and that it works in conjunction with the existing permissions deny list (lines 79-86).

config/claude/known_marketplaces.json (1)

20-25: Repository is accessible and properly configured.

The cc-marketplace repository (https://github.com/kenryu42/cc-marketplace.git) is publicly accessible (HTTP 200), and the safety-net plugin is correctly referenced in config/claude/settings.json as "safety-net@cc-marketplace": true. The marketplace is properly registered in known_marketplaces.json.

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.

2 participants