Skip to content

Using the accrue skill

Accrue has an agent skill that builds pipelines for you. Describe the job to a coding agent and it designs the fields, tries them on a few rows, tells you what the full run will cost, runs it and leaves you a script you can run again.

It is written for Claude Code and follows the open Agent Skills format, so other agents that read SKILL.md files can use it too.

Install the skill

pip install accrue installs the library, not the skill. Add the skill to the project where you will do the work, in one of these ways.

Claude Code plugin. Inside Claude Code:

/plugin marketplace add matt-house-e/accrue
/plugin install accrue@accrue

Any agent, with the skills installer (needs Node.js). From your project folder:

npx skills add matt-house-e/accrue --skill accrue-data-enrichment

It asks which agent to install for and copies the skill into that agent's skills folder (.claude/skills/accrue-data-enrichment/ for Claude Code).

By hand. Copy the plugins/accrue/skills/accrue-data-enrichment/ folder from the repo into your project's .claude/skills/, or into ~/.claude/skills/ to have it in every project.

The skill tracks the main branch, so it can describe a feature a few days before that feature reaches PyPI. It checks the installed package first and trusts that over its own notes. If the two disagree, upgrade with pip install -U accrue.

You also need an API key for the provider you will use, set in your environment: OPENAI_API_KEY, ANTHROPIC_API_KEY or GOOGLE_API_KEY.

Use it

Say what you have and what you want. The more specific the request, the fewer questions it asks:

> /accrue-data-enrichment I have 5,000 supplier listings in listings.csv. Pull out category, unit price,
  warranty and fire rating. Try it on 5 rows and show me the cost, then run the rest.

You don't have to type /accrue-data-enrichment. Claude Code loads the skill by itself when a request looks like an enrichment job. Installed as a plugin, the full name is /accrue:accrue-data-enrichment.

What it does

The skill works through these steps, skipping any your request already settles.

  1. Looks at the data. It reads the columns and a few rows, and tells you about anything that changes the job: empty rows, duplicates, or many rows sharing the same thing to look up. Where rows repeat, it enriches each distinct input once and joins the answers back, so you don't pay for the same call twice. It sends the model only the columns it needs.
  2. Designs the fields. It proposes the output columns as a table: what each means, the allowed values, and what happens when the answer isn't in the data. This is the step worth your attention. Change anything that doesn't match how you would decide a case yourself.
  3. Shapes the pipeline. Usually one step. It adds steps when a cheap check can rule rows out before an expensive one, when later fields depend on earlier ones, or when only some fields need web search.
  4. Picks a model and settings. It starts with the cheapest model that suits the job and says why. Prices come from the skill's model and price table, which is re-checked monthly.
  5. Tries a few rows. It runs plan() on a handful of rows, which makes real, paid calls for those rows only. Then it shows you the answers next to their inputs and an estimated cost for the full run. It tells you before spending anything.
  6. Runs the rest, once you have seen the sample and the cost. It runs the script for you, or hands you the command if you would rather run it yourself.
  7. Checks the results. It counts failed rows and retries them, reads the run report for signs a prompt is off, and tells you which rows deserve a second look.

You end up with the output file, and an enrich.py in your project that holds the whole job: fields, prompts and steps. Keep it in git. Running it again next month costs only the new rows.

When the answers have to be checked

Tell the skill if someone will review or sign off the results. It will then ask the model for the sentence each answer came from, leave a cell empty when the source doesn't say, and can run the job two or three times and list the cells where the runs disagree (merging repeated runs). That list is your review queue.

Tips

  • Say what the output is for. "Tag these so I can count complaints by topic each week" gets better fields than "categorise this".
  • Say what should happen when the answer isn't there. A blank is usually what you want. The skill sets that up, but it needs to know that a guess is not acceptable.
  • Look hard at the sample. A wrong field definition costs pennies to fix on five rows.
  • Confidential data. The rows are sent to the model provider. The skill will say so before the first call. Tell it early if the data is sensitive.

What the skill reads

The skill is a set of Markdown files in the repo. Read them if you want to know what the agent has been told: