Skip to content
Back to skills

Contentrain Bulk

ASecurity

Batch operations on Contentrain content: copy locales, update status, delete multiple entries. Use when performing bulk content operations.

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 23, 2026
ai-agents

Works with

  • mcp

Security analysis

A100/100

Scanned September 23, 2026

npx -y skills add Contentrain/ai --skill contentrain-bulk --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Contentrain Bulk?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Contentrain Bulk
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/contentrain-contentrain-bulk/badge)](https://www.skillsdirectory.com/skills/contentrain-contentrain-bulk)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: contentrain-bulk
description: "Batch operations on Contentrain content: copy locales, update status, delete multiple entries. Use when performing bulk content operations."
metadata:
  author: Contentrain
  version: "1.0.0"
---

# Skill: Run Bulk Content Operations

> Apply safe batch operations to existing content entries.

---

## When to Use

Use this when the user wants to:

- copy one locale to another
- update status on many entries
- delete multiple collection entries

This skill is for existing content, not for schema design.

---

## Steps

### 1. Inspect the Model

Call `contentrain_status` and `contentrain_describe(model: "<model-id>")` first.

Confirm:

- model kind
- whether `i18n` is enabled
- which locales are supported

### 2. Pick the Correct Bulk Operation

- `copy_locale`: clone one locale to another for i18n-enabled `collection`, `singleton`, or `dictionary` models
- `update_status`: update metadata state — many entries at once for `collection` (by `entry_ids`) or `document` (by `slugs`), or the single record of a `singleton`/`dictionary`
- `delete_entries`: remove many collection entries at once

### 3. Apply Safety Rules

- never use `copy_locale` on non-i18n models
- `update_status` addresses records the way their meta is laid out: `entry_ids` for `collection` models, `slugs` for `document` models (meta is one file per slug — the same identity `contentrain_content_save` uses), and **neither** for `singleton`/`dictionary`, which have one meta record per locale. The wrong list is rejected with a message naming the right one.
- `publish_at` on `contentrain_content_save` does **not** publish — it gates delivery of an already-published entry. `update_status` is the only way to change status.
- `delete_entries` is collection-only
- `update_status` rewrites every supported locale unless you pass `locale`. Pass it when restoring one locale's status, or you will change the other's too.
- **preview first**: `dry_run: true` runs the operation in a throwaway worktree and reports what would change (`would_copy`/`would_replace`, `would_update` + `not_found`, `would_delete` + `files_to_remove`) without committing anything. A preview needs no `confirm`
- `copy_locale` REPLACES the target locale — the preview's `would_replace` is how many records that costs
- confirm entry IDs before delete operations
- batch only related entries together

### 4. Execute with `contentrain_bulk`

Examples:

```json
{
  "operation": "copy_locale",
  "model": "ui-labels",
  "source_locale": "en",
  "target_locale": "tr"
}
```

```json
{
  "operation": "update_status",
  "model": "blog-post",
  "entry_ids": ["post_001", "post_002"],
  "status": "in_review"
}
```

Scoped to one locale — leaves every other locale's status untouched:

```json
{
  "operation": "update_status",
  "model": "blog-post",
  "entry_ids": ["post_001"],
  "status": "published",
  "locale": "tr"
}
```

A document model — meta is one file per slug, so pass `slugs`, not `entry_ids`:

```json
{
  "operation": "update_status",
  "model": "guide-sections",
  "slugs": ["instagram-9", "instagram-10", "instagram-11"],
  "status": "published",
  "locale": "tr"
}
```

A singleton or dictionary — one meta record, so no `entry_ids` or `slugs`:

```json
{
  "operation": "update_status",
  "model": "site-settings",
  "status": "published"
}
```

```json
{
  "operation": "delete_entries",
  "model": "faq-items",
  "entry_ids": ["faq_01", "faq_02"],
  "confirm": true
}
```

### 5. Validate When Needed

After `copy_locale` or status-heavy cleanup, call `contentrain_validate` if content correctness may have changed.

### 6. Submit

Bulk operations still create branches/commits. Call `contentrain_submit` if the project is in review flow.

### 7. Final Summary

Report:

- operation performed
- model affected
- locale or entry count affected
- validation outcome if run
- submit status

## Related Skills

- **contentrain-content** — Single-entry content operations
- **contentrain-validate-fix** — Validate after bulk changes
- **contentrain-generate** — Regenerate SDK after bulk locale copy
- **contentrain** — Core architecture and MCP tool catalog

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.