spree-resource

Installation
SKILL.md

Adding a Spree Resource

Commands below use the Spree CLI form (spree …, Docker). On a classic Rails app without the CLI (typical pre-5.4), use the native mapping in the spree-project skill — bin/rails / bundle exec rake from the app root, paths without the backend/ prefix.

To add a new model that's exposed via the Spree v3 API, use the spree:api_resource generator. One command produces:

  • The model (in backend/app/models/spree/<name>.rb)
  • The migration
  • Store + Admin API controllers
  • Store + Admin serializers
  • FactoryBot factory
  • Controller specs covering full CRUD
  • Routes (injected into spree/api/config/routes.rb)

Prerequisite: run spree eject first — the generator executes inside the Docker container, and only the ejected dev compose bind-mounts ./backend, so generated files appear (and persist) on your host.

The one-command path

Installs
45
GitHub Stars
4
First Seen
Jun 11, 2026
spree-resource — spree/agent-skills