本文へ移動
cccskills
無料GitHub で公開

byted-volcengine-topology-builder

从火山引擎账号资产快照中尽量全量拉取当前已接入的资源数据,并沉淀为可复用的基础资产数据与拓扑视图。只要用户在做火山引擎账号资产盘点、资源梳理、依赖关系建模、运维底座建设,或者希望为拓扑分析、影响面评估、自动化运维、故障排查等上层场景准备基础数据时,都应该使用这个 skill;当用户提到“看图”“画图”“导图”“导出拓扑图片”时,也要触发。

インストール方法を見る

含まれるファイル(10)

  • SKILL.md6.1 KB
  • references/public_ip_115_190_115_84_metadata.json164 B
  • scripts/build_topology_from_account_assets.py48.5 KB
  • scripts/dump_account_assets.py21.4 KB
  • scripts/render_topology_graph.py35.1 KB
  • scripts/run_topology_pipeline.py5.4 KB
  • scripts/save_topology.py11.1 KB
  • scripts/sdk_runtime.py7.7 KB
  • scripts/topology_constants.py579 B
  • tests/test_topology_builder.py10.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

火山引擎基础资产数据与拓扑 Skill

能力定位

这个 Skill 的职责是构建一层可复用的基础数据,而不是只服务某一个上层分析场景。

  • 采集层:尽量全量拉取当前已接入的火山引擎资源资产
  • 建模层:把原始快照整理成结构化资产数据和统一关系表达
  • 输出层:落盘为 json/md/dot/svg/png 等可复用产物
  • 复用层:供拓扑分析、影响面评估、自动化运维、故障排查、资产盘点、依赖梳理等场景继续消费

默认产物

默认会在当前工作空间的 business_topologies/<business_key>/ 下生成:

business_topologies/<business_key>/
  account_assets_snapshot.json
  topology.json
  topology.md
  topology.dot
  topology.svg   # 本地装有 Graphviz 或自动安装成功时生成
  topology.png   # 本地装有 Graphviz 或自动安装成功时生成

说明:

  • account_assets_snapshot.json 是原始资产快照,是后续所有分析和重建的基础输入
  • topology.json 是结构化关系模型,适合被脚本、agent、分析工具继续消费
  • topology.md 是给人快速浏览的文本视图
  • topology.dot 会始终生成,便于后续用 Graphviz 或其他工具继续转换
  • topology.svg/png 主要用于“看图/导图/给用户展示”

一键流水线

  1. 准备当前工作空间内的 .env:
VOLCENGINE_AK=...
VOLCENGINE_SK=...
  1. 运行通用入口脚本:
python3 <byted-volcengine-topology-builder-skill>/scripts/run_topology_pipeline.py \
  --workspace-root "$(pwd)" \
  --env-path ./.env \
  --region cn-shanghai \
  --business default-topology

这条流水线默认会依次执行:

  • 采集资产快照
  • 从快照构建拓扑
  • 保存 topology.json/topology.md
  • 生成 topology.dot
  • 如果本地可用 Graphviz,再继续生成 topology.svg/topology.png

如果本地没有 dot 命令,脚本会先尝试自动安装 Graphviz;安装失败后再降级为仅输出 topology.dot,不会阻塞整个基础数据落盘流程。

常用参数

通用入口脚本 run_topology_pipeline.py 支持:

  • --business:业务或资产视图标识
  • --region:地域
  • --include:需要采集的资源类型,可重复传入或逗号分隔
  • --entry:构图时优先使用的入口资源类型,可重复传入或逗号分隔
  • --skip-render-graph:只生成结构化产物,不额外产图

例如:

python3 <byted-volcengine-topology-builder-skill>/scripts/run_topology_pipeline.py \
  --workspace-root "$(pwd)" \
  --env-path ./.env \
  --region cn-shanghai \
  --business payment-core \
  --include ecs,eip,clb,alb,natgateway,rds_mysql,redis \
  --entry eip --entry clb

分层执行

1. 采集资产快照

python3 <byted-volcengine-topology-builder-skill>/scripts/dump_account_assets.py \
  --region cn-shanghai \
  --env-path ./.env \
  --include ecs,eip,clb,alb,natgateway,rds_mysql,redis \
  --output-file ./business_topologies/payment-core/account_assets_snapshot.json

这一层的目标是尽量沉淀稳定、可复用、可重建的基础资产数据。

2. 从快照构图

python3 <byted-volcengine-topology-builder-skill>/scripts/build_topology_from_account_assets.py \
  --assets-file ./business_topologies/payment-core/account_assets_snapshot.json \
  --region cn-shanghai \
  --entry eip --entry clb --entry alb --entry natgateway \
  --output-file ./business_topologies/payment-core/topology.json

这一层负责把离散资产组织成统一关系模型,方便后续分析和可视化。

3. 保存并渲染产物

python3 <byted-volcengine-topology-builder-skill>/scripts/save_topology.py \
  --business payment-core \
  --root ./business_topologies \
  --topology-file ./business_topologies/payment-core/topology.json

如果只想对已有 topology.json 单独补画图:

python3 <byted-volcengine-topology-builder-skill>/scripts/render_topology_graph.py \
  --topology-file ./business_topologies/payment-core/topology.json \
  --output-dir ./business_topologies/payment-core

关系表达

当前 topology.json 使用 nodes + chains 的结构:

  • path[].relation:主链路关系
  • contexts.<node_id>:路径节点的上下文资源

当前关系语义:

  • attached_to:A 绑定到 B,例如 EIP -> CLB、ECS -> EBS
  • has:A 拥有 B,例如 CLB -> 后端服务器组
  • contains:A 包含 B,例如 后端服务器组 -> ECS、VPC -> 子网
  • belongs_to:A 归属 B,例如 ECS -> VPC/子网/安全组

展示层默认以资源 id 为主,避免实例名称重复导致歧义;name 保留在元数据中作为辅助信息。

当前覆盖范围

在权限允许且快照字段完整的情况下,当前优先沉淀下面这些基础关系:

  • EIP -> CLB -> 后端服务器组 -> ECS
  • EIP -> ECS
  • ECS -> VPC/子网/安全组/EBS
  • VPC -> 子网

这意味着它已经能为很多上层场景提供基础输入,但它依然是一个可扩展的底座,不应被理解为“已经完整覆盖所有云资源关系”。

常见问题

  • AccessDenied (403):账号没有对应产品的只读权限,脚本会尽量降级并保留已成功拉取的资产
  • rds_mysql/redis 对应 SDK 方法或字段不稳定:说明当前采集适配仍需继续扩展,但不影响已有基础产物落盘
  • 本地没有 dot 命令:不会阻塞 topology.json/topology.md 生成,至少仍会得到 topology.dot
  • 如果不希望渲染脚本自动安装 Graphviz,可在直接调用渲染脚本时加 --skip-auto-install-graphviz

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Deploy, update, validate, and troubleshoot the AgentKit hybrid-cloud customer-service demo in this directory. Use when a user asks an AI coding agent to follow the README, deploy or update the demo, configure OpenAPI/Runtime/Knowledge/Memory/Sandbox/MCP/Skills/A2A, run customer-view validation, or record manual platform steps and failures.

日本語の概要は準備中です。原文の説明を表示しています。

bytedance/agentkit-samples4702026年10月12日 更新

Generate deterministic SVG algorithmic artwork. Invoke when the user asks for geometric, generative, or algorithmic visual art.

日本語の概要は準備中です。原文の説明を表示しています。

bytedance/agentkit-samples4702026年10月12日 更新

通过本地 Python CLI 和 OpenAPI 客户端管理、排查火山云手机资源。适用于查询实例和资源、截图、执行命令、查看任务、检查应用、主机和机房容量、标签、DNS、路由,以及操作已授权的测试云手机实例。

日本語の概要は準備中です。原文の説明を表示しています。

bytedance/agentkit-samples4702026年10月12日 更新

Launch and continue the Volcengine AI Research survey workflow for concept testing, audience design, questionnaire drafting, interview guide generation, execution confirmation, progress checks, and result queries. Use this skill when the user wants to create, revise, confirm, execute, or follow up on a real AI research survey task in ABCompass instead of doing generic brainstorming, copywriting, translation, summarization, or broad market discussion.

日本語の概要は準備中です。原文の説明を表示しています。

bytedance/agentkit-samples4702026年10月12日 更新

Create and check long-running video material evaluation tasks. Use this skill when the user wants to submit videos for evaluation, check an existing video evaluation task list, or fetch the result of a previously created video evaluation task. This skill is not a general-purpose video upload skill because upload is allowed only as an internal step of task creation. Authentication uses an API key passed as an Authorization bearer token.

日本語の概要は準備中です。原文の説明を表示しています。

bytedance/agentkit-samples4702026年10月12日 更新

火山引擎 AntiDDoSPro 高防域名只读巡检。用户要查域名健康、攻击、流量、CC/WAF/区域封禁、智能防护或 CCAI 状态时使用。

日本語の概要は準備中です。原文の説明を表示しています。

bytedance/agentkit-samples4702026年10月12日 更新

bytedance のスキルをすべて見る

このスキルの問題を報告する