mirror of
https://github.com/AceDataCloud/Skills.git
synced 2026-09-14 20:06:53 +08:00
6382daafae
* feat(tencentcloud): 6 official skills for Tencent Cloud devops Adds the second half of the connector + skills design from AuthBackend #102 / #104. Each skill declares connections: [tencentcloud] in its frontmatter; once AuthBackend PR registers this repo as a catalog source (PR 5 of the series), the agent runtime that resolves SKILL.md content can read the user's encrypted SecretId / SecretKey from the matching Connection row and inject them into the sandbox as TENCENTCLOUD_SECRET_ID / TENCENTCLOUD_SECRET_KEY / TENCENTCLOUD_REGION env vars (the official Tencent Cloud SDK convention). The skills are written in the Anthropic style: docs + code examples the agent reads to construct calls at runtime. No bundled scripts. This keeps each skill small (~200 LoC of markdown), avoids re-shipping SDK boilerplate, and lets the agent adapt examples to the user's specific question. Skills (one connector, many sub-skills, loose coupling): * tencentcloud-cos (object storage: list / upload / download / pre-signed URL / batch delete / du / cp) * tencentcloud-cls (log search: CQL / SQL / trace lookup / pagination / topic discovery) * tencentcloud-cls-alarm (alarm policies + notice groups + shields + firing history; Enable vs Status callout) * tencentcloud-tke (Kubernetes: cluster / node / pool inspection via SDK + scale / restart via kubectl with SDK-fetched kubeconfig) * tencentcloud-dns (DNSPod records: A / AAAA / CNAME / MX / TXT / NS / SRV / CAA; CNAME apex restriction; v3 API only) * tencentcloud-edgeone (CDN: purge by URL / prefix / host / all, prefetch, task tracking; EdgeOne DNS) Plus a shared cross-skill auth doc: * skills/_shared/tencentcloud.md (SecretId / SecretKey / region setup, sub-account hardening guidance, common region codes, .env vs sandboxed env-var injection, sanity-check snippet) The user can install only the sub-skills they need via the per-skill install button at https://auth.acedata.cloud/user/skills — installing 'just COS' is fine; the connector stays a single shared install. Verification: python -c '...frontmatter parse over all 6 SKILL.md files...' -> all 6 pass: name slug-valid, description non-empty, connections=[tencentcloud] Followups: PR 5: AuthBackend register AceDataCloud/Skills as a catalog source in app/services/skill_catalog.py DEFAULT_SOURCES PR 6: AuthBackend agent-runtime credential injection into skill sandboxes (GET /connections/by-skill/<id>/credentials) PR 7: docs.acedata.cloud documentation page for the connector + skills pair * feat(tencentcloud): bundle scripts/ inside each skill Addresses review on #170 — "只有 SKILL 就行了??.claude/scripts 里的脚本不要了??" Each of the 6 tencentcloud-* skills now ships a self-contained scripts/<name>.py CLI alongside its SKILL.md, so the agent can shell out to a maintained command surface instead of constructing SDK calls from scratch every time. Mirrors the pattern that the AceDataCloud- internal .claude/scripts/ folder uses, but reworked to: * drop the PlatformBackend/.env auto-loader (sandbox vars are pre- injected by aichat2 from the user's BYOC connection) * read TENCENTCLOUD_SECRET_ID / TENCENTCLOUD_SECRET_KEY (the official tencentcloud-sdk-python EnvironmentVariableCredential names) — no more legacy TENCENT_CLOUD_* / DP_Id / DP_Key pairs * point usage examples at $SKILL_DIR/scripts/<name>.py instead of .claude/scripts/<name>.py Per-skill scripts: | skill | script | source | |-----------------------------|------------------------|----------------------------------------| | tencentcloud-cos | scripts/cos.py | .claude/scripts/cos.py (cleaned) | | tencentcloud-cls | scripts/cls.py | rewritten — drops PlatformBackend | | | | service-id mapping, requires --topic | | tencentcloud-cls-alarm | scripts/cls_alarm.py | .claude/scripts/cls_alarm.py (cleaned) | | tencentcloud-tke | scripts/tke.py | .claude/scripts/tke.py (cleaned) | | tencentcloud-dns | scripts/dns.py | rewritten — DNSPod v3 SDK + unified | | | | TENCENTCLOUD_* creds (was v2 dnsapi.cn | | | | with separate DP_Id/DP_Key) | | tencentcloud-edgeone | scripts/edgeone.py | .claude/scripts/edgeone.py (cleaned) | Each SKILL.md now has a 'CLI (preferred)' section near the top that lists the bundled subcommands as the primary way to do each operation. The existing SDK-from-scratch examples remain below as fallback for cases the CLI doesn't cover. Verification: python -m py_compile skills/tencentcloud-*/scripts/*.py # all 6 OK python <each script> --help # argparse OK frontmatter parse over all 6 SKILL.md # all 6 OK, connections=[tencentcloud]
3 lines
19 B
Plaintext
3 lines
19 B
Plaintext
__pycache__/
|
|
*.pyc
|