Agent Skills
› opskat/opskat
› etcd
etcd
GitHub提供etcd键值读写能力,支持get、put、del及lease管理操作。用于在Agent中直接访问和修改etcd存储的数据,适用于配置管理和服务发现场景。
触发场景
需要读取或写入etcd中的配置项
管理etcd中的租约(lease)
检查etcd集群状态或健康情况
安装
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 | etcd account name |
password |
string | no | Write-only. Encrypted in the asset; does not create a credential |
credential_id |
number | no | Existing managed password credential ID |
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. The three certificates share one source: give them all as paths (tls_*_file) or all as content (tls_*_pem); switching source drops what was stored in the other |
tls_ca_pem |
string | no | CA certificate as PEM content, stored in the asset |
tls_cert_file |
string | no | Path to a client certificate file (mTLS) |
tls_cert_pem |
string | no | Client certificate as PEM content (mTLS) |
tls_key_file |
string | no | Path to a client key file (mTLS) |
tls_key_pem |
string | no | Write-only. Client key as PEM content (mTLS), encrypted in the asset |
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 |
proxy_chain |
array | no | Ordered list of hops, nearest to this machine first; replaces the whole stored chain and the SSH tunnel, [] clears it. Layers: {"type":"ssh","ssh_asset_id":N}, {"type":"socks5","host":"...","port":N,"username":"...","password":"..."}, {"type":"http_tunnel","url":"https://...","token":"...","timeout_seconds":N} (first layer only). password / token are write-only, encrypted in the asset. Not together with ssh_asset_id |
password and credential_id are mutually exclusive. Plaintext is never returned, is
encrypted in the asset, and never creates a managed credential.
版本历史
-
2b9abfb
当前 2026-10-19 03:58
扩展资产表单与 opsctl,新增 SSH 隧道、多层代理链及 TLS 证书字段支持;优化了连接配置的 Tab 展示与错误定位逻辑。
- b159e91 2026-08-19 20:20
-
d6c7a6e
2026-08-16 07:28
修正etcd endpoint报错文案及bool字段类型描述错误
- aeb4bc3 2026-07-24 16:28


