tc_migrate

腾讯云跨账号资源迁移工具。将源账号(账号A)的 VPC、CLB、NAT、CVM、安全组等资源迁移到目标账号(账号B),通过 CCN 云联网实现跨账号网络互通。支持自动扫描、配置生成、Terraform 部署。

3,891 stars

Best use case

tc_migrate is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

腾讯云跨账号资源迁移工具。将源账号(账号A)的 VPC、CLB、NAT、CVM、安全组等资源迁移到目标账号(账号B),通过 CCN 云联网实现跨账号网络互通。支持自动扫描、配置生成、Terraform 部署。

Teams using tc_migrate should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/tc-migrate/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/awaili/tc-migrate/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/tc-migrate/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How tc_migrate Compares

Feature / Agenttc_migrateStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

腾讯云跨账号资源迁移工具。将源账号(账号A)的 VPC、CLB、NAT、CVM、安全组等资源迁移到目标账号(账号B),通过 CCN 云联网实现跨账号网络互通。支持自动扫描、配置生成、Terraform 部署。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# tc-migrate 跨账号迁移 Skill

腾讯云跨账号资源迁移工具,将源账号的云资源迁移到目标账号,通过 CCN 云联网实现网络互通。

**核心流程 — 4 步**:

```
① 配置 → ② 扫描 → ③ 生成 → ④ 部署
```

---

## 支持的资源类型

| 资源类型 | Key |
|----------|-----|
| VPC | `vpc` |
| Subnet | `subnet` |
| Security Group | `sg` |
| CLB | `clb` |
| NAT Gateway | `nat` |
| CVM | `cvm` |
| CCN(自动创建) | `ccn` |

---

## 前提条件

1. **安装依赖**:
   ```bash
   pip install -r {baseDir}/requirements.txt
   ```

2. **安装 Terraform**(>= 1.0):
   ```bash
   # CentOS/RHEL
   sudo yum install -y yum-utils
   sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
   sudo yum -y install terraform
   
   # 验证
   terraform --version
   ```

3. **准备 `account.yaml`**(在工作目录下):
   ```yaml
   account_a:  # 源账号
     secret_id: "AKID..."
     secret_key: "..."
   account_b:  # 目标账号
     secret_id: "AKID..."
     secret_key: "..."
   region_a: "ap-beijing"
   region_b: "ap-guangzhou"
   ```

> ⚠️ **安全提醒**:绝不要在对话中显示或记录密钥值!

---

## Step 1: 全自动配置

```bash
# 基本用法(推荐)
python3 {baseDir}/main.py config auto --skip-empty-vpc

# 生成密钥模板(如果没有 account.yaml)
python3 {baseDir}/main.py config account-init
```

**生成文件**:`tc-migrate.yaml`

---

## Step 2: 资源扫描

```bash
# 扫描并保存(推荐)
python3 {baseDir}/main.py scan --save --skip-empty-vpc

# 仅预览
python3 {baseDir}/main.py scan
```

**更新文件**:`tc-migrate.yaml`(追加 `resources` 配置)

> 💡 `config auto` 默认自动扫描,可跳过此步。

---

## Step 3: 生成 Terraform 变量文件

```bash
# 生成 tfvars(推荐)
python3 {baseDir}/main.py generate --force

# 仅预览
python3 {baseDir}/main.py generate --preview
```

**生成文件**:`{baseDir}/terraform/terraform.tfvars`

---

## Step 4: 执行迁移

```bash
# 执行迁移(会在 apply 前确认)
python3 {baseDir}/main.py run

# 跳过确认
python3 {baseDir}/main.py run -y
```

**内部流程**:generate → init → plan → apply

---

## 常见场景

### 场景 1:完整首次迁移

```bash
python3 {baseDir}/main.py config account-init     # 1. 生成密钥模板
# 编辑 account.yaml 填入密钥
python3 {baseDir}/main.py config auto --skip-empty-vpc  # 2. 配置 + 扫描
python3 {baseDir}/main.py generate                # 3. 生成 tfvars
python3 {baseDir}/main.py run                     # 4. 执行迁移
```

### 场景 2:增量变更

```bash
# 修改 tc-migrate.yaml 后
python3 {baseDir}/main.py generate
python3 {baseDir}/main.py plan
python3 {baseDir}/main.py apply
```

### 场景 3:销毁资源

```bash
python3 {baseDir}/main.py destroy
```

---

## 重要提醒

1. **绝不显示或记录密钥值**
2. **执行 apply 前务必确认 plan 输出**
3. **CCN 安全配置已通过 Terraform 自动实现**
4. **妥善保管 `terraform.tfstate`(包含敏感信息)**

---

## 参考文档

详细信息请查阅 `{baseDir}/reference/` 目录:

| 文档 | 内容 |
|------|------|
| `installation.md` | 安装指南 |
| `commands.md` | 完整命令参考 |
| `file-structure.md` | 文件结构和配置示例 |
| `ccn-security.md` | CCN 安全配置详解 |
| `troubleshooting.md` | 故障排查指南 |

Related Skills

migrate

3891
from openclaw/skills

Migrate from Cypress or Selenium to Playwright. Use when user mentions "cypress", "selenium", "migrate tests", "convert tests", "switch to playwright", "move from cypress", or "replace selenium".

---

3891
from openclaw/skills

name: article-factory-wechat

Content & Documentation

humanizer

3891
from openclaw/skills

Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.

Content & Documentation

find-skills

3891
from openclaw/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

General Utilities

tavily-search

3891
from openclaw/skills

Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.

Data & Research

baidu-search

3891
from openclaw/skills

Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.

Data & Research

agent-autonomy-kit

3891
from openclaw/skills

Stop waiting for prompts. Keep working.

Workflow & Productivity

Meeting Prep

3891
from openclaw/skills

Never walk into a meeting unprepared again. Your agent researches all attendees before calendar events—pulling LinkedIn profiles, recent company news, mutual connections, and conversation starters. Generates a briefing doc with talking points, icebreakers, and context so you show up informed and confident. Triggered automatically before meetings or on-demand. Configure research depth, advance timing, and output format. Walking into meetings blind is amateur hour—missed connections, generic small talk, zero leverage. Use when setting up meeting intelligence, researching specific attendees, generating pre-meeting briefs, or automating your prep workflow.

Workflow & Productivity

self-improvement

3891
from openclaw/skills

Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks.

Agent Intelligence & Learning

botlearn-healthcheck

3891
from openclaw/skills

botlearn-healthcheck — BotLearn autonomous health inspector for OpenClaw instances across 5 domains (hardware, config, security, skills, autonomy); triggers on system check, health report, diagnostics, or scheduled heartbeat inspection.

DevOps & Infrastructure

linkedin-cli

3891
from openclaw/skills

A bird-like LinkedIn CLI for searching profiles, checking messages, and summarizing your feed using session cookies.

Content & Documentation

notebooklm

3891
from openclaw/skills

Google NotebookLM 非官方 Python API 的 OpenClaw Skill。支持内容生成(播客、视频、幻灯片、测验、思维导图等)、文档管理和研究自动化。当用户需要使用 NotebookLM 生成音频概述、视频、学习材料或管理知识库时触发。

Data & Research