RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/MetaMask/metamask-design-system

Cursor rule

.cursor/rules/pr.mdc

Generate 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 blocks

Repository

34

— · pushed 3 days ago

Last changed

3 days ago

First indexed 3 days ago.
MetaMask/metamask-design-system/.cursor/rules/pr.mdcRawGitHub
1---
2description: Generate a comprehensive PR description using the pull request template and current branch diff
3globs: ['**/*']
4alwaysApply: false
5---
6 
7When the user types `@pr`, automatically generate a comprehensive pull request description and create the PR using GitHub CLI by:
8 
91. **Analyzing the current branch diff** to understand:
10 
11 - What files were added, modified, or deleted
12 - What components/features were changed
13 - The scope and nature of changes (feat, fix, chore, etc.)
14 - Any new dependencies or breaking changes
15 
162. **Following the PR template structure** from `.github/pull_request_template.md`:
17 
18 - Fill in the Description section with a clear summary
19 - Identify any related issues if mentioned in commits
20 - Suggest manual testing steps based on changes
21 - Note if screenshots/recordings would be helpful
22 - Pre-check relevant checklist items
23 
243. **Smart content generation**:
25 
26 - **Description**: Write 2-3 sentences explaining what changed and why
27 - **Related issues**: Look for issue references in commit messages
28 - **Manual testing steps**: Generate realistic testing steps based on the components changed
29 - **Screenshots/Recordings**: Suggest if UI/visual changes are detected
30 - **Checklist items**: Auto-check items that are clearly satisfied
31 
324. **Component-specific intelligence**:
33 
34 - For Figma Code Connect files: Mention design system alignment
35 - For React/React Native changes: Note cross-platform consistency
36 - For test files: Highlight testing improvements
37 - For build/config changes: Note infrastructure updates
38 - For documentation: Mention docs updates
39 
405. **Create the PR using GitHub CLI**:
41 
42 - 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 needed
45 - Save the generated description to the temporary file
46 - 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 creation
50 - If PR creation fails, ensure the temporary file is deleted to prevent accumulation
51 
526. **Display the generated description and PR creation status**:
53 
54```markdown
55## **Description**
56 
57[Auto-generated description based on diff analysis]
58 
59## **Related issues**
60 
61[Auto-detected or "Fixes: <!-- Add issue links -->"]
62 
63## **Manual testing steps**
64 
65[Component-specific testing steps based on changes]
66 
67## **Screenshots/Recordings**
68 
69[Indicate if needed based on UI changes]
70 
71## **Pre-merge author checklist**
72 
73- [x] [Auto-check items that are clearly satisfied]
74- [ ] [Leave unchecked items that need manual verification]
75 
76## **Pre-merge reviewer checklist**
77 
78- [ ] 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```
81 
82**Special handling for common patterns**:
83 
84- 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..."
89 
90**Example auto-generated descriptions**:
91 
92- 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."
95 
96**GitHub CLI Integration**:
97 
98- Always create PR as draft initially using `--draft` flag
99- Use semantic PR titles following conventional commits (feat:, fix:, chore:, etc.)
100- Generate unique temporary filenames using UUIDs or random strings to avoid conflicts
101- 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 instructions
105- Always clean up temporary files regardless of success or failure to prevent accumulation
106 
107**Error Handling**:
108 
109- 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 

Commands it names

  • gh pr create --title "[generated-title]" --body-file .cursor/temp/pr-description-[unique-id].md --draft
  • gh pr ready
  • gh pr create --title "..." --body-file .cursor/temp/pr-description-[unique-id].md --draft
  • gh auth login
  • git push -u origin [branch-name]

Sections

  • **Description**
  • **Related issues**
  • **Manual testing steps**
  • **Screenshots/Recordings**
  • **Pre-merge author checklist**
  • **Pre-merge reviewer checklist**

What it covers

testgit-prsecurity

Stack — with the evidence

typescript

(1.00)

node

(1.00)

eslint

(1.00)

react

(0.70)

react-native

(0.70)

expo

(0.70)

tailwind

(0.70)

vite

(0.70)

vitest

(0.70)

jest

(0.70)

playwright

(0.70)

javascript

(0.60)

github-actions

(0.60)

Glob targeting

  • **/*

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
MetaMask
Language
—
License
—
Archived
no

All configs in this repo

Also in MetaMask/metamask-design-system

Diff this repo’s formats

One 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?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
MetaMask/metamask-design-systemCLAUDE.md · 34CLAUDE.mdtypescriptnode+12buildtestlint-formatstyle+597/1003 days ago
Diff against CLAUDE.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1Cursor rulestypescriptnextjs+5setuptestlint-formatstyle+799/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack