gateway-restart

gateway-restart is a skill for Claude Code, Codex from kirodotdev/KiroCrew. It costs 52 tokens per session (3,978 once invoked), scanned C, original, Apache-2.0.

A procedure for restarting the KiroCrew gateway while an agent session is running, then continuing the conversation afterward.

In plain words
What is it for?
Use it after configuration changes or when the user asks to restart, reload, or restart the gateway.
Why use it?
A direct restart would end the current session, and the command may be blocked by a security filter. The procedure schedules the restart outside the session and resumes it later.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it after configuration changes or when the user asks to restart, reload, or restart the gateway.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kirodotdev/kirocrew/gateway-restart
About the project

Kiro Crew is a persistent development workspace where agents continue multi-step software work across sessions, schedules, and connected interfaces. Developers use it locally or remotely through a desktop app, web dashboard, CLI, Slack, or Discord, with unattended tasks and recurring jobs. The catalogue contains skills and instructions for working with this workspace.

kirodotdev/KiroCrew · 3,687 stars · on GitHub · kiro.dev

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kirodotdev/KiroCrew --skill gateway-restart
Clone the repo
git clone --depth 1 https://github.com/kirodotdev/KiroCrew

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gateway-restart

README.md
[![agentmods](https://agentmods.dev/badge/skills/kirodotdev/kirocrew/gateway-restart.svg)](https://agentmods.dev/skills/kirodotdev/kirocrew/gateway-restart)
Your own site
<a href="https://agentmods.dev/skills/kirodotdev/kirocrew/gateway-restart"><img src="https://agentmods.dev/badge/skills/kirodotdev/kirocrew/gateway-restart.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,978 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 12 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Rogue Agent · line 146
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
  • high Rogue Agent · line 182
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
  • high Rogue Agent · line 146
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
  • high Rogue Agent · line 182
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
  • medium Excessive Agency · line 134
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Rogue Agent · line 26
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 113
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 26
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 113
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Prompt Injection · line 134
    Subtle instructions detected that may alter agent decision-making or introduce hidden biases.
    Fix: Review content for implicit steering or bias. Ensure instructions are explicit and align with the skill's stated purpose.
  • medium Privilege Escalation · line 138
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Rogue Agent · line 139
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.03978
Opus 5 $0.00026 $0.01989
Sonnet 5 $0.00010 $0.00796
Haiku 4.5 $0.00005 $0.00398

Measured today against content hash 6c7f13ff977a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade C, and why

gateway-restart scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

The scan reads SKILL.md. This mod also ships 2 executable files (do-restart.ps1, do-restart.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Subtle steeringmediumPrompt injection

Instructions that bias recommendations or shape behaviour without the user noticing.

**Never tell the user the restart succeeded without checking.** The restart runs as a disowned process; the only place its verdict lands is the status file the helper script writes. When the resume cron fires, take the a

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

3. **Non-zero** → the restart FAILED even though this session is running (the gateway you woke up in may be the old process, or a service manager refused the restart). Read the tail of the attempt's own log — `<status fi
skills/gateway-restart/SKILL.md · 197 lines

How it starts

The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Gateway Restart

Overview

Gracefully restart the KiroCrew gateway from within a running agent session. The challenge: kirocrew restart is blocked by kiro-cli's security filter, and killing the gateway kills the current session. This skill teaches the agent to schedule the restart externally and resume the conversation afterward.

Core Concepts

The Problem

The agent cannot directly run kirocrew restart — kiro-cli blocks it. Even if it could, the restart would kill the agent mid-response. The solution is a two-phase approach: schedule resume jobs, then trigger the restart via a mechanism that runs outside the agent session.

Restart Mechanism

The agent cannot run kirocrew restart directly — kiro-cli's security filter blocks it at the shell command level (regex match on the command string). Platform-specific scripts handle this indirectly:

Linux / macOS:

nohup /path/to/skills/gateway-restart/do-restart.sh >/dev/null 2>&1 & disown

The script sleeps 10 seconds (giving the session time to respond), then invokes the restart. Because it's a detached process reparented to PID 1, it survives the gateway's death and executes reliably.

Both scripts record the outcome instead of discarding it: the restart's exit status is written to a status file under <crew home>/logs/ and its output goes to a log correlated with that attempt<status file>.log when an attempt-specific status file is passed, the shared logs/restart.log for a lone unscheduled run (crew home is $KIROCREW_HOME, default ~/.kiro/crew; both scripts derive their paths from it, so never pass hardcoded %USERPROFILE% paths). The status file is attempt-specific when the scheduler passes one — KIROCREW_RESTART_STATUS_FILE (Linux/macOS) or -StatusFile (Windows), see step 3 — so overlapping restart attempts cannot overwrite each other's verdict or quote each other's diagnostics; without it the shared default logs/restart-status is used. The file is removed when the attempt starts, so while it is absent the attempt is pending; once present it names that attempt's exit status. The CLI restart verb itself verifies the replacement gateway is serving and exits non-zero when it is not — the status file is how that verdict reaches the resumed session (see "Verify the outcome" below).

Read the full file on GitHub · 197 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +7 lines 6c7f13ff977a
  2. 5d ago Changed · +29 lines scan A → C 386f1a2aa4d8
  3. 8d ago First seen · 161 lines · 52 tokens per session scan A c6ded2290a17

Subscribe to this mod's changes

gateway-restart is a skill published in the GitHub repository kirodotdev/KiroCrew (3,687 stars, last pushed today), licensed Apache-2.0. It adds 52 tokens to every session and 3,978 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 2 findings (subtle steering, asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.