huaweicloud/huaweicloud-skills/huawei-cloud-functiongraph-function-create
Claude Code and agent skill by huaweicloud/huaweicloud-skills
- community
Checking that the SKILL.md file is still in the repository.
Create and invoke FunctionGraph functions on Huawei Cloud. Supports VPC configuration, environment variables, synchronous and asynchronous function invocation. Use this skill when users ask to create, deploy, upload, or invoke cloud functions, serverless functions, or FunctionGraph functions. Triggered by keywords like "create function", "deploy function", "upload function", "invoke function", "create cloud function", "创建函数", "部署函数", "上传函数", "调用函数", "创建云函数", "FunctionGraph function", "serverless function", "function invocation".
Install
npx vskill@latest install huaweicloud/huaweicloud-skills/huawei-cloud-functiongraph-function-createSKILL.md
The same SKILL.md was published earlier as huaweicloud/huaweicloud-skills/huawei-cloud-functiongraph-function-create.
FunctionGraph Function Creation & Invocation Skill
Overview
This skill manages FunctionGraph functions on Huawei Cloud, supporting creation with advanced configuration (VPC, environment variables) and function invocation (sync/async).
Architecture: Uses Huawei Cloud FunctionGraph Python SDK to interact with FunctionGraph service.
Applicable Scenarios:
- Quickly create cloud functions without manual console login
- Batch creation of multiple functions with VPC or environment variable configuration
- Foundation component for workflow deployment
- CI/CD integration for function deployment
- Invoke and test deployed functions
Typical Use Cases:
- "Create a Python function named my_handler"
- "Deploy this code to FunctionGraph with VPC configuration"
- "Create a function with environment variables"
- "Invoke the function I just created"
Prerequisites
1. Python Environment
- Python 3.9+
- Verify:
python --version
2. SDK Installation
3. Authentication Configuration
- Valid Huawei Cloud credentials (AK/SK mode)
- Configure via environment variables:
Security Rules:
- NEVER expose AK/SK values in code or logs
- NEVER let users input AK/SK directly in conversation
- ALWAYS use environment variables for credentials
- Recommend using IAM user instead of main account
4. IAM Permission Requirements
functiongraph:function:create- Create functionfunctiongraph:function:get- Query function detailsfunctiongraph:function:list- List functionsfunctiongraph:function:invoke- Invoke function
See IAM Policies for detailed permission configuration.
Workflow
Usage
Create a Function
Invoke a Function
Note: The function URN uses the real FunctionGraph URN prefixurn:fss:.ReplacePROJECT_IDin the examples below with your actual project ID(the same value as theHUAWEI_PROJECT_IDenvironment variable). Thefunction package isdefaultand the version islatest(or a specificversion/alias). You can copy the URN returned by thecreatecommand andappend:latestfor invocation.
Parameter Confirmation
Create Parameters
| Parameter | Required/Optional | Description | Default | |
|---|---|---|---|---|
--name | Required | Function name, must follow naming rules | - | |
--runtime | Required | Runtime environment (Python3.9, etc.) | - | |
--handler | Required | Function entry point (e.g., index.handler) | - | |
--code | Required | Code file path or inline code content | - | |
--memory | Optional | Memory size in MB | 128 | |
--timeout | Optional | Timeout in seconds | 3 | |
--description | Optional | Function description | - | |
--vpc-id | Optional | VPC ID for VPC configuration (must be set together with --subnet-id and --security-group-id) | - | |
--subnet-id | Optional | Subnet ID for VPC configuration (must be set together with --vpc-id and --security-group-id) | - | |
--security-group-id | Optional | Security group ID for VPC configuration (must be set together with --vpc-id and --subnet-id) | - | |
--env-vars | Optional | Environment variables as JSON string | - |
Invoke Parameters
| Parameter | Required/Optional | Description | Default | |
|---|---|---|---|---|
--function-urn | Required | Function URN to invoke | - | |
--body | Optional | Event payload as JSON string | {} | |
--invocation-type | Optional | sync or async | sync | |
--log-type | Optional | tail to return last 4KB log | - |
Runtime Options
| Runtime | Handler Format | Example | |
|---|---|---|---|
| Python3.9 | index.handler | def handler(event, context): | |
| Node.js14.18 | index.handler | exports.handler = (event, context) => {} | |
| Java8 | com.example.Handler::handleRequest | Java class method | |
| Go1.x | handler | Go function name |
Verification Method
See Verification Method for detailed procedures.
Quick Verification
Output Format
Create Output
The script returns a structured JSON object:
Invoke Output
Best Practices
- Test before production: Always test in a development environment first
- Monitor resources: Set up monitoring for function invocations and errors
- Use environment variables: Store sensitive data in environment variables
- Implement error handling: Add proper error handling in function code
- Set appropriate timeouts: Configure timeout based on function logic
- VPC for private resources: Use VPC configuration when functions need access to private network resources
Error Handling
| Error Code | Description | Resolution | |
|---|---|---|---|
| InvalidParameter | Invalid input parameters | Check parameter format and values | |
| InsufficientPermission | Insufficient permissions | Check IAM permissions | |
| QuotaExceeded | Resource quota exceeded | Request quota increase or delete unused functions | |
| FunctionAlreadyExists | Function with same name exists | Use different function name or delete existing function | |
| FunctionNotFound | Function URN not found (invoke) | Verify the function URN is correct |
References
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/computing/functiongraph/huawei-cloud-functiongraph-function-create/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/huaweicloud/huaweicloud-skills/huawei-cloud-functiongraph-function-create)