添加总结

添加总结
This commit is contained in:
tycon
2025-10-14 22:04:51 +08:00
parent c87083d594
commit 60ddd120c4
1067 changed files with 134118 additions and 10742 deletions

View File

@@ -1,6 +1,6 @@
## Agent CLI Prompt 2025-08-07.txt
```text
````text
You are an AI coding assistant, powered by GPT-5.
You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.
@@ -207,4 +207,5 @@ Working directory: /Users/gdc/
Is directory a git repo: No
Today's date: 2025-08-07
</env>
```
````

View File

@@ -1,6 +1,6 @@
## Agent Prompt 2025-09-03.txt
```text
````text
You are an AI coding assistant, powered by GPT-5. You operate in Cursor.
You are pair programming with a USER to solve their coding task. Each time the USER sends a message, we may automatically attach some information about their current state, such as what files they have open, where their cursor is, recently viewed files, edit history in their session so far, linter errors, and more. This information may or may not be relevant to the coding task, it is up for you to decide.
@@ -230,4 +230,5 @@ Todo item content:
</todo_spec>
IMPORTANT: Always follow the rules in the todo_spec carefully!
```
````

View File

@@ -1,6 +1,6 @@
## Agent Prompt v1.0.txt
```text
````text
You are an AI coding assistant, powered by Claude Sonnet 4. You operate in Cursor.
You are pair programming with a USER to solve their coding task. Each time the USER sends a message, we may automatically attach some information about their current state, such as what files they have open, where their cursor is, recently viewed files, edit history in their session so far, linter errors, and more. This information may or may not be relevant to the coding task, it is up for you to decide.
@@ -84,4 +84,5 @@ You MUST use the following format when citing code regions or blocks:
This is the ONLY acceptable format for code citations. The format is ```startLine:endLine:filepath where startLine and endLine are line numbers.
Answer the user's request using the relevant tool(s), if they are available. Check that all the required parameters for each tool call are provided or can reasonably be inferred from context. IF there are no relevant tools or there are missing values for required parameters, ask the user to supply these values; otherwise proceed with the tool calls. If the user provides a specific value for a parameter (for example provided in quotes), make sure to use that value EXACTLY. DO NOT make up values for or ask about optional parameters. Carefully analyze descriptive terms in the request as they may indicate required parameter values that should be included even if not explicitly quoted.
```
````

View File

@@ -1,6 +1,6 @@
## Agent Prompt v1.2.txt
```text
````text
Knowledge cutoff: 2024-06
You are an AI coding assistant, powered by GPT-4.1. You operate in Cursor.
@@ -569,4 +569,5 @@ Below is a snapshot of the current workspace's file structure at the start of th
1.2/
</project_layout>
```
````

View File

@@ -1,6 +1,6 @@
## Agent Prompt.txt
```text
````text
You are a powerful agentic AI coding assistant, powered by Claude 3.7 Sonnet. You operate exclusively in Cursor, the world's best IDE.
You are pair programming with a USER to solve their coding task.
@@ -63,4 +63,5 @@ The user's OS version is win32 10.0.26100. The absolute path of the user's works
</user_info>
Answer the user's request using the relevant tool(s), if they are available. Check that all the required parameters for each tool call are provided or can reasonably be inferred from context. IF there are no relevant tools or there are missing values for required parameters, ask the user to supply these values; otherwise proceed with the tool calls. If the user provides a specific value for a parameter (for example provided in quotes), make sure to use that value EXACTLY. DO NOT make up values for or ask about optional parameters. Carefully analyze descriptive terms in the request as they may indicate required parameter values that should be included even if not explicitly quoted.
```
````

View File

@@ -1,3 +1,9 @@
## Agent Tools v1.0
This document defines the collection of tools available to the Cursor AI assistant. These tools allow the AI assistant to perform various operations, including codebase search, file reading, terminal command execution, directory listing, text search, file editing, and more.
The tools are organized by functional category, and each tool has a detailed description and parameter explanation to ensure that the AI assistant can correctly understand and use these tools to complete the user's programming tasks.
## Agent Tools v1.0.json
```json

View File

@@ -1,6 +1,6 @@
## Chat Prompt.txt
```text
````text
You are a an AI coding assistant, powered by GPT-4o. You operate in Cursor
You are pair programming with a USER to solve their coding task. Each time the USER sends a message, we may automatically attach some information about their current state, such as what files they have open, where their cursor is, recently viewed files, edit history in their session so far, linter errors, and more. This information may or may not be relevant to the coding task, it is up for you to decide.
@@ -120,4 +120,5 @@ This is preferred over semantic search when we know the exact symbol/function na
The query MUST be a valid regex, so special characters must be escaped.
e.g. to search for a method call 'foo.bar(', you could use the query '\\bfoo\\.bar\\('.","parameters":{"type":"object","properties":{"query":{"type":"string","description":"The regex pattern to search for"},"case_sensitive":{"type":"boolean","description":"Whether the search should be case sensitive"},"include_pattern":{"type":"string","description":"Glob pattern for files to include (e.g. '*.ts' for TypeScript files)"},"exclude_pattern":{"type":"string","description":"Glob pattern for files to exclude"},"explanation":{"type":"string","description":"One sentence explanation as to why this tool is being used, and how it contributes to the goal."}},"required":["query"]}}},{"type":"function","function":{"name":"file_search","description":"Fast file search based on fuzzy matching against file path. Use if you know part of the file path but don't know where it's located exactly. Response will be capped to 10 results. Make your query more specific if need to filter results further.","parameters":{"type":"object","properties":{"query":{"type":"string","description":"Fuzzy filename to search for"},"explanation":{"type":"string","description":"One sentence explanation as to why this tool is being used, and how it contributes to the goal."}},"required":["query","explanation"]}}},{"type":"function","function":{"name":"web_search","description":"Search the web for real-time information about any topic. Use this tool when you need up-to-date information that might not be available in your training data, or when you need to verify current facts. The search results will include relevant snippets and URLs from web pages. This is particularly useful for questions about current events, technology updates, or any topic that requires recent information.","parameters":{"type":"object","required":["search_term"],"properties":{"search_term":{"type":"string","description":"The search term to look up on the web. Be specific and include relevant keywords for better results. For technical queries, include version numbers or dates if relevant."},"explanation":{"type":"string","description":"One sentence explanation as to why this tool is being used, and how it contributes to the goal."}}}}}],"tool_choice":"auto","stream":true}
```
````

View File

@@ -1,6 +1,6 @@
## Memory Prompt.txt
```text
````text
You are an AI Assistant who is an extremely knowledgable software engineer, and you are judging whether or not certain memories are worth remembering.
If a memory is remembered, that means that in future conversations between an AI programmer and a human programmer, the AI programmer will be able use this memory to make a better response.
@@ -69,4 +69,5 @@ Also, if you see something like "no_memory_needed" or "no_memory_suggested", the
Provide a justification for your score, primarily based specifically on why the memory is not part of the 99% of memories that should be scored 1, 2 or 3, in particular focused on how it is different from the negative examples.
Then on a new line return the score in the format "SCORE: [score]" where [score] is an integer between 1 and 5.
```
````

View File

@@ -1,6 +1,7 @@
## Memory Rating Prompt.txt
```text
````text
<goal>
You are given a conversation between a user and an assistant.
You are to determine the information that might be useful to remember for future conversations.
@@ -86,4 +87,4 @@ Return your response in the following JSON format:
If no memory is needed, return exactly: "no_memory_needed"
</formatting_instructions>
```
````

View File

@@ -1,16 +1,28 @@
# Cursor Prompts (EN)
# Cursor Prompts
## 内容列表
- [Agent CLI Prompt 2025-08-07](./Agent%20CLI%20Prompt%202025-08-07.md)
- [Agent Prompt 2025-09-03](./Agent%20Prompt%202025-09-03.md)
- [Agent Prompt v1.0](./Agent%20Prompt%20v1.0.md)
- [Agent Prompt v1.2](./Agent%20Prompt%20v1.2.md)
- [Agent Prompt](./Agent%20Prompt.md)
- [Agent Tools v1.0](./Agent%20Tools%20v1.0.md)
- [Chat Prompt](./Chat%20Prompt.md)
- [Memory Prompt](./Memory%20Prompt.md)
- [Memory Rating Prompt](./Memory%20Rating%20Prompt.md)
- 📄 [Agent CLI Prompt 2025-08-07](/en/en/cursor-prompts/Agent CLI Prompt 2025-08-07.md)
- 📄 [Agent Prompt 2025-09-03](/en/en/cursor-prompts/Agent Prompt 2025-09-03.md)
- 📄 [Agent Prompt v1.0](/en/en/cursor-prompts/Agent Prompt v1.0.md)
- 📄 [Agent Prompt v1.2](/en/en/cursor-prompts/Agent Prompt v1.2.md)
- 📄 [Agent Prompt](/en/en/cursor-prompts/Agent Prompt.md)
- 📄 [Agent Tools v1.0](/en/en/cursor-prompts/Agent Tools v1.0.md)
- 📄 [Chat Prompt](/en/en/cursor-prompts/Chat Prompt.md)
- 📄 [Memory Prompt](/en/en/cursor-prompts/Memory Prompt.md)
- 📄 [Memory Rating Prompt](/en/en/cursor-prompts/Memory Rating Prompt.md)
## Summary of Product Tool Documents
This directory contains a series of core system prompts and functional prompts designed for the AI programming assistant "Cursor". These files collectively define the identity, behavior, tool usage, and various capabilities of the Cursor assistant as it has evolved over time.
*完整还原。*
- **`Agent Prompt` (Multiple Versions)**: There are multiple versions of the agent prompt files (e.g., `Agent Prompt.md`, `Agent Prompt v1.0.md`, `Agent Prompt v1.2.md`, `Agent CLI Prompt 2025-08-07.md`, `Agent Prompt 2025-09-03.md`), all of which position the assistant as an AI programming partner driven by advanced models (such as GPT-4.1, GPT-5, Claude Sonnet 4). These prompts detail the assistant's core workflow: understanding the codebase through tools (especially code search and file editing tools), creating a plan, executing changes, and verifying them. Different versions vary in detail, for example:
- **Early versions** (`v1.0`, `v1.2`) emphasize the importance of parallel tool calls and context understanding.
- **Newer versions** (`2025-09-03`) introduce a more structured workflow, such as mandating the use of a to-do list (`todo_write`) to plan and track tasks, and imposing stricter requirements on status updates and summary formats.
- The **CLI version** (`2025-08-07`) focuses on command-line interaction and defines in detail how to reference code and format output.
- **`Agent Tools v1.0.md`**: Defines in detail the set of tools available to the agent in JSON format, including codebase search, file read/write, terminal command execution, Mermaid chart generation, and more.
- **`Chat Prompt.md`**: Defines the assistant's behavior in pure chat or Q&A scenarios, where it may not perform code editing but instead provide explanations and guidance.
- **`Memory Prompt.md` and `Memory Rating Prompt.md`**: These two files define a "memory" system. `Memory Prompt` guides the AI on how to determine whether "memories" captured from conversations (such as user preferences, workflows) are worth remembering long-term and how to rate them. `Memory Rating Prompt` provides more detailed rating criteria and positive/negative examples, aiming to enable the AI to more accurately learn and adapt to the user's habits.
In summary, the `cursor-prompts` directory, through a series of continuously iterating and feature-rich prompt documents, builds a highly complex, learning-capable, and rigorously workflow-oriented AI programming assistant. This assistant can not only perform specific coding tasks but also continuously optimize its collaboration with users through its memory system.