restart
Scannednpx machina-cli add skill cyrus-cai/claude-cobrain/restart --openclawFiles (1)
SKILL.md
682 B
restart
Use direct python3 restart via controller script.
if [[ -n "${CLAUDE_PLUGIN_ROOT:-}" && -f "${CLAUDE_PLUGIN_ROOT}/scripts/control.sh" ]]; then
CONTROL_SCRIPT="${CLAUDE_PLUGIN_ROOT}/scripts/control.sh"
elif [[ -f "./plugin/scripts/control.sh" ]]; then
CONTROL_SCRIPT="./plugin/scripts/control.sh"
else
CONTROL_SCRIPT="$(ls -dt "$HOME"/.claude/plugins/cache/*/claude-cobrain/*/scripts/control.sh 2>/dev/null | head -1)"
fi
[[ -n "${CONTROL_SCRIPT:-}" && -f "$CONTROL_SCRIPT" ]] || { echo "control.sh not found. Run: /claude-cobrain:cobrain install"; exit 1; }
bash "$CONTROL_SCRIPT" restart
Source
git clone https://github.com/cyrus-cai/claude-cobrain/blob/main/plugin/skills/restart/SKILL.mdView on GitHub Overview
This skill restarts the cobrain daemon by invoking the controller script. It locates the control.sh script from multiple common locations and executes a restart, ensuring the service comes back online without manual steps.
How This Skill Works
The operator checks common locations for a control.sh script (CLAUDE_PLUGIN_ROOT/scripts/control.sh, ./plugin/scripts/control.sh, or a cache-based path) and assigns it to CONTROL_SCRIPT. If a valid script is found, it runs bash "$CONTROL_SCRIPT" restart; otherwise it prints an error guiding the user to install the CLI tooling.
When to Use It
- You’ve updated plugin or config changes and need the daemon to reload.
- The cobrain daemon becomes unresponsive and requires a restart.
- Performing routine maintenance or troubleshooting to apply updates.
- After installing a new plugin or feature that requires a restart.
- Automated CI/CD workflow that ensures the daemon restarts after deployment.
Quick Start
- Step 1: Ensure CLAUDE_PLUGIN_ROOT or plugin/scripts/control.sh can be found.
- Step 2: Run bash "$CONTROL_SCRIPT" restart
- Step 3: Verify cobrain daemon status and logs to confirm restart
Best Practices
- Verify control.sh exists before invoking restart.
- Prefer explicit paths or export CLAUDE_PLUGIN_ROOT to guide location resolution.
- Check the exit status and log output of the restart command.
- Avoid restarting during peak load; schedule maintenance windows.
- Capture and store restart logs for auditing and debugging.
Example Use Cases
- Developer restarts cobrain locally after enabling a new plugin to confirm it loads correctly.
- Ops restarts the daemon in a staging environment following a config tweak.
- CI pipeline triggers a restart to apply changes to the cobrain daemon post-deploy.
- An admin locates the control.sh via the home cache path and runs restart.
- Troubleshooting where the daemon was unresponsive and needed a controlled restart.
Frequently Asked Questions
Add this skill to your agents