Skip to content

Instantly share code, notes, and snippets.

View michaellperry's full-sized avatar

Michael L Perry michaellperry

View GitHub Profile
@michaellperry
michaellperry / Init-Cursor.ps1
Created September 2, 2025 19:36
PowerShell script to download Cursor files
New-Item -ItemType Directory -Path ".cursor\rules" -Force
Invoke-WebRequest -Uri "https://gist.githubusercontent.com/michaellperry/1bfa039958ca6ad05a88f5e53f84c561/raw" -OutFile ".cursor\rules\documentation-structure.mdc"
Invoke-WebRequest -Uri "https://gist.githubusercontent.com/michaellperry/b1a58708036a914028af9d427e66e1f5/raw" -OutFile ".cursor\rules\prd-review.mdc"
Invoke-WebRequest -Uri "https://gist.githubusercontent.com/michaellperry/5a41c62bb4e8ad31e336116a18e3aaae/raw" -OutFile ".cursor\rules\plan.mdc"
Invoke-WebRequest -Uri "https://gist.githubusercontent.com/michaellperry/6fca895eb7ef63faa5014f94709b36a6/raw" -OutFile ".cursor\rules\plan-review.mdc"
Invoke-WebRequest -Uri "https://gist.githubusercontent.com/michaellperry/be30a4eac4d5f2d949a05e0d5758e386/raw" -OutFile ".cursor\rules\implement.mdc"
Invoke-WebRequest -Uri "https://gist.githubusercontent.com/michaellperry/642d556fed4e54e73f7bbb4569cfe832/raw" -OutFile "fix_formatter.py"
@michaellperry
michaellperry / prd_review.mdc
Created September 1, 2025 23:35
Cursor manual rule for reviewing a product requirements document
---
alwaysApply: false
---
# PRD Review and Compliance Rule
## Purpose
This rule instructs models to critically review Product Requirements Documents (PRDs) against established documentation standards and codebase consistency. The model must identify issues and recommend changes to bring PRDs into compliance, close gaps, ensure consistency with existing code, simplify over-engineered designs, and improve implementation feasibility.
## Review Criteria
@michaellperry
michaellperry / plan.mdc
Created September 1, 2025 23:34
Cursor manual rule for creating a plan
---
alwaysApply: false
---
# Plan Creation Rule
When asked to create a plan for a feature, system, or project, you MUST follow these requirements:
## Plan Structure Requirements
@michaellperry
michaellperry / plan_review.mdc
Created September 1, 2025 23:28
Cursor manual rule for reviewing a plan
---
alwaysApply: false
---
# Plan Review and Feasibility Assessment Rule
## Purpose
This rule instructs models to critically review implementation plans against established documentation standards and codebase consistency. The model must identify issues, assess feasibility, and recommend changes to ensure plans are implementable, well-structured, and aligned with existing code.
## Review Criteria
@michaellperry
michaellperry / init-cursor.bash
Last active September 1, 2025 23:38
Script to download Cursor rules into a new project
mkdir -p .cursor/rules
curl -L https://gist.githubusercontent.com/michaellperry/1bfa039958ca6ad05a88f5e53f84c561/raw -o .cursor/rules/documentation-structure.mdc
curl -L https://gist.githubusercontent.com/michaellperry/b1a58708036a914028af9d427e66e1f5/raw -o .cursor/rules/prd-review.mdc
curl -L https://gist.githubusercontent.com/michaellperry/5a41c62bb4e8ad31e336116a18e3aaae/raw -o .cursor/rules/plan.mdc
curl -L https://gist.githubusercontent.com/michaellperry/6fca895eb7ef63faa5014f94709b36a6/raw -o .cursor/rules/plan-review.mdc
curl -L https://gist.githubusercontent.com/michaellperry/be30a4eac4d5f2d949a05e0d5758e386/raw -o .cursor/rules/implement.mdc
curl -L https://gist.githubusercontent.com/michaellperry/642d556fed4e54e73f7bbb4569cfe832/raw -o fix_formatter.py
@michaellperry
michaellperry / fix_frontmatter.py
Last active August 24, 2025 23:12
Python script to fix the frontmatter errors introduced by Cursor's /Generate Cursor Rules command
#!/usr/bin/env python3
"""
Script to fix frontmatter placement issues in .mdc files within .cursor/rules directory.
Moves misplaced frontmatter from the bottom of files to the top where it belongs.
"""
import os
import re
import shutil
from pathlib import Path
@michaellperry
michaellperry / implement.mdc
Last active September 1, 2025 23:30
Cursor rule to implement a section of a plan
---
alwaysApply: false
---
# Implementation Rule
## Requirements
Review the mentioned section of the plan against the current application as implemented. Identify any issues, inconsistencies, or points of confusion.
## Clarification Process
If the instructions are unclear:
@michaellperry
michaellperry / documentation-structure.mdc
Last active August 24, 2025 22:03
Cursor rule for project documentation structure
---
description: "Documentation structure standards for organizing project documentation into logical sections including implementation plans, technical architecture, user guides, and setup documentation. Emphasizes critical plan file requirements with progress tracking, checklists, phased work breakdowns, and project management focus. Includes file naming conventions, markdown formatting standards, content organization guidelines, and version control practices for maintaining documentation quality."
alwaysApply: true
---
# Documentation Structure and Standards
## Overview
The `/docs` folder contains comprehensive documentation for the project, organized into logical sections for different types of documentation and audiences.
## Documentation Structure
@michaellperry
michaellperry / upgrade_gatsby.sh
Created April 10, 2022 14:03
Upgrade gatsby.js and all plugins to the latest version
cat package.json | jq -r '.dependencies | keys | map(select(startswith("gatsby")) | "\(.)@latest") | join(" ")' | xargs npm
i
@michaellperry
michaellperry / GitAliases.sh
Last active August 5, 2023 17:37 — forked from trayburn/GitAliases.sh
Tim Rayburn's GIT Aliases
git config --global alias.a 'add -A'
git config --global alias.b 'branch'
git config --global alias.c 'checkout'
git config --global alias.cb 'checkout -b'
git config --global alias.d 'diff'
git config --global alias.f 'fetch'
git config --global alias.l 'log --pretty=oneline --abbrev-commit'
git config --global alias.r 'rebase --interactive HEAD~10'
git config --global alias.s '-p status'