Skip to content

skill(cms): add product builder skill#5

Open
PaulBratslavsky wants to merge 10 commits into
mainfrom
skills/product-builder
Open

skill(cms): add product builder skill#5
PaulBratslavsky wants to merge 10 commits into
mainfrom
skills/product-builder

Conversation

@PaulBratslavsky

@PaulBratslavsky PaulBratslavsky commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

What

Adds strapi-product-builder under skills/in-progress/ — an interview-driven skill that turns a fuzzy product idea into a build-ready spec (six markdown files, ending in a self-contained Claude Code build spec) for a Strapi v5 + Strapi Cloud project. Experimental / work-in-progress.

Highlights

  • Business-value-first six-stage interview: product → users → requirements → tech → tech spec → build spec
  • Opinionated, overridable defaults: Strapi v5 + Strapi Cloud + Postgres; frontend is an open choice (Next.js / TanStack Start / Astro / Nuxt / …); confirm-first auth (Better Auth beta vs. Users & Permissions fallback)
  • Strapi MCP server (v5.47+, beta) as an optional product capability — stage 4 explicitly asks when the product needs AI agents to read/write content; full reference + caveats
  • Extensible companion-skill + resource registries (references/companions.md, references/resources.md) — build skills and docs/blogs referenced by capability with graceful fallbacks, so the generated spec stands alone even with no companion skills installed
  • "Who authors this content?" guidance — team → Strapi admin panel; end-users → content API + U&P / api-permissions (+ ownership policy)
  • Worked example under examples/trailhead/; multi-surface install docs (Claude Code / Desktop / web)

Validation

Ran an end-to-end dry-run test (a simulated interview against a sample product needing AI-agent content access). All six stages produced template-shaped files; the MCP path correctly surfaced at stages 3 → 4 → 5; confirm-first auth and companion-as-optional-with-fallbacks behaved as designed. Findings were folded back in (MCP section in the requirements template, Astro heuristic nuance, authoring-surface guidance, env-prefix reminders).

🤖 Generated with Claude Code

PaulBratslavsky and others added 9 commits June 22, 2026 12:20
Interview-driven skill that turns a fuzzy product idea into a build-ready spec (six markdown files, ending in a Claude Code build spec) for a Strapi v5 + Strapi Cloud project. Placed under skills/in-progress/ as experimental.

Includes extensible companion-skill and resource registries (references/companions.md, references/resources.md) so build skills and docs are referenced by capability with graceful fallbacks, keeping the generated spec self-contained even when no companion skills are installed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add Strapi's built-in MCP server (v5.47+, beta) as an optional product
capability. New references/strapi-mcp-server.md (enable config, POST /mcp
endpoint, scoped admin-token auth, exposed CRUD/publish tools, plugin
extension via strapi.ai.mcp, beta caveats); an AI/agent-access requirement
prompt in stage 3; a tech-decision area in stage 4; a spec section in stage 5;
matching 04/05 template sections; the feature docs in resources.md; and the
folder map. Off by default; opt-in only when the product needs agents to
manage content.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…o worked example

Add the optional Strapi MCP server to 'What you get', a plain-English
description of the output (six files; 06 is the build spec), and a pointer to
examples/trailhead/ so readers can see real output.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Stage 4 now explicitly asks whether to expose Strapi's built-in MCP server
(beta, v5.47+) when stage 3 flags AI/agent content access. Fix the missing MCP
section in the stage-3 requirements template, nuance the Astro content-heavy
heuristic (public/static -> Astro; authenticated/interactive content apps ->
Next.js), and strengthen the VITE_ env-prefix reminder in the 05/06 templates.
Found via an end-to-end dry-run test of the skill.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Make the admin-panel (team) vs U&P-frontend (end-users) authoring choice
explicit in content-modeling.md, with the team-vs-end-user rule, the
submit/review/publish pattern, and a per-content-type record-it nudge. Add a
pointer from stage 3 so the planner resolves 'editors' ambiguity instead of
papering over it. Closes the last finding from the dry-run test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Remove all references to community skills (strapi-configuration, better-auth-setup, add-page, strapi-custom-field, dockerize-strapi) and personal repos (PaulBratslavsky/*) — they are not in this official repo and may not be installed. Delete references/companions.md. Add references/strapi-build-cookbook.md (lean v5 traps from the marketplace build test: Document-Service owner-injection, owner-scoped reads, is-owner policy, U&P user-service seeding, both-roles, SQLite/sanitize gotchas), each citing official docs. Reframe build instructions to: build from the spec + official Strapi docs. Add the official strapi/LaunchPad starter as the Next.js reference. Build steps and inline commands are preserved.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a 'where does logic go?' section to the build cookbook: request/auth-aware
logic (stamp owner/author = current user) -> controller; document-level logic
(slug, derived fields) -> Document Service middleware in register(); lifecycle
hooks are no longer the v5 default (no request context; fire twice on publish).
Fix the trailhead example M4, which stamped author from session in a
beforeCreate hook (impossible — hooks have no request context) -> controller +
Document Service. Cite three official Strapi blog posts in resources.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…m build test #2)

Regression build test #2 passed (all four original traps prevented up front;
self-contained; correct controller/middleware layering). Folding in the two new
findings it surfaced: (1) the controller snippet needs casts to compile under
Strapi's strict TS build (sanitizeInput union -> TS2698; Document Service data
strictly typed); (2) uid/slug fields are not auto-filled on API/Document-Service/
seed writes, so slug middleware must cover every uid field used for filtering.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…d test)

SaaS build test (PageHub) passed end-to-end (Stripe-stubbed: plan-gating 403s,
webhook HMAC verification + tampered-body rejection, plan flip) with zero
regressions. Folding in the 5 new traps it surfaced:
- Stripe webhook RAW BODY: strapi::body includeUnparsed + Symbol.for('unparsedBody')
  (koa-body named 'unparsed' import doesn't exist; not in official docs)
- Extending a plugin content type (U&P user) is a FULL REPLACE not a merge —
  must include the entire base schema or the DB loses email/password (corrupting)
- Authorization gates (plan/quota/role -> 403) belong in a route policy, with the
  Core.Policy TS caveat
- Webhook routes: config { auth: false } for unauthenticated third-party callers;
  carry the Strapi user id via Stripe client_reference_id/metadata
- Scaffold: --non-interactive --no-example --no-git-init for truly non-interactive;
  add JWT_SECRET + DATABASE_FILENAME

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@innerdvations innerdvations left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed against strapi/strapi develop — solid WIP product-builder skill overall; MCP section, scaffold flags, and the v5 build cookbook align with core. Please fix the README install paths before merge (copy-paste is broken today). Optional follow-ups on the trailhead example and PR description noted inline.

AI-assisted comment.


```bash
git clone https://github.com/strapi/skills.git
cp -R skills/skills/in-progress/strapi-product-builder ~/.claude/skills/

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Install path has an extra skills/ segment — after cloning this repo, the folder is skills/in-progress/strapi-product-builder/, not skills/skills/....

Suggested change
cp -R skills/skills/in-progress/strapi-product-builder ~/.claude/skills/
cp -R skills/in-progress/strapi-product-builder ~/.claude/skills/

(Same fix needed on lines 56 and 68.)

AI-assisted comment.


```bash
mkdir -p /path/to/your/project/.agents/skills
cp -R skills/skills/in-progress/strapi-product-builder /path/to/your/project/.agents/skills/

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same duplicate skills/ segment here.

Suggested change
cp -R skills/skills/in-progress/strapi-product-builder /path/to/your/project/.agents/skills/
cp -R skills/in-progress/strapi-product-builder /path/to/your/project/.agents/skills/

AI-assisted comment.

Claude Desktop installs skills from a **zip**. Create one from your clone:

```bash
cd skills/skills/in-progress

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same duplicate skills/ segment for the Desktop zip path.

Suggested change
cd skills/skills/in-progress
cd skills/in-progress

AI-assisted comment.


- Draft & publish: **yes** (moderators stage trails)
- Localized: no
- Lifecycle hooks: `beforeCreate`/`beforeUpdate` — generate `slug` from `name` if missing

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worked example diverges from the skill's own v5 guidance in references/strapi-build-cookbook.md and stage 5 of SKILL.md:

  • Slug generation (no request context) → Document Service middleware in register(), not lifecycle hooks.
  • author stamping (needs session) → custom controller (Document Service create), not beforeCreate — lifecycles have no ctx.state.user and fire twice on publish.

Worth updating the trailhead example (lines 25, 47, 105–106) so the flagship output matches what the skill teaches.

AI-assisted comment.

- Dev-mode utility: a `log` tool.

## Extending with custom tools
Register custom MCP tools from a Strapi **plugin** via the `strapi.ai.mcp` service — use this when the agent needs domain actions beyond CRUD (e.g. "approve order", "recompute totals"). Walkthrough in the blog linked above. Scaffold the plugin shell with `npx @strapi/sdk-plugin init` (see the Strapi plugin SDK docs on https://docs.strapi.io).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional clarity (verified on develop): custom tool registration via strapi.ai.mcp.registerTool must happen before mcp.start() — in practice the plugin/app register() hook. Could append something like: "Register tools in the plugin register() phase (before the MCP server starts)."

AI-assisted comment.

@innerdvations

Copy link
Copy Markdown

Small PR-description nit: the body mentions references/companions.md, but the diff only adds references/resources.md. Either add a companions registry or trim that bullet from the description so it matches what's shipped.

AI-assisted comment.

…modeling guidance

From the interview smoke test (messy tech-first user). The test passed but only
because the operator knew facts the skill didn't contain — fixing that:
- State Strapi v5 is SQL-only (no MongoDB) in strapi-defaults.md + stage-4 DB +
  a stage-1 Strapi-fit red flag. The most load-bearing honest-steering moment no
  longer depends on model memory.
- Add stage-1 scope-contradiction guidance (single-user vs multi-tenant silently
  corrupts the stage-5 schema).
- content-modeling.md: how to model an end-user that is also a domain record
  (U&P user 1:1 to a domain collection).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants