Communitygithub.com

CLI-Anything OpenRefine

透過代理原生 CLI 使用 OpenRefine,匯入雜亂資料、套用 JSON 操作歷史、檢視列、匯出清理後資料,以及管理工作階段復原/重做。

CLI-Anything OpenRefine 是什麼?

這個技能為 AI 代理提供了一個基於命令列的介面,用來與 OpenRefine(一個強大的開源資料清理工具)進行互動。核心用途是讓代理能像人類使用者一樣自動化操作 OpenRefine 的所有常見功能,例如匯入 CSV 或 TSV 檔案、對特定欄位執行文字轉換(使用 `value.trim()` 等表達式)、套用預先定義的 JSON 操作歷史來重複複雜的清理流程、匯出乾淨的資料,以及管理工作階段的還原與重做。它支援自訂伺服器位址(透過 `OPENREFINE_URL` 環境變數),並提供一個互動式 REPL 模式,不僅適合單次使用,也能透過 pipe 標準輸入的方式整合到 CI/CD 工作流程中。所有的指令都建議搭配 `--json` 旗標來輸出結構化的結果,方便代理解析成功或失敗的狀態,而 `--session` 參數則能隔離不同任務的執行狀態,確保任務之間不會互相干擾。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HKUDS/CLI-Anything/tree/main/skills/cli-anything-openrefine

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

CLI-Anything OpenRefine 是做什麼的?

當工作需要 OpenRefine 進行資料清理、轉換、可重複使用的操作歷史,或從自動化代理工作流程匯出 CSV/TSV 時,請使用此技能。

前置需求

安裝 Harness:

cd openrefine/agent-harness
python -m pip install -e .

在執行後端指令前,先啟動 OpenRefine:

openrefine -i 127.0.0.1 -p 3333

設定自訂伺服器位址,可透過 OPENREFINE_URL=http://127.0.0.1:3333 環境變數或 --base-url 參數傳遞。

代理指令規則

  • 在每個一次性指令上優先使用 --json。
  • 使用 --session <path> 來隔離任務狀態。
  • 在執行列、套用、匯出、還原或重做指令前,必須先匯入或開啟專案。
  • 現有的 OpenRefine 操作歷史 JSON 可以直接傳遞給 data apply 指令。
  • 產生的檔案為一般的 OpenRefine 操作 JSON 以及匯出的 CSV/TSV 資料。

常用指令

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

執行 cli-anything-openrefine(不帶任何子指令)即可進入 REPL 模式。

對於自動化的使用者流程,可以透過 stdin 傳遞以換行分隔的 REPL 指令。

重新導向的串流會自動使用僅包含 ASCII 的輸入/輸出路徑,而互動式終端機則保留 Unicode 橫幅、指令歷史以及樣式:

printf 'help\nexit\n' | cli-anything-openrefine

當 REPL 被重新導向時,Unicode 內容會以可逆的 ASCII 反斜線跳脫序列呈現,避免傳統 Windows 輸出編碼將成功的指令轉變為失敗的旅程。

在 exit 或檔案結尾處,如果有任何指令失敗,管線工作流程會回傳非零的結束狀態,讓 CI 系統能夠偵測到不成功的使用者旅程。

錯誤處理

當設定了 --json 時,指令失敗會將一個包含 ok: false 的 JSON 物件寫入 stderr。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

cli-anything-adguardhome

>-

cli-anything-anygen

>-

cli-anything-audacity

>-

cli-anything-blender

>-

cli-anything-browser

Browser automation CLI using DOMShell MCP server. Maps Chrome

cli-anything-calibre

>-

cli-anything-ccswitch

CLI interface for CC Switch — manage AI coding tool configurations from the terminal

cli-anything-chromadb

>-

cli-anything-cloudanalyzer

Command-line interface for CloudAnalyzer — Agent-friendly harness for CloudAnalyzer, a QA platform for mapping, localization, and perception outputs. Supports 27 commands across 8 groups: point cloud evaluation, trajectory evaluation, ground segmentation QA, config-driven quality gates, baseline evolution, processing, visualization, and interactive REPL.

cli-anything-cloudcompare

Command-line interface for CloudCompare — Agent-friendly harness for CloudCompare, the open-source 3D point cloud and mesh processing software. Supports 41 commands across 9 groups: project management, session control, point cloud operations (subsample, filter, segment, analyze), mesh operations, distance computation (C2C, C2M), transformations (ICP, matrix), export (LAS/LAZ/PLY/PCD/OBJ/STL/E57), and interactive REPL.

cli-anything-comfyui

>-

cli-anything-dify-workflow

Wrapper for the Dify workflow DSL CLI. Create, inspect, validate, edit, and export Dify workflow files through a CLI-Anything harness.

cli-anything-drawio

>-

cli-anything-eez-studio

Use EEZ Studio from the command line: inspect and modify native .eez-project files, edit LVGL screens/widgets, manage SCPI commands, and invoke the real EEZ Studio backend for LVGL builds.

cli-anything-eth2-quickstart

>-

cli-anything-exa

>-

cli-anything-firefly-iii

Firefly III CLI - Personal finance management via CLI-Anything

cli-anything-freecad

Complete CLI harness for FreeCAD parametric 3D CAD modeler (258 commands). Covers ALL workbenches: Part (29 primitives + boolean + mirror + loft + sweep), Sketcher (26 cmds: geometry + constraints + editing), PartDesign (38 cmds: pad/pocket/groove/fillet/chamfer/patterns/hole/datum), Assembly (11 cmds), Mesh (16 cmds), TechDraw (15 cmds: views + dimensions + PDF/SVG), Draft (33 cmds: 2D shapes + arrays + transforms), FEM (12 cmds), CAM/CNC (10 cmds), Surface (6 cmds), Spreadsheet (7 cmds), Import (13 formats), Export (17 formats), Measure (12 cmds), Materials (21 presets). Headless FreeCAD export to STEP/IGES/STL/OBJ/DXF/PDF/glTF/3MF.

cli-anything-gimp

>-

cli-anything-godot

>-

相關技能