Agent Skills
› opskat/opskat
› etcd
etcd
GitHub提供etcd键值存储的读写能力,支持get/put/del及租约管理。通过类etcdctl语法操作集群配置与状态,适用于分布式系统配置同步、服务发现等场景。
Trigger Scenarios
需要读取或写入etcd中的配置项或数据
查询etcd集群节点健康状态或端点信息
管理etcd租约(lease)以控制键值生存时间
Install
npx skills add opskat/opskat --skill etcd -g -y
SKILL.md
Frontmatter
{
"name": "etcd",
"description": "Read and write etcd keys via exec, using an etcdctl-like command syntax."
}
etcd assets
Command syntax
<op> [key] [value] [--flags] — a subset of etcdctl.
get /app/configget /app/ --prefixget '' --prefix(whole keyspace —get --prefixwith no key errors)get /app/config --limit=10 --revision=42put /app/config 'hello world'put /app/config '{"debug": true}' --lease=694d5c0fdel /app/ --prefixlease grant --ttl=3600lease revoke --lease=694d5c0flease listmember listendpoint statusendpoint health
Notes
get/del/putalways require a key positional — even to read the whole keyspace, pass an explicit empty key:get '' --prefix. A bareget --prefixerrors because there is no key argument.- Quote any value containing spaces or JSON:
put /k '{"a": 1}'. An unquoted multi-word value is rejoined with spaces (put /k hello worldsets the value tohello world), so quote it whenever the intent should be unambiguous. --leaseis hexadecimal, matching etcdctl.- Two-word ops (
lease grant,member list,endpoint status) are written with a space, exactly as shown. - Unknown flags are rejected rather than ignored.
- A key/value token starting with
--is parsed as a flag, not as data: if it matches a known flag name it is consumed as that flag instead (put /k --limit=5fails with "requires key and value" because--limit=5becomes the--limitflag, not the value); if it doesn't, the whole command is rejected ("unknown flag"). A single leading-is ordinary data and is not affected (get -fooreads key-foo). - The command line is shell-tokenized but not shell-executed:
$,|,>,&and similar shell metacharacters produce an error rather than expanding or redirecting.put /k "$HOME"fails; wrap values containing such characters in single quotes so they are taken literally. - This is a narrower subset of etcdctl than it looks: range syntax (
get /a /bmeaning "everything from /a to /b") is not supported. Extra positionals are silently dropped forget/del(get /a /breads only/a) and joined into the value forput. Use--prefixfor range-like reads. - The
scopeparameter is not used by etcd assets.
Asset config (for put_asset)
| field | type | required | notes |
|---|---|---|---|
endpoints |
string | yes | Comma/semicolon/newline separated host:port list, no scheme prefix — each entry must parse as host:port, so http:///https:// is rejected with etcd endpoint必须为host:port格式: e.g. "10.0.1.5:2379,10.0.1.6:2379" |
username |
string | no | |
password |
string | no | Stored encrypted; never echoed back |
tls |
bool | no | true to enable TLS |
tls_insecure |
bool | no | true to skip TLS certificate verification |
tls_server_name |
string | no | TLS SNI / server name override |
tls_ca_file |
string | no | Path to a CA certificate file |
tls_cert_file |
string | no | Path to a client certificate file (mTLS) |
tls_key_file |
string | no | Path to a client key file (mTLS) |
dial_timeout_seconds |
number | no | Connection dial timeout override, in seconds |
command_timeout_seconds |
number | no | Per-command timeout override, in seconds |
ssh_asset_id |
number | no | SSH asset to tunnel through; 0 detaches |
Version History
-
d6c7a6e
Current 2026-08-16 07:28
修正etcd endpoint报错文案及bool字段类型描述错误
- aeb4bc3 2026-07-24 16:28


