← All playbooks · Raw API

task-article-tags

# Capability: Article tags

## Intent phrases

- update article tags
- retag articles
- add tags to blog posts

## Requires capabilities

`articles` and `tags`

## Prerequisites

- `cms_edit ["index", "sync"]`
- Resolve tag IDs: `resolve --tag-slug <slug> --tag-type-slug <type>` or `list --type tag`

## Steps

**Batch (many articles):**

1. Build `tags.json` with an `articles` array (see `cms-edit help article-tags-from-json`)
2. `cms_edit ["article-tags-from-json", "--json", "<tags-json>", "--dry-run"]`
3. User confirms tag slugs per article
4. `cms_edit ["article-tags-from-json", "--json", "<tags-json>"]`

**Single article (session):**

1. `cms_edit ["open", "--article-slug", "<slug>"]`
2. `cms_edit ["set", "@p0", "tags", "<id1>,<id2>", "--links"]` (or `--append`)
3. `cms_edit ["diff"]` → `cms_edit ["save"]`

## Confirmation gates

1. List target articles and tag slugs — user confirms
2. `diff` before each `save` when using sessions

## Out of scope

- Publish
- Creating new tags (see **Taxonomy** capability first)

## Related resources

- `cms-edit://customer/articles`
- `task-taxonomy`
- `cms-edit help article-tags-from-json`