- Created skills/ directory - Moved 272 skills to skills/ subfolder - Kept agents/ at root level - Kept installation scripts and docs at root level Repository structure: - skills/ - All 272 skills from skills.sh - agents/ - Agent definitions - *.sh, *.ps1 - Installation scripts - README.md, etc. - Documentation Co-Authored-By: Claude <noreply@anthropic.com>
3.7 KiB
3.7 KiB
description, allowed-tools
| description | allowed-tools |
|---|---|
| Set Safety Net status line in Claude Code settings | 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:
{
"statusLine": {
"type": "command",
"command": "<shell command to execute>",
"padding": <optional number>
}
}
type: Must be"command"command: Shell command that outputs the status line textpadding: 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:
{
"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:
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:
- Show the current command to the user
- Use AskUserQuestion to let user choose:
{
"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:
{
"statusLine": {
"type": "command",
"command": "bunx cc-safety-net --statusline"
}
}
(Use npx -y instead of bunx if user selected npx)
If Pipe:
{
"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:
{
"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:
- Read existing
~/.claude/settings.json(or start with{}if it doesn't exist) - Merge the new
statusLineconfiguration - Write back to
~/.claude/settings.jsonwith proper JSON formatting (2-space indent)
Use the Write tool to update the file.
Step 7: Confirm Success
Tell the user:
- Configuration saved to
~/.claude/settings.json - Changes take effect immediately - no restart needed
- 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 justnpx) to skip prompts when using npm