Skip to content

Instantly share code, notes, and snippets.

View ctrlShiftBryan's full-sized avatar

Bryan Arendt ctrlShiftBryan

View GitHub Profile
@ctrlShiftBryan
ctrlShiftBryan / prompt.md
Created April 6, 2025 18:47
Turn Cursor Docs into Markdown Prompt

Documentation Generation Prompt

Create comprehensive documentation for [SUBJECT]. Each topic should have its own numbered markdown file.

File Structure:

  • Place all files in: /docs/[subject-name]/ folder
  • Name each file with its number and topic: 1.intro.md, 2.installation.md, etc.

Formatting:

13. Zustand Best Practices

Overview

Zustand is a lightweight state management library for React that provides a simple API to create global state stores with a focus on minimal boilerplate. At just 1.1KB (minified + gzipped), it offers Redux-like patterns without the complexity, allowing flexible implementation with optional features like immer integration and middlewares.

Core Principles

Use Custom Hooks

Add Background Process Management Scripts

This prompt helps you add background process management scripts to any Node.js project with a development server (Expo, Next.js, Vite, etc.).

Instructions

  1. Analyze the project to determine:
    • Package manager (npm, yarn, pnpm, bun)
    • Dev server command (start, dev, serve, etc.)
  • Default port number