consul
Use when the user asks about HashiCorp Consul, service discovery, Consul DNS, health checks, Consul KV, ACLs, service mesh intentions, mesh gateways, WAN…
от j4flmao★ 47 звёзд на GitHub
Установить consul в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Consul
Purpose
Deploy and operate HashiCorp Consul for service discovery, health checking, KV configuration, multi-datacenter federation, and the Connect service mesh with mTLS, intentions, and Envoy proxying.
Agent Protocol
Trigger
Exact user phrases: "consul", "consul agent", "consul server", "consul client", "consul cluster", "consul datacenter", "consul service discovery", "consul DNS", "consul catalog", "consul health check", "consul KV", "consul sessions", "consul ACL", "consul token", "consul connect", "consul service mesh", "consul intention", "consul envoy", "consul mesh gateway", "consul snapshot", "consul federation", "consul admin partition", "consul namespace", "consul k8s", "consul helm", "consul terraform", "consul-template", "consul ESM", "consul NIA", "consul terraform sync", "service discovery".
Input Context
- Consul deployment topology (single or multiple datacenters).
- Agent modes: server, client, or dev (local).
- Integration points: Nomad, Vault, Terraform, Kubernetes, Envoy, registrator.
- Networking: gossip (8301/8302) and RPC (8300) port layouts, TLS, mTLS mesh.
- Scale expectations: number of services, registers per second, queries per second.
Output Artifact
Consul agent configuration (HCL), service registration definitions, ACL policy/token files, intention rules, or Terraform/Kubernetes manifests.
Response Format
Consul HCL/JSON configuration, CLI commands, or Kubernetes manifests. No preamble. No explanations unless asked.
Completion Criteria
- Agent configuration is correct for server/client mode with proper ports and join addresses.
- Services registered with correct health checks (HTTP, TCP, gRPC, script).
- DNS service resolution validated (
dig <service>.service.consul). - KV keys written and consumed via consul-template or config injection.
- ACLs bootstrapped; tokens scoped with least-privilege policies and roles.
- Connect service mesh configured with mTLS and intentions.
- Federation (WAN gossip or mesh gateways) configured if multiple DCs.
- Snapshots and scheduled backups in place; upgrade path planned.
Max Response Length
400 lines.
Quick Start
consul agent -dev → register a service (consul services register svc.hcl or consul service register) → consul catalog services → dig @127.0.0.1 -p 8600 web.service.consul → enable ACLs with consul acl bootstrap → consul connect envoy -sidecar-for web for the mesh.
Decision Tree: Deployment Topology
| Topology | Use Case | Agents | Federation |
|---|---|---|---|
| Single DC | Most applications, one region | 3–5 servers + clients | None |
| Multi-DC (WAN gossip) | Global services, low ACL/plan needs | 3–5 per DC, clients everywhere | WAN gossip + mesh gateways |
| Multi-DC (mesh gateways only) | Isolate gossip, strict security | Same, gateways on boundary | Mesh gateways, no WAN gossip |
| Dev | Local testing | 1 dev agent | None |
Core Workflow
Step 1: Server Configuration
# /etc/consul.d/server.hcl
server = true
bootstrap_expect = 3
ui = true
data_dir = "/opt/consul"
log_level = "INFO"
bind_addr = "{{ GetPrivateInterfaces | attr \"address\" }}"
client_addr = "0.0.0.0"
retry_join = ["10.0.1.11", "10.0.1.12", "10.0.1.13"]
ports {
dns = 8600
http = 8500
https = -1
grpc = 8502
serf_lan = 8301
serf_wan = 8302
server = 8300
}
# Encrypt gossip and RPC
encrypt = "A4F4+oAxyOvAThY4c3Kt0sMN0+SIpxEwbjxZTr/BRh0="
verify_server_hostname = true
verify_incoming = true
verify_outgoing = true
ca_file = "/etc/consul.d/tls/consul-agent-ca.pem"
# ACLs
acl = {
enabled = true
default_policy = "deny"
enable_token_persistence = true
tokens = {
master = "a34adf98-9b1d-4be5-8f6a-5c1f2a3b4c5d"
}
}
performance {
raft_multiplier = 1
}
Step 2: Client Configuration
# /etc/consul.d/client.hcl
server = false
data_dir = "/opt/consul"
client_addr = "0.0.0.0"
bind_addr = "{{ GetPrivateInterfaces | attr \"address\" }}"
retry_join = ["10.0.1.11:8301", "10.0.1.12:8301", "10.0.1.13:8301"]
encrypt = "A4F4+oAxyOvAThY4c3Kt0sMN0+SIpxEwbjxZTr/BRh0="
# Client agents proxy traffic and serve DNS locally
Step 3: Service Registration
# /etc/consul.d/conf.d/web.hcl
service {
name = "web"
id = "web-01"
address = "10.0.1.50"
port = 8080
tags = ["primary", "v1"]
checks = [
{
name = "web-http"
type = "http"
path = "/healthz"
interval = "10s"
timeout = "2s"
status = "passing"
},
{
name = "web-memory"
type = "script"
args = ["/usr/local/bin/check-web.sh"]
interval = "30s"
}
]
enable_tag_override = false
meta {
version = "1.2.0"
}
}
consul services register /etc/consul.d/conf.d/web.hcl
consul catalog services # list unique services
consul catalog nodes -servi
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/consul-acls-and-security.md
- references/consul-connect-mesh.md
- references/consul-federation-and-multidc.md
- references/consul-fundamentals.md
- references/consul-kv-and-sessions.md
- references/consul-operations-and-scale.md
- references/consul-service-discovery.md
FAQ
Что делает скилл consul?
Use when the user asks about HashiCorp Consul, service discovery, Consul DNS, health checks, Consul KV, ACLs, service mesh intentions, mesh gateways, WAN federation, admin partitions, or consul-template. Produces Consul configs and operations runbooks. Not for Istio or Linkerd (use devops-service-mesh) or Nomad scheduling (use nomad).
Как установить скилл consul?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл consul запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
AnthropicThe scan that the plugin's GitHub Action runs.
azure-static-web-apps
GitHubHelps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
ai-ready
GitHubMake any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
aws-cdk-python-setup
GitHubSetup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…