camofox-browser / rules
Cursor rule438 starsChanged 8 months agoMITView on GitHub
camofox-browser anti-patterns — common mistakes to avoid
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/050-cli-dev.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
Files
---
description: "camofox-browser anti-patterns — common mistakes to avoid"
alwaysApply: true
---
# Anti-Patterns (Avoid These)
## 1) Skipping snapshot before actions
```bash
# BAD
camofox click e4
# GOOD
camofox snapshot
camofox click e4
```
## 2) Reusing refs after navigation/rerender
```bash
# BAD
camofox click e9
camofox navigate https://another-page.com
camofox click e9
# GOOD
camofox click e9
camofox navigate https://another-page.com
camofox snapshot
camofox click e3
```
## 3) Mixing `userId` across same tab flow
```bash
# BAD
camofox open https://x.com --user alice
camofox snapshot --user bob
# GOOD
camofox open https://x.com --user alice
camofox snapshot --user alice
```
## 4) Parsing text output in automation
```bash
# BAD
camofox get-url | awk '{print $2}'
# GOOD
camofox get-url --format json
```
## 5) Hardcoded query URLs instead of macros
```bash
# BAD
# manually composing search URL every time
# GOOD
# API macro use
# {"macro":"@google_search","query":"my query"}
```
## 6) Embedding plaintext credentials in scripts
```bash
# BAD
type e2 "my-secret-password"
# GOOD
camofox auth save profile
camofox auth load profile --inject --username-ref e2 --password-ref e3
```
## 7) Forgetting tab invalidation after display toggle
```bash
# BAD
# toggle display then keep using old tabId
# GOOD
# toggle display, then create a new tab
```
## 8) Assuming `download` command performs server-side direct fetch
```bash
# BAD
camofox download https://files.example.com/a.zip
# GOOD
camofox downloads --format json
# or call /tabs/:tabId/batch-download
```
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.

