camofox-browser / rules
Cursor rule438 starsChanged 8 months agoMITView on GitHub
Conventions for developing camofox-browser REST API routes
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,181 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 repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/001-camofox-core.mdcCursor rule
- .cursor/rules/010-cli-commands.mdcCursor rule
- .cursor/rules/020-api-endpoints.mdcCursor rule
- .cursor/rules/030-workflows.mdcCursor rule
- .cursor/rules/040-anti-patterns.mdcCursor rule
- .cursor/rules/050-cli-dev.mdcCursor rule
- .cursor/rules/070-search-macros-presets.mdcCursor rule
- camofox-browserSkill
- camofox-cliSkill
- dogfoodSkill
- gemini-imageSkill
- redditSkill
The file
We split this 060-routes-dev.mdc into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Keep core API in src/routes/core.ts and OpenClaw compatibility in src/routes/openclaw.ts.
- Very specific: line 15
Keep user-scoped tab lookup consistent (findTabById(tabId, userId)).
- Very specific: line 19
Use withUserLimit and withTimeout for heavy tab operations.
- Very specific: line 20
Use withTabLock for tab-mutating actions.
- Distinctive: line 29
Keep responses stable for CLI and OpenClaw clients.
- Distinctive: line 31
Avoid returning raw internal errors.
- Very specific: line 34
Keep user ownership checks on download lookup/content/delete.
- Very specific: line 38
Use structured log() calls with req context when available.
≈ “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
--- description: "Conventions for developing camofox-browser REST API routes" globs: "src/routes/**" alwaysApply: false --- # Route Development Conventions ## Route Files - Keep core API in `src/routes/core.ts` and OpenClaw compatibility in `src/routes/openclaw.ts`. - Preserve endpoint compatibility unless a versioned migration is planned. ## Request Validation - Validate required fields early and return `400` on malformed input. - Keep user-scoped tab lookup consistent (`findTabById(tabId, userId)`). - Enforce request body limits for evaluation endpoints. ## Concurrency and Timeouts - Use `withUserLimit` and `withTimeout` for heavy tab operations. - Use `withTabLock` for tab-mutating actions. - Respect config-driven limits from `loadConfig()`. ## Auth and Security - Apply conditional API-key checks where currently defined. - Apply admin-key checks for destructive server controls (`/stop`). - Sanitize cookie payloads and enforce bounds. ## Response Shape - Keep responses stable for CLI and OpenClaw clients. - Include `ok` and useful context fields when practical. - Avoid returning raw internal errors; use safe error wrappers. ## Download/Resource Routes - Keep user ownership checks on download lookup/content/delete. - Enforce limits on blob resolution arrays and payload sizes. ## Logging - Use structured `log()` calls with req context when available. - Log operation failures with concise, non-sensitive details.
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.

