libuipc / rules
Cursor rule351 starsChanged 3 months agoApache-2.0View on GitHub
All C++ code must conform to the .clang-format in the project root. Run clang-format before committing. When writing or editing C++ code, follow these rules so output is close to clang-format without a manual reformat:
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 4,183 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository19 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .cursor/rules/self-improvement.mdcCursor rule
- cmake-workflowSkill
- commit-conventionSkill
- commitSkill
- cursor-rulesSkill
- documentSkill
- fix-issueSkill
- fix-prSkill
- formatSkill
- github-prSkill
- gpu-optimizationSkill
- project-structureSkill
- push-tagSkill
- repository-setupSkill
- review-prSkill
- run-testsSkill
- simulation-devSkill
- xmake-workflowSkill
The file
We split this cpp-format.mdc into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 9
All C++ code must conform to the .clang-format in the project root.
- Distinctive: line 13
When writing or editing C++ code, follow these rules so output is close to clang-format without a manual reformat:
- Very specific: line 21
One parameter per line: when they don't fit: BinPackArguments: false, BinPackParameters: false.
- Very specific: line 23
Header guards: Use #pragma once.
≈ “Common” is an estimate: at least 1 in 5 of the 6,668 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
---
globs: "*.h,*.hpp,*.cpp,*.inl,*.cu,*.cuh"
---
# C++ Format Rules
## Overview
All C++ code must conform to the [.clang-format](mdc:.clang-format) in the project root. Run `clang-format` before committing.
## Key Style Points
When writing or editing C++ code, follow these rules so output is close to clang-format without a manual reformat:
- **Indentation**: 4 spaces, no tabs.
- **Column limit**: 80 characters.
- **Braces**: Allman style — opening brace on its own line for classes, structs, functions, control statements, namespaces, enums, unions, lambdas, catch, and else.
- **Pointer alignment**: Left (`int* p`, not `int *p`).
- **No space before parentheses**: `if(cond)`, `for(...)`, `func()` — not `if (cond)`.
- **Namespace indentation**: Inner namespaces are indented; use `namespace uipc::module { }` style.
- **One parameter per line** when they don't fit: `BinPackArguments: false`, `BinPackParameters: false`.
- **Include sorting**: Disabled (`SortIncludes: false`) — keep the existing include order.
- **Header guards**: Use `#pragma once`.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

