Skip to content
Prompt

shopsys — Cursor Rules

by shopsys

AI Summary

A Cursor IDE rule set providing test-driven development workflows and testing patterns specifically for Shopsys e-commerce framework projects. Developers working with Shopsys benefit from structured guidance on when and how to write tests before refactoring.

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to add the "shopsys — Cursor Rules" prompt rules to my project.
Repository: https://github.com/shopsys/shopsys

Please read the repo to find the rules/prompt file, then:
1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type)
2. If there's an existing rules file, merge the new rules in rather than overwriting
3. Confirm what was added

Description

Testing frameworks and essential testing patterns

Before Refactoring/Changes

Always check for existing tests before making significant changes: • Analyze existing code - Check if the code being modified has tests • If no tests exist - Ask user: _"I notice there are no tests for [component/function] that I'm about to refactor. Would you like me to create tests first to ensure the refactoring doesn't break existing functionality?"_ • After user confirmation - Create baseline tests that verify current behavior • Proceed with changes - Make the refactoring/modifications • Verify tests pass - Ensure changes don't break functionality

After New Implementation

Always offer to create tests for new functionality: • After implementing new features - Ask user: _"I've implemented [feature/component]. Would you like me to create tests for this new functionality? This would include [unit/component/integration] tests to ensure reliability."_ • After user confirmation - Create comprehensive tests covering the new code

When to Apply This Workflow

• ✅ New components, hooks, utilities • ✅ Business logic or data processing • ✅ API endpoints or GraphQL resolvers • ✅ Complex refactoring • ✅ Bug fixes that add new logic • ❌ Minor styling changes • ❌ Text/copy updates • ❌ Simple configuration changes

Run tests

docker compose exec storefront pnpm test

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 15d ago
Active
Adoption100+ stars on GitHub
346 ★ · Growing
DocsMissing or thin
Undocumented

GitHub Signals

Stars346
Forks99
Issues78
Updated15d ago
View on GitHub
No License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Any AI assistant that accepts custom rules or system prompts

Claude
ChatGPT
Cursor
Windsurf
Copilot
+ more