Cursor rule
.cursor/rules/pr.mdcGenerate a comprehensive PR description using the pull request template and current branch diff
Cursor rules
Quality
73/100
Scores the file, not the repository.Length
714 words
6 headings · 1 code blocksRepository
34
— · pushed 3 days agoLast changed
3 days ago
First indexed 3 days ago.1234567When the user types `@pr`, automatically generate a comprehensive pull request description and create the PR using GitHub CLI by:891. **Analyzing the current branch diff** to understand:1011 - What files were added, modified, or deleted12 - What components/features were changed13 - The scope and nature of changes (feat, fix, chore, etc.)14 - Any new dependencies or breaking changes15162. **Following the PR template structure** from `.github/pull_request_template.md`:1718 - Fill in the Description section with a clear summary19 - Identify any related issues if mentioned in commits20 - Suggest manual testing steps based on changes21 - Note if screenshots/recordings would be helpful22 - Pre-check relevant checklist items23243. **Smart content generation**:2526 - **Description**: Write 2-3 sentences explaining what changed and why27 - **Related issues**: Look for issue references in commit messages28 - **Manual testing steps**: Generate realistic testing steps based on the components changed29 - **Screenshots/Recordings**: Suggest if UI/visual changes are detected30 - **Checklist items**: Auto-check items that are clearly satisfied31324. **Component-specific intelligence**:3334 - For Figma Code Connect files: Mention design system alignment35 - For React/React Native changes: Note cross-platform consistency36 - For test files: Highlight testing improvements37 - For build/config changes: Note infrastructure updates38 - For documentation: Mention docs updates39405. **Create the PR using GitHub CLI**:4142 - Generate a concise PR title based on the changes (e.g., "feat: add Avatar Figma Code Connect integration")43 - Create a secure temporary file with a unique name using a UUID or random string (e.g., `pr-description-[uuid].md`)44 - Ensure the `.cursor/temp/` directory exists, create it if needed45 - Save the generated description to the temporary file46 - Execute: `gh pr create --title "[generated-title]" --body-file .cursor/temp/pr-description-[unique-id].md --draft`47 - If successful, display: "✅ Draft PR created successfully: [PR-URL]"48 - Provide next steps: "Review the description and run `gh pr ready` when ready for review"49 - Clean up temporary file after successful PR creation50 - If PR creation fails, ensure the temporary file is deleted to prevent accumulation51526. **Display the generated description and PR creation status**:5354```markdown55## **Description**5657[Auto-generated description based on diff analysis]5859## **Related issues**6061[Auto-detected or "Fixes: <!-- Add issue links -->"]6263## **Manual testing steps**6465[Component-specific testing steps based on changes]6667## **Screenshots/Recordings**6869[Indicate if needed based on UI changes]7071## **Pre-merge author checklist**7273- [x] [Auto-check items that are clearly satisfied]74- [ ] [Leave unchecked items that need manual verification]7576## **Pre-merge reviewer checklist**7778- [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).79- [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.80```8182**Special handling for common patterns**:8384- Avatar components → "Enhances avatar component suite with..."85- Figma files → "Adds Figma Code Connect integration for..."86- Build configs → "Updates build configuration to..."87- Bug fixes → "Resolves issue with..."88- New features → "Implements new functionality for..."8990**Example auto-generated descriptions**:9192- For Avatar Figma files: "Adds Figma Code Connect integration for Avatar components, ensuring design-to-code alignment between React and React Native implementations."93- For build changes: "Updates TypeScript build configuration to exclude Figma Code Connect files from production builds while maintaining development type checking."94- For component updates: "Enhances [ComponentName] with [specific improvements] and ensures cross-platform consistency between React and React Native versions."9596**GitHub CLI Integration**:9798- Always create PR as draft initially using `--draft` flag99- Use semantic PR titles following conventional commits (feat:, fix:, chore:, etc.)100- Generate unique temporary filenames using UUIDs or random strings to avoid conflicts101- Show the GitHub CLI command being executed: `gh pr create --title "..." --body-file .cursor/temp/pr-description-[unique-id].md --draft`102- After successful creation, display: "✅ Draft PR created successfully: [PR-URL]"103- Provide next steps: "Review the description and run `gh pr ready` when ready for review"104- If `gh` command fails, display the generated description and provide manual instructions105- Always clean up temporary files regardless of success or failure to prevent accumulation106107**Error Handling**:108109- If GitHub CLI is not installed: "Please install GitHub CLI: `brew install gh` or visit https://cli.github.com"110- If not authenticated: "Please authenticate with GitHub: `gh auth login`"111- If branch has no remote: "Please push your branch first: `git push -u origin [branch-name]`"112
Also in MetaMask/metamask-design-system
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| MetaMask/metamask-design-systemCLAUDE.md · 34 | CLAUDE.md | buildtestlint-formatstyle+5 | 97/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
