Skip to content
Back to skills

Ape Add Generator

ASecurity

Add a generator: a content kind that generation runs write on the worker, with its generate purpose, code checks, QA playbook and tools, input form and glossary.

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
developmenttestingapi

Works with

  • api

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add BuffApe/BuffApe --skill ape-add-generator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ape Add Generator?

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

Security grade badge for Ape Add Generator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/buffape-ape-add-generator/badge)](https://www.skillsdirectory.com/skills/buffape-ape-add-generator)

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: ape-add-generator
description: "Add a generator: a content kind that generation runs write on the worker, with its generate purpose, code checks, QA playbook and tools, input form and glossary."
---

# Add a generator

A generator lets an Owner start a run that writes a set of items of one content kind, checks each in code and with AI QA, and sends the set to review. People still approve the set. The flow is in `docs/CONTENT_PIPELINE.md`. In BuffCore's repository, the playground's tips (`apps/playground/src/modules/notes/tips.ts` and `apps/playground/src/generation.ts`) are the model to copy.

1. Turn it on: `pnpm ape enable generation` (it brings `ai`). The product needs the worker (`processes` in `buffcore.config.ts`, and `apps/api/src/worker.ts`; `ape create` adds both), and passes `generation` where the app is composed: `buffcoreModules(product, { ai, generation })`.
2. Declare the content kind in a module's manifest (the `ape-add-module` skill): `contributes: [contentKinds.add({ tip: { schema, description, checks } })]`, with `contentKinds` from `@buffcore/modules/content` (a kind declared twice stops the app at start).
   - A check is a plain function of the content and `{ kind, key, locale }` that answers a reason it fails, or nothing (a `length` check answers `'too long'` past 120 characters). Deterministic and quick: no network, no AI. It runs on every draft save, by hand or by a run. It never refuses a save: set review shows it and a run regenerates the item.
   - A limit that differs by language is a check that reads `locale`. A kind only people translate (legal text) gets `humanTranslationOnly: true`.
3. Declare the generate purpose, `content.generate.<kind>` (the `ape-add-ai-purpose` skill): class `authoring` or another with no personal data, `output: generatedItems(schema)` (`{ items: [{ key, content }] }`; `generatedItems` from `@buffcore/modules/generation`), and instructions that say how many items, what a key looks like, and that with `redo` (`{ key, content, reasons }`) it writes only that item again and fixes every reason. Give it a starting profile, and fixtures: a first call, and one per `redo` the test expects.
4. Configure the kind: `generation = { kinds: { tip: { purpose, input, tools?, qaTools? } }, qa: { class, instructions: { v1: PLAYBOOK } }, glossary? }`.
   - `input` is a Zod schema; the run's start form is a JSON editor checked against it.
   - `tools` are the product's functions the generate purpose may call. `qaTools` are the ones AI QA may call beside BuffCore's `read_live` (what is live for a key), such as a simulation that runs an item through the real runtime.
   - The QA playbook is the `content.qa` instructions, by version: plain words on what to check, and to fail an item with one plain reason per problem. AI QA only flags; a person approves. Give `content.qa` and `i18n.translate` (translation runs) starting profiles in `aiModule({ profiles })` and fixtures, in a class that clears their providers. QA's class is also the translation's.
   - `glossary: { es: { 'times table': 'tabla de multiplicar' } }` holds the approved translation of each term, per language. It feeds translation and its glossary check.
5. Test it as the playground does in BuffCore's repository (`apps/playground/src/generation.test.ts`): `createTestApp` and `drainJobs` from `@buffcore/server/testing`, `POST /v1/admin/generation/runs` as the Owner, `drainJobs(app)` to run the job, then read the run and the QA report. Cover an item that passes, one that fails a check and is regenerated, and one that stays flagged, then sending one back and the Spanish set.
6. Show the kind in the console: `createAdmin({ contentKinds: { tip: { label, Render } } })` (the `ape-admin-screen` skill); without `Render` the console shows JSON. Run it with `pnpm dev`: in the console, Content › Runs, start a run, then approve its set in Inbox › Reviews. `pnpm verify`.

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.

View all in development →

Comments

Loading comments…

Newsletter

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