Skip to content

Add agent configuration templates - #1

Merged
AllenReder merged 1 commit into
mainfrom
agent/add-config-templates
Aug 9, 2026
Merged

AllenReder merged 1 commit into
mainfrom
agent/add-config-templates

Conversation

@AllenReder

Copy link
Copy Markdown
Owner

Adds validated, redacted configuration templates for Codex, Claude Code, and OpenCode.

No credentials or personal/internal endpoint URLs are included.

@AllenReder
AllenReder force-pushed the agent/add-config-templates branch from e256461 to b458fa4 Compare August 9, 2026 07:10
@AllenReder
AllenReder marked this pull request as ready for review August 9, 2026 07:11
Copilot AI lite review requested due to automatic review settings August 9, 2026 07:11
@AllenReder
AllenReder merged commit cb24bcf into main Aug 9, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds starter configuration templates for three agent tools (OpenCode, Codex, and Claude Code) so contributors can more easily set up a consistent custom-provider workflow without committing secrets.

Changes:

  • Added an OpenCode config with an OpenAI-compatible provider and a curated model/variant matrix.
  • Added a Codex config.toml for a custom model provider plus approval/notification hooks.
  • Added a Claude Code settings.json with environment and hook defaults for the same provider setup.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
opencode/opencode.json OpenCode provider + models/variants template for an OpenAI-compatible backend.
codex/config.toml Codex custom provider template plus approval reviewer and hook commands.
claude/settings.json Claude Code settings template with env defaults and approval/stop hooks.
Suppressed comments (4)

codex/config.toml:27

  • Same as above: this hook appends to /tmp/codex-bark-hook.log and may grow unbounded. Redirect to /dev/null (or make logging opt-in) to keep the template safe by default.
type = "command"
command = "zsh -lc 'host=\"${HOST:-$(hostname)}\"; bark -t \"Codex @ ${host}\" -b \"本轮 Codex 回复已结束\" -i \"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.88.0/light/codex-color.png\" -g \"codex\" -l \"active\" >> /tmp/codex-bark-hook.log 2>&1 || true'"
timeout = 5

claude/settings.json:9

  • Use a reserved example domain (e.g. api.example.com) for templates. api.example.top is not a reserved example domain and could be real, leading to accidental outbound calls if users forget to change it.
    "ANTHROPIC_BASE_URL": "https://api.example.top",

claude/settings.json:19

  • BARK_DEVICE_KEYS is set to an empty string. If Claude Code applies these env entries literally, this can override a valid value from the shell and break notifications in a non-obvious way. Prefer removing the key or using a non-empty placeholder.
    "BARK_DEVICE_KEYS": "",

claude/settings.json:20

  • Use a reserved example domain (e.g. bark.example.com) for templates. bark.example.top is not reserved and could be real; using example.com helps prevent accidental network calls from unedited templates.
    "BARK_SERVER": "https://bark.example.top/push",

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread opencode/opencode.json
Comment on lines +6 to +10
"options": {
"apiKey": "",
"baseURL": "https://api.example.top/v1",
"setCacheKey": true
},
Comment thread codex/config.toml
Comment on lines +11 to +13
requires_openai_auth = true
base_url = "https://api.example.top/v1"
experimental_bearer_token = ""
Comment thread codex/config.toml
Comment on lines +19 to +21
type = "command"
command = "zsh -lc 'host=\"${HOST:-$(hostname)}\"; bark -t \"Codex @ ${host}\" -b \"需要你审批 Codex 的工具调用\" -i \"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.88.0/light/codex-color.png\" -g \"codex\" -l \"timeSensitive\" >> /tmp/codex-bark-hook.log 2>&1 || true'"
timeout = 5
Comment thread claude/settings.json
},
"effortLevel": "high",
"env": {
"ANTHROPIC_AUTH_TOKEN": "",

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b458fa4815

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread claude/settings.json
"effortLevel": "high",
"env": {
"ANTHROPIC_AUTH_TOKEN": "",
"ANTHROPIC_BASE_URL": "https://api.example.top",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use a reserved domain for placeholder endpoints

When a user fills in the blank ANTHROPIC_AUTH_TOKEN but leaves this apparent placeholder unchanged, Claude Code will send the token and conversation data to api.example.top. The .top TLD is publicly registrable, and example.top is not an IANA-reserved documentation domain; the same unsafe API placeholder is used in codex/config.toml:12 and opencode/opencode.json:8, while the Bark endpoint has the same problem. Use a guaranteed non-claimable name such as api.example.com or a .example domain so activating a template cannot disclose credentials to whoever controls the hostname.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants