MCP ExplorerExplorer

Cursor Prompt Template

@S17S17on 10 months ago
1 MIT
FreeCommunity
AI Systems
A reusable prompt template for managing complex tasks with Cursor using MCPs, with examples for fixing issues and implementing features.

Overview

What is Cursor Prompt Template

Cursor-prompt-template is a reusable prompt template designed for managing complex tasks using Cursor and Model Context Protocols (MCPs). It provides a structured workflow to prevent hallucinations by guiding users through planning, research, and implementation.

Use cases

Use cases for cursor-prompt-template include resolving software bugs, implementing new features, conducting research tasks, and managing complex workflows that require coordination among multiple MCP tools.

How to use

To use the cursor-prompt-template, follow the structured steps outlined in the prompt. Begin by defining the project, the issue or feature, and the timeframe for resolution. Utilize the specified MCP tools at each step, logging progress and outcomes to ensure a clear workflow.

Key features

Key features of the cursor-prompt-template include a structured approach to task management, integration with various MCP tools for planning and execution, and a logging system for tracking progress and debugging.

Where to use

Cursor-prompt-template can be used in software development, project management, and any field that requires systematic problem-solving and feature implementation using MCPs.

Content

Cursor Prompt Template

This repository contains a reusable prompt template for managing complex tasks with Cursor using Model Context Protocols (MCPs). It helps prevent Cursor from hallucinating by providing a structured workflow, leveraging MCP tools for planning, research, and implementation.

Prompt Template

I'm working on the [PROJECT NAME], a [PROJECT DESCRIPTION]. The current [ISSUE/FEATURE] is [DESCRIBE THE ISSUE OR FEATURE]. I need you to [RESOLVE THE ISSUE/IMPLEMENT THE FEATURE] within [TIMEFRAME] to meet [GOAL OR DEADLINE].

You have access to the following MCPs and their tools:
- **github**: `create_or_update_file`, `search_repositories`, `create_repository`, `get_file_contents`, `push_files`, `create_issue`, `create_pull_request`, `fork_repository`, `create_branch`, `list_commits`, `list_issues`, `update_issue`, `add_issue_comment`, `search_code`, `search_issues`, `search_users`, `get_issue`.
- **Sequential Thinking**: `sequentialthinking`.
- **mcp-server-firecrawl**: `firecrawl_scrape`, `firecrawl_map`, `firecrawl_crawl`, `firecrawl_batch_scrape`, `firecrawl_check_batch_status`, `firecrawl_check_crawl_status`, `firecrawl_search`, `firecrawl_extract`, `firecrawl_deep_research`, `firecrawl_generate_llmtext`.

Follow these steps in order, using the specified MCP tools at each step, to [RESOLVE THE ISSUE/IMPLEMENT THE FEATURE]. After each step, save progress to `progress_log.md` and reference it in subsequent steps to avoid starting from scratch. Log all actions, errors, and outcomes for debugging. If an error occurs, backtrack, analyze, and retry.

### Step 1: Plan the Approach Using Sequential Thinking MCP
- Use the `sequentialthinking` tool to create a detailed plan for [RESOLVING THE ISSUE/IMPLEMENTING THE FEATURE].
- Analyze the [ISSUE/FEATURE]: "[DESCRIBE THE ISSUE OR FEATURE]".
- Hypothesize potential [CAUSES/REQUIREMENTS] (e.g., [LIST POTENTIAL CAUSES OR REQUIREMENTS]).
- Outline steps to address each [CAUSE/REQUIREMENT], including [SPECIFIC ACTIONS].
- Save the plan to `progress_log.md` with the heading "Step 1: Planning with Sequential Thinking".

### Step 2: Research Online Solutions Using Firecrawl MCP
- Use `firecrawl_search` with the query "[RELEVANT SEARCH QUERY]" to find potential solutions online.
- Use `firecrawl_extract` to pull relevant information from the top 3 search results (e.g., forum posts, documentation, blogs).
- If no clear solution is found, use `firecrawl_deep_research` with the same query for a more thorough investigation.
- Summarize findings (e.g., common [CAUSES/REQUIREMENTS], suggested [FIXES/IMPLEMENTATIONS]).
- Append the summary to `progress_log.md` under "Step 2: Research with Firecrawl".

### Step 3: Extract Best Practices from GitHub Using GitHub MCP
- Use `search_repositories` with keywords "[RELEVANT KEYWORDS]" to find relevant repositories.
- For the top repository, use `get_file_contents` to extract relevant files (e.g., [SPECIFIC FILES]) that handle [RELEVANT FUNCTIONALITY].
- Identify best practices for [SPECIFIC ASPECTS OF THE ISSUE/FEATURE].
- Append the best practices to `progress_log.md` under "Step 3: GitHub Best Practices".

### Step 4: Replan with Sequential Thinking MCP Based on Research
- Use `sequentialthinking` to refine the plan from Step 1, incorporating findings from Steps 2 and 3.
- Read `progress_log.md` to understand the initial plan and research outcomes.
- Update the plan to prioritize [FIXES/IMPLEMENTATIONS] based on research.
- Save the updated plan to `progress_log.md` under "Step 4: Refined Plan with Sequential Thinking".

### Step 5: Implement [FIXES/FEATURE] and Test
- Read `progress_log.md` to follow the refined plan from Step 4.
- Implement the [FIXES/FEATURE] as per the plan, using code snippets or configurations from research.
- Add detailed logging to track execution and errors.
- Test with a simple [QUERY/USE CASE] (e.g., [EXAMPLE]).
- Verify the [ISSUE IS RESOLVED/FEATURE WORKS] and the UI updates correctly.
- Log the test outcome to `progress_log.md` under "Step 5: Implementation and Test Results".

### Step 6: Verify and Finalize
- Use `sequentialthinking` to verify the outcome:
  - Check if the [ISSUE IS RESOLVED/FEATURE IS IMPLEMENTED].
  - Confirm the UI shows the expected behavior.
  - Ensure no [ERRORS/ISSUES] occur.
- If the [ISSUE/FEATURE] persists, backtrack to Step 2, research further, and retry.
- Once resolved, save the final solution and test logs to `progress_log.md` under "Step 6: Verification and Finalization".
- Deliver the working system within the [TIMEFRAME].

### Additional Instructions
- Log all actions, errors, and outcomes to `progress_log.md` for debugging and continuity.
- Reference `progress_log.md` at the start of each step to maintain state and avoid starting from scratch.
- If an error occurs, log it, analyze it, and use `sequentialthinking` to hypothesize causes and test solutions.
- Focus on core [FEATURES/FIXES] first to meet the deadline, then polish if time permits.

Example Uses

For an Issue

I'm working on the MyWebApp, a web application for task management. The current issue is users can't log in due to a server timeout. I need you to resolve the issue within 2 days to meet the sprint deadline.

You have access to the following MCPs and their tools:
- **github**: `create_or_update_file`, `search_repositories`, `create_repository`, `get_file_contents`, `push_files`, `create_issue`, `create_pull_request`, `fork_repository`, `create_branch`, `list_commits`, `list_issues`, `update_issue`, `add_issue_comment`, `search_code`, `search_issues`, `search_users`, `get_issue`.
- **Sequential Thinking**: `sequentialthinking`.
- **mcp-server-firecrawl**: `firecrawl_scrape`, `firecrawl_map`, `firecrawl_crawl`, `firecrawl_batch_scrape`, `firecrawl_check_batch_status`, `firecrawl_check_crawl_status`, `firecrawl_search`, `firecrawl_extract`, `firecrawl_deep_research`, `firecrawl_generate_llmtext`.

Follow these steps in order, using the specified MCP tools at each step, to resolve the issue. After each step, save progress to `progress_log.md` and reference it in subsequent steps to avoid starting from scratch. Log all actions, errors, and outcomes for debugging. If an error occurs, backtrack, analyze, and retry.

### Step 1: Plan the Approach Using Sequential Thinking MCP
- Use the `sequentialthinking` tool to create a detailed plan for resolving the issue.
- Analyze the issue: "users can't log in due to a server timeout".
- Hypothesize potential causes (e.g., slow database query, server overload).
- Outline steps to address each cause, including checking server logs.
- Save the plan to `progress_log.md` with the heading "Step 1: Planning with Sequential Thinking".

For a Feature

I'm working on the MyWebApp, a web application for task management. The current feature is adding a user profile page. I need you to implement the feature within 3 days to meet the client demo.

You have access to the following MCPs and their tools:
- **github**: `create_or_update_file`, `search_repositories`, `create_repository`, `get_file_contents`, `push_files`, `create_issue`, `create_pull_request`, `fork_repository`, `create_branch`, `list_commits`, `list_issues`, `update_issue`, `add_issue_comment`, `search_code`, `search_issues`, `search_users`, `get_issue`.
- **Sequential Thinking**: `sequentialthinking`.
- **mcp-server-firecrawl**: `firecrawl_scrape`, `firecrawl_map`, `firecrawl_crawl`, `firecrawl_batch_scrape`, `firecrawl_check_batch_status`, `firecrawl_check_crawl_status`, `firecrawl_search`, `firecrawl_extract`, `firecrawl_deep_research`, `firecrawl_generate_llmtext`.

Follow these steps in order, using the specified MCP tools at each step, to implement the feature. After each step, save progress to `progress_log.md` and reference it in subsequent steps to avoid starting from scratch. Log all actions, errors, and outcomes for debugging. If an error occurs, backtrack, analyze, and retry.

### Step 1: Plan the Approach Using Sequential Thinking MCP
- Use the `sequentialthinking` tool to create a detailed plan for implementing the feature.
- Analyze the feature: "adding a user profile page".
- Hypothesize potential requirements (e.g., UI design, database schema).
- Outline steps to address each requirement, including creating a new route.
- Save the plan to `progress_log.md` with the heading "Step 1: Planning with Sequential Thinking".

Why This Prompt Works

  • Structured Workflow: Uses Sequential Thinking to plan and verify, ensuring a methodical approach that prevents Cursor from hallucinating or skipping steps.
  • Tool-Specific Instructions: Leverages specific MCP tools (github, firecrawl) for specific tasks, ensuring accurate implementation.
  • State Management: Saves progress in progress_log.md after each step, preventing Cursor from resetting and maintaining continuity.
  • Error Handling: Includes backtracking and debugging instructions to handle potential issues.
  • Clarity and Specificity: Provides clear, detailed instructions with placeholders for customization.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers