
huawei-cloud-ges-graph
Provides access guide for Huawei Cloud Graph Database GES service. Covers Cypher queries, GQL queries, schema/label management, summary info queries, graph data editing and more. Use this skill when users want to operate Huawei Cloud graph database GES service via terminal.
- Installs
- 190
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/huaweicloud/huaweicloud-skills --skill huawei-cloud-ges-graph- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads huawei-cloud-ges-graph automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
⚠️ Execution Method (Must Read): This skill executes queries via local Python or Node.js scripts under
scripts/. Using direct API calls is prohibited.
- Query scripts are located under the skill directory
scripts/(e.g.,scripts/ges_graph_skill.py)- All scripts and environment check scripts are inside the skill package. You must use
skill action=execto execute them; do not run them directly in the shell- Prefer inline execution (
python -cornode -e) over creating temporary script files. See "Inline Execution (No Temp Files)" section below.- All paths are relative to the skill directory, which is the directory where this SKILL.md resides
GES Graph Access Guidance
Overview
Huawei Cloud Graph Engine Service (GES) persistent edition atomic capability, providing access guide for graph database operations. Covers Cypher queries, GQL queries, schema/label management, summary info queries, graph data editing and other core capabilities.
Directory Structure
The directory conventions are as follows (all paths are relative to the skill directory):
scripts/- Contains the Python and Node.js execution scriptsges_graph_skill.py- Python SDK for GES graph operationsges_graph_skill.js- Node.js SDK for GES graph operations
references/- Contains documentation and configuration examplesges_env.csv.example- Environment configuration template
Prerequisites
Before using this skill, ensure the following conditions are met:
1. Runtime Environment
Supports Python or Node.js runtime. Requires Python 3.8+ or Node.js 14+.
2. Graph Instance Configuration
This skill supports both environment variables and configuration files. Environment variables take precedence over configuration files.
Environment Variables and Parameters
| Environment Variable | Description | Required |
|---|---|---|
GES_GRAPH_IP | GES service IP | Yes |
GES_GRAPH_PORT | GES service port | Yes |
GES_PROJECT_ID | Project ID | Yes |
GES_GRAPH_NAME | Graph name | Yes |
GES_IAM_URL | IAM service URL | Yes |
GES_REGION | Region | Yes |
HUAWEI_CLOUD_AK | Access Key | Yes* |
HUAWEI_CLOUD_SK | Secret Key | Yes* |
GES_USERNAME | Username | Conditional** |
GES_PASSWORD | Password | Conditional** |
GES_DOMAIN_NAME | Domain name | Conditional** |
GES_TOKEN | Token (highest priority) | Optional |
- AK/SK required for AKSK authentication. ** Username/password conditionally required when AKSK is not available.
Configuration File (.env/ges_env.csv)
Config file path: .env/ges_env.csv
| Config Item | Description | Required | Example Value |
|---|---|---|---|
| graph_ip | GES service IP | Yes | 100.95.xxx.xxx |
| graph_port | GES service port | Yes | 80 |
| project_id | Project ID | Yes | your_project_id |
| graph_name | Graph name | Yes | your_graph_name |
| iam_url | IAM service URL | Yes | (see region table below) |
| access_key | Access Key | Yes* | your_access_key |
| secret_key | Secret Key | Yes* | your_secret_key |
| username | Username | Conditional** | your_username |
| password | Password | Conditional** | your_password |
| domain_name | Domain name | Conditional** | your_domain_name |
| region | Region | Yes | cn-north-4 |
- access_key/secret_key required for AKSK authentication. ** username/password/domain_name conditionally required when AKSK is not available.
IAM URLs by Region
| Region | URL | protocol |
|---|---|---|
| cn-north-4 | iam.cn-north-4.myhuaweicloud.com/v3/auth/tokens | HTTPS |
| ap-southeast-1 | iam.ap-southeast-1.myhuaweicloud.com/v3/auth/tokens | HTTPS |
Three methods are supported (priority from high to low):
- Environment variable
GES_TOKEN - AKSK method (
HUAWEI_CLOUD_AK+HUAWEI_CLOUD_SKoraccess_key+secret_key) - Password method (username + password + domain_name)
⛔ Prohibited Operations (Safety Guardrail)
This skill prohibits the following operations:
| Prohibited Operation | Description | Reason |
|---|---|---|
| ❌ Printing sensitive credentials | Printing AK/SK, password, token, or other sensitive information | Risk of sensitive information leakage |
The following high-risk operations require explicit agent confirmation before execution:
| High-Risk Operation | Description | Confirmation Prompt |
|---|---|---|
| ⚠️ Clearing all graph data | clear_graph() or similar clear operations | "Are you sure you want to clear all data in the graph? This operation is irreversible." |
| ⚠️ Batch deleting nodes/edges | Unconditional bulk deletion of all nodes or edges | "Are you sure you want to batch delete all nodes/edges? This operation is irreversible." |
If a user requests any of the above high-risk operations, explicit confirmation must be obtained: "This is a high-risk operation and requires your explicit confirmation. Please reply with 'confirm' to proceed."
Cypher and GQL Query Languages
GES supports two query languages: Cypher (Neo4j-compatible) and GQL (international standard graph query language).
Cypher Usage
Python:
# Execute a Cypher query
result = skill.execute_query("MATCH (n) RETURN n LIMIT 10")
# Create a node (_ID_ is used only during creation to set a custom ID)
result = skill.execute_query(
"CREATE (n:Person {_ID_: 'p001', name: '张三'}) RETURN n"
)
# Match query
result = skill.execute_query(
"MATCH (n:Person)-[:KNOWS]->(m) WHERE n.name = '张三' RETURN m"
)
# Update a node (match via id() function)
result = skill.execute_query(
"MATCH (n) WHERE id(n) = 123 SET n.name = '李四' RETURN n"
)
# Delete a node
result = skill.execute_query(
"MATCH (n) WHERE id(n) = 123 DETACH DELETE n"
)
# Aggregate query
result = skill.execute_query(
"MATCH (n:Person) RETURN n.city, count(*) as cnt ORDER BY cnt DESC"
)
Node.js:
const { GESGraphSkill } = require('./ges_graph_skill.js');
const skill = new GESGraphSkill();
// Execute a Cypher query
const result = await skill.executeQuery("MATCH (n) RETURN n LIMIT 10");
// Create a node (_ID_ is used only during creation to set a custom ID)
const result = await skill.executeQuery(
"CREATE (n:Person {_ID_: 'p001', name: '张三'}) RETURN n"
);
// Match query
const result = await skill.executeQuery(
"MATCH (n:Person)-[:KNOWS]->(m) WHERE n.name = '张三' RETURN m"
);
// Update a node
const result = await skill.executeQuery(
"MATCH (n) WHERE id(n) = 123 SET n.name = '李四' RETURN n"
);
// Delete a node
const result = await skill.executeQuery(
"MATCH (n) WHERE id(n) = 123 DETACH DELETE n"
);
// Aggregate query
const result = await skill.executeQuery(
"MATCH (n:Person) RETURN n.city, count(*) as cnt ORDER BY cnt DESC"
);
// Path query
const result = await skill.executeQuery(
"MATCH p=(n:Person)-[*1..3]->(m) WHERE n.name = '张三' RETURN p"
);
Inline Execution (No Temp Files)
Execute Cypher queries directly via skill action=exec without creating any script files.
Note: When running via
skill action=exec, the working directory is the project root. The installed skill is located under.agents/skills/huawei-cloud-ges-graph, not underskills/ai/ges/.
Python:
skill exec py -c "
import sys, os; cwd=os.getcwd()
skill_dir = os.path.join(cwd, '.agents', 'skills', 'huawei-cloud-ges-graph')
sys.path.insert(0, os.path.join(skill_dir, 'scripts'))
from ges_graph_skill import get_skill
import json
r = get_skill().execute_query('MATCH (n) RETURN n LIMIT 5')
print(json.dumps(r, ensure_ascii=False, indent=2))
"
Node.js:
skill exec node -e "
const path = require('path');
const cwd = process.cwd();
const scriptPath = path.join(cwd, '.agents', 'skills', 'huawei-cloud-ges-graph', 'scripts', 'ges_graph_skill.js');
const { GESGraphSkill } = require(scriptPath);
(async () => {
const r = await new GESGraphSkill().executeQuery('MATCH (n) RETURN n LIMIT 5');
console.log(JSON.stringify(r, null, 2));
})();
"
Common Cypher Statements
| Category | Statement | Description |
|---|---|---|
| Schema | call db.schema() | Get graph schema information |
| Indexes | call db.indexes() | View all indexes |
| Kill query | call dbms.killQuery('queryId') | Terminate a running query |
| Running queries | call dbms.listQueries() | View current queries |
| System parameters | call dbms.parameter('needNodeIndex', false) | Remove index constraint (large graph scenarios) |
GQL Usage (Supported by this Skill)
GQL is the ISO/IEC 39075 standardized graph query language. GES invokes it via action_id=execute-gql-query.
# GQL requires the underlying _request method
client = GESClient()
result = client._request('POST', '/action?action_id=execute-gql-query', json={
"statements": [{
"statement": "INSERT (n:Person{_ID_:'p001', firstName:'Eywa'}) RETURN n",
"parameters": {},
"resultDataContents": ["row"]
}]
})
Common GQL Statements
| Category | Statement | Description |
|---|---|---|
| Insert | INSERT (n:Person{_ID_:'p001', firstName:'Eywa'}) RETURN n | Insert node |
| Match | MATCH (n:Person WHERE element_id(n)='p001') RETURN n | Conditional match |
| Update | MATCH (n:Person WHERE element_id(n)='p001') SET n.lastName='Higgo' RETURN n | Update properties |
| Remove property | MATCH (n:Person WHERE element_id(n)='p001') REMOVE n.lastName RETURN n | Remove property |
| Delete node | MATCH (n:Person WHERE element_id(n)='p001') DELETE n | Delete node |
| Filter | MATCH (n:Person)-[:KNOWS]->(m) FILTER element_id(n)='7933' AND m.gender='male' RETURN m | Filter results |
| FOR loop | FOR a IN [1,2,3] RETURN a | Loop statement |
| LET variable | LET a = 1, b = 2 RETURN a, b | Variable definition |
| UNION | ... UNION ALL ... | Merge result sets |
Cypher vs GQL Key Differences
| Feature | Cypher | GQL |
|---|---|---|
| Internal ID | id(n) | element_id(n) |
| Custom ID (insert only) | _ID_ property | _ID_ property |
| Node matching | MATCH (n) | MATCH (n WHERE ...) |
| SET statement | SET n.prop = value | SET n.prop = value |
| Remove property | REMOVE n.prop | REMOVE n.prop |
| Loops | Not supported | FOR x IN [...] |
| Variable definition | Not supported | LET x = value |
Cypher Query
# Execute a Cypher query
result = skill.execute_query("MATCH (n) RETURN n LIMIT 10")
# Execute a Cypher query with parameters
result = skill.execute_query(
"MATCH (n) WHERE n.name = $name RETURN n",
parameters={"name": "张三"}
)
Vertex Operations
# Add a node
result = skill.client.add_node(
node_id="mem_001",
labels=["Memory", "conversation"],
properties={"content": "User said Hello", "timestamp": 1234567890}
)
# Batch add nodes
result = skill.client.add_nodes_batch([
{"id": "mem_001", "labels": ["Memory"], "properties": {"content": "test1"}},
{"id": "mem_002", "labels": ["Memory"], "properties": {"content": "test2"}}
])
# Get a node
result = skill.client.get_node("mem_001")
# Update a node
result = skill.client.update_node("mem_001", {"content": "New content"})
# Delete a node
result = skill.client.delete_node("mem_001")
Edge Operations
# Add an edge
result = skill.client.add_edge(
start_node_id="mem_001",
end_node_id="mem_002",
edge_type="RELATED_TO",
properties={"weight": 0.8}
)
# Delete an edge
result = skill.client.delete_edge("mem_001", "mem_002", "RELATED_TO")
# Get edges of a node
result = skill.client.get_edges("mem_001", direction="both")
Label Operations
# Add a label to a node
result = skill.client.add_label_to_node("mem_001", "important")
# Query nodes by label
result = skill.client.get_nodes_by_label("Memory", limit=100)
Graph Management
# Get schema information
result = skill.get_schema_info()
# Get graph statistics
result = skill.get_statistics()
# Clear all data in the graph (dangerous operation)
result = skill.clear_all_memories()
Import/Export
# Import graph data
job_id = skill.client.import_graph(
schema_path="obs://bucket/schema.xml",
vertex_path="obs://bucket/vertex",
edge_path="obs://bucket/edge"
)
# Export graph data (access_key/secret_key are read from .env automatically)
job_id = skill.client.export_graph(
export_path="obs://bucket/export",
vertex_set_name="set_vertex",
edge_set_name="set_edge"
)
GES Syntax Guide
Node ID Handling
GES uses the special _ID_ property to handle string-type node IDs:
-
Creating nodes uses the
_ID_property:CREATE (n:Memory{_ID_: 'mem_001', content: 'test'}) -
Other operations use the
id()function:MATCH (n) WHERE id(n) = 'mem_001' RETURN n MATCH (n)-[r]->(m) WHERE id(n) = 'mem_001' RETURN r
Schema Requirements
GES requires that schema (Labels and Properties) be defined before corresponding nodes can be created. Schema can be defined through:
- Creating Labels and properties via the GES management console
- Importing data with schema through the import interface
Response Format
All Cypher interfaces return a unified JSON format:
{
"results": [
{
"columns": ["column1", "column2"],
"data": [
{"row": ["value1", "value2"], "meta": [null, null]}
]
}
],
"errors": []
}
Error Handling
from ges_graph_skill import get_skill
skill = get_skill()
try:
result = skill.execute_query("MATCH (n) RETURN n")
except Exception as e:
print(f"Error: {e}")
Important Notes
- Token validity: Token is valid for 24 hours; the code refreshes automatically
- Schema constraint: Ensure Labels and Properties are defined before creating nodes
- Dangerous operations:
clear_graph()deletes all data in the graph; use with caution - Asynchronous operations: For large data import/export, asynchronous mode is recommended
Reference Documentation
- Configuration file format:
references/ges_env.csv.example— Environment configuration file template and field descriptions - Graph database format: https://support.huaweicloud.com/usermanual-ges/ges_01_0153.html — Detailed GES graph data format documentation
- How to access the business API: https://support.huaweicloud.com/api-ges/ges_03_0112.html — GES business API access guide
FAQ
What does the huawei-cloud-ges-graph skill do?
Provides access guide for Huawei Cloud Graph Database GES service. Covers Cypher queries, GQL queries, schema/label management, summary info queries, graph data editing and more. Use this skill when users want to operate Huawei Cloud graph database GES service via terminal.
How do I install huawei-cloud-ges-graph?
Run npx skills add https://github.com/huaweicloud/huaweicloud-skills --skill huawei-cloud-ges-graph in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/huawei-cloud-ges-graph/ (personal) or .claude/skills/huawei-cloud-ges-graph/ (project).
Which AI agents can use huawei-cloud-ges-graph?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is huawei-cloud-ges-graph safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains huawei-cloud-ges-graph?
It is published by huaweicloud in huaweicloud/huaweicloud-skills. It has 190 recorded installs.
More from huaweicloud/huaweicloud-skills
huawei-cloud-terraform-installer
huaweicloud/huaweicloud-skills
Installs Terraform CLI cross-platform with Huawei Cloud mirror support. Use this skill whenever the user mentions installing Terraform, setting up Terraform environment, or when IaC tasks detect missing Terraform. Trigger: install terraform, setup terraform, terraform environment, huaweicloud provider.
huawei-cloud-find-skills
huaweicloud/huaweicloud-skills
Invoke this skill to search, list, query, discover, browse, find and install any Huawei Cloud (华为云) agent skill. Triggers include: "华为云", "华为云有什么skill", "华为云相关skill", "华为云agent skill 市场", "华为云skill类目", "explore Huawei Cloud skills", "show Huawei Cloud skill categories", "does a Huawei Cloud skill exist for...", "which Huawei Cloud skills exist", "搜索华为云技能", "查询华为云skill列表", "有没有管理ECS/OBS/RDS的skill", "帮我找 XX 华为云skill", "介绍 XX Skill 内容", "华为云 XX Skill 具体做什么", "安装华为云Skill".
huawei-cloud-billing-scout
huaweicloud/huaweicloud-skills
Huawei Cloud BSS billing (not AWS/Azure/other clouds; refuses pricing quotes, real-name review, and any non-billing scope): balance, spend, attribution, reconciliation, coupons, stored-value cards, enterprise/partner billing. One-page briefing via hcloud. Use only when the user explicitly mentions 华为云 / Huawei Cloud / BSS and 余额/账单/对账/资源包/代金券/储值卡/企业或伙伴账务; refuses pay, renew, refund, delete.
huawei-cloud-computing-query
huaweicloud/huaweicloud-skills
Queries Huawei Cloud computing resources (ECS/BMS/IMS/AS), Covers ECS instances, flavors, keypairs, quotas, server groups, block devices, NICs, VNC console, BMS bare metal servers/flavors/quotas, IMS images/OS versions/members/quotas, and AS scaling groups/configs/policies/activity logs/lifecycle hooks/warm pools/quotas. No write operations. Use this skill when the user needs to query ECS instance details, list flavors, check BMS availability, browse images, or view auto-scaling group/policy status. Triggers: 弹性云服务器, ECS, 裸金属, BMS, 镜像, IMS, 弹性伸缩, AS, 伸缩组, 伸缩策略, 规格查询, flavor, instance, image, scaling.
huawei-cloud-obs-upload
huaweicloud/huaweicloud-skills
Upload local files or directories to Huawei Cloud OBS (Object Storage Service) buckets, list OBS buckets with capacity and object count, and schedule periodic uploads via crontab. Use this skill when the user wants to: (1) upload a local file or directory to an OBS bucket, (2) list OBS buckets and check their storage capacity and object count, (3) set up a scheduled/periodic upload task to automatically sync a local directory to an OBS bucket. Triggers include: user mentions "OBS", "object storage", "bucket list", "bucket capacity", "upload to OBS", "upload file", "upload directory", "scheduled upload", "periodic upload", "sync to bucket", "对象存储", "桶列表", "桶容量", "上传文件", "上传目录", "定时上传", "OBS管理"
huawei-cloud-terraform-generator
huaweicloud/huaweicloud-skills
Generate Huawei Cloud Terraform configurations and execute deployment with user-guided approval. Use this skill when users want to create Huawei Cloud infrastructure as Terraform, whether they ask explicitly for Terraform or describe goals such as deploying a website, launching an application, or creating network, compute, database, load balancing, or storage resources. Trigger when users mention 创建/create、生成/generate、部署/deploy、配置/configure、使用/use、管理/manage、华为云/Huawei Cloud、Terraform、ECS、VPC、资源/resource、云服务器/ECS、虚拟机/VM、实例/instance、网络/network、负载均衡/ELB、数据库/database、RDS、存储/storage、OBS、桶/bucket、域名/domain、DNS、证书/certificate、SSL、监控/monitoring、日志/log、备份/backup、容器/container、CCE、函数工作流/FunctionGraph
Popular data & databases skills
supabase-postgres-best-practices
supabase/agent-skills
Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pgcron, pgmq), vector/semantic search (pgvector), and restoring dumps (pgrestore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.
prisma-client-api
prisma/skills
Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on "prisma query", "findMany", "create", "update", "delete", "$transaction".
prisma-database-setup
prisma/skills
Deprecated compatibility name for prisma-orm-setup. Use only when a user or existing integration explicitly invokes prisma-database-setup; otherwise select prisma-orm-setup.
prisma-cli
prisma/skills
Prisma ORM 7 CLI reference for existing Prisma 7 applications or explicitly selected Prisma 7 workflows. Covers prisma init, generate, migrate, db, dev, studio, and mcp. For setup, connection repair, or Prisma 8, use prisma-orm-setup; not the Prisma Platform CLI.
prisma-postgres
prisma/skills
Deprecated compatibility name for prisma-postgres-setup. Use only when a user or existing integration explicitly invokes prisma-postgres; otherwise select prisma-postgres-setup.
prisma-driver-adapter-implementation
prisma/skills
Required reference for Prisma ORM 7 SQL driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter, Transaction, savepoint, result mapping, or DriverAdapterError behavior. Covers current transaction lifecycle, optional savepoint hooks, original database-error preservation, and verification.