camofox-browser / rules
Cursor rule438 starsChanged 8 months agoMITView on GitHub
Conventions for developing camofox CLI commands
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/060-routes-dev.mdcCursor rule
- .cursor/rules/070-search-macros-presets.mdcCursor rule
- camofox-browserSkill
- camofox-cliSkill
- dogfoodSkill
- gemini-imageSkill
- redditSkill
The file
We split this 050-cli-dev.mdc into the rules it gives an agent
11 rules. About 0 are common, 6 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Keep command handlers thin: parse input, call transport, format output.
- Very specific: line 15
Prefer .argument() + .option() signatures with explicit validation.
- Very specific: line 18
Use printWithOptionalFormat or context formatter for consistent output.
- Very specific: line 21
Use apiRequestWithFallback / requestWithFallback where legacy paths exist.
- Distinctive: line 23
Keep fallback logic deterministic and minimal.
- Distinctive: line 28
Avoid leaking secrets in errors or logs.
- Distinctive: line 31
Never print decrypted passwords to stdout.
- Distinctive: line 33
Keep password values in narrow scope and wipe best-effort buffers.
- Very specific: line 37
Avoid any; use narrow records/interfaces for payloads.
- Distinctive: line 38
Keep helpers pure when possible.
- Very specific: line 41
Verify help text and command signatures with --help outputs.
≈ “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 CLI commands" globs: "src/cli/**" alwaysApply: false --- # CLI Development Conventions ## Structure - Register commands in `src/cli/commands/*.ts` grouped by domain. - Wire modules in `src/cli/index.ts` only. - Keep command handlers thin: parse input, call transport, format output. ## Command Design - Prefer `.argument()` + `.option()` signatures with explicit validation. - Support active tab fallback for optional `[tabId]` where relevant. - Resolve user via `resolveCommandUser` and default to CLI/global setting. - Use `printWithOptionalFormat` or context formatter for consistent output. ## Transport and Fallback - Use `apiRequestWithFallback` / `requestWithFallback` where legacy paths exist. - Handle 404 fallback explicitly for compatibility branches. - Keep fallback logic deterministic and minimal. ## Error Handling - Route all errors to `context.handleError`. - Throw actionable validation errors for bad CLI input. - Avoid leaking secrets in errors or logs. ## Auth Vault Safety - Never print decrypted passwords to stdout. - For `--inject`, require explicit username/password refs. - Keep password values in narrow scope and wipe best-effort buffers. ## TypeScript Practices - Preserve strict typing for command options and action handlers. - Avoid `any`; use narrow records/interfaces for payloads. - Keep helpers pure when possible. ## Testing/Validation - Verify help text and command signatures with `--help` outputs. - Validate JSON/text/plain formatting behavior. - Confirm auto-start behavior and `server` command exclusions in preAction logic.
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.

