Agent skill

Agent Self-Customization

by nanocoai in nanocoai/nanoclaw

A decision tree for an agent changing its own setup: edit memory directly, request approval for packages and MCP servers, and delegate code edits to a builder agent.

MITAuto-check: notesAgent Workflows

Install Agent Self-Customization

skills CLI
$ npx skills add nanocoai/nanoclaw --skill self-customize -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install nanocoai/nanoclaw self-customize --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/nanocoai/nanoclaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/container/skills/self-customize .claude/skills/self-customize && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
self-customize
GitHub stars
31k
Used in
1 other repo
Token cost
~1.5k tokens
SKILL.md length
613 words
Files
1
Skills in repo
59
Repo updated
First seen
Licence
MIT

At a glance

A decision tree for an agent changing its own setup: edit memory directly, request approval for packages and MCP servers, and delegate code edits to a builder agent.

  • Works in 5 steps: Describe what you need changed in… → Call create_agent({ name: "Builder",… → Call send_to_agent({ agentGroupId, text:… → …
  • The user asks the agent to add a feature or install a tool for itself
  • SKILL.md covers Decision Tree, Workflow: Code Changes via…, Diff Size Limits — Why and Example: Adding a New MCP Tool…, plus 2 more sections
  • Calls pnpm

What it does

Requests are sorted by what has to change. Memory and standing instructions can be edited in place with no approval, while the composed provider document, CLAUDE.md or AGENTS.md, is regenerated on every spawn and must not be edited. System or global npm packages go through install_packages, and MCP servers through add_mcp_server; both need admin approval and trigger a rebuild or restart once approved.

Changes to source files or the Dockerfile are handed to a builder agent created with create_agent, which works in its own container and reports back so you get a reviewable boundary. The builder's instructions call for precise, minimal edits and enforce diff size limits, on the reasoning that a 50-line change can actually be reviewed and a 500-line sweep cannot. A new specialist capability is handled by creating a dedicated agent.

When your agent uses it

  • The user asks the agent to add a feature or install a tool for itself
  • Registering a new MCP server for the agent
  • Deciding whether a change needs approval or a builder agent

Example prompts

  • “Install ffmpeg in your container so you can convert audio files.”
  • “Add an MCP server for our issue tracker and restart yourself with it.”
  • “Update your standing instructions to always reply in short bullet points.”

Requirements

  • A NanoClaw agent with the install_packages, add_mcp_server and create_agent tools
  • Admin approval for package and MCP changes

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Describe what you need changed in concrete terms (files, behavior, acceptance criteria)
  2. Call create_agent({ name: "Builder", instructions: "" }) — the returned agent group ID is your builder
  3. Call send_to_agent({ agentGroupId, text: "" })
  4. The builder works in its own container, makes the changes, and reports back
  5. You review the builder's summary and confirm with the user. Source-code edits inside /app/src are picked up automatically on the next…

What it can do on your machine

Read from SKILL.md and the folder at commit 66f0823. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • mcp.so

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agent Self-Customization loads about 1.5k tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 613 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:48
    - Never modify secrets, credentials, or .env files

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from nanocoai/nanoclaw at commit 66f0823, republished under its MIT licence (© nanocoai). 613 words, ~1,453 tokens.

Download SKILL.mdSave it as .claude/skills/self-customize/SKILL.md (or your agent's skills folder).
name
self-customize
description
Customize your own agent — add capabilities, install packages, add MCP servers, edit code or CLAUDE.md. Use when the user asks you to add a feature, install a tool, or modify how you work. For non-trivial code changes, delegate to a builder agent via create_agent.

Self-Customization

You can modify your own environment. Different kinds of changes have different workflows.

Decision Tree

What needs to change?

  • Memory or standing instructions → Edit memory/ or instructions.prepend.md directly, no approval needed. The workspace is persisted on the host. The composed provider document (CLAUDE.md or AGENTS.md) is regenerated every spawn and must not be edited.
  • System package (apt) or global npm package → install_packages. Requires admin approval. On approval, image rebuild + container restart happen automatically.
  • MCP server → add_mcp_server. Requires admin approval. On approval, container restarts with the new server wired up (no rebuild — bun runs TS directly).
  • Your source code or Dockerfile → Delegate to a builder agent via create_agent (see below).
  • A new specialist capability → create_agent to spin up a dedicated agent for it.

Workflow: Code Changes via Builder Agent

For anything that requires editing source files (your own code, Dockerfile, etc.), do not edit directly — delegate to a builder agent. This gives the user a reviewable boundary and keeps your main session focused.

  1. Describe what you need changed in concrete terms (files, behavior, acceptance criteria)
  2. Call create_agent({ name: "Builder", instructions: "<builder prompt>" }) — the returned agent group ID is your builder
  3. Call send_to_agent({ agentGroupId, text: "<task description with specific files and changes>" })
  4. The builder works in its own container, makes the changes, and reports back
  5. You review the builder's summary and confirm with the user. Source-code edits inside /app/src are picked up automatically on the next container start — no rebuild step needed (bun runs TS directly). If the builder also installed packages, its own install_packages approval will have rebuilt the image.
Builder Agent Instructions (use as CLAUDE.md when creating)
You are a builder agent. Your job is to make precise, minimal code changes to NanoClaw source files when the main agent requests it.

## Rules

- **Minimal scope.** Only change what was requested. Do not refactor surrounding code, "improve" unrelated files, or add features not asked for.
- **Diff size limits.** Reject any change that exceeds 200 new lines or 150 modified lines in a single task. If the change is larger, push back and ask for it to be split into smaller tasks.
- **Read before writing.** Always read the target file fully before editing. Understand the existing patterns.
- **Test if possible.** If there are relevant tests, run them after your change.
- **Report back.** When done, use send_to_agent to tell the requesting agent: (a) what files you changed, (b) a summary of the changes, (c) any follow-up needed (rebuild, tests, migrations).
- **No silent failures.** If you can't complete the task, explain why — don't produce partial work without flagging it.

## Safety

- Never edit files outside the requested scope
- Never commit or push anything
- Never modify secrets, credentials, or .env files
- If a change would break existing tests, stop and report

Diff Size Limits — Why

A 50-line focused change is reviewable. A 500-line sweep is not. Hard limits force the agent to decompose work into reviewable chunks, which:

  • Makes human approval meaningful (you can actually read 150 lines)
  • Catches runaway edits early (if the first task hits the limit, the scope was wrong)
  • Forces clear acceptance criteria per task

The limits are per builder task, not per session. A 500-line feature is fine as 4 sequential builder tasks of ~125 lines each, each with its own scope.

Show full SKILL.md (254 more words)Show less

Example: Adding a New MCP Tool to Yourself

User: "Can you add a tool for reading RSS feeds?"

  1. Check mcp.so for an existing RSS MCP server
  2. If one exists → add_mcp_server({ name: "rss", command: "npx", args: ["some-rss-mcp"] }) → admin approves → container restarts with the new server → done
  3. If nothing suitable exists → delegate to a builder agent:
    • create_agent({ name: "RSS Tool Builder", instructions: "<builder prompt from above>" })
    • send_to_agent({ agentGroupId, text: "Add an MCP tool 'read_rss' to container/agent-runner/src/mcp-tools/. It should fetch an RSS URL and return the latest N items. Register it in mcp-tools/index.ts. Target: <200 new lines." })
    • Wait for builder's report — new tool code is picked up on the next container start (bun runs TS directly)

Example: Installing a System Tool

User: "Can you transcribe audio?"

  1. Check what's available — which ffmpeg (likely not installed in base image)
  2. Decide approach: @xenova/transformers (npm, workspace-local) or whisper.cpp (apt + compile)
  3. For persistent system tool: install_packages({ apt: ["ffmpeg"], npm: ["@xenova/transformers"], reason: "Audio transcription for voice messages" })
  4. Wait for admin approval — on approve, the image is rebuilt and your container is restarted automatically
  5. Test the new capability once the container restarts

When NOT to Self-Customize

  • The change is for a one-off task — just do it in your workspace, don't modify the container
  • The request is ambiguous — ask the user what they actually need before spinning up builders or requesting installs
  • You don't know if it will work — prototype in your workspace first (pnpm install in /workspace/agent/), then promote to container-level install if it proves useful

© nanocoai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in container/skills/self-customize of nanocoai/nanoclaw.

Open the folder on GitHubat commit 66f0823

Used in 1 other repository

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in nanocoai/nanoclaw, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Agent Self-Customization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agent Self-Customization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agent Self-Customization this skillnanocoai/nanoclaw31k1 repos~1.5kAutomated safety check: NotesMIT
Dive Into LangGraphluochang212/dive-into-langgraph457—~837Automated safety check: NotesCustom licence
Ask User QuestionMemTensor/MemOS12k—~1kAutomated safety check: PassApache-2.0
Agent Setup Health Audittw93/Waza7.2k—~5.2kAutomated safety check: NotesMIT
Semantix GuideGnosil/semantix821—~2.1kAutomated safety check: PassMIT
Working With Claude Code Docsobra/superpowers-developing-for-claude-code142—~1.5kAutomated safety check: PassNone

Similar skills

  • Dive Into LangGraph

    luochang212/dive-into-langgraph

    A Chinese-language guide and reference for building agents with LangGraph 1.0, from a first ReAct agent through middleware, memory, MCP, RAG and web search.

    457 GitHub stars~837 tokensUpdated 27 days ago
    AI & LLM EngineeringAuto-check: notes
  • Ask User Question

    MemTensor/MemOS

    Shows a question as a modal in the interface to clarify a task, collect a preference or get approval, since the user cannot see terminal output.

    12k GitHub stars~1k tokensUpdated 9 days ago
    Agent WorkflowsAuto-check passed
  • Audits a project's agent configuration, instruction drift, hooks, MCP and AI maintainability, then reports prioritized findings with evidence and next actions.

    7.2k GitHub stars~5.2k tokensUpdated yesterday
    Agent WorkflowsAuto-check: notes
  • Semantix Guide

    Gnosil/semantix

    Troubleshoot and configure Semantix capabilities: Skills (project/custom/global/builtin priority, discovery dirs), Commands (override order, /dir:file naming), Hooks (11 events, automatic project…

    821 GitHub stars~2.1k tokensUpdated 3 days ago
    Agent WorkflowsAuto-check passed
  • Working With Claude Code Docs

    obra/superpowers-developing-for-claude-code

    Looks up official Claude Code documentation stored as reference files instead of guessing about CLI commands, configuration, or plugin APIs.

    142 GitHub stars~1.5k tokensUpdated 10 mo ago
    Agent WorkflowsAuto-check passed
  • Agnix

    agent-sh/agnix

    A skill your agent uses when user asks to 'lint agent configs', 'validate skills', 'check CLAUDE.md', 'validate hooks', 'lint MCP'.

    445 GitHub stars~874 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from nanocoai/nanoclaw

All 59 skills in this repo
  • Installs or refreshes Iron Proxy and its Iron Control web console for NanoClaw, with a local Docker setup, database, credentials and a human approval bridge.

    31k GitHub stars~4.6k tokensUpdated 2 days ago
    Auto-check: notes
  • Agent Browser

    nanocoai/nanoclaw

    Drives a web browser from the shell with the agent-browser CLI: open pages, read an element snapshot, click and fill by reference, grab text and screenshots.

    31k GitHub starsUsed in 3 repos~1.6k tokens
    Auto-check passed
  • Installs or refreshes OneCLI as the gateway provider for NanoClaw, copying the adapter files, registering the provider and running the setup script.

    31k GitHub stars~1.1k tokensUpdated 2 days ago
    Auto-check: notes
  • Guides a conversational migration from an OpenClaw install to NanoClaw v2, carrying over identity, channel credentials, scheduled tasks and workspace files.

    31k GitHub stars~6k tokensUpdated 2 days ago
    Auto-check: notes
  • Wires up an additional phone number onto an already-installed Dial channel, so one NanoClaw install answers SMS and AI voice calls on more than one line.

    31k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • NanoClaw LLM Wiki Setup

    nanocoai/nanoclaw

    Adds a persistent wiki knowledge base to a NanoClaw group following Karpathy's LLM Wiki pattern, with folders, a tailored container skill and a CLAUDE.md section.

    31k GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed

Categories

Questions about Agent Self-Customization

What does Agent Self-Customization do?

A decision tree for an agent changing its own setup: edit memory directly, request approval for packages and MCP servers, and delegate code edits to a builder agent. Requests are sorted by what has to change.md, is regenerated on every spawn and must not be edited.

When should I use Agent Self-Customization?

Agent Self-Customization fits situations like: the user asks the agent to add a feature or install a tool for itself; registering a new MCP server for the agent; deciding whether a change needs approval or a builder agent.

How do I install Agent Self-Customization in Claude Code?

Run `npx skills add nanocoai/nanoclaw --skill self-customize -a claude-code`. Or copy the skill folder (container/skills/self-customize in nanocoai/nanoclaw) into .claude/skills/self-customize in your project. Claude Code loads it when a task matches its description.

How do I install Agent Self-Customization in Codex?

Run `npx skills add nanocoai/nanoclaw --skill self-customize -a codex`. Or copy the skill folder (container/skills/self-customize in nanocoai/nanoclaw) into .agents/skills/self-customize in your project. Codex loads it when a task matches its description.

Can I use Agent Self-Customization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nanocoai/nanoclaw --skill self-customize -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/self-customize, .gemini/skills/self-customize, .github/skills/self-customize and .opencode/skills/self-customize in your project.

What does Agent Self-Customization need to run?

Going by SKILL.md and its folder, Agent Self-Customization needs the command-line tools its instructions call (pnpm). Our summary lists: A NanoClaw agent with the install_packages, add_mcp_server and create_agent tools; Admin approval for package and MCP changes.

Does Agent Self-Customization access the network?

SKILL.md names 1 domain. As links in the text: mcp.so. This is read from the text; nothing was executed.

Is Agent Self-Customization safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Agent Self-Customization use?

Agent Self-Customization is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agent Self-Customization use?

About 1.5k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Agent Self-Customization?

Skills that share tags, products or a category with Agent Self-Customization: Dive Into LangGraph (luochang212/dive-into-langgraph, 457 stars), Ask User Question (MemTensor/MemOS, 12k stars), Agent Setup Health Audit (tw93/Waza, 7.2k stars) and Semantix Guide (Gnosil/semantix, 821 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agent Self-Customization?

nanocoai (a GitHub organization) maintains it in nanocoai/nanoclaw, which has 30,897 GitHub stars. The repository holds 59 skills in this directory. The repository was last updated on October 6, 2026.

Source: nanocoai/nanoclaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.