SuperCharge Claude Code v1.0.0 - Complete Customization Package
Features: - 30+ Custom Skills (cognitive, development, UI/UX, autonomous agents) - RalphLoop autonomous agent integration - Multi-AI consultation (Qwen) - Agent management system with sync capabilities - Custom hooks for session management - MCP servers integration - Plugin marketplace setup - Comprehensive installation script Components: - Skills: always-use-superpowers, ralph, brainstorming, ui-ux-pro-max, etc. - Agents: 100+ agents across engineering, marketing, product, etc. - Hooks: session-start-superpowers, qwen-consult, ralph-auto-trigger - Commands: /brainstorm, /write-plan, /execute-plan - MCP Servers: zai-mcp-server, web-search-prime, web-reader, zread - Binaries: ralphloop wrapper Installation: ./supercharge.sh
This commit is contained in:
132
plugins/claude-code-safety-net/commands/set-custom-rules.md
Normal file
132
plugins/claude-code-safety-net/commands/set-custom-rules.md
Normal file
@@ -0,0 +1,132 @@
|
||||
---
|
||||
description: Set custom rules for Safety Net
|
||||
allowed-tools: Bash, Read, Write, AskUserQuestion
|
||||
---
|
||||
|
||||
You are helping the user configure custom blocking rules for claude-code-safety-net.
|
||||
|
||||
## Context
|
||||
|
||||
### Schema Documentation
|
||||
|
||||
!`npx -y cc-safety-net --custom-rules-doc`
|
||||
|
||||
## Your Task
|
||||
|
||||
Follow this flow exactly:
|
||||
|
||||
### Step 1: Ask for Scope
|
||||
|
||||
Use AskUserQuestion to let user select scope:
|
||||
|
||||
```json
|
||||
{
|
||||
"questions": [
|
||||
{
|
||||
"question": "Which scope would you like to configure?",
|
||||
"header": "Configure",
|
||||
"multiSelect": false,
|
||||
"options": [
|
||||
{
|
||||
"label": "User",
|
||||
"description": "(`~/.cc-safety-net/config.json`) - applies to all your projects"
|
||||
},
|
||||
{
|
||||
"label": "Project",
|
||||
"description": "(`.safety-net.json`) - applies only to this project"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Step 2: Show Examples and Ask for Rules
|
||||
|
||||
Show examples in natural language:
|
||||
- "Block `git add -A` and `git add .` to prevent blanket staging"
|
||||
- "Block `npm install -g` to prevent global package installs"
|
||||
- "Block `docker system prune` to prevent accidental cleanup"
|
||||
|
||||
Ask the user to describe rules in natural language. They can list multiple.
|
||||
|
||||
### Step 3: Generate and Show JSON Config
|
||||
|
||||
Parse user input and generate valid schema JSON using the schema documentation above.
|
||||
|
||||
Then show the generated config JSON to the user.
|
||||
|
||||
### Step 4: Ask for Confirmation
|
||||
|
||||
Use AskUserQuestion to let user choose:
|
||||
|
||||
```json
|
||||
{
|
||||
"questions": [
|
||||
{
|
||||
"question": "Does this look correct?",
|
||||
"header": "Confirmation",
|
||||
"multiSelect": false,
|
||||
"options": [
|
||||
{
|
||||
"label": "Yes",
|
||||
},
|
||||
{
|
||||
"label": "No",
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Step 5: Check and Handle Existing Config
|
||||
|
||||
1. Check existing User Config with `cat ~/.cc-safety-net/config.json 2>/dev/null || echo "No user config found"`
|
||||
2. Check existing Project Config with `cat .safety-net.json 2>/dev/null || echo "No project config found"`
|
||||
|
||||
If the chosen scope already has a config:
|
||||
|
||||
Show the existing config to the user.
|
||||
Use AskUserQuestion tool to let user choose:
|
||||
```json
|
||||
{
|
||||
"questions": [
|
||||
{
|
||||
"question": "The chosen scope already has a config. What would you like to do?",
|
||||
"header": "Configure",
|
||||
"multiSelect": false,
|
||||
"options": [
|
||||
{
|
||||
"label": "Merge",
|
||||
},
|
||||
{
|
||||
"label": "Replace",
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Step 6: Write and Validate
|
||||
|
||||
Write the config to the chosen scope, then validate with `npx -y cc-safety-net --verify-config`.
|
||||
|
||||
If validation errors:
|
||||
- Show specific errors
|
||||
- Offer to fix with your best suggestion
|
||||
- Confirm before proceeding
|
||||
|
||||
### Step 7: Confirm Success
|
||||
|
||||
Tell the user:
|
||||
1. Config saved to [path]
|
||||
2. **Changes take effect immediately** - no restart needed
|
||||
3. Summary of rules added
|
||||
|
||||
## Important Notes
|
||||
|
||||
- Custom rules can only ADD restrictions, not bypass built-in protections
|
||||
- Rule names must be unique (case-insensitive)
|
||||
- Invalid config → entire config ignored, only built-in rules apply
|
||||
172
plugins/claude-code-safety-net/commands/set-statusline.md
Normal file
172
plugins/claude-code-safety-net/commands/set-statusline.md
Normal file
@@ -0,0 +1,172 @@
|
||||
---
|
||||
description: Set Safety Net status line in Claude Code settings
|
||||
allowed-tools: Bash, Read, Write, AskUserQuestion
|
||||
---
|
||||
|
||||
You are helping the user configure the Safety Net status line in their Claude Code settings.
|
||||
|
||||
## Context
|
||||
|
||||
### Schema Documentation
|
||||
|
||||
The `statusLine` field in `~/.claude/settings.json` has this structure:
|
||||
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "<shell command to execute>",
|
||||
"padding": <optional number>
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `type`: Must be `"command"`
|
||||
- `command`: Shell command that outputs the status line text
|
||||
- `padding`: Optional number for spacing
|
||||
|
||||
## Your Task
|
||||
|
||||
Follow this flow exactly:
|
||||
|
||||
### Step 1: Ask for Package Runner
|
||||
|
||||
Use AskUserQuestion to let user select their preferred package runner:
|
||||
|
||||
```json
|
||||
{
|
||||
"questions": [
|
||||
{
|
||||
"question": "Which package runner would you like to use?",
|
||||
"header": "Runner",
|
||||
"multiSelect": false,
|
||||
"options": [
|
||||
{
|
||||
"label": "bunx (Recommended)",
|
||||
"description": "Uses Bun's package runner - faster startup"
|
||||
},
|
||||
{
|
||||
"label": "npx",
|
||||
"description": "Uses npm's package runner - more widely available"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Step 2: Check Existing Settings
|
||||
|
||||
Read the current settings file:
|
||||
|
||||
```bash
|
||||
cat ~/.claude/settings.json 2>/dev/null || echo "{}"
|
||||
```
|
||||
|
||||
Parse the JSON and check if `statusLine.command` already exists.
|
||||
|
||||
### Step 3: Handle Existing Command
|
||||
|
||||
If `statusLine.command` already exists:
|
||||
|
||||
1. Show the current command to the user
|
||||
2. Use AskUserQuestion to let user choose:
|
||||
|
||||
```json
|
||||
{
|
||||
"questions": [
|
||||
{
|
||||
"question": "The statusLine command is already set. What would you like to do?",
|
||||
"header": "Existing",
|
||||
"multiSelect": false,
|
||||
"options": [
|
||||
{
|
||||
"label": "Replace",
|
||||
"description": "Replace the existing command with Safety Net statusline"
|
||||
},
|
||||
{
|
||||
"label": "Pipe",
|
||||
"description": "Add Safety Net at the end using pipe (existing_command | cc-safety-net --statusline)"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Step 4: Generate the Configuration
|
||||
|
||||
Based on user choices:
|
||||
|
||||
**If Replace or no existing command:**
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bunx cc-safety-net --statusline"
|
||||
}
|
||||
}
|
||||
```
|
||||
(Use `npx -y` instead of `bunx` if user selected npx)
|
||||
|
||||
**If Pipe:**
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "<existing_command> | bunx cc-safety-net --statusline"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Step 5: Show and Confirm
|
||||
|
||||
Show the generated config to the user.
|
||||
|
||||
Use AskUserQuestion to confirm:
|
||||
|
||||
```json
|
||||
{
|
||||
"questions": [
|
||||
{
|
||||
"question": "Does this configuration look correct?",
|
||||
"header": "Confirm",
|
||||
"multiSelect": false,
|
||||
"options": [
|
||||
{
|
||||
"label": "Yes, apply it",
|
||||
"description": "Write the configuration to ~/.claude/settings.json"
|
||||
},
|
||||
{
|
||||
"label": "No, cancel",
|
||||
"description": "Cancel without making changes"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Step 6: Write Configuration
|
||||
|
||||
If user confirms:
|
||||
|
||||
1. Read existing `~/.claude/settings.json` (or start with `{}` if it doesn't exist)
|
||||
2. Merge the new `statusLine` configuration
|
||||
3. Write back to `~/.claude/settings.json` with proper JSON formatting (2-space indent)
|
||||
|
||||
Use the Write tool to update the file.
|
||||
|
||||
### Step 7: Confirm Success
|
||||
|
||||
Tell the user:
|
||||
1. Configuration saved to `~/.claude/settings.json`
|
||||
2. **Changes take effect immediately** - no restart needed
|
||||
3. Summary of what was configured
|
||||
|
||||
## Important Notes
|
||||
|
||||
- The settings file is located at `~/.claude/settings.json`
|
||||
- If the file doesn't exist, create it with the statusLine configuration
|
||||
- Preserve all existing settings when merging
|
||||
- Use `npx -y` (not just `npx`) to skip prompts when using npm
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
description: Verify custom rules for Safety Net
|
||||
allowed-tools: Bash, Read, Write, AskUserQuestion
|
||||
---
|
||||
|
||||
You are helping the user verify the custom rules config file.
|
||||
|
||||
## Your Task
|
||||
|
||||
Run `npx -y cc-safety-net --verify-config` to check current validation status
|
||||
|
||||
If the config has validation errors:
|
||||
1. Show the specific validation errors
|
||||
2. Run `npx -y cc-safety-net --custom-rules-doc` to read the schema documentation
|
||||
3. Use AskUserQuestion tool to offer fixes with your best suggestions
|
||||
4. After fixing, run `npx -y cc-safety-net --verify-config` to verify again
|
||||
Reference in New Issue
Block a user