Skip to content

skill(cms): add product builder skill#5

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

skill(cms): add product builder skill#5
PaulBratslavsky wants to merge 11 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 (Strapi v5 is SQL-only); frontend is an open choice (Next.js / TanStack Start / Astro / Nuxt / …); confirm-first auth (Better Auth beta vs. Users & Permissions)
  • 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
  • Self-contained: references only official Strapi sources (docs, official blog posts, the official strapi/LaunchPad starter) collected in references/resources.md — depends on no other skill; the generated spec builds with nothing else installed
  • references/strapi-build-cookbook.md — the non-obvious Strapi v5 build traps (Document Service controllers for server-set fields, is-owner policies, U&P seeding, lifecycle-vs-middleware-vs-controller layering, Stripe webhook raw-body) — discovered by actually building from the spec
  • Worked example under examples/trailhead/; multi-surface install docs

Validation

Build-verified end-to-end (booted + core loop passed) across a marketplace and a Stripe SaaS, plus a messy-user interview smoke test.

🤖 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
Contributor

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.

Comment thread skills/in-progress/strapi-product-builder/README.md Outdated
Comment thread skills/in-progress/strapi-product-builder/README.md Outdated
Comment thread skills/in-progress/strapi-product-builder/README.md Outdated
Comment thread skills/in-progress/strapi-product-builder/references/strapi-mcp-server.md Outdated
@innerdvations

Copy link
Copy Markdown
Contributor

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.

PaulBratslavsky and others added 2 commits June 24, 2026 11:12
…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>
…, MCP register note)

- README: drop the duplicate skills/ segment in install paths + cd into the clone
  (copy-paste was broken)
- trailhead/05-tech-requirements.md: slug -> Document Service middleware, author ->
  create controller (was lifecycle hooks; matches the cookbook/SKILL guidance and
  the two cited Strapi posts). The 06 file was already fixed; this completes it.
- strapi-mcp-server.md: note custom tools register in register() before mcp.start()

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

Copy link
Copy Markdown
Collaborator Author

Updated the PR description to match the self-contained refactor: companions.md was removed (the skill now references only references/resources.md plus official Strapi sources), so the description no longer mentions a companions registry. Thanks!

@innerdvations innerdvations left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Change request

Solid WIP skill overall — the interview flow and strapi-build-cookbook.md are strong. A few items to address before merge:

Install instructions (interim)

README install paths are Claude-only today. Please add Cursor / cross-agent paths for this PR (e.g. ~/.cursor/skills/ or project .agents/skills/ / .cursor/skills/). A repo-wide universal install README can be a follow-up — no need to block on that here.

Rename stage-6 output to be agent-agnostic

06-claude-code-spec.md content is already generic; the filename and framing assume Claude Code. Please rename to something neutral (e.g. 06-build-spec.md) and update all references:

  • templates/06-claude-code-spec.template.md06-build-spec.template.md
  • examples/trailhead/06-claude-code-spec.md
  • References in SKILL.md, README.md, scripts/README.md, examples/README.md
  • Stage-6 wording: "hand to any coding agent" rather than Claude Code only

1. Stage-5 template contradicts v5 cookbook

templates/05-tech-requirements.template.md still prescribes beforeCreate lifecycle hooks for slug generation, but SKILL.md declares templates the source of truth and the cookbook/trailhead example use Document Service middleware + controller stamping. Please align the template with the cookbook pattern.

2. Template conflates blocks and richtext

Same file, example field row uses richtext (blocks) — in v5 these are separate field types. Split or pick one explicitly.

3. STRAPI_URL vs BETTER_AUTH_URL naming drift

auth-better-auth.md config uses STRAPI_URL but env var lists / trailhead use BETTER_AUTH_URL. README troubleshooting also mentions STRAPI_URL. Pick one name and use it consistently across auth ref, trailhead, templates, and README.

5. Desktop zip path assumes repo root

Zip instructions use cd skills/in-progress without context — fails if the user already cd skills from the personal-install block. Clarify "from repo root" or use cd in-progress after cd skills.

6. auth-better-auth.md lifecycle suggestion

Line ~142 suggests Profile.beforeCreate for validation — slightly at odds with the skill's "avoid lifecycles for business logic" guidance elsewhere. Reword or drop.


Happy to re-review once these land.

AI-assisted comment.

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