Community编程与开发github.com

huaweicloud/huawei-cloud-ges-graph

提供访问华为云图数据库 GES 服务的指南。涵盖 Cypher 查询、GQL 查询、Schema/标签管理、摘要信息查询、图数据编辑等。当用户希望通过终端操作华为云图数据库 GES 服务时使用此技能。

huawei-cloud-ges-graph 是什么?

该技能为 AI 代理(如 Claude Code)提供了通过终端操作华为云图数据库 GES 的全面指南。它支持 Python 和 Node.js 运行时,使用本地脚本(位于 `scripts/` 目录下)执行查询,并强制要求内联执行而非创建临时文件。技能涵盖所有核心能力:Cypher 和 GQL 查询、节点和边的增删改查、Schema/标签管理、数据导入导出以及图统计信息获取。为确保安全,代码层实现了安全护栏(ISSUE-002),自动拦截如 `MATCH (n) DETACH DELETE n` 等未限定的全量删除操作,并引导用户通过带 `allow_destructive=True` 参数的专用 `clear_graph()` 接口执行危险操作。配置支持环境变量和 CSV 文件,支持 AK/SK、Token 和密码三种认证方式,并兼容华为云统一响应格式。通过参考目录中的详细文档,该技能还确保了 IAM 安全策略、验证流程和验收标准的完整性。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/huaweicloud/huaweicloud-skills/tree/HEAD/skills/ai/ges/huawei-cloud-ges-graph

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

⚠️ 执行方法(必读):此技能通过本地 Python 或 Node.js 脚本(位于 scripts/ 目录下)执行查询。禁止直接使用 API 调用。

  • 查询脚本位于技能目录下的 scripts/ 目录中(例如 scripts/ges_graph_skill.py)
  • 所有脚本和环境检查脚本都位于技能包内。必须使用 skill action=exec 执行它们;不要直接在 shell 中运行
  • 优先使用内联执行(python -c 或 node -e),而不是创建临时脚本文件。请参阅下面的“内联执行(无临时文件)”部分。
  • 所有路径均相对于技能目录,即此 SKILL.md 文件所在的目录

GES 图访问指南

概述

华为云图引擎服务(GES)持久化版本的原子能力,为图数据库操作提供访问指南。 涵盖 Cypher 查询、GQL 查询、Schema/标签管理、摘要信息查询、图数据编辑等核心能力。

目录结构

目录约定如下(所有路径均相对于技能目录):

  1. scripts/ - 包含 Python 和 Node.js 执行脚本
    • ges_graph_skill.py - GES 图操作的 Python SDK
    • ges_graph_skill.js - GES 图操作的 Node.js SDK
  2. references/ - 包含文档和配置示例
    • ges_env.csv.example - 环境配置模板
    • cypher-gql-guide.md - 完整的 Cypher/GQL 使用指南(示例、表格、内联执行)
    • cli-installation-guide.md - 运行时(Python/Node.js)安装和配置指南
    • iam-policies.md - 适用于 GES/OBS 的最小 IAM 权限策略
    • verification-method.md - 验证步骤和检查清单
    • acceptance-criteria.md - 验收标准(通过/失败阈值)
    • user-guide-authentication.md - IAM Token 方法和 GitCode API Token 认证
    • chaining-protocol.md - 统一结果封装和链式调用约定

前提条件

使用此技能前,请确保满足以下条件:

1. 运行时环境

支持 Python 或 Node.js 运行时。 需要 Python 3.8+ 或 Node.js 14+。

Python 依赖:requests(pip install requests)。可选地,可以安装 huaweicloudsdkges (pip install huaweicloudsdkges)以使用 SDK 级别的调用(问题 ISSUE-013); 此技能通过其内置的 HTTP 客户端可以在没有该依赖的情况下正常工作。对于 Node.js,无需外部 npm 包(仅使用标准库 https/http)。

2. 图实例配置

此技能同时支持环境变量和配置文件。环境变量优先于配置文件。

环境变量和参数

环境变量描述是否必需
GES_GRAPH_IPGES 服务 IP是
GES_GRAPH_PORTGES 服务端口是
GES_PROJECT_ID项目 ID是
GES_GRAPH_NAME图名称是
GES_IAM_URLIAM 服务 URL是
GES_REGION区域是
HUAWEI_CLOUD_AK访问密钥是*
HUAWEI_CLOUD_SK秘密密钥是*
GES_USERNAME用户名有条件**
GES_PASSWORD密码有条件**
GES_DOMAIN_NAME域名有条件**
GES_TOKENToken(最高优先级)可选
  • AK/SK 必需用于 AKSK 认证。 ** 用户名/密码有条件地必需当 AKSK 不可用时。

配置文件 (config/ges_env.csv)

配置文件路径:config/ges_env.csv

配置项描述是否必需示例值
graph_ipGES 服务 IP是100.95.xxx.xxx
graph_portGES 服务端口是80
project_id项目 ID是your_project_id
graph_name图名称是your_graph_name
iam_urlIAM 服务 URL是(参见下面的区域表)
access_key访问密钥是*your_access_key
secret_key秘密密钥是*your_secret_key
username用户名有条件**your_username
password密码有条件**your_password
domain_name域名有条件**your_domain_name
region区域是cn-north-4
  • access_key/secret_key 必需用于 AKSK 认证。 ** username/password/domain_name 有条件地必需当 AKSK 不可用时。

各区域 IAM URL

区域URL协议
cn-north-4iam.cn-north-4.myhuaweicloud.com/v3/auth/tokensHTTPS
ap-southeast-1iam.ap-southeast-1.myhuaweicloud.com/v3/auth/tokensHTTPS

支持三种方法(优先级从高到低):

  1. 环境变量 GES_TOKEN
  2. AKSK 方法(HUAWEI_CLOUD_AK + HUAWEI_CLOUD_SK 或 access_key + secret_key)
  3. 密码方法(用户名 + 密码 + 域名)

⛔ 禁止操作(安全护栏)

本技能在代码层强制执行安全护栏(问题 ISSUE-002),不止于文档约束:

  • scripts/ges_graph_skill.py / ges_graph_skill.js 中的 validateCypher() 会拦截未限定的全量删除/清空语句(如 MATCH (n) DETACH DELETE n、 MATCH ()-[r]->() DELETE r、DROP ALL 等);
  • 定向增删改(带 WHERE ... id(n)=... 或 element_id(...))不受影响;
  • 所有属性值仅允许 JSON 标量(str/int/float/bool/None),拒绝 dict/list/bytes;
  • 若确有全量清空需求,请走 clear_graph()(或 clearGraph())专用接口, 并先取得用户明确确认,再以 allow_destructive=True 放行。
禁止操作描述原因
❌ 打印敏感凭证打印 AK/SK、密码、令牌或其他敏感信息敏感信息泄露风险

以下高风险操作在执行前需要 agent 明确确认:

高风险操作描述确认提示
⚠️ 清除所有图数据clear_graph() 或类似的清除操作

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

huaweicloud/huawei-cloud-dws-io-diag

DWS cluster I/O overload root cause diagnosis skill, based on KooCLI v3.2.0+ and DWS Autopilot MCP Server. Automatically collects I/O metrics, analyzes root causes (customer-side / system-side) via three-stage decision tree, and outputs a standardized diagnosis report. Applicable to DWS cluster I/O usage too high, I/O alarms, disk I/O load anomaly scenarios. Trigger words: "I/O高", "I/O告警", "I/O诊断", "I/O过载", "IO高", "IO告警", "IO诊断", "IO过载", "磁盘IO负载异常", "util打满", "await高", "high I/O", "I/O alarm", "I/O diagnosis"

huaweicloud/huawei-cloud-ecs-manage

Use when managing Huawei Cloud ECS (Elastic Cloud Server / 弹性云服务器) instances — lifecycle management (create / start / stop / restart / delete), day-to-day change operations (resize / reinstall OS / reset password / replace keypair / bind & unbind EIP / change security group / add & remove NIC / attach & detach volume), instance querying, quota/flavor/image inspection, mandatory async-job polling after every write, and multi-step root-cause diagnosis of ECS instance creation failures (quota → flavor → image → network → keypair → disk). Provides 23 huawei_* actions: huawei_list_ecs_instances, huawei_get_ecs_instance, huawei_list_ecs_flavors, huawei_list_ecs_images, huawei_list_ecs_quotas, huawei_diagnose_ecs_create_failure, huawei_analyze_ecs_health, huawei_create_ecs_instance, huawei_start_ecs_instance, huawei_stop_ecs_instance, huawei_restart_ecs_instance, huawei_delete_ecs_instance, huawei_resize_ecs_instance, huawei_reinstall_ecs_os, huawei_reset_ecs_password, huawei_replace_ecs_keypair, huawei_bind_ecs_eip

huaweicloud/huawei-cloud-obs-upload

Upload a local file or directory to a specified Huawei Cloud OBS (Object Storage Service) bucket with obsutil, and set up a scheduled/periodic upload task (crontab) that syncs a local directory to an OBS bucket. Also lists OBS buckets with storage capacity and object count. Use this skill when the user wants to: (1) upload a specific local file or directory to a named OBS bucket, (2) set up a scheduled/periodic upload task that automatically syncs a local directory to a named OBS bucket, (3) list their OBS buckets and check capacity and object count. Triggers include: user mentions "upload to OBS bucket", "上传文件到OBS", "上传目录到OBS", "定时上传到OBS", "目录同步到OBS桶", "OBS scheduled upload", "OBS周期上传", "OBS bucket capacity check", "OBS桶容量查询". Generic phrases such as "object storage", "upload file" or "upload directory" alone are NOT sufficient to trigger this skill.

huaweicloud/huawei-cloud-obs-website-host

Configure Huawei Cloud OBS static website hosting with Python SDK and a custom domain. Use when the user needs to enable or repair OBS website hosting, set index or error pages, expose an existing bucket for public website access through a custom domain, or connect that domain through Huawei Cloud DNS when Huawei manages the zone. Triggers include OBS static website hosting, website endpoint, index page, error page, public-read bucket website access, custom domain CNAME, Huawei Cloud DNS, setBucketWebsite. 中文触发词包括:OBS 静态网站托管、网站托管、自定义域名解析。

相关技能