跳到正文
cccskills
免费在 GitHub 公开

volcengine-rds-postgresql

使用火山引擎 RDS PostgreSQL,帮助用户完成 RDS PostgreSQL 相关的实例管理、数据库操作、账号管理和运维任务,可直接调用 uv run ./scripts/call_rds_postgresql.py 脚本获取实时结果。

中文简介正在准备中。当前显示原文说明。

集成工具PostgreSQL
查看安装方法

包含的文件(4)

  • SKILL.md6.6 KB
  • LICENSE11.1 KB
  • requirements.txt127 B
  • scripts/call_rds_postgresql.py19.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Skill 概览

本 Skill 用于在对话中充当 火山引擎 RDS PostgreSQL 的智能运维代理:

  • 理解用户的自然语言需求(中文或英文),识别是否与 RDS PostgreSQL 相关;
  • 直接调用内置脚本 scripts/call_rds_postgresql.py 实时查询 RDS PostgreSQL 并获取结果;
  • 当获取到结果或用户粘贴错误信息时,进一步解释、诊断并给出后续建议。

工作模式:

  • 使用 scripts/call_rds_postgresql.py 脚本直接获取 RDS PostgreSQL 的实时响应

运行方式: 脚本支持两种运行方式:

# 方式 1: 使用 uv (推荐,自动管理依赖)
uv run ./scripts/call_rds_postgresql.py [action] [options]

# 方式 2: 使用 python (需要预先安装依赖)
python ./scripts/call_rds_postgresql.py [action] [options]

标准使用流程

  1. 确认任务类型与参数

    • 判断用户意图:查询实例列表、查看实例详情、管理数据库、管理账号、查看参数配置、创建实例等。
    • 收集必要参数(如未指定则使用默认值):
      • --region:地域 ID(默认 cn-beijing)
      • --action:操作类型(如 list-instances、describe-instance、list-databases 等)
      • --instance-id:实例 ID(部分操作必需)
  2. 构造查询并调用脚本

    • 示例(以下命令可使用 uv run 或 python 运行):
      # 查询实例列表
      uv run ./scripts/call_rds_postgresql.py list-instances
      # 或
      python ./scripts/call_rds_postgresql.py list-instances
      
      # 查询指定实例详情
      uv run ./scripts/call_rds_postgresql.py describe-instance --instance-id postgres-xxx
      # 或
      python ./scripts/call_rds_postgresql.py describe-instance --instance-id postgres-xxx
      
      # 查询实例的数据库列表
      uv run ./scripts/call_rds_postgresql.py list-databases --instance-id postgres-xxx
      # 或
      python ./scripts/call_rds_postgresql.py list-databases --instance-id postgres-xxx
      
      # 查询实例的账号列表
      uv run ./scripts/call_rds_postgresql.py list-accounts --instance-id postgres-xxx
      # 或
      python ./scripts/call_rds_postgresql.py list-accounts --instance-id postgres-xxx
      
      # 查询实例参数
      uv run ./scripts/call_rds_postgresql.py list-parameters --instance-id postgres-xxx
      # 或
      python ./scripts/call_rds_postgresql.py list-parameters --instance-id postgres-xxx
      
      # 查询 VPC 列表(用于创建实例)
      uv run ./scripts/call_rds_postgresql.py list-vpcs
      # 或
      python ./scripts/call_rds_postgresql.py list-vpcs
      
      # 查询子网列表
      uv run ./scripts/call_rds_postgresql.py list-subnets --vpc-id vpc-xxx --zone-id cn-beijing-a
      # 或
      python ./scripts/call_rds_postgresql.py list-subnets --vpc-id vpc-xxx --zone-id cn-beijing-a
      
  3. 解析结果并后续处理

    • 将 RDS PostgreSQL 的响应用自然语言解释给用户;
    • 如返回包含敏感操作,评估风险并提醒:
      • 避免在生产环境直接执行高风险操作(如删除实例、删除数据库等);
      • 建议在测试环境验证或做好备份。

工具脚本使用说明

支持的操作(Actions)

操作说明必需参数
list-instances查询 RDS PostgreSQL 实例列表无
describe-instance查询指定实例详情--instance-id
list-databases查询实例的数据库列表--instance-id
list-accounts查询实例的账号列表--instance-id
list-parameters查询实例的参数配置--instance-id
list-parameter-templates查询参数模板列表无
describe-parameter-template查询参数模板详情--template-id
list-vpcs查询 VPC 列表无
list-subnets查询子网列表--vpc-id
get-price查询实例价格多个配置参数

命令行参数

参数说明默认值
action操作类型(必需)-
--region / -r火山引擎地域 IDcn-beijing
--instance-id / -i实例 ID无
--page-number分页页码1
--page-size每页记录数10
--output / -o输出格式(json/table)json

注意:--region、--page-number、--page-size 等全局参数必须放在子命令之前,例如:

uv run ./scripts/call_rds_postgresql.py --region cn-shanghai list-instances

放在子命令之后会被忽略(argparse 解析限制)。

输出格式

脚本会将查询信息输出到 stderr,将结果输出到 stdout,便于分离日志和结果:

[操作] list-instances
[地域] cn-beijing
============================================================
[查询结果]
<实际结果内容>

常见使用场景

1. 查看所有实例

uv run ./scripts/call_rds_postgresql.py list-instances

2. 查看实例详情

uv run ./scripts/call_rds_postgresql.py describe-instance --instance-id postgres-xxx

3. 查看实例的数据库

uv run ./scripts/call_rds_postgresql.py list-databases --instance-id postgres-xxx

4. 查看实例的账号

uv run ./scripts/call_rds_postgresql.py list-accounts --instance-id postgres-xxx

5. 查看实例参数配置

uv run ./scripts/call_rds_postgresql.py list-parameters --instance-id postgres-xxx

6. 按版本过滤实例

uv run ./scripts/call_rds_postgresql.py list-instances --db-engine-version PostgreSQL_14

7. 创建实例前查询网络信息

# 先查询 VPC
uv run ./scripts/call_rds_postgresql.py list-vpcs

# 再查询子网
uv run ./scripts/call_rds_postgresql.py list-subnets --vpc-id vpc-xxx --zone-id cn-beijing-a

环境变量配置

  1. 获取火山引擎访问凭证:参考 用户指南 获取 AK/SK

  2. 配置以下环境变量:

export VOLCENGINE_ACCESS_KEY="your-access-key"
export VOLCENGINE_SECRET_KEY="your-secret-key"
export VOLCENGINE_REGION="cn-beijing"  # 可选,默认 cn-beijing

权限说明:list-vpcs 和 list-subnets 调用的是 VPC 服务接口,AK/SK 需要同时授予 RDS PostgreSQL 和 VPC(vpc:DescribeVpcs、vpc:DescribeSubnets)两个服务的权限, 否则会返回 AccessDenied 403 错误。

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

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-samples4742026年10月16日 更新

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

中文简介正在准备中。当前显示原文说明。

bytedance/agentkit-samples4742026年10月16日 更新

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

中文简介正在准备中。当前显示原文说明。

bytedance/agentkit-samples4742026年10月16日 更新

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-samples4742026年10月16日 更新

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-samples4742026年10月16日 更新

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

中文简介正在准备中。当前显示原文说明。

bytedance/agentkit-samples4742026年10月16日 更新

查看 bytedance 的全部技能

报告此技能的问题