Guide · Agent skill
How to use the OpenRefine Data Cleaning CLI agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
This guide explains how to install and use the cli-anything-openrefine skill, which lets an AI agent drive a local OpenRefine data-cleaning server through a command-line interface. It is written for readers who have not used agent skills before. By the end you will know what the skill does, how to install it, how to ask for work in plain language, and what to check for safety.
Quick start
- 1Install Python and the harness. Make sure Python with pip is available. From the agent-harness folder, run python -m pip install -e . to install cli-anything-openrefine.
- 2Start OpenRefine. Run openrefine -i 127.0.0.1 -p 3333 so the local server is available before backend commands run.
- 3Install the skill folder. Unzip the downloaded ZIP into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills in the Claude apps.
- 4Set the server address if needed. Set OPENREFINE_URL or pass --base-url if your server is not at http://127.0.0.1:3333.
- 5Ask for the cleanup. Describe the file, column, cleanup and output path in plain language so the agent can pick the right commands.
- 6Review the result. Check the exported CSV or TSV and the session's rows. Use undo or redo within the session if a step needs changing.
What an agent skill is and what this one does
An agent skill is a folder containing a SKILL.md file with instructions that an AI agent loads when a task matches the skill's description. This skill is defined in the openrefine/agent-harness/cli_anything/openrefine/skills directory of the HKUDS/CLI-Anything project and is licensed Apache-2.0.
Once installed, the agent can import messy CSV files into an OpenRefine project, apply reusable JSON operation histories such as trimming whitespace or running text transforms, inspect rows, export cleaned CSV or TSV files, and undo or redo steps within a saved session. OpenRefine itself must be running separately on your machine.
Install the skill (ZIP download or Claude Skills upload)
Download the skill as a ZIP from this page and unzip it. Then place the skill folder in one of these locations: ~/.claude/skills/ for your user account, or a project's .claude/skills/ folder if you want the skill limited to one project.
You can also upload the ZIP in the Claude apps under Settings → Capabilities → Skills.
The skill's SKILL.md tells the agent to install the command-line harness first. Run this from the agent-harness folder of the project:
- Requires Python with pip
- Harness install command is taken from SKILL.md: python -m pip install -e .
cd openrefine/agent-harness
python -m pip install -e .Start OpenRefine before you ask for backend work
The skill talks to a running OpenRefine server. Start it before any import, row, apply, export, undo or redo task. The source example uses the following command, which binds to your own machine.
By default the tool points at the server address in the source. If your server runs elsewhere, set the OPENREFINE_URL environment variable or pass the --base-url flag.
- Example server address used in the source: http://127.0.0.1:3333
- Override with OPENREFINE_URL=http://127.0.0.1:3333 or --base-url
openrefine -i 127.0.0.1 -p 3333Ask for cleaning work in plain language
You do not need to type commands yourself. Describe the outcome you want and name the file. The agent is instructed to use JSON output for one-shot commands, to keep its work in a separate session file, and to import or open a project before running row, apply, export, undo or redo commands.
Good requests name the input file, the column, the cleanup you want and the output file. For example: "Use the OpenRefine skill to trim whitespace in the Name column of messy.csv, then export the result to run/clean.csv as CSV." Naming the session file (for example run/session.json) helps keep the task isolated.
- Name the input file and the column to change
- State the cleanup, such as trimming whitespace or a text transform
- Say where the cleaned CSV or TSV should be saved
Example workflow the agent can run
The skill's reference commands follow a typical cleanup: check the server, create a project from a CSV, inspect rows, apply a transform, export, then use undo or redo if a step needs reversing. The agent chooses these steps from your request; you can read them to check what it did.
Existing OpenRefine operation-history JSON can be passed directly to data apply, so a saved history can be replayed on another dataset. Generated files are normal OpenRefine operation JSON and exported CSV or TSV data.
- Check the server is reachable (server ping)
- Import messy.csv into a named project within a session file
- Inspect the first rows (data rows --limit 10)
- Apply a text transform or an operation history JSON file
- Export to CSV, then undo or redo steps if needed
cli-anything-openrefine --json server ping
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 undoSafety: scripts, network and sensitive data
This skill runs scripts and uses the network. The harness sends requests to an OpenRefine server URL, and that URL can be set to any address. Only point it at a server you trust, and do not send sensitive datasets through a server you do not control.
Keep OpenRefine bound to 127.0.0.1 on your own machine unless you have a reason to share it. Review the operation JSON before applying it to important data, because applying an operation history changes the project data.
- Runs scripts: yes
- Uses network: yes
- Default example binds to 127.0.0.1, your own machine
- Check the OPENREFINE_URL or --base-url value before running
Tips for reliable runs
The source recommends --json on every one-shot command so the agent can read results. Use a separate --session file for each task so projects and undo history do not mix. When an command fails with --json set, a JSON object with ok: false is written to stderr.
For repeatable journeys, you can run the REPL with piped newline-separated commands. Piped workflows return a nonzero exit status if any command failed, which lets a CI job detect a failed run.
- Use --json for one-shot commands
- Give each task its own --session file
- Read stderr for ok: false errors
- Pipe commands into the REPL for scripted, CI-checkable runs
printf 'help\nexit\n' | cli-anything-openrefineWhat people use it for
- Trimming stray whitespace from a name column in a CSV before loading it into another system
- Replaying a saved OpenRefine operation history on a new batch of TSV files
- Building a scripted cleanup step inside an automated data pipeline that exports a clean CSV
- Keeping a replayable record of the transformations applied to a shared dataset
Frequently asked questions
Is the OpenRefine CLI agent skill free to use?
The skill and the HKUDS/CLI-Anything project are licensed under Apache-2.0, as stated on this page. OpenRefine must be installed and running separately on your machine, so check its own licence and requirements.
What do I need before installing cli-anything-openrefine?
You need Python with pip to install the harness, and a running OpenRefine server. The skill cannot work without a local OpenRefine server running, started for example with openrefine -i 127.0.0.1 -p 3333.
How do I install an agent skill like this one?
Download the ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder. You can also upload the ZIP in the Claude apps under Settings → Capabilities → Skills.
Can I use this skill with a remote OpenRefine server?
The tool talks to an OpenRefine server URL that can be set to any address, using OPENREFINE_URL or --base-url. Only do this with a server you trust, and avoid sending sensitive data through a server you do not control.
Why does the agent say it cannot connect to OpenRefine?
The most likely cause is that OpenRefine is not running. Start it with openrefine -i 127.0.0.1 -p 3333, then run cli-anything-openrefine --json server ping to confirm. If you use a different address, check OPENREFINE_URL or --base-url.
How does this compare with running OpenRefine by hand?
The skill lets an agent drive OpenRefine through a command-line interface, with JSON output, saved sessions, and replayable operation histories. Working in the OpenRefine interface directly is better when you want to explore data visually; the skill suits repeatable, scripted cleanup.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits analysts and developers who need repeatable, scripted cleanup of CSV or TSV files and want a replayable record of transformations. It is a poor fit if you do not have OpenRefine running locally or if your data is sensitive and must stay off servers you do not control.
Download the skill