← 返回 Skills 市场
strongant

Consul Service Deregister

作者 strongant · GitHub ↗ · v1.0.4 · MIT-0
cross-platform ✓ 安全检测通过
117
总下载
0
收藏
1
当前安装
5
版本数
在 OpenClaw 中安装
/install consul-deregister
功能描述
Consul service deregistration tool. Triggered when users mention Consul deregister, remove service instance, service removal, or offline. Supports batch dere...
使用说明 (SKILL.md)

Consul Service Deregister

Deregister service instances from Consul via the HTTP API.

Usage

Mode 1: Service ID + Agent List (Most Common)

User: Deregister service my-service-id on consul-agent-1, consul-agent-2, and consul-agent-3

AI executes:

python3 /Users/shiheng/.qclaw/workspace/skills/consul-deregister/scripts/deregister.py \
  --service-id my-service-id \
  --agents http://\x3CCONSUL_HOST_1>:8500 http://\x3CCONSUL_HOST_2>:8500 http://\x3CCONSUL_HOST_3>:8500

Mode 2: Paste Raw curl Commands (Easiest)

User pastes existing curl commands, AI parses and replays them:

User: Execute these deregister commands:
      curl -XPUT http://\x3CCONSUL_HOST_1>:8500/v1/agent/service/deregister/\x3CSERVICE_ID>
      curl -XPUT http://\x3CCONSUL_HOST_2>:8500/v1/agent/service/deregister/\x3CSERVICE_ID>

AI executes:

python3 /Users/shiheng/.qclaw/workspace/skills/consul-deregister/scripts/deregister.py \
  --from-curl "curl -XPUT http://\x3CCONSUL_HOST>:8500/v1/agent/service/deregister/\x3CSERVICE_ID> ..."

Mode 3: Read Agent List from File

python3 /Users/shiheng/.qclaw/workspace/skills/consul-deregister/scripts/deregister.py \
  --service-id my-service-id \
  --agents-file ./agents.txt

agents.txt format (supports # comments):

# Consul Agent node list
\x3CCONSUL_HOST_1>:8500
\x3CCONSUL_HOST_2>:8500
\x3CCONSUL_HOST_3>:8500

Dry-Run Preview

Add --dry-run to any mode to preview the requests without actually sending them:

python3 /Users/shiheng/.qclaw/workspace/skills/consul-deregister/scripts/deregister.py \
  --service-id my-service-id \
  --agents http://\x3CCONSUL_HOST_1>:8500 http://\x3CCONSUL_HOST_2>:8500 \
  --dry-run

With ACL Token

python3 /Users/shiheng/.qclaw/workspace/skills/consul-deregister/scripts/deregister.py \
  --service-id my-service-id \
  --agents http://\x3CCONSUL_HOST>:8500 \
  --token your-consul-acl-token

Common Workflows

Scenario 1: Batch Deregister Gray Nodes User provides a service ID and multiple IP:port pairs.

Scenario 2: Release Rollback User triggers rollback; AI finds the old version's service ID from config/docs and deregisters.

Scenario 3: Service Migration Moving a service from old cluster to new cluster — deregister from all old cluster nodes first.

Notes

  • service-id must exactly match the ID registered in Consul (no extra spaces)
  • Agent addresses accept both host:port and full URL (http://host:port) — auto-completed
  • Parallel requests by default (up to 10 concurrent), automatic speedup for many nodes
  • Non-zero exit code on any failure; AI will surface failure details
  • Use --json for JSON output suitable for scripting / pipeline integration
安全使用建议
This skill appears coherent and implements Consul service deregistration as described, but deregistration is a destructive operation. Before using it: (1) run with --dry-run to verify target URLs and service IDs; (2) double-check the list of agents (agents file or pasted curl commands) to avoid accidental broad impact; (3) never paste production ACL tokens into untrusted contexts — provide tokens only when necessary and prefer short-lived tokens scoped to deregistration if your environment supports them; (4) be aware the script will send PUT requests to arbitrary host:port addresses you supply, so confirm network targets are correct; (5) if you want extra assurance, review or run the included scripts/deregister.py locally in a test environment before using in production.
功能分析
Type: OpenClaw Skill Name: consul-deregister Version: 1.0.4 The 'consul-deregister' skill is a utility designed to deregister service instances from Consul agents via the HTTP API. The Python script (scripts/deregister.py) uses the standard library's urllib to send PUT requests and includes features like parallel execution, dry-run mode, and ACL token support. No evidence of data exfiltration, malicious execution, or prompt injection was found; the code logic strictly follows the stated purpose of managing Consul services.
能力评估
Purpose & Capability
The name/description match the included Python script and SKILL.md. The script implements Deregister via Consul's /v1/agent/service/deregister endpoint and supports the documented modes (service-id + agents, parse curl, agents file, dry-run, ACL token, parallel execution). Nothing requested or installed is unrelated to Consul deregistration.
Instruction Scope
Instructions explicitly tell the agent to run the bundled Python script and describe reading an agents file or parsing curl text — all within the scope of deregistration. Minor caveat: example commands reference a user-specific absolute path (/Users/shiheng/.qclaw/...), which may not match the runtime environment; the agent should run the skill's script from the correct workspace path. The skill will also accept arbitrary agent addresses and ACL tokens and will send HTTP requests to them (expected but potentially destructive if used incorrectly).
Install Mechanism
No install spec or external downloads — instruction-only with a small included script. There are no external packages or network-based installers to review.
Credentials
No required environment variables or declared credentials. The script accepts an optional --token argument for Consul ACL tokens (documented). The requested inputs are proportional to the stated function — no unrelated secrets or services are requested.
Persistence & Privilege
Skill is not always-enabled and does not request persistent or elevated platform privileges. It does not modify other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install consul-deregister
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /consul-deregister 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.4
Clean description with no Chinese text remaining.
v1.0.3
Full English localization for international audience.
v1.0.2
Remove real IPs from examples, use placeholder tokens instead.
v1.0.1
Remove real IPs from examples, use placeholder tokens instead.
v1.0.0
Initial release: batch deregister Consul service instances by ID or curl commands, supports dry-run, parallel execution, and ACL tokens.
元数据
Slug consul-deregister
版本 1.0.4
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 5
常见问题

Consul Service Deregister 是什么?

Consul service deregistration tool. Triggered when users mention Consul deregister, remove service instance, service removal, or offline. Supports batch dere... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 117 次。

如何安装 Consul Service Deregister?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install consul-deregister」即可一键安装,无需额外配置。

Consul Service Deregister 是免费的吗?

是的,Consul Service Deregister 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Consul Service Deregister 支持哪些平台?

Consul Service Deregister 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Consul Service Deregister?

由 strongant(@strongant)开发并维护,当前版本 v1.0.4。

💬 留言讨论