Enrich categories with descriptions and term meta in bulk

ContentBeginner~15 min

Before you start

A connected site whose bound user holds the manage-categories capability, with the get-terms, get-term, update-term, and update-term-meta abilities enabled. The term writes are off by default.

Category archives are quietly some of the most-landed-on pages on a content site, and most of them ship with a blank description and no metadata at all. Fixing that by hand means opening the edit screen for every category and typing into the same two fields over and over. This has the agent draft the descriptions and set the fields, and it saves nothing until you approve a sample.

The prompt
A lot of my categories have empty descriptions and I want to fill them in,
plus set a couple of custom fields on each. Write nothing until I approve a
sample.
Read only first: list the categories and show me which ones have thin or
missing descriptions. For a first batch of [10], hand me a table with the
category name, its current description, and a suggested one written for
readers landing on that archive, plus the values I asked for in [the SEO
title field] and [any other allowlisted field].
I'll tell you which to keep. Only then write the approved descriptions back and
set the custom fields, working in small batches and showing me each one before
it saves. The custom fields are limited to the ones the site allows, so a typo
in a field name is refused rather than written somewhere odd. At the end, list
every category you updated.

Why this is safe to run

The first pass is reads: listing the categories and pulling their current values writes nothing, so you see every proposed description beside the existing one before a save happens. Updating a term and writing term meta are separate abilities, each off until you enable them, and each requires the manage-categories capability on the user you bound the agent to. Term meta is confined to an allowlist of scalar keys, so a mistyped field name is rejected instead of stored in the wrong place. There is no delete-term ability at all, so this recipe cannot remove or merge a category even by accident, only fill in and update. Every write lands in the Activity Log with the category it changed.

Already connected? Ask your agent for the “enrich categories” recipe and it runs the same sample-first flow across your own taxonomy.

How it works

  1. List the categories and flag which ones have thin or missing descriptions.
  2. Read a first batch to confirm the current values.
  3. Show a table of each category, its current description, and a suggested one.
  4. Wait for you to say which suggestions to keep.
  5. Write the approved descriptions and set the allowlisted term meta, in small batches.
  6. Return the list of every category updated.

Questions

Can it delete or merge categories?
No. There is no ability to delete a term, so this recipe can only fill in and update categories, never remove or merge them. It writes descriptions and allowlisted meta, and re-pointing posts between categories is a separate job with its own ability.
What if I give it a custom field name that does not exist?
Term meta is limited to an allowlist of scalar keys, so a field name the site does not allow is refused rather than written somewhere it should not be. Nothing gets stored under a stray key, and the batch tells you what it skipped.