Free: a sampler of tested rules files for Claude Code, Cursor and Codex: AGENTS.md, CLAUDE.md, Cursor .mdc and a security rule. Drop it in a repo and your agent follows it.
https://t.co/stOcpgDluc
Claude Code, Codex and Cursor all handle memory differently:
Claude Code: auto memory on, plain markdown, edit with /memory
Codex: off until you enable it, control with /memories
Cursor: Memories removed in 2.1
Where each lives and how to reset it:
https://t.co/RqzUbaMWQl
Codex tip: picking up yesterday's work?
codex resume --last
reopens the most recent chat, but only for the folder you're in. Add --all to search every directory. It takes model and sandbox overrides, not --worktree.
Codex tip: want auto-approval without going full --yolo?
codex --approve-for-me
uses automatic approval review with on-request approvals and the workspace-write sandbox. It conflicts with --sandbox and --yolo, so pick one.
Claude Code subagent tip: permissionMode in the agent file is ignored when your main session runs in bypassPermissions, acceptEdits or auto mode.
The subagent inherits that mode. Set the mode on the main session, or block risky tools with deny rules.
Codex tip: give a long task a goal that sticks.
/goal Finish the migration and keep tests green
stays attached to the chat while work continues. /goal edit, /goal pause, /goal resume or /goal clear it. Max 4,000 chars, so for more, point the goal at a file.
Claude Code tip: preview what it keeps on your machine for a project.
claude purge ~/work/repo --dry-run
lists the transcripts, task lists, debug logs, file-edit history and prompt history it would delete. Drop --dry-run to actually clear it.
Claude Code tip: curious what auto mode will block?
claude auto-mode defaults --label 'Git Destructive'
prints the built-in classifier rules whose label starts with that text. claude auto-mode config shows your effective config with your settings applied.
Claude Code acting weird and you suspect your own setup?
claude --safe-mode starts with CLAUDE.md, skills, plugins, hooks and MCP servers all turned off. Auth, model and permissions work as normal. If the problem goes away, it's one of your customizations.
Claude Code tip: want to try a different approach without losing the session you're in?
claude --resume <id> --fork-session
It resumes the conversation under a new session ID, so the original stays untouched and you can go back to it.
Cursor tip: in Auto-review, npm install often works because sandbox.json + Defaults already allows https://t.co/shwhnTLeb2.
When it fails, the host is usually off that list: a private registry, a Git dependency host, or an API your tests call. Add it in .cursor/sandbox.json.
Claude Code tip: /rewind won't undo most subagent edits.
Checkpoints don't capture what a subagent writes, so rewinding only restores files Claude already edited in your own conversation. Everything else the subagent touched stays. Commit before delegating big changes.
Cursor hooks tip: a stop hook can keep the agent working. Return JSON with a followup_message and Cursor sends it as the next prompt.
It's capped at 5 auto follow-ups per script by default. Set loop_limit on the hook to change that.
Codex tip: a deploy or release skill shouldn't fire just because your prompt sounded close.
In the skill's agents/openai.yaml set:
policy:
allow_implicit_invocation: false
Codex then won't pick it on its own. Typing $skill-name still runs it.
Claude Code tip: a Stop hook that sends the agent back with exit code 2 can loop forever if the tests keep failing.
Check stop_hook_active in the hook's input. It's true once a Stop hook already sent it back, so let it stop then and you get one retry, not a loop.
Codex custom agent that must not edit files? A line in its instructions isn't a sandbox.
Codex subagents inherit the parent session's sandbox and approvals. sandbox_mode in .codex/agents/*.toml doesn't override them.
Start the session read-only, then delegate.
Claude Code auto mode pauses after the classifier blocks an action 3x in a row (or 20 total).
Usually missing trusted infra. Add autoMode.environment in ~/.claude/settings.json (keep "$defaults"), or run /auto-mode-setup, then claude auto-mode config.
Claude Code monorepo tip: a skill in packages/payments/.claude/skills isn't loaded when you start at the repo root.
It loads the first time Claude works on a file in that package. Start Claude in packages/payments and it's there from the first prompt.
Before running Claude Code in a cloned repo, read .claude/skills.
A project skill's allowed-tools grant isn't gated by workspace trust. It applies even in a claude -p run in a folder you never trusted.
Agent npm install fails with EROFS on ~/.npm even after you open the network?
The sandbox can reach the registry but can't write the cache outside the workspace.
Claude Code: filesystem.allowWrite ["~/.npm"]
Codex: writable_roots = ["~/.npm"]
Claude Code subagent tip: disallowedTools: Bash(git push *) doesn't block just git push. It removes the whole Bash tool from that subagent.
To block one command, use a permissions.deny rule or a PreToolUse hook instead.