AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Migrate

skill-lightpointventures-claude-code-starter-migrate · by lightpointventures

当用户想转换数据格式、CSV 转 JSON、迁移数据库、导入导出数据时使用 -- 在不同格式和系统之间迁移数据

No reviews yet
0 installs
27 views
0.0% view→install

Install

$ agentstack add skill-lightpointventures-claude-code-starter-migrate

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-lightpointventures-claude-code-starter-migrate)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Migrate? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

数据迁移

帮用户在不同数据格式之间转换,或从一个系统迁移数据到另一个系统。

步骤

0. 备份(强制)

在做任何迁移操作之前,必须先备份源数据:

  • 文件:cp source.csv source.csv.bak
  • 数据库:pg_dump / mysqldump / sqlite3 db.sqlite .dump > backup.sql
  • 告知用户备份位置,确认后再继续

1. 确定迁移类型

根据用户需求,走对应的子路径:

(a) 文件格式转换(CSV/JSON/Excel/Parquet 互转)

  • 推荐工具:pandas(Python 通用)、jq(JSON 处理)、csvkit(CSV 命令行工具)
  • 关键:先用 filechardetect 确认源文件编码

(b) 数据库迁移(MySQL -> PostgreSQL、SQLite -> PostgreSQL 等)

  • 推荐工具:pgloader(MySQL/SQLite 到 PostgreSQL)、mysqldump + psql(手动)、Django/Alembic migrations(ORM 项目)
  • 关键:先对比源和目标的 schema 差异(字段类型、索引、约束)

(c) API 数据导入(从外部 API 拉数据存到本地)

  • 推荐:写 Python 脚本,包含分页处理 + rate limiting + 断点续传
  • 关键:先调一页确认数据结构,再跑全量

2. 分析源数据

  • 读取源数据,检查格式和结构
  • 统计数据量(行数、字段数、文件大小)
  • 发现潜在问题(编码、缺失值、格式不一致、重复数据)

3. Dry Run(试运行)

在正式迁移前,先用小样本测试:

> 试运行结果:从前 100 条数据中,成功转换 98 条,2 条有问题(原因:xxx)。 > 预计全量迁移 N 条记录,耗时约 X 分钟。 > 确认继续吗?

用户确认后再执行全量迁移。

4. 执行迁移 + 完整性校验

执行全量迁移,完成后做数据完整性检查:

  • 行数对比:源 vs 目标
  • 关键字段抽样对比(首行、末行、随机几行)
  • 数值型字段的 sum/count 对比

> 迁移完成。源数据 N 条,目标 N 条,校验通过。 > 备份文件在:xxx,确认无误后可删除。

遇到问题

  • 编码错误(UnicodeDecodeError / 乱码)?chardetect file.csv 检测实际编码,常见的是 GBK/GB2312 被当成 UTF-8 读取。pandas 用 encoding='gbk' 参数。
  • 迁移中途失败了? 检查错误日志,找到失败的行号。修复问题后从断点继续,不要从头重跑。API 导入建议记录已处理的 offset/page。
  • 迁移后数据数量对不上? 检查:(1) 是否有重复数据被去重,(2) 是否有空行/非法行被跳过,(3) 数据库是否有 unique 约束拒绝了重复记录。
  • 数据库迁移后查询变慢? 检查索引是否迁移过来了,大部分工具不会自动迁移索引,需要手动创建。

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.