跳到正文
Skillpedia
分析与电子表格58k · #3235

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/HKUDS/CLI-Anything/blob/main/openrefine/agent-harness/cli_anything/openrefine/skills/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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 --json on 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能