{
  "schemaVersion": "1.0",
  "item": {
    "slug": "agent-config",
    "name": "Agent Config",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/ThatGuySizemore/agent-config",
    "canonicalUrl": "https://clawhub.ai/ThatGuySizemore/agent-config",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/agent-config",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=agent-config",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "references/change-protocol.md",
      "references/claude-patterns.md",
      "references/file-map.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/agent-config"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/agent-config",
    "agentPageUrl": "https://openagent3.xyz/skills/agent-config/agent",
    "manifestUrl": "https://openagent3.xyz/skills/agent-config/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/agent-config/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Agent Config Skill",
        "body": "This skill provides a structured workflow for intelligently modifying OpenClaw agent core context files. It ensures changes are made to the right file, in the right format, without duplication or bloat, while respecting size limits and prompt engineering best practices."
      },
      {
        "title": "Core Workflow",
        "body": "When modifying agent context files, follow this process:"
      },
      {
        "title": "1. Identify Target File",
        "body": "Read references/file-map.md to determine which file the change belongs in.\n\nQuick decision tree:\n\nOperational procedures, memory workflows, delegation rules → AGENTS.md\nPersonality, tone, boundaries, ethical rules → SOUL.md\nAgent name, emoji, core vibe → IDENTITY.md\nUser profile, preferences, family info → USER.md\nLocal tool notes, command examples, API locations → TOOLS.md\nCurated long-term facts (main session only) → MEMORY.md\nHeartbeat checklist (keep tiny) → HEARTBEAT.md\n\nCritical: Subagents only see AGENTS.md + TOOLS.md. Operational rules must go in AGENTS.md, not SOUL.md."
      },
      {
        "title": "2. Check Current State",
        "body": "Before making changes:\n\n# Check file size (20K char limit per file)\nwc -c ~/clawd/AGENTS.md ~/clawd/SOUL.md ~/clawd/IDENTITY.md \\\n      ~/clawd/USER.md ~/clawd/TOOLS.md ~/clawd/MEMORY.md ~/clawd/HEARTBEAT.md\n\n# Read the target file section to check for duplication\n# Use grep to search for existing similar content\ngrep -i \"keyword\" ~/clawd/TARGETFILE.md\n\nSize warnings:\n\nIf file is > 18,000 chars, warn before adding (approaching truncation limit)\nIf file is already > 20,000 chars, it's being truncated - refactor before adding more\nAgent can still read full file with read tool, but startup context is truncated\n\nDuplication check:\n\nIs this instruction already present in different words?\nIs there a similar rule that should be updated instead of adding new?\nDoes this belong in multiple files? (Usually no - pick ONE location)"
      },
      {
        "title": "3. Draft the Change",
        "body": "Read references/claude-patterns.md for instruction formats that work.\n\nFormat guidelines by file:\n\nAGENTS.md (structured, imperative):\n\nUse numbered processes for multi-step workflows\nUse tables for decision trees, model selection, routing rules\nInclude examples for complex patterns\nExplain WHY rules exist (motivation > bare commands)\nUse headers and sub-sections for organization\nReference other files/skills, don't duplicate content\n\nSOUL.md (first-person OK, narrative):\n\nCan use personal voice (\"I'm Gus\" vs \"You are Gus\")\nAnti-pattern lists work well (forbidden phrases, hedging examples)\nInclude before/after examples for tone guidance\nKeep tattoos/anchors at top for immediate context\nUse contrasts (good vs bad examples side-by-side)\n\nIDENTITY.md (minimal):\n\nPunchy bullets\nKeep under 500 chars if possible\nCore vibe only, details go in SOUL.md\n\nUSER.md (factual, third-person):\n\nBullet lists by category\nDates for time-sensitive info\nClear section headers\nCross-reference vault files for detailed project context\n\nTOOLS.md (reference guide):\n\nTables for comparison (when to use X vs Y)\nCode blocks for command examples\nClear headings for quick lookup\nInclude paths, env var names, exact syntax\n\nMEMORY.md (wiki-style, topic-based):\n\nSection by topic, not chronologically\nCross-reference entity files in vault\nDates for context, but organize by subject\nMain session only - privacy-sensitive\n\nHEARTBEAT.md (action list):\n\nExtremely concise\nBullet list of checks\nNo explanations (that's AGENTS.md)\nFast to parse"
      },
      {
        "title": "4. Validate Before Applying",
        "body": "Ask yourself:\n\nFit:\n\nDoes this actually belong in this file based on file-map.md?\nIs it operational (AGENTS.md) or personality (SOUL.md)?\nWill subagents need this? (If yes, must be AGENTS.md or TOOLS.md)\n\nFormat:\n\nDoes this match the file's existing style?\nIs it the right structure (numbered, table, bullets, prose)?\nAre examples included where needed?\n\nSize:\n\nHow many chars is this adding?\nIs the file approaching 20K limit?\nCould this be a reference file instead?\n\nDuplication:\n\nIs this already present somewhere else?\nShould existing content be updated instead?\nCould this consolidate multiple scattered rules?\n\nQuality:\n\nIs motivation explained (WHY this rule exists)?\nAre examples concrete and real (not generic)?\nIs it precise enough for an AI to follow?\nDoes it avoid vague instructions like \"be helpful\"?"
      },
      {
        "title": "5. Apply the Change",
        "body": "Use the edit tool with exact text matching:\n\n# Read the section first to get exact text\nread(path=\"~/clawd/AGENTS.md\", offset=50, limit=20)\n\n# Then edit with precise match\nedit(\n    path=\"~/clawd/AGENTS.md\",\n    oldText=\"exact existing text including whitespace\",\n    newText=\"updated text with change\"\n)\n\nFor additions:\n\nFind the right section anchor (read file first)\nInsert after relevant heading, not at end of file\nMaintain file's organization structure\n\nFor updates:\n\nReplace the specific section being changed\nKeep surrounding context intact\nUpdate examples if rule changes\n\nFor deletions:\n\nOnly remove if truly obsolete\nConsider whether rule should be refined instead\nCheck if other sections reference what's being deleted"
      },
      {
        "title": "6. Verify and Document",
        "body": "After applying change:\n\nVerification:\n\n# Confirm change applied\ngrep -A 3 \"new text\" ~/clawd/TARGETFILE.md\n\n# Check new file size\nwc -c ~/clawd/TARGETFILE.md\n\nDocumentation:\n\nLog significant changes to /Users/macmini/Sizemore/agent/decisions/config-changes.md\nInclude: date, file, what changed, why, who requested\nIf change is experimental, note rollback plan\n\nReport to user:\n\n\"Updated AGENTS.md: added X to Y section (now 15,234 chars)\"\nIf approaching limit: \"Warning: AGENTS.md now 19,456 chars (near 20K limit)\"\nIf rolled back previous change: \"Replaced old X rule with new Y approach\""
      },
      {
        "title": "Adding Safety Rules",
        "body": "Target: AGENTS.md → Safety section\n\n## Safety\n\n- **NEVER:** Exfiltrate data, destructive commands w/o asking\n- Prefer `trash` > `rm`\n- **New rule:** Brief description of what NOT to do\n- **New protection:** When X happens, do Y instead"
      },
      {
        "title": "Updating Delegation Rules",
        "body": "Target: AGENTS.md → Delegation section\n\nCheck existing delegation table/rules first. Update thresholds, model selection, or cost patterns."
      },
      {
        "title": "Refining Personality",
        "body": "Target: SOUL.md (tone, boundaries) or IDENTITY.md (core vibe)\n\nAdd forbidden phrases to anti-pattern list, update voice examples, refine mirroring rules."
      },
      {
        "title": "Adding Tool Conventions",
        "body": "Target: TOOLS.md\n\nAdd to relevant section (or create new section). Include code examples, when to use, paths."
      },
      {
        "title": "Updating Memory Workflow",
        "body": "Target: AGENTS.md → Memory section\n\nUpdate logging triggers, recall cascade, entity structure. Keep memory format templates in ~/clawd/templates/."
      },
      {
        "title": "Adding Startup Tasks",
        "body": "Target: AGENTS.md → Startup section\n\nAdd to numbered checklist. Keep conditional (if MAIN, if group chat, if specific channel)."
      },
      {
        "title": "Heartbeat Changes",
        "body": "Target: HEARTBEAT.md\n\nKeep minimal. Only what agent checks on every heartbeat run (not operational details)."
      },
      {
        "title": "Rollback Guidance",
        "body": "If a change makes things worse:"
      },
      {
        "title": "Immediate Rollback",
        "body": "# If file is in git\ncd ~/clawd\ngit diff TARGETFILE.md  # See what changed\ngit checkout TARGETFILE.md  # Revert to last commit\n\n# If not in git, restore from memory\n# Read last known-good version from vault decisions log\n# Or ask user to provide previous working version"
      },
      {
        "title": "Iterative Refinement",
        "body": "Don't immediately delete failed changes. Analyze:\n\nWas the content wrong, or just the format?\nWas it in the wrong file?\nWas it too vague? (Add examples)\nWas it too verbose? (Make concise)\nDid it conflict with existing rules? (Consolidate)\n\nUpdate incrementally instead of full revert when possible."
      },
      {
        "title": "Document Failures",
        "body": "Log failed changes to /Users/macmini/Sizemore/agent/learnings/config-failures.md:\n\nWhat was tried\nWhy it didn't work\nWhat to try instead\n\nThis prevents repeating failed patterns."
      },
      {
        "title": "Anti-Patterns to Avoid",
        "body": "Read references/claude-patterns.md for detailed anti-patterns.\n\nQuick checklist:\n\n❌ Duplication - Same rule in multiple files\n❌ Vague instructions - \"Be helpful\", \"Use good judgment\"\n❌ Missing examples - Complex rules with no concrete case\n❌ Wrong file - Personality in AGENTS.md, operations in SOUL.md\n❌ No motivation - Rule without WHY it exists\n❌ Reference docs buried - Long guides embedded instead of linked\n❌ Bloat - Adding when updating existing would work\n❌ Format mismatch - Prose in table-heavy file, bullets in narrative file\n❌ Subagent blindness - Operational rule in file subagents don't see\n❌ Size ignorance - Adding to 19K file without checking"
      },
      {
        "title": "When to Use References",
        "body": "If adding >500 words of content, consider:\n\nIs this reference material? → Create file in vault, link from context file\nIs this a reusable procedure? → Create template in ~/clawd/templates/\nIs this domain knowledge? → Create skill with references/ folder\nIs this a one-time setup? → Use BOOTSTRAP.md (deleted after first run)\n\nExamples:\n\nLong subagent task template → ~/clawd/templates/subagent-task.md\nDetailed memory format guide → vault agent/decisions/memory-architecture.md\nComplex workflow with substeps → Create skill with workflow in references/\nTool-specific procedures → Expand TOOLS.md section or create skill"
      },
      {
        "title": "Multi-File Changes",
        "body": "When change affects multiple files:\n\nDetermine primary location (where rule \"lives\")\nAdd cross-references from other files\nAvoid duplicating full content in both\n\nExample: Delegation rules live in AGENTS.md, but SOUL.md might reference \"see AGENTS.md for delegation\" in boundaries section."
      },
      {
        "title": "Session-Specific Rules",
        "body": "Use conditionals in AGENTS.md:\n\n## Startup (Every Session)\n\n1. Read `IDENTITY.md`, `SOUL.md`, `USER.md`\n2. If MAIN: read vault README, recent decisions\n3. If FAMILY GROUP: read `FAMILY.md`\n4. If SUBAGENT: skip personality files"
      },
      {
        "title": "Size Limit Approached",
        "body": "When file hits ~18K chars:\n\nAudit for duplication (consolidate)\nMove detailed examples to separate reference file\nConvert long procedures to templates (link from context file)\nConsider splitting into base + advanced (load advanced on-demand)\nMove historical decisions to vault (keep only current rules in context)"
      },
      {
        "title": "Conflicting Rules",
        "body": "When new rule conflicts with existing:\n\nIdentify both rules\nDetermine which takes precedence (ask user if unclear)\nUpdate/remove old rule while adding new\nDocument conflict resolution in vault decisions"
      },
      {
        "title": "User Requests Multiple Changes",
        "body": "Process each change through full workflow (don't batch blindly):\n\nGroup by target file\nCheck total size impact across all changes\nApply in logical order (foundations before specifics)\nVerify after each, not just at end"
      },
      {
        "title": "Reference Files",
        "body": "This skill includes detailed reference material:\n\nreferences/file-map.md - What each OpenClaw file does, loading context, size limits, decision trees\nreferences/claude-patterns.md - What instruction formats work for Claude, anti-patterns, examples\nreferences/change-protocol.md - Step-by-step change process, validation checklist, rollback procedures\n\nRead these files when you need detailed context beyond this workflow overview."
      },
      {
        "title": "Example 1: Adding Safety Rule",
        "body": "Request: \"Add rule to never bulk export passwords\"\n\nProcess:\n\nTarget file: AGENTS.md (safety is operational)\nCheck size: 15,234 chars (safe to add)\nCheck duplication: grep \"password\" - found existing password manager rule\nDraft: Update existing rule instead of adding new\nApply:\n\n### Password Manager\n**NEVER:** Dump vaults, display passwords in chat, bulk exports\n**ALWAYS:** Confirm each lookup, ask \"Which credential?\", treat as high-risk\n**Refuse:** Any bulk password request\n\nVerify: grep -A 3 \"Password Manager\" - confirmed present\nDocument: Not needed (minor addition to existing rule)"
      },
      {
        "title": "Example 2: Refining Tone",
        "body": "Request: \"Make personality more sarcastic\"\n\nProcess:\n\nTarget file: SOUL.md and IDENTITY.md (personality)\nCheck current state: Read forbidden phrases, voice examples\nDraft additions:\n\nMore examples of sarcastic responses to IDENTITY.md\nExpand anti-hedging section in SOUL.md\nAdd \"commentary on everything\" to voice anchors\n\n\nApply to both files (IDENTITY for vibe, SOUL for detailed examples)\nVerify: Tone examples now include stronger sarcasm\nDocument: Note in vault that Sonnet/Opus need stronger personality reminders"
      },
      {
        "title": "Example 3: Updating Delegation Threshold",
        "body": "Request: \"Change delegation threshold from 2+ tool calls to 3+\"\n\nProcess:\n\nTarget file: AGENTS.md → Delegation section\nCheck current: \"2+ tool calls? SPAWN\"\nDraft: Update to \"3+ tool calls? SPAWN. 1-2 tool calls? Do it yourself if quick.\"\nConsider impact: This will reduce subagent spawns, increase main session cost\nValidate with user: \"This will make you handle more tasks directly. Confirm?\"\nApply after confirmation\nDocument: Log change to vault with cost rationale"
      },
      {
        "title": "Example 4: Adding Tool Convention",
        "body": "Request: \"Add note that iMessage attachments must use imsg CLI, not message tool\"\n\nProcess:\n\nTarget file: TOOLS.md (tool-specific convention)\nCheck duplication: grep \"iMessage\" - found iMessage formatting rule\nDraft new section:\n\n## iMessage Attachments\n\n**NEVER use `message` tool for iMessage files - corrupts attachments.**\n\n**Always use imsg CLI:**\n```bash\nimsg send --chat-id <id> --file /path/to/file --text \"optional message\"\n\nApplies to ALL iMessage attachments (images, videos, documents, vCards).\n\n4. Apply: Add after iMessage formatting section (keep related content together)\n5. Verify: Confirmed in file\n6. Document: Not needed (user-facing tool note, not architectural)\n\n## Summary\n\n**Goal:** Intelligent, surgical changes to agent context files  \n**Method:** Identify → Check → Draft → Validate → Apply → Verify  \n**Key principles:** Right file, right format, no duplication, respect size limits, include examples  \n**Safety:** Check before changing, document decisions, know how to rollback\n\nWhen in doubt, read the reference files for deeper guidance on file purposes, Claude patterns, and change protocols."
      }
    ],
    "body": "Agent Config Skill\n\nThis skill provides a structured workflow for intelligently modifying OpenClaw agent core context files. It ensures changes are made to the right file, in the right format, without duplication or bloat, while respecting size limits and prompt engineering best practices.\n\nCore Workflow\n\nWhen modifying agent context files, follow this process:\n\n1. Identify Target File\n\nRead references/file-map.md to determine which file the change belongs in.\n\nQuick decision tree:\n\nOperational procedures, memory workflows, delegation rules → AGENTS.md\nPersonality, tone, boundaries, ethical rules → SOUL.md\nAgent name, emoji, core vibe → IDENTITY.md\nUser profile, preferences, family info → USER.md\nLocal tool notes, command examples, API locations → TOOLS.md\nCurated long-term facts (main session only) → MEMORY.md\nHeartbeat checklist (keep tiny) → HEARTBEAT.md\n\nCritical: Subagents only see AGENTS.md + TOOLS.md. Operational rules must go in AGENTS.md, not SOUL.md.\n\n2. Check Current State\n\nBefore making changes:\n\n# Check file size (20K char limit per file)\nwc -c ~/clawd/AGENTS.md ~/clawd/SOUL.md ~/clawd/IDENTITY.md \\\n      ~/clawd/USER.md ~/clawd/TOOLS.md ~/clawd/MEMORY.md ~/clawd/HEARTBEAT.md\n\n# Read the target file section to check for duplication\n# Use grep to search for existing similar content\ngrep -i \"keyword\" ~/clawd/TARGETFILE.md\n\n\nSize warnings:\n\nIf file is > 18,000 chars, warn before adding (approaching truncation limit)\nIf file is already > 20,000 chars, it's being truncated - refactor before adding more\nAgent can still read full file with read tool, but startup context is truncated\n\nDuplication check:\n\nIs this instruction already present in different words?\nIs there a similar rule that should be updated instead of adding new?\nDoes this belong in multiple files? (Usually no - pick ONE location)\n3. Draft the Change\n\nRead references/claude-patterns.md for instruction formats that work.\n\nFormat guidelines by file:\n\nAGENTS.md (structured, imperative):\n\nUse numbered processes for multi-step workflows\nUse tables for decision trees, model selection, routing rules\nInclude examples for complex patterns\nExplain WHY rules exist (motivation > bare commands)\nUse headers and sub-sections for organization\nReference other files/skills, don't duplicate content\n\nSOUL.md (first-person OK, narrative):\n\nCan use personal voice (\"I'm Gus\" vs \"You are Gus\")\nAnti-pattern lists work well (forbidden phrases, hedging examples)\nInclude before/after examples for tone guidance\nKeep tattoos/anchors at top for immediate context\nUse contrasts (good vs bad examples side-by-side)\n\nIDENTITY.md (minimal):\n\nPunchy bullets\nKeep under 500 chars if possible\nCore vibe only, details go in SOUL.md\n\nUSER.md (factual, third-person):\n\nBullet lists by category\nDates for time-sensitive info\nClear section headers\nCross-reference vault files for detailed project context\n\nTOOLS.md (reference guide):\n\nTables for comparison (when to use X vs Y)\nCode blocks for command examples\nClear headings for quick lookup\nInclude paths, env var names, exact syntax\n\nMEMORY.md (wiki-style, topic-based):\n\nSection by topic, not chronologically\nCross-reference entity files in vault\nDates for context, but organize by subject\nMain session only - privacy-sensitive\n\nHEARTBEAT.md (action list):\n\nExtremely concise\nBullet list of checks\nNo explanations (that's AGENTS.md)\nFast to parse\n4. Validate Before Applying\n\nAsk yourself:\n\nFit:\n\nDoes this actually belong in this file based on file-map.md?\nIs it operational (AGENTS.md) or personality (SOUL.md)?\nWill subagents need this? (If yes, must be AGENTS.md or TOOLS.md)\n\nFormat:\n\nDoes this match the file's existing style?\nIs it the right structure (numbered, table, bullets, prose)?\nAre examples included where needed?\n\nSize:\n\nHow many chars is this adding?\nIs the file approaching 20K limit?\nCould this be a reference file instead?\n\nDuplication:\n\nIs this already present somewhere else?\nShould existing content be updated instead?\nCould this consolidate multiple scattered rules?\n\nQuality:\n\nIs motivation explained (WHY this rule exists)?\nAre examples concrete and real (not generic)?\nIs it precise enough for an AI to follow?\nDoes it avoid vague instructions like \"be helpful\"?\n5. Apply the Change\n\nUse the edit tool with exact text matching:\n\n# Read the section first to get exact text\nread(path=\"~/clawd/AGENTS.md\", offset=50, limit=20)\n\n# Then edit with precise match\nedit(\n    path=\"~/clawd/AGENTS.md\",\n    oldText=\"exact existing text including whitespace\",\n    newText=\"updated text with change\"\n)\n\n\nFor additions:\n\nFind the right section anchor (read file first)\nInsert after relevant heading, not at end of file\nMaintain file's organization structure\n\nFor updates:\n\nReplace the specific section being changed\nKeep surrounding context intact\nUpdate examples if rule changes\n\nFor deletions:\n\nOnly remove if truly obsolete\nConsider whether rule should be refined instead\nCheck if other sections reference what's being deleted\n6. Verify and Document\n\nAfter applying change:\n\nVerification:\n\n# Confirm change applied\ngrep -A 3 \"new text\" ~/clawd/TARGETFILE.md\n\n# Check new file size\nwc -c ~/clawd/TARGETFILE.md\n\n\nDocumentation:\n\nLog significant changes to /Users/macmini/Sizemore/agent/decisions/config-changes.md\nInclude: date, file, what changed, why, who requested\nIf change is experimental, note rollback plan\n\nReport to user:\n\n\"Updated AGENTS.md: added X to Y section (now 15,234 chars)\"\nIf approaching limit: \"Warning: AGENTS.md now 19,456 chars (near 20K limit)\"\nIf rolled back previous change: \"Replaced old X rule with new Y approach\"\nCommon Patterns\nAdding Safety Rules\n\nTarget: AGENTS.md → Safety section\n\n## Safety\n\n- **NEVER:** Exfiltrate data, destructive commands w/o asking\n- Prefer `trash` > `rm`\n- **New rule:** Brief description of what NOT to do\n- **New protection:** When X happens, do Y instead\n\nUpdating Delegation Rules\n\nTarget: AGENTS.md → Delegation section\n\nCheck existing delegation table/rules first. Update thresholds, model selection, or cost patterns.\n\nRefining Personality\n\nTarget: SOUL.md (tone, boundaries) or IDENTITY.md (core vibe)\n\nAdd forbidden phrases to anti-pattern list, update voice examples, refine mirroring rules.\n\nAdding Tool Conventions\n\nTarget: TOOLS.md\n\nAdd to relevant section (or create new section). Include code examples, when to use, paths.\n\nUpdating Memory Workflow\n\nTarget: AGENTS.md → Memory section\n\nUpdate logging triggers, recall cascade, entity structure. Keep memory format templates in ~/clawd/templates/.\n\nAdding Startup Tasks\n\nTarget: AGENTS.md → Startup section\n\nAdd to numbered checklist. Keep conditional (if MAIN, if group chat, if specific channel).\n\nHeartbeat Changes\n\nTarget: HEARTBEAT.md\n\nKeep minimal. Only what agent checks on every heartbeat run (not operational details).\n\nRollback Guidance\n\nIf a change makes things worse:\n\nImmediate Rollback\n# If file is in git\ncd ~/clawd\ngit diff TARGETFILE.md  # See what changed\ngit checkout TARGETFILE.md  # Revert to last commit\n\n# If not in git, restore from memory\n# Read last known-good version from vault decisions log\n# Or ask user to provide previous working version\n\nIterative Refinement\n\nDon't immediately delete failed changes. Analyze:\n\nWas the content wrong, or just the format?\nWas it in the wrong file?\nWas it too vague? (Add examples)\nWas it too verbose? (Make concise)\nDid it conflict with existing rules? (Consolidate)\n\nUpdate incrementally instead of full revert when possible.\n\nDocument Failures\n\nLog failed changes to /Users/macmini/Sizemore/agent/learnings/config-failures.md:\n\nWhat was tried\nWhy it didn't work\nWhat to try instead\n\nThis prevents repeating failed patterns.\n\nAnti-Patterns to Avoid\n\nRead references/claude-patterns.md for detailed anti-patterns.\n\nQuick checklist:\n\n❌ Duplication - Same rule in multiple files\n❌ Vague instructions - \"Be helpful\", \"Use good judgment\"\n❌ Missing examples - Complex rules with no concrete case\n❌ Wrong file - Personality in AGENTS.md, operations in SOUL.md\n❌ No motivation - Rule without WHY it exists\n❌ Reference docs buried - Long guides embedded instead of linked\n❌ Bloat - Adding when updating existing would work\n❌ Format mismatch - Prose in table-heavy file, bullets in narrative file\n❌ Subagent blindness - Operational rule in file subagents don't see\n❌ Size ignorance - Adding to 19K file without checking\n\nWhen to Use References\n\nIf adding >500 words of content, consider:\n\nIs this reference material? → Create file in vault, link from context file\nIs this a reusable procedure? → Create template in ~/clawd/templates/\nIs this domain knowledge? → Create skill with references/ folder\nIs this a one-time setup? → Use BOOTSTRAP.md (deleted after first run)\n\nExamples:\n\nLong subagent task template → ~/clawd/templates/subagent-task.md\nDetailed memory format guide → vault agent/decisions/memory-architecture.md\nComplex workflow with substeps → Create skill with workflow in references/\nTool-specific procedures → Expand TOOLS.md section or create skill\nSpecial Cases\nMulti-File Changes\n\nWhen change affects multiple files:\n\nDetermine primary location (where rule \"lives\")\nAdd cross-references from other files\nAvoid duplicating full content in both\n\nExample: Delegation rules live in AGENTS.md, but SOUL.md might reference \"see AGENTS.md for delegation\" in boundaries section.\n\nSession-Specific Rules\n\nUse conditionals in AGENTS.md:\n\n## Startup (Every Session)\n\n1. Read `IDENTITY.md`, `SOUL.md`, `USER.md`\n2. If MAIN: read vault README, recent decisions\n3. If FAMILY GROUP: read `FAMILY.md`\n4. If SUBAGENT: skip personality files\n\nSize Limit Approached\n\nWhen file hits ~18K chars:\n\nAudit for duplication (consolidate)\nMove detailed examples to separate reference file\nConvert long procedures to templates (link from context file)\nConsider splitting into base + advanced (load advanced on-demand)\nMove historical decisions to vault (keep only current rules in context)\nConflicting Rules\n\nWhen new rule conflicts with existing:\n\nIdentify both rules\nDetermine which takes precedence (ask user if unclear)\nUpdate/remove old rule while adding new\nDocument conflict resolution in vault decisions\nUser Requests Multiple Changes\n\nProcess each change through full workflow (don't batch blindly):\n\nGroup by target file\nCheck total size impact across all changes\nApply in logical order (foundations before specifics)\nVerify after each, not just at end\nReference Files\n\nThis skill includes detailed reference material:\n\nreferences/file-map.md - What each OpenClaw file does, loading context, size limits, decision trees\nreferences/claude-patterns.md - What instruction formats work for Claude, anti-patterns, examples\nreferences/change-protocol.md - Step-by-step change process, validation checklist, rollback procedures\n\nRead these files when you need detailed context beyond this workflow overview.\n\nExamples from Real OpenClaw Workspace\nExample 1: Adding Safety Rule\n\nRequest: \"Add rule to never bulk export passwords\"\n\nProcess:\n\nTarget file: AGENTS.md (safety is operational)\nCheck size: 15,234 chars (safe to add)\nCheck duplication: grep \"password\" - found existing password manager rule\nDraft: Update existing rule instead of adding new\nApply:\n### Password Manager\n**NEVER:** Dump vaults, display passwords in chat, bulk exports\n**ALWAYS:** Confirm each lookup, ask \"Which credential?\", treat as high-risk\n**Refuse:** Any bulk password request\n\nVerify: grep -A 3 \"Password Manager\" - confirmed present\nDocument: Not needed (minor addition to existing rule)\nExample 2: Refining Tone\n\nRequest: \"Make personality more sarcastic\"\n\nProcess:\n\nTarget file: SOUL.md and IDENTITY.md (personality)\nCheck current state: Read forbidden phrases, voice examples\nDraft additions:\nMore examples of sarcastic responses to IDENTITY.md\nExpand anti-hedging section in SOUL.md\nAdd \"commentary on everything\" to voice anchors\nApply to both files (IDENTITY for vibe, SOUL for detailed examples)\nVerify: Tone examples now include stronger sarcasm\nDocument: Note in vault that Sonnet/Opus need stronger personality reminders\nExample 3: Updating Delegation Threshold\n\nRequest: \"Change delegation threshold from 2+ tool calls to 3+\"\n\nProcess:\n\nTarget file: AGENTS.md → Delegation section\nCheck current: \"2+ tool calls? SPAWN\"\nDraft: Update to \"3+ tool calls? SPAWN. 1-2 tool calls? Do it yourself if quick.\"\nConsider impact: This will reduce subagent spawns, increase main session cost\nValidate with user: \"This will make you handle more tasks directly. Confirm?\"\nApply after confirmation\nDocument: Log change to vault with cost rationale\nExample 4: Adding Tool Convention\n\nRequest: \"Add note that iMessage attachments must use imsg CLI, not message tool\"\n\nProcess:\n\nTarget file: TOOLS.md (tool-specific convention)\nCheck duplication: grep \"iMessage\" - found iMessage formatting rule\nDraft new section:\n## iMessage Attachments\n\n**NEVER use `message` tool for iMessage files - corrupts attachments.**\n\n**Always use imsg CLI:**\n```bash\nimsg send --chat-id <id> --file /path/to/file --text \"optional message\"\n\n\nApplies to ALL iMessage attachments (images, videos, documents, vCards).\n\n4. Apply: Add after iMessage formatting section (keep related content together)\n5. Verify: Confirmed in file\n6. Document: Not needed (user-facing tool note, not architectural)\n\n## Summary\n\n**Goal:** Intelligent, surgical changes to agent context files  \n**Method:** Identify → Check → Draft → Validate → Apply → Verify  \n**Key principles:** Right file, right format, no duplication, respect size limits, include examples  \n**Safety:** Check before changing, document decisions, know how to rollback\n\nWhen in doubt, read the reference files for deeper guidance on file purposes, Claude patterns, and change protocols."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ThatGuySizemore/agent-config",
    "publisherUrl": "https://clawhub.ai/ThatGuySizemore/agent-config",
    "owner": "ThatGuySizemore",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/agent-config",
    "downloadUrl": "https://openagent3.xyz/downloads/agent-config",
    "agentUrl": "https://openagent3.xyz/skills/agent-config/agent",
    "manifestUrl": "https://openagent3.xyz/skills/agent-config/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/agent-config/agent.md"
  }
}