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.
npx skills add humanerd-drew/opencode-drewgent --skill yaml-config-patch-drewgentgit clone --depth 1 https://github.com/humanerd-drew/opencode-drewgentWrote 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.
[](https://agentmods.dev/skills/humanerd-drew/opencode-drewgent/yaml-config-patch-drewgent)<a href="https://agentmods.dev/skills/humanerd-drew/opencode-drewgent/yaml-config-patch-drewgent"><img src="https://agentmods.dev/badge/skills/humanerd-drew/opencode-drewgent/yaml-config-patch-drewgent.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00056 | $0.01911 |
| Opus 5 | $0.00028 | $0.00955 |
| Sonnet 5 | $0.00011 | $0.00382 |
| Haiku 4.5 | $0.00006 | $0.00191 |
Grade A, and why
yaml-config-patch-{{AGENT_NAME_LOWER}} 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.
YAML Config Patch — {{AGENT_NAME}} Dual-Config Pattern
{{AGENT_NAME}}는 config.yaml을 두 곳에 중복으로 유지한다. compression이나 auxiliary 같은 task-specific routing 변경 시 두 파일 모두 손대야 하고, 각 파일 내에서도 nested section 구조를 정확히 이해하고 patch해야 한다.
이 skill은 2026-06-03 cost optimization (H3 — M3 → M2.5 routing) 작업 중 두 차례 patch 실수로 얻은 운영 노하우를 정리한다.
1. Dual-Config Pattern (CRITICAL)
{{AGENT_NAME}}는 두 개의 config.yaml을 운영한다:
| File | Used by | What it has |
|---|---|---|
~/.{{AGENT_NAME_LOWER}}/config.yaml |
gateway, CLI, cron scheduler, run_kanban_worker | auxiliary.compression (provider/model) 만 |
~/.{{AGENT_NAME_LOWER}}/P5-ego/config/config.yaml |
P5-ego layer (identity snapshot) | compression: (summary_*) + auxiliary.compression: (provider/model) 둘 다 |
P5-ego 파일의 compression 섹션이 두 군데:
- root-level
compression:(line 43-50 근처) —summary_provider,summary_model,summary_base_url auxiliary.compression:(line 72-77 근처) —provider,model,base_url,api_key,timeout
이 둘은 다른 dict. P5-ego의 의도는 P5 layer가 자기 config를 가진 것. path-integrity-report-2026-05-17에서는 "do not auto-fix yet" 결정.
변경 시 두 파일 + P5-ego는 두 section 모두 손봐야 할 수 있다. auxiliary.compression만 보면 P5-ego의 root-level compression이 stale로 남는다.
2. mcp_patch YAML Gotcha
mcp_patch로 YAML을 patch할 때 partial old_string이 sibling section을
복제하는 사고를 내기 쉽다.
발생 패턴 (실제 사고 사례, 2026-06-03)
원본:
compression: ← root-level
enabled: true
threshold: 0.9
summary_model: ''
summary_provider: minimax
잘못된 patch — old_string이 summary_model: '' 부분만 잡고 new_string이
compression:으로 다시 시작:
compression: ← root-level (line 43)
enabled: true
compression: ← DUPLICATE (line 45) — 잘못된 새 키
enabled: true ← DUPLICATE (line 46)
threshold: 0.9
...
YAML이 broken. 두 개의 compression:이 같은 level에 있어서 parser가
후자만 인식하거나 error.
Prevention Rule
- Always read the file first — 정확한 indentation, sibling section 위치, 부모 key까지 확인 후 patch
- Match enough context — old_string에 부모 key + 첫 child 1
2줄 + target key 12줄 포함. target만 매치하면 부모가 ambiguous - Verify after every patch — 즉시
python3 -c "import yaml; yaml.safe_load(open(p))"- 출력으로 scope 확인
- If duplication appears, read file → 정확한 라인 파악 → 다시 patch
(이미 있는
compression:줄을 기준으로 작업)
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.
- 4d ago First seen · 165 lines · 56 tokens per session scan A 665bfcc42b97
yaml-config-patch-{{AGENT_NAME_LOWER}} is a skill published in the GitHub repository humanerd-drew/opencode-drewgent (2 stars, last pushed 1mo ago), licensed MIT. It adds 56 tokens to every session and 1,911 once invoked, about $0.0003 per session on Opus 5. 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-09-03.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
next-partial-prefetching-adoption
Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…
chronicle
Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…
babysit-pr
Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…