agentleFS
madebywildmadebywild/agent-harness/.claude/skills/harness-settings/SKILL.md

harness-settings

Skill16 starsChanged 7 months agoMITView on GitHub

Configure provider-specific settings (permissions, model, features) for Claude Code, OpenAI Codex CLI, and GitHub Copilot using the harness settings entity.

  • Reads credentials
  • Commits and pushes
Files
SKILL.md

/harness-settings

Manage provider-specific configuration — permissions, model selection, sandboxing, environment variables, and feature flags — through the harness settings entity.

What is the settings entity?

The settings entity lets you commit provider-specific configuration into .harness/src/settings/ and have harness write it to the correct provider config file on apply. Unlike entities such as prompt, skill, or mcp, settings are inherently per-provider: each file targets exactly one provider and is written to that provider's native config location.

Source files:

ProviderSourceOutput
claude.harness/src/settings/claude.json.claude/settings.json
codex.harness/src/settings/codex.json.codex/config.toml (merged with MCP/subagent/hook state)
copilot.harness/src/settings/copilot.json.github/copilot-settings.json

Per-provider override sidecars (.overrides.<provider>.yaml) are not applicable to settings entities — the file is already provider-specific.

Important: The hooks key in .claude/settings.json is managed by the hook entity. Do not set hooks inside claude.json — it will be merged in from your hook sources at apply time. Similarly, for Codex, mcp_servers, agents, and notify entries are merged in from their respective entity types; set only the keys your settings entity owns.


CLI commands

# Scaffold a settings source file
npx harness add settings claude
npx harness add settings codex
npx harness add settings copilot

# Preview what will be written
npx harness plan

# Write settings to provider config files
npx harness apply

# Remove a settings entity (keeps source by default)
npx harness remove settings claude
npx harness remove settings claude --no-delete-source

Claude Code (claude.json)

Written to .claude/settings.json. This is the project-scoped settings file committed to git and shared with your team.

Common fields

KeyTypeDescription
permissionsobjectTool allow/deny/ask rules — see below
modelstringOverride default model, e.g. "claude-sonnet-4-6"
apiKeyHelperstringShell script path to generate an auth token (X-Api-Key / Authorization: Bearer)
envobjectEnvironment variables injected into every session
cleanupPeriodDaysnumberDelete sessions inactive longer than N days (default: 30; 0 disables persistence)
autoUpdatesChannelstring"stable" or "latest" (default)
includeGitInstructionsbooleanInclude built-in commit/PR workflow instructions in system prompt (default: true)
companyAnnouncementsstring[]Messages shown to users at startup
attributionobjectCustomize git commit/PR attribution strings
languagestringClaude's preferred response language, e.g. "japanese"
effortLevelstringPersist effort level across sessions: "low", "medium", or "high"
alwaysThinkingEnabledbooleanEnable extended thinking by default
outputStylestringConfigure an output style preset
agentstringRun the main thread as a named subagent
enableAllProjectMcpServersbooleanAuto-approve all MCP servers in .mcp.json
enabledMcpjsonServersstring[]Approve specific MCP servers from .mcp.json
disabledMcpjsonServersstring[]Reject specific MCP servers from .mcp.json
sandboxobjectAdvanced sandboxing — see below
worktreeobjectWorktree symlink and sparse-checkout settings
statusLineobjectCustom status line command
plansDirectorystringOverride where plan files are stored

Permissions

The permissions object lives inside the settings.json root. Rules are evaluated: deny first, then ask, then allow. First match wins.

{
  "permissions": {
    "defaultMode": "acceptEdits",
    "allow": ["Bash(npm run *)", "Bash(git *)", "Read(~/.zshrc)"],
    "ask":   ["Bash(git push *)"],
    "deny":  ["Bash(curl *)", "Read(./.env)", "Read(./secrets/**)"],
    "additionalDirectories": ["../docs/"]
  }
}

defaultMode options:

ValueBehavior
"default"Normal interactive permission prompts
"acceptEdits"Auto-accept file edits; prompt for other tools
"bypassPermissions"Skip all permission prompts (non-interactive CI use)

Rule syntax: Tool or Tool(specifier). Examples:

  • "Bash" — all Bash commands
  • "Bash(npm run *)" — commands starting with npm run
  • "Read(./.env)" — reading the .env file
  • "WebFetch(domain:example.com)" — fetches to example.com
  • "mcp__*" — all MCP tool calls

Managed-only permission keys (for enterprise managed-settings.json):

  • disableBypassPermissionsMode: "disable" — prevent --dangerously-skip-permissions
  • allowManagedPermissionRulesOnly: true — block user/project allow/deny rules
  • allowManagedMcpServersOnly: true — enforce MCP allowlist from managed settings

Sandbox settings

{
  "sandbox": {
    "enabled": true,
    "autoAllowBashIfSandboxed": true,
    "excludedCommands": ["docker", "git"],
    "filesystem": {
      "allowWrite": ["/tmp/build", "~/.kube"],
      "denyRead":   ["~/.aws/credentials"]
    },
    "network": {
      "allowedDomains": ["github.com", "*.npmjs.org"]
    }
  }
}

Copy-paste example

This is a typical project-level claude.json for a team repo:

{
  "$schema": "https://json.schemastore.org/claude-code-settings.json",
  "model": "claude-sonnet-4-6",
  "env": {
    "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
  },
  "permissions": {
    "defaultMode": "acceptEdits",
    "allow": [
      "Bash(npm run *)",
      "Bash(pnpm *)",
      "Bash(git diff *)",
      "Bash(git log *)",
      "Bash(git status)",
      "Read",
      "Edit",
      "Write",
      "mcp__*"
    ],
    "ask": [
      "Bash(git push *)",
      "Bash(git commit *)"
    ],
    "deny": [
      "Bash(curl *)",
      "Bash(wget *)",
      "Read(./.env)",
      "Read(./.env.*)",
      "Read(./secrets/**)"
    ]
  },
  "includeGitInstructions": true,
  "autoUpdatesChannel": "stable",
  "companyAnnouncements": [
    "Run pnpm check:write before committing."
  ]
}

OpenAI Codex CLI (codex.json)

Written to .codex/config.toml and merged with MCP server entries, agent definitions, and hook notify commands from their respective entities. Only set the keys your settings entity owns — do not duplicate mcp_servers, agents.<name>, or notify.

Common fields

KeyTypeDescription
modelstringModel to use, e.g. "gpt-5-codex"
model_providerstringProvider ID (default: "openai"); use [model_providers.<id>] for custom providers
model_reasoning_effortstring"minimal", "low", "medium", "high", or "xhigh"
model_reasoning_summarystring"auto", "concise", "detailed", or "none"
approval_policystring/object"untrusted", "on-request", "never", or granular object
sandbox_modestring"read-only" (default), "workspace-write", "danger-full-access"
web_searchstring"disabled", "cached" (default), or "live"
service_tierstring"flex" or "fast"
developer_instructionsstringInjected session guidance
history.persistencestring"save-all" or "none"
features.shell_toolbooleanEnable/disable default command execution tool
features.multi_agentbooleanEnable agent collaboration tools
features.web_searchbooleanToggle web search
features.fast_modebooleanEnable fast mode feature flag
agents.max_threadsnumberConcurrent thread limit (default: 6)
agents.max_depthnumberMax nesting depth for spawned threads

Copy-paste example

{
  "model": "gpt-5-codex",
  "model_reasoning_effort": "medium",
  "approval_policy": "on-request",
  "sandbox_mode": "workspace-write",
  "web_search": "cached",
  "features": {
    "shell_tool": true,
    "multi_agent": true
  },
  "agents": {
    "max_threads": 4
  }
}

GitHub Copilot (copilot.json)

GitHub Copilot's primary customization surface is .github/copilot-instructions.md (managed by the prompt entity) and .vscode/mcp.json (managed by the mcp entity). The copilot.json settings entity handles remaining provider-level configuration written to .github/copilot-settings.json.

Copilot's custom instructions, agent skills, and MCP servers are all managed by their respective harness entities — not by the settings entity.


Entity interactions

ConcernEntity to use
Claude permissions, model, env varssettings claude
Claude lifecycle hookshook
Claude MCP serversmcp
Claude subagentssubagent
Codex model, approval policy, sandboxsettings codex
Codex MCP serversmcp
Codex hook notificationshook
Copilot system instructionsprompt
Copilot MCP serversmcp

Typical workflow

npx harness add settings claude
# Edit .harness/src/settings/claude.json
npx harness plan          # verify what will be written
npx harness apply         # write .claude/settings.json

To manage settings alongside other entities in a single apply:

npx harness add settings claude
npx harness add mcp my-server
npx harness add hook guard
# Edit source files
npx harness apply         # writes all provider artifacts at once

Official documentation

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.