Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ By creating a `.cursorrules` file in your project's root directory, you can leve
- [Graphical Apps Development](./rules/graphical-apps-development-cursorrules-prompt-file/.cursorrules) - Cursor rules for graphical apps development with integration.
- [Meta-Prompt](./rules/meta-prompt-cursorrules-prompt-file/.cursorrules) - Cursor rules for meta-prompt development with integration.
- [Next.js (Type LLM)](./rules/next-type-llm/.cursorrules) - Cursor rules for Next.js development with Type LLM integration.
- [Prompt Compression](./rules/prompt-compression-cursorrules-prompt-file/.cursorrules) - Cursor rules for compressing docs, prompts, and agent context files (AGENTS.md) for minimal token usage while preserving actionable information.
- [Unity (C#)](./rules/unity-cursor-ai-c-cursorrules-prompt-file/.cursorrules) - Cursor rules for Unity development with C# integration.
- [Web App Optimization](./rules/web-app-optimization-cursorrules-prompt-file/.cursorrules) - Cursor rules for web app development with optimization integration.
- [Code Pair Interviews](./rules/code-pair-interviews/.cursorrules) - Cursor rules for code pair interviews development with integration.
Expand Down
17 changes: 17 additions & 0 deletions rules/prompt-compression-cursorrules-prompt-file/.cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
When writing or editing AGENTS.md, CLAUDE.md, .cursorrules, or any agent context file:

1. Use pipe-delimited format for file indexes and structured references
2. Compress rules into single-line directives, not multi-paragraph explanations
3. Strip explanatory prose - keep only actionable content the agent needs
4. Use abbreviated keys (req, opt, str, int, bool, len, min, max, def)
5. Flatten nested hierarchies with brace expansion and path prefixes
6. Add "Prefer retrieval-led reasoning over pre-training-led reasoning" once as a file-level preamble when referencing external docs

When compressing existing content:

- Target 70-80% token reduction
- Preserve all actionable information and structural boundaries
- Keep code examples that demonstrate non-obvious API usage
- Never compress error messages or edge case docs

Before adding content to AGENTS.md, ask: "Can this be expressed in fewer tokens without losing information the agent needs to act on?"