Guides
Coding agent settings, answered
The settings questions people ask most, answered in one paragraph and backed by the vendor's own documentation.
Compare across agents
How do I let an AI coding agent run commands without asking for approval?
Every major coding agent has two levers: a full auto-approve switch (Run Everything in Cursor, --dangerously-skip-permissions in Claude Code, --yolo in Codex, Gemini CLI and Copilot CLI, YOLO Mode in Cline) and a scoped allowlist that pre-approves only the commands you trust. The allowlist is the safer default. Keep the full switch for containers, VMs or throwaway projects.
Where does each AI coding agent keep its MCP server config, and what command adds a server?
Most agents read a JSON file with an mcpServers object: .cursor/mcp.json in Cursor, .mcp.json in Claude Code, .kiro/settings/mcp.json in Kiro, .factory/mcp.json in Factory Droid and .junie/mcp/mcp.json in Junie. The exceptions are VS Code (a servers key in .vscode/mcp.json), Codex ([mcp_servers.NAME] tables in ~/.codex/config.toml), OpenCode (an mcp key in opencode.json), Zed (context_servers in settings) and goose (extensions in config.yaml). Claude Code, Codex, Gemini CLI, Amp and Factory Droid also have an mcp add command.
Where is the settings file for each AI coding agent, and which file wins when the same key is set twice?
Claude Code uses ~/.claude/settings.json plus .claude/settings.json and .claude/settings.local.json in the project. Codex uses ~/.codex/config.toml plus .codex/config.toml in trusted projects. Gemini CLI and Qwen Code use ~/.gemini/settings.json and ~/.qwen/settings.json with a .gemini or .qwen folder per project. OpenCode uses ~/.config/opencode/opencode.json and opencode.json, Amp uses ~/.config/amp/settings.json and .amp/settings.json, and Factory Droid uses ~/.factory/settings.json. Cursor keeps AI settings in the Cursor Settings panel and agent files such as permissions.json in ~/.cursor and .cursor. In every tool the project file overrides the user file.
Which rules or instructions file does each AI coding agent read, and does AGENTS.md work everywhere?
Cursor reads .mdc files in .cursor/rules plus AGENTS.md. Claude Code reads CLAUDE.md and falls back to AGENTS.md when there is no CLAUDE.md. Codex, Amp, Kiro and Junie read AGENTS.md natively. Gemini CLI reads GEMINI.md and can be pointed at AGENTS.md with context.fileName. GitHub Copilot reads .github/copilot-instructions.md, .github/instructions/*.instructions.md and AGENTS.md. Cline reads .clinerules/ and also detects .cursorrules, .windsurfrules and AGENTS.md. One AGENTS.md at the repo root covers most agents.
Where do hooks go in each AI coding agent, and how does a hook block a command?
Claude Code reads a hooks block in .claude/settings.json, Gemini CLI a hooks block in .gemini/settings.json, Cursor reads .cursor/hooks.json, Factory Droid .factory/hooks.json, GitHub Copilot .github/hooks/*.json and Kiro any JSON file in .kiro/hooks/, and Codex .codex/hooks.json or [hooks] in config.toml. Every one sends the event to your script as JSON on stdin. To block a tool call, exit with code 2 in Claude Code, Codex, Cursor, Gemini CLI, Factory Droid and the Kiro CLI, or print a deny decision as JSON (Claude Code, Codex and Copilot use permissionDecision, Cursor uses permission).
Where does each AI coding agent look for SKILL.md skills, and can one skill folder work in all of them?
Every one of these agents reads a folder with a SKILL.md file whose YAML frontmatter has a name and a description. Claude Code uses .claude/skills/ and ~/.claude/skills/. Codex, Amp and OpenHands use .agents/skills/ in the repo and ~/.agents/skills/ for you. Cline uses .cline/skills/ and ~/.cline/skills/, and also reads .claude/skills/. Amp also reads .claude/skills/. So a skill in .agents/skills/ covers Codex, Amp and OpenHands, and a copy in .claude/skills/ covers Claude Code, Cline and Amp. Cursor reads .cursor/skills/, .agents/skills/ and .claude/skills/.
How do I run Claude Code, Codex, Gemini CLI, Cursor CLI or GitHub Copilot CLI non-interactively in a script or CI job?
Every major coding agent CLI has a one-shot mode: claude -p for Claude Code, codex exec for Codex, gemini -p for Gemini CLI, agent -p for the Cursor CLI and copilot -p for GitHub Copilot CLI. Claude Code, Gemini CLI and Cursor can print JSON with --output-format json. Each one needs its own flag before it will edit files or run commands without asking: --allowedTools or --permission-mode (Claude Code), --sandbox workspace-write (Codex), --force (Cursor) and --allow-tool (Copilot).
How do I run an AI coding agent's commands in a sandbox, and how do I allow network access?
Claude Code: run /sandbox or set sandbox.enabled and list hosts in sandbox.network.allowedDomains. Cursor: configure .cursor/sandbox.json, where networkPolicy defaults to deny. Codex: pick read-only, workspace-write or danger-full-access with --sandbox or sandbox_mode. Gemini CLI: start with -s, set GEMINI_SANDBOX or tools.sandbox, and choose Docker, Podman, macOS Seatbelt, gVisor or LXC.
How do I create my own reusable /command in Claude Code, Gemini CLI, Codex, Cursor, Copilot, Junie, OpenCode, Kiro, Qwen Code and Cline?
Most agents turn a prompt file into a /command named after the file. Claude Code uses .claude/skills/NAME/SKILL.md or .claude/commands/NAME.md, Cursor uses .cursor/commands/NAME.md, OpenCode uses .opencode/commands/NAME.md, Junie uses .junie/commands/NAME.md, and VS Code Copilot uses .github/prompts/NAME.prompt.md. Gemini CLI uses TOML files in .gemini/commands/, Qwen Code uses Markdown in .qwen/commands/, and Kiro CLI uses saved prompts in .kiro/prompts/. Codex custom prompts in ~/.codex/prompts/ are deprecated in favor of skills, and Cline and Copilot CLI run skills as slash commands.
Which MCP server should I use for web scraping, search, browser automation, databases, deploys, error tracking, payments, auth or design?
For scraping sites that block bots, use Bright Data; for clean Markdown or JSON, use Firecrawl. For cheap web search, start with Parallel Search; for Google results, SerpApi. For browser automation while you code or in CI, use Playwright MCP; for cloud scale, Browserbase or Browserless. For databases, Neon is the safest Postgres pick (read-only switch and free branches), and Supabase is the pick if you already use it. For deploys, Vercel covers the most for front-end apps; for app errors, Sentry; for SaaS payments with tax handled, Paddle, and for the broadest payments API, Stripe. Point any database or payments server at a dev branch or sandbox, never production.
Cursor
How do I let Cursor's agent run commands without asking?
Open Settings > Agents > Approvals & Execution and pick a Run Mode. Run Everything runs every tool call automatically with no sandbox or review; Allowlist runs only the commands you list; Auto-review runs allowlisted calls immediately and sends other shell commands to the sandbox when possible.
Does Cursor store or train on my code?
With Privacy Mode on, Cursor says customer data is not used for training and it has zero data retention agreements with its model providers, though providers may run abuse classifiers. With Privacy Mode off, Cursor may store and use codebase data, prompts and editor actions to improve its features. Privacy Mode is available on every plan.
How do I add an MCP server to Cursor?
Install a server in one click from Customize in the sidebar, or define it under "mcpServers" in .cursor/mcp.json (one project) or ~/.cursor/mcp.json (all projects). Local servers use a command, and remote servers use a url plus optional headers or OAuth settings. You can toggle servers on or off from Customize, and Cursor asks for approval before running MCP tools by default.
How do I stop Cursor from reading certain files?
Create a .cursorignore file in your project root using .gitignore syntax, and Cursor will block matching files from Agent, Tab, Inline Edit, and @ mentions. Cursor also respects .gitignore, a built-in default ignore list, and optional global patterns in user settings. It is not a security boundary: terminal commands and MCP tools run by Agent can still read ignored files.
How do I set up and run the Cursor CLI, including in scripts and CI?
Install the Cursor CLI with the official install script, then run the agent command for an interactive session or agent -p for non-interactive print mode. Control what the agent may do with permissions.allow and permissions.deny in ~/.cursor/cli-config.json or a project .cursor/cli.json file. For CI, set the CURSOR_API_KEY environment variable and run agent in print mode.
How do I configure hooks in Cursor to run scripts on agent events?
Create a hooks.json file at <project>/.cursor/hooks.json or ~/.cursor/hooks.json with "version": 1 and a "hooks" object that maps event names like afterFileEdit or beforeShellExecution to commands. Each script receives JSON on stdin and can print JSON on stdout, for example {"permission": "deny"} to block a shell command. Exit code 2 also blocks the action, and Cursor reloads hooks.json automatically when you save it.
How does Cursor's agent terminal sandbox work and how do I configure it?
On macOS and Linux, Cursor can run agent terminal commands in a sandbox that limits writes to the workspace and blocks network access you have not allowed. Whether a command enters the sandbox depends on your run mode in Settings > Agents > Approvals & Execution. You tune the sandbox with sandbox.json in ~/.cursor/ or <project>/.cursor/, including a networkPolicy allow and deny list.
How do I find and edit Cursor's settings files?
Cursor has two settings surfaces: the Cursor Settings panel (Ctrl/Cmd + Shift + J) for AI and agent features, and the VS Code style editor settings opened with Preferences: Open Settings (UI). Agent tooling is configured with JSON files in ~/.cursor for your user and in .cursor inside a project, such as mcp.json, permissions.json, hooks.json and cli-config.json. You can import your VS Code extensions, themes, settings and keybindings in one click.
How do I let Cursor's Agent use the built-in browser?
Mention @browser in your Agent prompt and Agent controls a built-in browser in Cursor. It can navigate, click, type, scroll, take screenshots and read console and network output, with no extra tools to install. You choose how much it can do without asking in Agent Settings, and enterprise admins can limit which origins it may visit.
How do I create and use subagents in Cursor?
Create a markdown file with YAML frontmatter in .cursor/agents/ for a project or ~/.cursor/agents/ for all your projects, then call it with /name in a prompt or let Agent delegate to it automatically. Cursor also ships built-in Explore and Browser subagents. Agent can run several subagents in parallel, each with its own clean context.
How do I control Cursor telemetry and export usage data to OpenTelemetry?
Turn on Privacy Mode in Cursor Settings > General so your code is not used for training by Cursor or model providers. Enterprise teams can also export usage metrics and logs over OTLP/HTTP to their own collector from Team Settings > OpenTelemetry Export. For reporting, Cursor documents an Admin API, an Analytics API and an AI Code Tracking API at https://api.cursor.com.
How do I add project rules in Cursor?
Create .mdc files in your repo's .cursor/rules folder, each with frontmatter that sets description, globs and alwaysApply. The fastest way is to type /create-rule in Agent chat. For plain markdown with no metadata, use an AGENTS.md file instead.
How do I create my own slash command or skill in Cursor?
Create a folder in .cursor/skills/ (project) or ~/.cursor/skills/ (user) holding a SKILL.md file whose frontmatter has a name that matches the folder and a description. Type / in Agent chat and pick it, or let the agent apply it when the description fits. Add disable-model-invocation: true to make it run only when you call it, like a command. In Cursor 2.4 or later, /migrate-to-skills converts your existing slash commands and dynamic rules into skills.
Claude Code
How do I stop Claude Code asking for permission every time?
Press Shift+Tab to cycle permission modes, start with claude --permission-mode <mode>, or pre-approve specific commands with permissions.allow rules such as Bash(npm run *) in .claude/settings.json. Auto mode runs without routine prompts while a classifier reviews actions; --dangerously-skip-permissions is meant only for containers or VMs.
How do Claude Code permissions work, and how do I allow or block specific tools?
Claude Code checks every tool call against permission rules in your settings files. Rules go in permissions.allow, permissions.ask and permissions.deny, use the format Tool or Tool(specifier), and are evaluated deny first, then ask, then allow. Use /permissions to see every rule and the file it comes from, or pass --allowedTools and --disallowedTools for one session.
How do I disable Claude Code telemetry, and how long is my data kept?
Set DISABLE_TELEMETRY=1 to stop usage metrics, DISABLE_ERROR_REPORTING=1 to stop error reports, or CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 to stop all non-essential traffic. Consumer accounts keep data 30 days, or 5 years if you allow training; commercial accounts keep it 30 days, with zero data retention available for qualified Enterprise customers.
Where do I put CLAUDE.md, and does Claude Code read AGENTS.md?
Put team instructions in ./CLAUDE.md (or ./.claude/CLAUDE.md), personal ones in ~/.claude/CLAUDE.md, and private project notes in ./CLAUDE.local.md. Claude Code loads every CLAUDE.md from your working directory up to the root at launch, and subdirectory files on demand. It reads AGENTS.md when there is no CLAUDE.md; with both, import it with @AGENTS.md.
How do I run a command automatically when Claude Code edits a file?
Add a hooks block to .claude/settings.json (project) or ~/.claude/settings.json (user). A PostToolUse hook with matcher "Edit|Write" runs after every file edit; a PreToolUse hook that exits with code 2 blocks the action and sends its stderr back as the reason. Type /hooks in Claude Code to see what is configured. For finer control, print JSON with hookSpecificOutput.permissionDecision set to allow, deny, ask or defer, or answer permission prompts for you with a PermissionRequest hook.
How do I create a subagent in Claude Code?
Create a Markdown file in .claude/agents/ (project) or ~/.claude/agents/ (all projects) with YAML frontmatter: name and description are required; tools, model and permissionMode are optional. Claude delegates to it when the description matches, or you can ask for it by name or @-mention it.
How do I add an MCP server to Claude Code?
Run claude mcp add --transport http NAME URL for a remote server, or claude mcp add [options] NAME -- COMMAND [args] for a local stdio server. Servers are saved at local scope by default, so only you see them and only in the current project. Use --scope project to write a shared .mcp.json, or --scope user to make the server available in all your projects.
How do I create custom slash commands and skills in Claude Code?
Create a SKILL.md file in .claude/skills/SKILL-NAME/ for one project, or in ~/.claude/skills/SKILL-NAME/ for all your projects. You run it with /skill-name, and Claude can also load it on its own when your request matches its description. Custom commands have been merged into skills, so existing .claude/commands/*.md files still work and create the same kind of /name command.
Where do Claude Code settings files live, which one wins, and what can I put in them?
Claude Code reads settings from ~/.claude/settings.json (user), .claude/settings.json (shared project), .claude/settings.local.json (project local), and managed settings deployed by your organization. When the same key is set in several places, managed settings win, then command line arguments, then project local, shared project, and finally user settings. Common keys include permissions, env, model, hooks, and statusLine, and you can change personal options with the /config command.
What is a Claude Code plugin, and how do I install one, build one, or run a marketplace for my team?
A Claude Code plugin is a directory of skills, agents, hooks, MCP servers, or other components, usually with a manifest at .claude-plugin/plugin.json, that Claude Code installs and loads as one unit. Plugins come from marketplaces, which are repositories or directories with a .claude-plugin/marketplace.json catalog that you add with /plugin marketplace add. Teams can share marketplaces and enabled plugins through the extraKnownMarketplaces and enabledPlugins keys in a committed .claude/settings.json.
How do I run Claude Code non-interactively with claude -p in scripts and CI?
Add -p (or --print) to any claude command to run it once without the interactive interface, for example claude -p "What does the auth module do?". Use --output-format json or stream-json for machine-readable output, --allowedTools or --permission-mode to avoid prompts, and --bare in CI so the run skips local hooks, plugins, MCP servers, auto memory and CLAUDE.md.
How do I set up a custom status line in Claude Code?
Run /statusline with a plain English description and Claude Code writes the script and updates your settings for you. To do it by hand, add a statusLine object with type "command" and a command path to ~/.claude/settings.json. Claude Code pipes session JSON to the script on stdin and shows whatever it prints.
How do I change the model Claude Code uses?
Run /model inside a session to open the picker, or /model sonnet to switch directly. At startup use claude --model opus, or set ANTHROPIC_MODEL or the model key in settings.json for a lasting default. Use /effort to trade reasoning depth for speed and cost.
How do I check my Claude Code costs and usage limits, and how do I spend less?
Run /usage (or its aliases /cost and /stats) to see session cost, plan usage limits and activity stats. Subscribers on Pro, Max, Team or Enterprise also get a breakdown of what counts against their limits. To spend less, /clear between tasks, pick a cheaper model with /model, lower /effort, and trim context with /context.
How do I install and use Claude Code in VS Code?
Open the Extensions view (Cmd+Shift+X or Ctrl+Shift+X), search for Claude Code, and click Install. It needs VS Code 1.94.0 or later and any paid Claude plan or a Claude Console account. If you prefer the terminal, run claude in VS Code's integrated terminal, or run /ide from an external terminal to connect it.
How do I migrate my MCP server or client to the 2026-07-28 Model Context Protocol specification?
MCP 2026-07-28 makes the protocol stateless. It removes the initialize handshake and the Mcp-Session-Id header, so every request carries its protocol version and client capabilities in _meta. Servers must implement server/discover and return server-to-client requests (elicitation, sampling, roots) as input_required results instead of sending their own requests. Upgrade to the v2 TypeScript packages (2.0.0) or Python mcp 2.0.0. Both can serve modern and 2025-era clients from one server.
How do subagents and custom agents work in Claude Code, Codex, Cursor, Gemini CLI and GitHub Copilot?
All five tools let you define custom agents in files. Claude Code, Cursor, Gemini CLI and Copilot use Markdown with YAML frontmatter. Codex uses standalone TOML files. Each tool ships built-in subagents, such as Explore in Claude Code, explorer in Codex, explore in Cursor and Copilot, and codebase_investigator in Gemini CLI. Claude Code, Cursor, Gemini CLI and Copilot can pick an agent on their own from its description. In Codex you ask for subagents directly, or AGENTS.md or skill instructions request them. The tools differ most in tool restrictions, model choice and how background or parallel runs work.
How do I deploy an MCP server so remote clients can connect over HTTP?
Build your server with an official SDK's Streamable HTTP handler (createMcpHandler in the TypeScript SDK v2, or mcp.run(transport="streamable-http") or streamable_http_app() in the Python SDK v2), expose it at a single endpoint such as /mcp, and deploy it to any HTTPS host: Cloudflare Workers, a Next.js route on Vercel, or a web service on Railway that listens on 0.0.0.0:$PORT. Under the current spec (2026-07-28) each request is a self-contained POST with no session, so any instance can answer it. Before going live, add your public hostname to the SDK's Host/Origin allowlist and put token verification in front of the handler. Clients then connect with the URL, for example claude mcp add --transport http <name> <url>.
How do I turn on and configure the Claude Code sandbox for Bash commands?
The sandbox is off by default. Run /sandbox in a session, or set sandbox.enabled to true in a settings file such as ~/.claude/settings.json. Sandboxed shell commands can write only to the working directory, a per-user temp directory and directories you added, and reach only the hosts in sandbox.network.allowedDomains, which starts empty. In auto-allow mode Claude Code runs sandboxed commands without asking.
Codex
How do I make Codex run commands without asking?
Codex combines an approval policy (--ask-for-approval: on-request or never) with a sandbox (--sandbox: read-only, workspace-write or danger-full-access). --dangerously-bypass-approvals-and-sandbox, alias --yolo, removes both. Use /permissions in a session to change them.
Where is the Codex config.toml file, and how do I set the model, approvals, sandbox, profiles, and MCP servers?
Codex reads your personal settings from ~/.codex/config.toml. You can add project settings in a .codex/config.toml file inside a repo, and Codex loads those only when you trust the project. Use top-level keys such as model, model_reasoning_effort, approval_policy, and sandbox_mode, add MCP servers as [mcp_servers.<name>] tables or with codex mcp add, and put custom instructions in AGENTS.md files.
How do I set up AGENTS.md so Codex follows my project instructions?
Put a global AGENTS.md in your Codex home (~/.codex by default) and an AGENTS.md at your repository root, plus nested files in subfolders that need different rules. Codex reads one file per directory from the project root down to your current directory and joins them, so files closer to where you work take priority. An AGENTS.override.md in the same directory wins over AGENTS.md.
How do I add an MCP server to Codex?
Run codex mcp add with a name and the server command, for example codex mcp add context7 -- npx -y @upstash/context7-mcp, or add a [mcp_servers.<name>] table to ~/.codex/config.toml. Use command and args for local stdio servers and url for remote streamable HTTP servers. Type /mcp in the Codex TUI to see which servers are active.
How do I change the Codex sandbox mode and allow network access?
Codex has three sandbox modes: read-only, workspace-write and danger-full-access. Pick one per run with codex --sandbox <mode>, or set sandbox_mode in ~/.codex/config.toml. Network access is off by default in workspace-write; turn it on with network_access = true under [sandbox_workspace_write].
How do I run Codex non-interactively with codex exec?
Run codex exec "your task" to run Codex once without the interactive TUI. It runs in a read-only sandbox by default, so add --sandbox workspace-write if it needs to edit files. Use --json for a JSON Lines event stream, -o to save the final message, and --output-schema to force a structured answer.
How do I create and use skills in Codex?
A Codex skill is a folder with a SKILL.md file whose YAML frontmatter has a name and a description. Put it in .agents/skills in your repository or in ~/.agents/skills for all projects. Call it with /skills or by typing $ and the skill name, or let Codex pick it when your task matches the description.
How do I run a script before or after Codex uses a tool, and how do I block a command with a hook?
Codex hooks are on by default. Put them in ~/.codex/hooks.json or <repo>/.codex/hooks.json, or as [hooks] tables in config.toml. Each event, such as PreToolUse, takes a list of matcher groups with command handlers. Codex sends the event as JSON on stdin. To block a tool call, exit 2 with the reason on stderr, or print hookSpecificOutput.permissionDecision "deny". Project hooks run only after the project's .codex/ folder is trusted.
Gemini CLI
How do I stop Gemini CLI asking before every tool call?
Start Gemini CLI with --approval-mode auto_edit to auto-approve edits, or --yolo (--approval-mode yolo) to auto-approve everything. YOLO can only be turned on from the command line. To allow specific shell commands, list them in tools.allowed in settings.json.
How do I disable Gemini CLI telemetry?
Set privacy.usageStatisticsEnabled to false in ~/.gemini/settings.json to stop usage statistics, and keep telemetry.enabled false (it can also be set with GEMINI_TELEMETRY_ENABLED).
Where does Gemini CLI read settings.json from, and how do I add MCP servers and context files like AGENTS.md?
Gemini CLI reads your personal settings from ~/.gemini/settings.json and project settings from .gemini/settings.json in the project root, and there are also system-level files. Settings are nested under category objects such as general, ui, model, context, and tools, and MCP servers go under a top-level mcpServers object or are added with gemini mcp add. Instructions go in GEMINI.md files, and context.fileName lets you load AGENTS.md instead of or as well as GEMINI.md.
How do I install, build, and manage Gemini CLI extensions and custom slash commands?
Gemini CLI extensions package MCP servers, context files, custom commands, hooks, themes, sub-agents, and agent skills behind a gemini-extension.json manifest, and you manage them with the gemini extensions command group from your terminal. Installed extensions live in ~/.gemini/extensions and changes take effect after you restart the CLI. For lighter shortcuts, drop .toml files into ~/.gemini/commands or your project's .gemini/commands folder to create custom slash commands.
How do I set up GEMINI.md context files in Gemini CLI?
Put shared instructions in ~/.gemini/GEMINI.md and project instructions in a GEMINI.md at your project root. Gemini CLI loads all found context files, joins them, and sends them with every prompt. Use /memory show to see what is loaded and /memory reload after edits.
How do I add an MCP server to Gemini CLI?
Run gemini mcp add with a name and a command or URL, or add an entry under mcpServers in settings.json. Each server needs one of command (stdio), url (SSE) or httpUrl (streamable HTTP). Check status with gemini mcp list in your shell or /mcp inside the CLI.
How do I create custom slash commands in Gemini CLI?
Create a .toml file with a prompt field in ~/.gemini/commands/ for global commands or .gemini/commands/ in your project. The file path becomes the command name, so git/commit.toml runs as /git:commit. Run /commands reload to pick up changes without restarting.
How do I run Gemini CLI non-interactively in scripts or CI?
Pass your prompt with -p (or --prompt), or run the CLI with piped input in a non-TTY environment. Add --output-format json for one JSON object, or stream-json for newline-delimited events. Check the exit code: 0 is success, 1 is an error, 42 is bad input, 53 is turn limit exceeded.
How do I run Gemini CLI in a sandbox?
Start the CLI with -s (or --sandbox), set GEMINI_SANDBOX, or set tools.sandbox in settings.json. Supported providers include docker, podman, sandbox-exec (macOS Seatbelt), runsc (gVisor) and lxc. The flag wins over the env var, which wins over settings.
How do I set up hooks in Gemini CLI?
Add a hooks object to .gemini/settings.json (project) or ~/.gemini/settings.json (user). Each event, such as BeforeTool or AfterTool, holds a list of groups with a matcher and a hooks array of command hooks. A hook gets JSON on stdin and replies with JSON on stdout. Exit 0 with a deny decision, or exit 2 with a reason on stderr, blocks the action. Use /hooks panel to see what is loaded.
GitHub Copilot
How do I give GitHub Copilot persistent instructions for my repository, my files, and myself?
Put repository-wide guidance in .github/copilot-instructions.md and file-specific guidance in .github/instructions/NAME.instructions.md files with an applyTo glob in the frontmatter. Copilot also reads AGENTS.md files for agent work, and you can add personal instructions on github.com or organization instructions in org settings. Reusable task prompts live in .github/prompts as .prompt.md files in VS Code.
How do I connect MCP servers to GitHub Copilot in VS Code and to Copilot cloud agent on GitHub?
In VS Code, define servers under a top-level servers key in .vscode/mcp.json for a workspace, or in your user profile mcp.json via the MCP: Open User Configuration command. Use an inputs array to prompt for secrets instead of hardcoding them. For Copilot cloud agent on GitHub, paste a JSON config with an mcpServers key into the repository Settings under Copilot, then MCP servers.
How do I preinstall dependencies for the GitHub Copilot coding agent with copilot-setup-steps.yml?
Add .github/workflows/copilot-setup-steps.yml with a single job named copilot-setup-steps and merge it to your default branch. Its steps run in GitHub Actions before Copilot starts work. GitHub's docs now call this agent Copilot cloud agent.
How do I control which tools GitHub Copilot CLI can run without asking?
Use --allow-tool and --deny-tool with shell(COMMAND), write, or an MCP server name, or --allow-all-tools to skip all prompts. --deny-tool always beats the allow options. --allow-all or --yolo turns on all permissions at once.
How do I create a custom agent for GitHub Copilot in .github/agents?
Add a Markdown file ending in .agent.md to .github/agents with YAML frontmatter that includes a required description, then merge it to the default branch. The body is the agent's prompt, up to 30,000 characters. Select it from the agents dropdown on GitHub, when assigning an issue, or with /agent in Copilot CLI.
How do I make GitHub Copilot review pull requests automatically?
For your own PRs, open Copilot settings, click Code review, and enable Automatic Copilot code review. For a repository or organization, create a branch ruleset with the rule Automatically request Copilot code review. Personal automatic review needs Copilot Pro, Pro+, Max, Business or Enterprise and is not available for managed user accounts.
How do I add hooks to GitHub Copilot CLI or the Copilot cloud agent?
Commit a JSON file to .github/hooks/ with "version": 1 and a hooks object keyed by event, such as preToolUse or sessionStart. Each entry is a command hook with bash and powershell commands and an optional timeoutSec (default 30). A preToolUse hook can deny a tool call by printing {"permissionDecision": "deny", "permissionDecisionReason": "..."}. The cloud agent reads hooks only from .github/hooks/*.json on the default branch; Copilot CLI also reads ~/.copilot/hooks/.
How do I run GitHub Copilot CLI non-interactively with copilot -p in shell scripts and GitHub Actions?
Pass a prompt with -p or --prompt and Copilot CLI runs it and exits. Add -s to print only the response, --no-ask-user so it never stops for input, and --allow-tool to grant only the tools the task needs. In CI, set COPILOT_GITHUB_TOKEN to a fine-grained personal access token with the Copilot Requests permission, or in an organization-owned repository use the built-in GITHUB_TOKEN with the copilot-requests: write permission.
How do I make a reusable /command for GitHub Copilot Chat in VS Code with a .prompt.md file?
Save a Markdown file with the .prompt.md extension in .github/prompts (workspace) or in your VS Code user profile. Type / and the file name in Copilot Chat to run it, for example /create-api. Optional YAML frontmatter sets description, name, argument-hint, agent (ask, agent, plan or a custom agent), model and tools. In the body you can link files, reference tools with #tool:name and ask for input with ${input:name}. Prompt files run only in Local sessions in the Chat view; for other harnesses VS Code points you to agent skills.
OpenCode
Where does OpenCode read its config, and how do I set models, permissions, MCP servers, and rules?
OpenCode reads JSON or JSONC config from ~/.config/opencode/opencode.json globally and opencode.json in your project, and it merges every source instead of replacing them, with later sources winning only on conflicting keys. One file controls your model and providers, permissions, MCP servers, agents, and commands, and you can validate it with the https://opencode.ai/config.json schema. Project rules go in an AGENTS.md file, which /init can generate for you.
How do I add an MCP server to OpenCode?
Add the server under the top-level mcp key in opencode.json or opencode.jsonc. Use type local with a command array for servers you run yourself, or type remote with a url for hosted servers. Manage OAuth and check connections with the opencode mcp commands.
How do I control which tools and commands OpenCode can run without asking?
Set the permission key in opencode.json. Each permission resolves to allow, ask or deny, and you can use glob patterns for bash commands and file paths. The last matching rule wins, so put the catch-all first and specific patterns after it.
How do I create a custom agent or subagent in OpenCode?
Put a markdown file in .opencode/agents/ for a project or ~/.config/opencode/agents/ for every project, or add an entry under the agent key in opencode.json. The file name becomes the agent name. Set mode to subagent and call it with an @ mention or let the primary agent call it.
How do I create a custom /command in OpenCode?
Add a Markdown file to .opencode/commands/ in your project or ~/.config/opencode/commands/ for every project. The file name becomes the command: test.md runs as /test. The body is the prompt template, and frontmatter can set description, agent, model and subtask. Use $ARGUMENTS (or $1, $2) for what you type after the command, !`cmd` to insert shell output and @path to include a file. You can also define commands under "command" in your OpenCode config.
Cline
Where do Cline rules go, and how do I scope or toggle them?
Put project rules as markdown files in a .clinerules/ or .cline/rules/ folder at your project root, and personal rules in your global Cline Rules directory such as ~/Documents/Cline/Rules. Cline also detects .cursorrules, .windsurfrules, and AGENTS.md, and you can scope a rule to certain paths with YAML frontmatter. Every rule can be switched on or off from the scale icon in the Cline panel.
How do I add an MCP server to Cline?
Add the server under mcpServers in cline_mcp_settings.json. In the IDE extension, open it from the MCP Servers icon, the Configure tab, then Configure MCP Servers. Use command and args for local servers, or url with type streamableHttp for remote servers.
How do I make Cline stop asking for approval?
Turn on the Auto Approve toggles you want, such as Read project files or Execute safe commands. To approve everything, open Cline Settings, then Features, and check YOLO Mode. YOLO mode disables all safety checks, so use it only in throwaway or sandboxed projects.
How do I add a custom skill to Cline?
Create a folder with a SKILL.md file in .cline/skills/ for a project or ~/.cline/skills/ for every project. The frontmatter needs a name that matches the folder and a description. Cline loads the skill when your request matches the description, or you can run it with a slash command.
Kiro
How do I give Kiro persistent project instructions with steering files?
Put markdown files in .kiro/steering/ in your workspace, or in ~/.kiro/steering/ for global rules, and Kiro loads them as persistent project knowledge. A YAML front matter block sets the inclusion mode: always (the default), fileMatch with a fileMatchPattern, manual, or auto. Kiro also reads AGENTS.md files, which are always included.
How do I add an MCP server to Kiro?
Add the server under mcpServers in .kiro/settings/mcp.json for one workspace or ~/.kiro/settings/mcp.json for all workspaces. Use command and args for local servers, or url and headers for remote ones. In the CLI you can also run kiro-cli mcp add.
How do I set up hooks in Kiro?
Create a JSON file in .kiro/hooks/ with a version of v1 and a hooks array. Each hook has a name, a trigger such as PostFileSave or PreToolUse, an optional matcher and an action that runs a shell command or injects an agent prompt. Hooks activate automatically when a session starts.
How do I let Kiro run commands or edit files without asking?
Create ~/.kiro/settings/permissions.yaml with rules that set a capability, optional match patterns and an effect of allow, ask or deny. Deny always wins over ask, and ask wins over allow, across every scope. Workspace rules live outside the repo in ~/.kiro/workspace-roots/<hash>/permissions.yaml.
Zed
Which rules files does the Zed agent read, and how do I add MCP servers and control tool access?
The Zed Agent loads personal instructions from ~/.config/zed/AGENTS.md plus the first project file it finds from a fixed list that starts with .rules and includes AGENTS.md and CLAUDE.md. MCP servers go under context_servers in your settings file, and agent.tool_permissions plus agent profiles decide which tools run and when you are asked. Other agents like Claude Agent or Codex run inside Zed through the Agent Client Protocol.
How do I auto-approve or block tool actions in the Zed agent?
Set agent.tool_permissions in your Zed settings. Use default (confirm, allow or deny) as a fallback, and add always_allow, always_deny and always_confirm regex patterns per tool such as terminal. In Zed v0.224.0 and later this replaces the old always_allow_tool_actions setting.
How do I use Claude, Codex or Gemini CLI as an agent inside Zed?
Install them as External Agents from the ACP Registry with the zed: acp registry command, then start a thread from the Agent Panel agent selector. Each external agent handles its own login and billing. For agents not in the registry, add a custom entry under agent_servers in your settings.
How do I use a local Ollama model in Zed?
Install Ollama, pull a model, make sure the server is running, then pick the Ollama model in Zed's model dropdown. To list models yourself or raise the context length, edit language_models.ollama in your settings.
Aider
Junie
Where does Junie read guidelines from, and how do I configure MCP servers and command approvals?
Junie CLI reads project guidelines from .junie/AGENTS.md first, then a root AGENTS.md, and still supports the legacy .junie/guidelines.md file. MCP servers live in .junie/mcp/mcp.json for a project or ~/.junie/mcp/mcp.json for your user. Command approvals are controlled by brave mode and the ~/.junie/allowlist.json file.
How do I add an MCP server to Junie?
Put an mcpServers object in .junie/mcp/mcp.json in your project, or in ~/.junie/mcp/mcp.json for all your projects. Local servers use command, args and env, and remote servers use url and headers. In Junie CLI, type /mcp to see status and enable, disable, edit or authorize servers.
How do I stop Junie from asking for approval on every command?
Add allow rules to ~/.junie/allowlist.json so trusted commands run without asking, or turn on brave mode with /brave or Ctrl+B. Brave mode has three levels: Off, Auto and On. On runs all sensitive actions without asking, so pair it with sandbox mode where available.
How do I create custom slash commands in Junie CLI?
Create a Markdown file with a description in YAML frontmatter in .junie/commands for the project or ~/.junie/commands for yourself. The file name is the command name, so explain.md becomes /explain. Use $name placeholders in the prompt and pass values as name=value.
Amp
How does Amp load AGENTS.md files, where is settings.json, and how do I add MCP servers?
Amp always loads AGENTS.md from the working directory and its parents, plus your personal and system-wide files, and pulls in subtree AGENTS.md files when it reads files there. User settings live in ~/.config/amp/settings.json, workspace settings in the nearest .amp/settings.json, and every key uses the amp. prefix. Add MCP servers with amp mcp add or the amp.mcpServers setting.
How do I add an MCP server to Amp?
Run amp mcp add with a name and either a command or a URL, or add the server to amp.mcpServers in ~/.config/amp/settings.json or .amp/settings.json. Amp recommends bundling MCP servers in skills so tools load only when needed. Servers in workspace settings must be approved with amp mcp approve.
How do I give Amp project instructions with AGENTS.md?
Put an AGENTS.md file in your repo. Amp always includes AGENTS.md files in the current directory and its parents up to $HOME, plus personal files at ~/.config/amp/AGENTS.md and ~/.config/AGENTS.md. Subtree files load when the agent reads a file in that subtree.
How do I create or install a skill in Amp?
Create a folder with a SKILL.md in .agents/skills/ for the project, or install one with amp skill add <source>. The frontmatter needs a name and a description. Amp shows the model each skill's name and description, and loads the rest of SKILL.md only when the skill is invoked.
goose
Where does Goose keep its configuration, and how do I add MCP extensions, project context, recipes and permission modes?
Goose reads its settings from config.yaml, which lives at ~/.config/goose/config.yaml on macOS and Linux and under %APPDATA%\Block\goose\config on Windows. Extensions are MCP servers that you add with goose configure or by editing the extensions section of that file, while AGENTS.md and .goosehints files give Goose project context. Recipes package reusable workflows as YAML, and the Goose mode setting controls how much Goose can do without asking.
How do I give goose project rules with .goosehints or AGENTS.md?
Create a .goosehints file in your project folder, or ~/.config/goose/.goosehints for rules that apply everywhere. By default goose reads both AGENTS.md and .goosehints, and the Developer extension must be on. Local hints win over global hints when they conflict.
How do I change goose's permission mode so it asks before running tools?
Set GOOSE_MODE to auto, approve, smart_approve or chat in ~/.config/goose/config.yaml, as an environment variable, or through goose configure. The default is auto, which edits and deletes files without asking. In Desktop, pick a Default Mode under Settings and Chat.
How do I write and run a goose recipe?
A recipe is a YAML or JSON file with a title, a description, and instructions or a prompt. Run it with goose run --recipe recipe.yaml and pass values with --params key=value. goose finds recipes in the current folder, in GOOSE_RECIPE_PATH folders, or in a GitHub repo set by GOOSE_RECIPE_GITHUB_REPO.
OpenHands
Factory Droid
How do I install and configure the Factory Droid CLI?
Install Droid with the official install script, Homebrew or npm, then run droid inside your project. Put project instructions in AGENTS.md, personal preferences in ~/.factory/settings.json, custom droids in .factory/droids, and MCP servers in mcp.json files. Use droid exec with --auto low, medium or high to control what headless runs may do without approval.
How do I add an MCP server to Factory Droid?
Run droid mcp add with a name, a URL or command, and --type stdio, http or sse. Servers you add this way go into your user config at ~/.factory/mcp.json, and a project can share servers in .factory/mcp.json. Type /mcp inside Droid to see status, tools, OAuth and enable or disable servers.
How do I set up hooks in Factory Droid?
Put hooks in ~/.factory/hooks.json for yourself or .factory/hooks.json in the repo for your team, keyed by event name such as PreToolUse. Each entry has a matcher and a list of command hooks. A hook that exits with code 2 blocks the tool call in PreToolUse.
How do I create a custom droid (subagent) in Factory Droid?
Add a Markdown file with YAML frontmatter to .factory/droids/ in your repo or ~/.factory/droids/ for personal use. The name field sets the subagent_type, and the body is the system prompt. You can also run /droids and pick Create a new Droid.
Qwen Code
Where does Qwen Code keep its settings, and how do I set up a provider, context files, MCP servers and approval modes?
Qwen Code reads JSON settings from ~/.qwen/settings.json for your user and .qwen/settings.json for a project, with system level files above them. Connect any OpenAI-compatible provider with OPENAI_API_KEY, OPENAI_BASE_URL and OPENAI_MODEL, or define modelProviders in settings.json. Project instructions go in QWEN.md (renamable via context.fileName), MCP servers go under mcpServers, and tools.approvalMode controls how much runs without asking.
How do I create a custom /command in Qwen Code?
Add a Markdown file to .qwen/commands/ in your project or ~/.qwen/commands/ for all projects. The file name becomes the command, so test.md runs as /test, and subfolders add a colon: git/commit.md runs as /git:commit. Optional YAML frontmatter sets a description shown in /help. Use {{args}} for what you type after the command, !{command} to insert shell output after you confirm it, and @{path} to insert a file. TOML command files still load but are deprecated.
Antigravity CLI
loops
mcp
Which web scraping MCP server should my AI agent use, and how do I set it up?
For pages that block bots, Bright Data's MCP server is the only one of the five whose docs say it handles anti-bot measures, CAPTCHAs and proxy rotation on every request, and it has the largest free tier (5,000 requests a month). Firecrawl is best for turning pages into clean Markdown or JSON. Apify runs ready-made scrapers from its store. Tavily is built for search. Browserbase drives a cloud browser step by step. All five have a hosted endpoint and an npx package.
Which web search MCP server should my AI agent use, and how do I set it up?
For the lowest cost, start with Parallel Search: its hosted MCP server is free to use without an API key, and its API costs $1 per 1,000 fast searches. For deep research answers, use Perplexity (perplexity_research) or Exa (agent_run). For real Google results, use SerpApi. For an independent index with no third party in the loop, use Brave Search. For full page content with each result, use Firecrawl search, Exa or Tavily.
Which browser automation MCP server should my AI agent use, and how do I set it up?
For local testing and CI, use Playwright MCP from Microsoft: it is open source, runs on your machine, needs no account, and drives pages through the accessibility tree. For debugging and performance work in Chrome, add Google's Chrome DevTools MCP. For sites that block bots, use Bright Data's browser tools or Browserless, which both list CAPTCHA solving in their free tiers. For cloud scale, Browserbase and Browserless run many browsers at once, and for plain-English tasks, Browser Use runs a full agent session from one instruction.
Which database MCP server should my AI coding agent use, and how do I keep it from breaking my data?
For Postgres with safe schema changes, Neon is the strongest pick: its MCP server tests migrations on a temporary branch first, has a readonly=true switch, and Neon's free plan includes 10 branches per project. Supabase is the pick if you already use it, with read_only=true and project scoping on its hosted endpoint, but its branching tools need a paid plan. For MongoDB, run the official server with --readOnly; for analytics, ClickHouse and MotherDuck both default to read-only queries. Whatever you pick, point it at a dev database or branch, not production.
Which payments MCP server should my AI agent use, and how do I set it up safely?
For SaaS subscriptions where you want sales tax handled for you, use Paddle: it is the merchant of record and charges 5% + 50¢ per checkout transaction, and its MCP server has a sandbox endpoint. For marketplaces, one-off payments and the widest API coverage, use Stripe's hosted MCP server at https://mcp.stripe.com (2.9% + 30¢ per US card payment), which asks a human to confirm refunds when the agent acts with your user credentials. If your buyers expect to pay with PayPal or Venmo, add PayPal's MCP server and start it with PAYPAL_ENVIRONMENT set to SANDBOX. Whatever you pick, test in the sandbox first and give the agent a key with only the permissions it needs.
Which deploy and hosting MCP server should my AI agent use, and how do I set it up safely?
For a front-end or Next.js app, Vercel's hosted MCP server covers the most ground: it can deploy, read build and runtime logs, edit environment variables and DNS records, with OAuth sign-in. For DNS and Workers on Cloudflare, use Cloudflare's API server, which reaches the whole Cloudflare API through two Code Mode tools, search and execute, plus a docs tool. Use Railway for a full-stack app with a database, Cloud Run for containers, Firebase for Firebase projects, and the AWS MCP Server only if you are already on AWS. When you need a read-only setup, the clearest options are Cloud Run's run.readonly OAuth scope and the --read-only flag on the MCP Proxy for AWS.
Which error tracking or observability MCP server should my AI agent use, what can it query or change, and how do I set it up?
To debug app errors from your editor, use Sentry's hosted MCP server, or Honeybadger's if you already use Honeybadger, since its self-hosted server is read-only by default and the hosted one can be connected with read-only access. For traces, use Honeycomb; for logs and metrics on a large free tier, use Axiom; if your data lives in Grafana, use Grafana's server and run the local one with --disable-write for read-only access. For incident response, use PagerDuty's hosted server, but note it has no read-only switch or tool filtering, so limit it with a scoped OAuth client or a least-privilege user. New Relic and Dynatrace suit teams already on those platforms; their tools are mostly queries and analysis.
Which auth provider's MCP server should my AI agent use, and how do I add OAuth to my own MCP server?
For B2B apps with organizations, SSO and roles, use WorkOS: its hosted MCP server manages organizations, connections, directories and users, starts in a sandbox, and AuthKit is free for the first 1 million monthly active users. For a consumer or SaaS app where the agent should create apps, change instance settings and create users, use Clerk's hosted server (free for 50,000 monthly retained users). Use Auth0's local server to manage applications, APIs, Actions, logs and forms; it has no user tools, but it has a --read-only flag (free plan: up to 25,000 monthly active users). All three can act as the OAuth authorization server for your own remote MCP server.
Which design MCP server should my AI agent use (Figma, Canva, Webflow, Wix, Miro or Cloudinary), and what plan does each need?
For design to code, use Figma's remote MCP server: it reads design context, variables and screenshots from a Figma file, and real use needs a Dev or Full seat on a paid plan (Starter gets 20 tool calls a month). To build or edit a website, use Webflow's server for visual and CMS edits, or the Wix MCP to create, publish and manage Wix sites; both connect with OAuth to a hosted URL. Use Canva for marketing designs (most tools work on the free plan), Miro for whiteboards (free plan, 100 calls a day), and Cloudinary for uploading, searching and transforming images and video (free plan, 25 credits a month).