← Back to Skills Marketplace
mkuiwu

Ai Config Admin

by mkuiwu · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ✓ Security Clean
183
Downloads
0
Stars
1
Active Installs
3
Versions
Install in OpenClaw
/install ai-config-admin
Description
Manage AI configuration for OpenClaw, OpenCode, Codex CLI, and Claude Code. Use when the user wants to add/remove models or providers, switch default or agen...
README (SKILL.md)

AI Config Admin

Identify which target the user wants to modify first: OpenClaw, OpenCode, Codex CLI, or Claude Code. Then use the bundled script for that target.

Required rules

  • Follow this skill and the existing script capabilities exactly.
  • Do not manually edit config files to bypass script limitations.
  • If the request is outside current script support, say so clearly and explain what is missing.
  • Before every write, create a backup in the same directory as the original file.
  • Perform backup and write through the bundled script, not manual editing.
  • Do not echo secrets such as apiKey, OPENAI_API_KEY, ANTHROPIC_AUTH_TOKEN, tokens, or refresh tokens in replies.

Target files

  • OpenClaw: ~/.openclaw/openclaw.json
  • OpenCode: ~/.config/opencode/opencode.json
  • Codex CLI: ~/.codex/config.toml, ~/.codex/auth.json
  • Claude Code: ~/.claude/settings.json

Routing

  • OpenClaw requests: openclaw.json, default model, agent model, add/remove provider, add/remove model, memory search.
  • OpenCode requests: opencode.json, OpenCode config, replace full JSON.
  • Codex CLI requests: config.toml, auth.json, Codex CLI, model_provider, review_model, wire_api, requires_openai_auth.
  • Claude Code requests: settings.json, Claude Code, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_BASE_URL, ANTHROPIC_MODEL, CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC, CLAUDE_CODE_ATTRIBUTION_HEADER.

Input handling

  • Accept natural language, semi-structured JSON, or mixed descriptions.
  • Convert user intent into explicit script parameters or complete JSON/TOML text before invoking scripts.
  • Ask follow-up questions only when critical parameters cannot be inferred.

OpenClaw

  • Infer supported arguments from user intent.
  • When fields are missing, prefer filling from the current config when safe.
  • Use add-model to add a model to an existing provider, or to create/update a provider when the user also supplies the required provider fields.
  • For a brand-new provider, add-model needs enough provider config to make it valid: at minimum --base-url and --api; use --api-key and --auth-header when appropriate.
  • Use add-openai-model only for OpenAI-compatible provider setup flows that require explicit apiKey and api handling in one step.

OpenCode

  • If the user provides complete JSON, replace the file directly.
  • Do not merge partial JSON.

Codex CLI

  • config.toml: infer structured parameters and call the script.
  • auth.json: write only when the user provides a complete JSON payload; default to full replacement.
  • Do not delete unknown TOML sections such as projects, notice, or tui.
  • If existing auth.json contains login-state fields, replace it only when the user explicitly asks for full replacement.

Claude Code

  • Full settings.json input may be replaced directly.
  • If the user provides only an {"env": {...}} fragment:
    • If ANTHROPIC_BASE_URL is present, replace the Claude-related env key set.
    • Otherwise, update only the explicitly provided Claude-related env keys.
  • Do not invent missing model fields.
  • Do not modify non-Claude env keys.

Commands

Use {baseDir} as the skill root.

OpenClaw

python3 {baseDir}/scripts/openclaw_config.py --help
python3 {baseDir}/scripts/openclaw_config.py --file ~/.openclaw/openclaw.json summary
python3 {baseDir}/scripts/openclaw_config.py --file ~/.openclaw/openclaw.json add-model \
  --provider-id minimax-cn \
  --model-id MiniMax-M2.7 \
  --name 'MiniMax M2.7' \
  --context-window 200000 \
  --max-tokens 8192 \
  --set-default

Supported operations:

  • summary
  • add-model [--provider-id ...] [--model-id ...] [--name ...] [--context-window ...] [--max-tokens ...] [--reasoning true|false] [--allowlist] [--set-default] [--input text|image ...] [--base-url ...] [--api-key ...] [--api ...] [--auth-header true|false]
  • add-openai-model ...
  • set-openai-provider [--base-url ...] [--api-key ...]
  • remove-model \x3Cprovider/model>
  • set-memory-search on|off
  • set-default-model \x3CmodelId>
  • set-agent-model \x3CagentId> \x3CmodelId>
  • remove-provider \x3CproviderId>

OpenCode

python3 {baseDir}/scripts/opencode_config.py --file ~/.config/opencode/opencode.json summary
python3 {baseDir}/scripts/opencode_config.py --file ~/.config/opencode/opencode.json replace-from-stdin \x3C\x3C'EOF'
{...full JSON...}
EOF

Supported operations:

  • summary
  • replace-from-stdin

Codex CLI

python3 {baseDir}/scripts/codex_config.py --help
python3 {baseDir}/scripts/codex_config.py --config-file ~/.codex/config.toml --auth-file ~/.codex/auth.json summary
python3 {baseDir}/scripts/codex_config.py --config-file ~/.codex/config.toml replace-config-from-stdin \x3C\x3C'EOF'
model_provider = "OpenAI"
model = "gpt-5.4"
EOF
python3 {baseDir}/scripts/codex_config.py --auth-file ~/.codex/auth.json replace-auth-from-stdin \x3C\x3C'EOF'
{"OPENAI_API_KEY":"sk-..."}
EOF

Supported operations:

  • summary
  • replace-config-from-stdin
  • replace-auth-from-stdin
  • set-openai-provider [--model-provider ...] [--model ...] [--review-model ...] [--reasoning-effort ...] [--disable-response-storage true|false] [--network-access ...] [--windows-wsl-setup-acknowledged true|false] [--model-context-window ...] [--model-auto-compact-token-limit ...] [--provider-name ...] [--base-url ...] [--wire-api ...] [--requires-openai-auth true|false]

Claude Code

python3 {baseDir}/scripts/claude_config.py --help
python3 {baseDir}/scripts/claude_config.py --file ~/.claude/settings.json summary
python3 {baseDir}/scripts/claude_config.py --file ~/.claude/settings.json set-env \
  --anthropic-auth-token 'sk-...' \
  --attribution-header '0'
python3 {baseDir}/scripts/claude_config.py --file ~/.claude/settings.json replace-env \
  --anthropic-base-url 'https://example.invalid' \
  --anthropic-auth-token 'sk-...' \
  --attribution-header '0'
python3 {baseDir}/scripts/claude_config.py --file ~/.claude/settings.json replace-from-stdin \x3C\x3C'EOF'
{"env":{"ANTHROPIC_BASE_URL":"https://example.invalid"}}
EOF

Supported operations:

  • summary
  • replace-from-stdin
  • set-env [--anthropic-auth-token ...] [--anthropic-base-url ...] [--anthropic-default-haiku-model ...] [--anthropic-default-opus-model ...] [--anthropic-default-sonnet-model ...] [--anthropic-model ...] [--api-timeout-ms ...] [--disable-nonessential-traffic ...] [--attribution-header ...]
  • replace-env [--anthropic-auth-token ...] [--anthropic-base-url ...] [--anthropic-default-haiku-model ...] [--anthropic-default-opus-model ...] [--anthropic-default-sonnet-model ...] [--anthropic-model ...] [--api-timeout-ms ...] [--disable-nonessential-traffic ...] [--attribution-header ...]

Defaults and safeguards

  • Do not write headers.User-Agent unless explicitly needed.
  • Do not switch the default model unless the user asks.
  • Do not change memorySearch unless the user asks.
  • Stop if the script reports validation or dependency errors.
  • For OpenCode, default to full replacement when complete JSON is provided.
  • For Claude Code, if ANTHROPIC_BASE_URL is present, rebuild the Claude-related env set instead of carrying forward stale provider-specific env/model keys.
Usage Guidance
This skill edits and overwrites configuration and auth files in your home directory (backing them up first). That's exactly what it says it will do — including writing API keys/tokens if you provide them. Before installing or using: confirm you trust the skill owner, avoid pasting sensitive keys unless you intend them to be written to your local auth/config files, and request a dry-run or summary first (the scripts support summary operations) so you can review changes before a write.
Capability Analysis
Type: OpenClaw Skill Name: ai-config-admin Version: 1.1.0 The 'ai-config-admin' skill bundle is a legitimate utility designed to manage configuration files for various AI CLI tools (OpenClaw, OpenCode, Codex, and Claude Code). It includes Python scripts (e.g., `openclaw_config.py`, `claude_config.py`) that perform structured updates to JSON and TOML configuration files located in the user's home directory (e.g., `~/.openclaw/openclaw.json`). The bundle demonstrates good security practices by implementing automatic file backups before modification, validating input formats, and providing explicit instructions in `SKILL.md` to prevent the AI agent from echoing sensitive secrets like API keys in its responses. No evidence of data exfiltration, malicious execution, or unauthorized persistence was found.
Capability Assessment
Purpose & Capability
The name/description promise (manage OpenClaw, OpenCode, Codex CLI, Claude Code configs) matches the included scripts and declared target file paths. The scripts operate on ~/.openclaw, ~/.config/opencode, ~/.codex, and ~/.claude files as expected.
Instruction Scope
SKILL.md confines runtime actions to building explicit script arguments, invoking the bundled scripts, and operating on the identified config files. It mandates backups and forbids manual edits or echoing secrets. The scripts implement summary/read/replace and targeted update operations described in the doc.
Install Mechanism
This is an instruction-only skill with bundled Python scripts and no install spec; nothing is downloaded or written to disk by an installer beyond the normal execution of included scripts.
Credentials
No environment variables are required to install or run the skill. The skill is explicitly designed to read and write auth/config files that may contain API keys or tokens (e.g., OPENAI_API_KEY, ANTHROPIC_AUTH_TOKEN). This is proportionate to its purpose, but users should be aware that invoking the skill with token-containing input will store those tokens into their local files (per user intent). The scripts intentionally summarize presence of keys as booleans and do not print secrets.
Persistence & Privilege
The skill is not always-enabled and does not request elevated OS privileges. It can be invoked autonomously (platform default), which is expected for skills; autonomy combined with the ability to modify local auth files increases impact if misused, but that is coherent with the skill's purpose.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ai-config-admin
  3. After installation, invoke the skill by name or use /ai-config-admin
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.0
Add generic openclaw model support (add-model command); narrow remove-provider checks; add set-model-alias command
v1.0.1
ai-config-admin 1.0.1 - Added _meta.json file for skill metadata. - Updated SKILL.md with a new metadata field (short-description) and minor formatting changes. - No functional changes to logic or supported operations.
v1.0.0
Initial public release
Metadata
Slug ai-config-admin
Version 1.1.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 3
Frequently Asked Questions

What is Ai Config Admin?

Manage AI configuration for OpenClaw, OpenCode, Codex CLI, and Claude Code. Use when the user wants to add/remove models or providers, switch default or agen... It is an AI Agent Skill for Claude Code / OpenClaw, with 183 downloads so far.

How do I install Ai Config Admin?

Run "/install ai-config-admin" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Ai Config Admin free?

Yes, Ai Config Admin is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Ai Config Admin support?

Ai Config Admin is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Ai Config Admin?

It is built and maintained by mkuiwu (@mkuiwu); the current version is v1.1.0.

💬 Comments