self_config

self_config is a skill for Claude Code, Codex from opensquad-ai/opensquad. It costs 0 tokens per session (662 once invoked), scanned A, original, MIT.

A tool that lets the coding agent change its own configuration file and reload the updated settings.

In plain words
What is it for?
Adding plugins to the agent's configuration and setting their tool levels.
Why use it?
It removes the need to stop and manually edit configuration when the agent needs another plugin or setting.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/opensquad-ai/opensquad/self_config
Any agent
npx skills add opensquad-ai/opensquad --skill self_config
Clone the repo
git clone --depth 1 https://github.com/opensquad-ai/opensquad

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for self_config

README.md
[![agentmods](https://agentmods.dev/badge/skills/opensquad-ai/opensquad/self_config.svg)](https://agentmods.dev/skills/opensquad-ai/opensquad/self_config)
Your own site
<a href="https://agentmods.dev/skills/opensquad-ai/opensquad/self_config"><img src="https://agentmods.dev/badge/skills/opensquad-ai/opensquad/self_config.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 662 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00662
Opus 5 $0.00000 $0.00331
Sonnet 5 $0.00000 $0.00132
Haiku 4.5 $0.00000 $0.00066

Measured 3d ago against content hash c78ee093e6a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

self_config scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/skills/self_config/SKILL.md · 106 lines

How it starts

The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: Self Configuration

Skill ID: self_config
Display Name: Self Configuration
Description: Allows the Agent to modify its own configuration file and reload


Tool: Add Plugin to Configuration

add_plugin_to_config

Adds a plugin to the current Agent's config.json and automatically reloads.

Usage Example:

# Step 1: Read current configuration
import json

config_path = "agents/coder/config.json"

with open(config_path, "r", encoding="utf-8") as f:
    config = json.load(f)

# Step 2: Add plugin to tools array (if not already present)
plugins_to_add = ["chat_account", "agent_factory"]

for plugin in plugins_to_add:
    if plugin not in config.get("tools", []):
        config.setdefault("tools", []).append(plugin)
        print(f"Added {plugin} to tools")
    else:
        print(f"{plugin} already in tools")

# Step 3: Ensure tool_levels configuration exists
config.setdefault("tool_levels", {})
for plugin in plugins_to_add:
    if plugin not in config["tool_levels"]:
        config["tool_levels"][plugin] = "core"
        print(f"Set {plugin} level to core")

# Step 4: Write back to configuration file
with open(config_path, "w", encoding="utf-8") as f:
    json.dump(config, f, ensure_ascii=False, indent=2)

print("Configuration updated")

# Step 5: Reload plugins
import opensquad.tools.agent_setup as agent_setup

result = agent_setup.reload_plugins()
print(result)

Complete Workflow

1. Read Configuration

Use filesystem.read_file to read agents/{agent_dir}/config.json

2. Modify Configuration

Parse JSON, add plugin to the tools array and tool_levels dictionary

3. Save Configuration

Use filesystem.write_file to write back to the configuration file

4. Reload

Call agent_setup.reload_plugins() to apply the configuration immediately


Notes

  1. Backup: It is recommended to back up the original file before modifying the configuration
  2. JSON Format: Ensure the written-back JSON is correctly formatted
  3. Restart vs Reload:
    • reload_plugins() - Hot reload, no restart required
    • Launcher API restart - Full restart of the agent process
  4. Tool Levels:
    • core - Core tools, always loaded
    • extended - Extended tools, loaded on demand
    • high - High-level tools

Read the full file on GitHub · 106 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 106 lines · 0 tokens per session scan A c78ee093e6a3

Subscribe to this mod's changes

self_config is a skill published in the GitHub repository opensquad-ai/opensquad (5 stars, last pushed 20d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 662 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.