agents.mdx 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746
  1. ---
  2. title: Agents
  3. description: Configure and use specialized agents.
  4. ---
  5. agent는 특정 작업과 워크플로에 맞게 설정할 수 있는 전문 AI assistant입니다. custom prompt, model, tool 접근 권한을 조합해 목적에 맞는 agent를 만들 수 있습니다.
  6. :::tip
  7. 코드를 수정하지 않고 분석과 제안 검토만 하고 싶다면 plan agent를 사용하세요.
  8. :::
  9. 세션 중에 agent를 전환하거나 `@` mention으로 호출할 수 있습니다.
  10. ---
  11. ## 유형
  12. OpenCode의 agent는 primary agent와 subagent, 두 가지 유형으로 나뉩니다.
  13. ---
  14. ### Primary agents
  15. primary agent는 사용자가 직접 상호작용하는 메인 assistant입니다. **Tab** 키 또는 설정한 `switch_agent` keybind로 순환 전환할 수 있습니다. primary agent는 메인 대화를 처리하며, tool 접근은 permission으로 제어합니다. 예를 들어 Build는 모든 tool이 활성화되어 있고 Plan은 제한되어 있습니다.
  16. :::tip
  17. 세션 중 **Tab** 키로 primary agent를 빠르게 전환할 수 있습니다.
  18. :::
  19. OpenCode에는 기본 제공 primary agent인 **Build**와 **Plan**이 포함되어 있습니다. 아래에서 각각 살펴보겠습니다.
  20. ---
  21. ### Subagents
  22. subagent는 primary agent가 특정 작업을 위해 호출하는 전문 assistant입니다. 메시지에서 **@ mention**으로 직접 호출할 수도 있습니다.
  23. OpenCode에는 기본 제공 subagent인 **General**과 **Explore**가 포함되어 있습니다. 아래에서 살펴보겠습니다.
  24. ---
  25. ## 기본 제공
  26. OpenCode는 기본적으로 primary agent 2개와 subagent 2개를 제공합니다.
  27. ---
  28. ### Use build
  29. _Mode_: `primary`
  30. Build는 모든 tool이 활성화된 **default** primary agent입니다. 파일 작업과 시스템 명령에 대한 전체 접근이 필요한 일반적인 개발 작업에 사용하는 표준 agent입니다.
  31. ---
  32. ### Use plan
  33. _Mode_: `primary`
  34. Plan은 계획과 분석에 특화된 제한형 agent입니다. 더 높은 제어력과 의도치 않은 변경 방지를 위해 permission 시스템을 사용합니다.
  35. 기본값으로 아래 항목은 모두 `ask`로 설정됩니다.
  36. - `file edits`: 모든 write, patch, edit
  37. - `bash`: 모든 bash 명령
  38. 코드베이스를 실제로 수정하지 않고 LLM 분석, 변경 제안, 계획 수립만 진행하고 싶을 때 유용합니다.
  39. ---
  40. ### Use general
  41. _Mode_: `subagent`
  42. 복잡한 질문을 조사하고 다단계 작업을 수행하기 위한 범용 agent입니다. todo를 제외한 모든 tool 접근이 가능하므로 필요하면 파일 수정도 할 수 있습니다. 여러 작업 단위를 병렬로 처리할 때 사용하세요.
  43. ---
  44. ### Use explore
  45. _Mode_: `subagent`
  46. 코드베이스 탐색에 최적화된 빠른 읽기 전용 agent입니다. 파일을 수정할 수 없습니다. 패턴 기반 파일 탐색, 키워드 검색, 코드베이스 관련 질의 응답을 빠르게 처리할 때 사용하세요.
  47. ---
  48. ### Use compaction
  49. _Mode_: `primary`
  50. 긴 context를 더 짧은 요약으로 압축하는 숨겨진 시스템 agent입니다. 필요할 때 자동으로 실행되며 UI에서 직접 선택할 수 없습니다.
  51. ---
  52. ### Use title
  53. _Mode_: `primary`
  54. 짧은 세션 제목을 생성하는 숨겨진 시스템 agent입니다. 자동으로 실행되며 UI에서 직접 선택할 수 없습니다.
  55. ---
  56. ### Use summary
  57. _Mode_: `primary`
  58. 세션 요약을 생성하는 숨겨진 시스템 agent입니다. 자동으로 실행되며 UI에서 직접 선택할 수 없습니다.
  59. ---
  60. ## 사용법
  61. 1. primary agent는 세션 중 **Tab** 키로 순환 전환할 수 있습니다. 설정한 `switch_agent` keybind를 사용할 수도 있습니다.
  62. 2. subagent 호출 방법:
  63. - **Automatically**: primary agent가 설명(description)을 바탕으로 특화 작업에 자동 호출합니다.
  64. - 수동 호출: 메시지에서 subagent를 **@ mention**하여 호출합니다. 예:
  65. ```txt frame="none"
  66. @general help me search for this function
  67. ```
  68. 3. **세션 간 이동**: subagent가 child session을 만들면 아래 키로 parent session과 child session 사이를 이동할 수 있습니다.
  69. - **\<Leader>+Right** (또는 설정한 `session_child_cycle` keybind): parent → child1 → child2 → ... → parent 순방향 순환
  70. - **\<Leader>+Left** (또는 설정한 `session_child_cycle_reverse` keybind): parent ← child1 ← child2 ← ... ← parent 역방향 순환
  71. 이를 통해 메인 대화와 특화 subagent 작업 사이를 자연스럽게 오갈 수 있습니다.
  72. ---
  73. ## 구성
  74. 기본 제공 agent를 커스터마이즈하거나 config를 통해 직접 agent를 만들 수 있습니다. agent는 두 가지 방식으로 설정합니다.
  75. ---
  76. ### JSON
  77. `opencode.json` config 파일에서 agent를 설정합니다.
  78. ```json title="opencode.json"
  79. {
  80. "$schema": "https://opencode.ai/config.json",
  81. "agent": {
  82. "build": {
  83. "mode": "primary",
  84. "model": "anthropic/claude-sonnet-4-20250514",
  85. "prompt": "{file:./prompts/build.txt}",
  86. "tools": {
  87. "write": true,
  88. "edit": true,
  89. "bash": true
  90. }
  91. },
  92. "plan": {
  93. "mode": "primary",
  94. "model": "anthropic/claude-haiku-4-20250514",
  95. "tools": {
  96. "write": false,
  97. "edit": false,
  98. "bash": false
  99. }
  100. },
  101. "code-reviewer": {
  102. "description": "Reviews code for best practices and potential issues",
  103. "mode": "subagent",
  104. "model": "anthropic/claude-sonnet-4-20250514",
  105. "prompt": "You are a code reviewer. Focus on security, performance, and maintainability.",
  106. "tools": {
  107. "write": false,
  108. "edit": false
  109. }
  110. }
  111. }
  112. }
  113. ```
  114. ---
  115. ### Markdown
  116. Markdown 파일로도 agent를 정의할 수 있습니다. 다음 위치에 두세요.
  117. - Global: `~/.config/opencode/agents/`
  118. - Per-project: `.opencode/agents/`
  119. ```markdown title="~/.config/opencode/agents/review.md"
  120. ---
  121. description: Reviews code for quality and best practices
  122. mode: subagent
  123. model: anthropic/claude-sonnet-4-20250514
  124. temperature: 0.1
  125. tools:
  126. write: false
  127. edit: false
  128. bash: false
  129. ---
  130. You are in code review mode. Focus on:
  131. - Code quality and best practices
  132. - Potential bugs and edge cases
  133. - Performance implications
  134. - Security considerations
  135. Provide constructive feedback without making direct changes.
  136. ```
  137. Markdown 파일명은 agent 이름이 됩니다. 예를 들어 `review.md`는 `review` agent를 만듭니다.
  138. ---
  139. ## 옵션
  140. 각 config 옵션을 자세히 살펴보겠습니다.
  141. ---
  142. ### Description
  143. `description` 옵션으로 agent의 역할과 사용 시점을 간단히 설명하세요.
  144. ```json title="opencode.json"
  145. {
  146. "agent": {
  147. "review": {
  148. "description": "Reviews code for best practices and potential issues"
  149. }
  150. }
  151. }
  152. ```
  153. 이 옵션은 **필수** config 항목입니다.
  154. ---
  155. ### Temperature
  156. `temperature` config로 LLM 응답의 무작위성과 창의성을 제어합니다.
  157. 값이 낮을수록 응답이 더 집중되고 결정적이며, 값이 높을수록 창의성과 다양성이 커집니다.
  158. ```json title="opencode.json"
  159. {
  160. "agent": {
  161. "plan": {
  162. "temperature": 0.1
  163. },
  164. "creative": {
  165. "temperature": 0.8
  166. }
  167. }
  168. }
  169. ```
  170. Temperature 값은 일반적으로 0.0~1.0 범위를 사용합니다.
  171. - **0.0-0.2**: 매우 집중되고 결정적인 응답, 코드 분석/계획에 적합
  172. - **0.3-0.5**: 적당한 창의성이 섞인 균형형 응답, 일반 개발 작업에 적합
  173. - **0.6-1.0**: 더 창의적이고 다양한 응답, 브레인스토밍/탐색에 유용
  174. ```json title="opencode.json"
  175. {
  176. "agent": {
  177. "analyze": {
  178. "temperature": 0.1,
  179. "prompt": "{file:./prompts/analysis.txt}"
  180. },
  181. "build": {
  182. "temperature": 0.3
  183. },
  184. "brainstorm": {
  185. "temperature": 0.7,
  186. "prompt": "{file:./prompts/creative.txt}"
  187. }
  188. }
  189. }
  190. ```
  191. temperature를 지정하지 않으면 OpenCode는 model별 기본값을 사용합니다. 일반적으로 대부분의 model은 0, Qwen model은 0.55를 사용합니다.
  192. ---
  193. ### Max steps
  194. agent가 텍스트 응답만 하도록 강제되기 전까지 수행할 수 있는 agentic iteration의 최대 횟수를 제어합니다. 비용을 관리하려는 사용자에게 agentic action 제한을 제공하기 위한 옵션입니다.
  195. 이 값을 설정하지 않으면 model이 중단을 선택하거나 사용자가 세션을 중단할 때까지 agent는 계속 반복합니다.
  196. ```json title="opencode.json"
  197. {
  198. "agent": {
  199. "quick-thinker": {
  200. "description": "Fast reasoning with limited iterations",
  201. "prompt": "You are a quick thinker. Solve problems with minimal steps.",
  202. "steps": 5
  203. }
  204. }
  205. }
  206. ```
  207. 제한에 도달하면 agent는 작업 요약과 남은 권장 작업을 응답하도록 지시하는 특수 시스템 prompt를 받습니다.
  208. :::caution
  209. 레거시 `maxSteps` 필드는 deprecated입니다. 대신 `steps`를 사용하세요.
  210. :::
  211. ---
  212. ### Disable
  213. `true`로 설정하면 agent를 비활성화합니다.
  214. ```json title="opencode.json"
  215. {
  216. "agent": {
  217. "review": {
  218. "disable": true
  219. }
  220. }
  221. }
  222. ```
  223. ---
  224. ### Prompt
  225. `prompt` config로 해당 agent의 custom 시스템 prompt 파일을 지정합니다. prompt 파일에는 agent 목적에 맞는 지시사항을 작성하세요.
  226. ```json title="opencode.json"
  227. {
  228. "agent": {
  229. "review": {
  230. "prompt": "{file:./prompts/code-review.txt}"
  231. }
  232. }
  233. }
  234. ```
  235. 이 경로는 config 파일 위치 기준의 상대 경로입니다. 따라서 전역 OpenCode config와 프로젝트별 config 모두에서 동일하게 동작합니다.
  236. ---
  237. ### Model
  238. `model` config로 해당 agent의 model을 override할 수 있습니다. 작업 특성에 맞춰 model을 달리 쓸 때 유용합니다. 예를 들어 계획에는 더 빠른 model, 구현에는 더 강력한 model을 사용할 수 있습니다.
  239. :::tip
  240. model을 지정하지 않으면 primary agent는 [전역으로 설정한 model](/docs/config#models)을 사용하고, subagent는 해당 subagent를 호출한 primary agent의 model을 사용합니다.
  241. :::
  242. ```json title="opencode.json"
  243. {
  244. "agent": {
  245. "plan": {
  246. "model": "anthropic/claude-haiku-4-20250514"
  247. }
  248. }
  249. }
  250. ```
  251. OpenCode config의 model ID는 `provider/model-id` 형식을 사용합니다. 예를 들어 [OpenCode Zen](/docs/zen)을 사용한다면 GPT 5.1 Codex에 `opencode/gpt-5.1-codex`를 사용합니다.
  252. ---
  253. ### Tools
  254. `tools` config로 agent에서 사용할 tool을 제어합니다. 각 tool을 `true` 또는 `false`로 설정해 활성화/비활성화할 수 있습니다.
  255. ```json title="opencode.json" {3-6,9-12}
  256. {
  257. "$schema": "https://opencode.ai/config.json",
  258. "tools": {
  259. "write": true,
  260. "bash": true
  261. },
  262. "agent": {
  263. "plan": {
  264. "tools": {
  265. "write": false,
  266. "bash": false
  267. }
  268. }
  269. }
  270. }
  271. ```
  272. :::note
  273. agent별 config는 전역 config를 override합니다.
  274. :::
  275. 와일드카드를 사용하면 여러 tool을 한 번에 제어할 수 있습니다. 예를 들어 MCP 서버의 모든 tool을 비활성화하려면 다음과 같이 설정합니다.
  276. ```json title="opencode.json"
  277. {
  278. "$schema": "https://opencode.ai/config.json",
  279. "agent": {
  280. "readonly": {
  281. "tools": {
  282. "mymcp_*": false,
  283. "write": false,
  284. "edit": false
  285. }
  286. }
  287. }
  288. }
  289. ```
  290. [tool에 대해 더 알아보기](/docs/tools).
  291. ---
  292. ### Permissions
  293. permission을 설정해 agent가 수행할 수 있는 action을 제어할 수 있습니다. 현재 `edit`, `bash`, `webfetch` tool의 permission은 다음 값으로 설정할 수 있습니다.
  294. - `"ask"` — tool 실행 전에 승인 요청
  295. - `"allow"` — 승인 없이 모든 작업 허용
  296. - `"deny"` — tool 비활성화
  297. ```json title="opencode.json"
  298. {
  299. "$schema": "https://opencode.ai/config.json",
  300. "permission": {
  301. "edit": "deny"
  302. }
  303. }
  304. ```
  305. 이 permission은 agent별로 override할 수 있습니다.
  306. ```json title="opencode.json" {3-5,8-10}
  307. {
  308. "$schema": "https://opencode.ai/config.json",
  309. "permission": {
  310. "edit": "deny"
  311. },
  312. "agent": {
  313. "build": {
  314. "permission": {
  315. "edit": "ask"
  316. }
  317. }
  318. }
  319. }
  320. ```
  321. Markdown agent에서도 permission을 설정할 수 있습니다.
  322. ```markdown title="~/.config/opencode/agents/review.md"
  323. ---
  324. description: Code review without edits
  325. mode: subagent
  326. permission:
  327. edit: deny
  328. bash:
  329. "*": ask
  330. "git diff": allow
  331. "git log*": allow
  332. "grep *": allow
  333. webfetch: deny
  334. ---
  335. Only analyze code and suggest changes.
  336. ```
  337. 특정 bash 명령에 대해서도 permission을 설정할 수 있습니다.
  338. ```json title="opencode.json" {7}
  339. {
  340. "$schema": "https://opencode.ai/config.json",
  341. "agent": {
  342. "build": {
  343. "permission": {
  344. "bash": {
  345. "git push": "ask",
  346. "grep *": "allow"
  347. }
  348. }
  349. }
  350. }
  351. }
  352. ```
  353. 여기에는 glob 패턴을 사용할 수 있습니다.
  354. ```json title="opencode.json" {7}
  355. {
  356. "$schema": "https://opencode.ai/config.json",
  357. "agent": {
  358. "build": {
  359. "permission": {
  360. "bash": {
  361. "git *": "ask"
  362. }
  363. }
  364. }
  365. }
  366. }
  367. ```
  368. 또한 `*` 와일드카드로 모든 명령의 permission을 제어할 수 있습니다.
  369. 마지막으로 일치한 규칙이 우선하므로 `*` 와일드카드를 먼저 두고, 구체적인 규칙을 뒤에 두세요.
  370. ```json title="opencode.json" {8}
  371. {
  372. "$schema": "https://opencode.ai/config.json",
  373. "agent": {
  374. "build": {
  375. "permission": {
  376. "bash": {
  377. "*": "ask",
  378. "git status *": "allow"
  379. }
  380. }
  381. }
  382. }
  383. }
  384. ```
  385. [permission에 대해 더 알아보기](/docs/permissions).
  386. ---
  387. ### Mode
  388. `mode` config로 agent 모드를 제어합니다. `mode` 옵션은 agent를 어떤 방식으로 사용할지 결정합니다.
  389. ```json title="opencode.json"
  390. {
  391. "agent": {
  392. "review": {
  393. "mode": "subagent"
  394. }
  395. }
  396. }
  397. ```
  398. `mode`는 `primary`, `subagent`, `all` 중 하나로 설정할 수 있습니다. 설정하지 않으면 기본값은 `all`입니다.
  399. ---
  400. ### Hidden
  401. `hidden: true`를 설정하면 `@` 자동완성 메뉴에서 subagent를 숨길 수 있습니다. 다른 agent가 Task tool을 통해 programmatic으로만 호출해야 하는 내부 subagent에 유용합니다.
  402. ```json title="opencode.json"
  403. {
  404. "agent": {
  405. "internal-helper": {
  406. "mode": "subagent",
  407. "hidden": true
  408. }
  409. }
  410. }
  411. ```
  412. 이 설정은 자동완성 메뉴에서의 사용자 가시성에만 영향을 줍니다. permission이 허용되면 hidden agent도 모델이 Task tool을 통해 호출할 수 있습니다.
  413. :::note
  414. `mode: subagent` agent에만 적용됩니다.
  415. :::
  416. ---
  417. ### Task permissions
  418. `permission.task`로 Task tool을 통해 해당 agent가 호출할 수 있는 subagent 범위를 제어합니다. 유연한 매칭을 위해 glob 패턴을 사용합니다.
  419. ```json title="opencode.json"
  420. {
  421. "agent": {
  422. "orchestrator": {
  423. "mode": "primary",
  424. "permission": {
  425. "task": {
  426. "*": "deny",
  427. "orchestrator-*": "allow",
  428. "code-reviewer": "ask"
  429. }
  430. }
  431. }
  432. }
  433. }
  434. ```
  435. `deny`로 설정되면 해당 subagent는 Task tool 설명에서 완전히 제거되므로 모델이 호출을 시도하지 않습니다.
  436. :::tip
  437. 규칙은 선언 순서대로 평가되며, **마지막으로 일치한 규칙이 승리합니다**. 위 예시에서 `orchestrator-planner`는 `*`(deny)와 `orchestrator-*`(allow) 모두에 일치하지만, `orchestrator-*`가 뒤에 있으므로 결과는 `allow`입니다.
  438. :::
  439. :::tip
  440. 사용자는 agent의 task permission이 deny여도 `@` 자동완성 메뉴를 통해 어떤 subagent든 직접 호출할 수 있습니다.
  441. :::
  442. ---
  443. ### Color
  444. `color` 옵션으로 UI에서 agent의 시각 스타일을 지정할 수 있습니다. 인터페이스에서 agent가 표시되는 방식에 영향을 줍니다.
  445. 유효한 hex 색상(예: `#FF5733`) 또는 theme 색상(`primary`, `secondary`, `accent`, `success`, `warning`, `error`, `info`)을 사용하세요.
  446. ```json title="opencode.json"
  447. {
  448. "agent": {
  449. "creative": {
  450. "color": "#ff6b6b"
  451. },
  452. "code-reviewer": {
  453. "color": "accent"
  454. }
  455. }
  456. }
  457. ```
  458. ---
  459. ### Top P
  460. `top_p` 옵션으로 응답 다양성을 제어합니다. 무작위성을 제어하는 Temperature의 대안입니다.
  461. ```json title="opencode.json"
  462. {
  463. "agent": {
  464. "brainstorm": {
  465. "top_p": 0.9
  466. }
  467. }
  468. }
  469. ```
  470. 값 범위는 0.0~1.0입니다. 값이 낮을수록 집중되고, 높을수록 다양해집니다.
  471. ---
  472. ### Additional
  473. agent config에 지정한 나머지 옵션은 모델 옵션으로 provider에 **그대로 전달(pass through)** 됩니다. 이를 통해 provider별 기능과 파라미터를 활용할 수 있습니다.
  474. 예를 들어 OpenAI reasoning model에서는 reasoning effort를 제어할 수 있습니다.
  475. ```json title="opencode.json" {6,7}
  476. {
  477. "agent": {
  478. "deep-thinker": {
  479. "description": "Agent that uses high reasoning effort for complex problems",
  480. "model": "openai/gpt-5",
  481. "reasoningEffort": "high",
  482. "textVerbosity": "low"
  483. }
  484. }
  485. }
  486. ```
  487. 이 추가 옵션은 model 및 provider마다 다릅니다. 사용 가능한 파라미터는 provider 문서를 확인하세요.
  488. :::tip
  489. 사용 가능한 model 목록은 `opencode models` 명령으로 확인할 수 있습니다.
  490. :::
  491. ---
  492. ## 에이전트 생성
  493. 아래 명령으로 새 agent를 만들 수 있습니다.
  494. ```bash
  495. opencode agent create
  496. ```
  497. 이 인터랙티브 명령은 다음을 수행합니다.
  498. 1. agent 저장 위치를 묻습니다(전역/프로젝트).
  499. 2. agent가 수행할 작업의 설명을 받습니다.
  500. 3. 적절한 시스템 prompt와 식별자를 생성합니다.
  501. 4. agent가 접근할 tool을 선택하게 합니다.
  502. 5. 마지막으로 agent config가 담긴 Markdown 파일을 생성합니다.
  503. ---
  504. ## 사용 사례
  505. 서로 다른 agent의 대표적인 사용 사례는 다음과 같습니다.
  506. - **Build agent**: 모든 tool을 활성화한 전체 개발 작업
  507. - **Plan agent**: 코드 변경 없이 분석과 계획 수행
  508. - **Review agent**: 읽기 전용 접근 + 문서화 tool 기반 코드 리뷰
  509. - **Debug agent**: bash/read tool 중심의 조사 작업
  510. - **Docs agent**: 파일 작업은 가능하지만 시스템 명령은 없는 문서 작성 작업
  511. ---
  512. ## 예시
  513. 실제로 유용하게 쓸 수 있는 예시 agent를 소개합니다.
  514. :::tip
  515. 공유하고 싶은 agent가 있나요? [PR 제출하기](https://github.com/anomalyco/opencode).
  516. :::
  517. ---
  518. ### Documentation agent
  519. ```markdown title="~/.config/opencode/agents/docs-writer.md"
  520. ---
  521. description: Writes and maintains project documentation
  522. mode: subagent
  523. tools:
  524. bash: false
  525. ---
  526. You are a technical writer. Create clear, comprehensive documentation.
  527. Focus on:
  528. - Clear explanations
  529. - Proper structure
  530. - Code examples
  531. - User-friendly language
  532. ```
  533. ---
  534. ### Security auditor
  535. ```markdown title="~/.config/opencode/agents/security-auditor.md"
  536. ---
  537. description: Performs security audits and identifies vulnerabilities
  538. mode: subagent
  539. tools:
  540. write: false
  541. edit: false
  542. ---
  543. You are a security expert. Focus on identifying potential security issues.
  544. Look for:
  545. - Input validation vulnerabilities
  546. - Authentication and authorization flaws
  547. - Data exposure risks
  548. - Dependency vulnerabilities
  549. - Configuration security issues
  550. ```