cli-anything-openrefine
它能做什么
这个技能让 AI 智能体使用 OpenRefine 这款数据清理工具,修正并重组杂乱的表格。适合任何需要清理杂乱名单、导出数据或电子表格的人。
适用场景
- ✓当你有一个 CSV 文件,其中的姓名有多余空格或重复值需要修正的时候。
- ✓当你想使用保存的操作文件,把相同的清理步骤应用到新数据上的时候。
- ✓当你需要撤销或重做清理过程中所做的更改的时候。
技能链接
https://github.com/HKUDS/CLI-Anything/blob/main/openrefine/agent-harness/cli_anything/openrefine/skills/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我清理这份客户 CSV 文件:去掉姓名列中的多余空格,然后重新导出。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体把你的文件导入 OpenRefine,应用保存的清理步骤,然后导出结果。它会记录更改,以便撤销或重做。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
CLI-Anything OpenRefine
Use this skill when a task needs OpenRefine data cleaning, transformation, reusable operation histories, or CSV/TSV export from an automated agent workflow.
Prerequisites
Install the harness:
cd openrefine/agent-harness
python -m pip install -e .
Start OpenRefine before backend commands:
openrefine -i 127.0.0.1 -p 3333
Set a custom server with OPENREFINE_URL=http://127.0.0.1:3333 or pass --base-url.
Command Rules For Agents
- Prefer
--jsonon every one-shot command. - Use
--session <path>for isolated task state. - Import or open a project before row, apply, export, undo, or redo commands.
- Existing OpenRefine operation-history JSON can be passed directly to
data apply. - Generated files are normal OpenRefine operation JSON and exported CSV/TSV data.
Common Commands
cli-anything-openrefine --json server ping
cli-anything-openrefine --json project list
cli-anything-openrefine --json --session run/session.json project import messy.csv --name cleanup
cli-anything-openrefine --json --session run/session.json data rows --limit 10
cli-anything-openrefine --json ops text-transform run/trim.json --column Name --expression 'value.trim()'
cli-anything-openrefine --json --session run/session.json data apply run/trim.json
cli-anything-openrefine --json --session run/session.json data export run/clean.csv --format csv
cli-anything-openrefine --json --session run/session.json session undo
cli-anything-openrefine --json --session run/session.json session redo
REPL
Run cli-anything-openrefine with no subcommand to enter the REPL.
For automated user journeys, pipe newline-separated REPL commands through stdin. Redirected streams automatically use an ASCII-only input/output path while interactive terminals retain the Unicode banner, prompt history, and styling:
printf 'help\nexit\n' | cli-anything-openrefine
Unicode payloads are rendered as reversible ASCII backslash escapes when the REPL is redirected, preventing legacy Windows output encodings from turning a successful command into a failed journey.
Piped workflows return a nonzero exit status at exit or EOF if any command
failed, allowing CI to detect an unsuccessful user journey.
Error Handling
When --json is set, command failures write a JSON object to stderr with ok: false.
常见问题
OpenRefine 需要处于运行状态吗?
需要。使用前,必须先在你的电脑上启动 OpenRefine。
我可以重复使用清理步骤吗?
可以。OpenRefine 的操作历史文件可以应用到其他数据上。
它可以导出哪些文件格式?
它可以把清理后的数据导出为 CSV 或 TSV 文件。
详情
作者的原始描述
Use OpenRefine through an agent-native CLI for importing messy data, applying JSON operation histories, inspecting rows, exporting cleaned data, and managing session undo/redo.
repo: HKUDS/CLI-Anything
热度
- GitHub 星标
- 58k
- 排名
- #3235
- 许可证
- Apache-2.0
- 更新时间
- 2026/9/21
评论
- …
同一仓库的更多技能
cli-anything-3mf
58k帮你的智能体检查和修复 3D 打印文件,包括查找圆孔、调整孔径、修复网格,以及比较两个文件。
cli-anything-qgis
58k帮你的智能体在终端中打开、编辑和导出 QGIS 地图项目,包括图层、要素、打印布局和处理工具。
cli-anything-adguardhome
58k帮你的智能体管理 AdGuard Home,这是一款全网络广告拦截器,可管理过滤规则、DNS 重写、客户端和查询日志。
cli-anything-anygen
58k帮你的智能体借助 AnyGen 服务,根据文字提示生成幻灯片、文档、网站和图表。