0xkobold 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/.agents/skills/nextjs-best-practices/SKILL.md +208 -0
  2. package/.agents/skills/sql-optimization-patterns/SKILL.md +509 -0
  3. package/HEARTBEAT.md +45 -0
  4. package/README.md +197 -0
  5. package/USAGE.md +191 -0
  6. package/dist/package.json +77 -0
  7. package/dist/src/agent/pi-adapter.js +307 -0
  8. package/dist/src/agent/pi-adapter.js.map +1 -0
  9. package/dist/src/agent/tool-adapter.js +86 -0
  10. package/dist/src/agent/tool-adapter.js.map +1 -0
  11. package/dist/src/approval/queue.js +114 -0
  12. package/dist/src/approval/queue.js.map +1 -0
  13. package/dist/src/ascii-kobold.js +76 -0
  14. package/dist/src/ascii-kobold.js.map +1 -0
  15. package/dist/src/cli/client.js +217 -0
  16. package/dist/src/cli/client.js.map +1 -0
  17. package/dist/src/cli/commands/agent.js +272 -0
  18. package/dist/src/cli/commands/agent.js.map +1 -0
  19. package/dist/src/cli/commands/chat.js +234 -0
  20. package/dist/src/cli/commands/chat.js.map +1 -0
  21. package/dist/src/cli/commands/config.js +202 -0
  22. package/dist/src/cli/commands/config.js.map +1 -0
  23. package/dist/src/cli/commands/daemon.js +203 -0
  24. package/dist/src/cli/commands/daemon.js.map +1 -0
  25. package/dist/src/cli/commands/gateway.js +184 -0
  26. package/dist/src/cli/commands/gateway.js.map +1 -0
  27. package/dist/src/cli/commands/init.js +175 -0
  28. package/dist/src/cli/commands/init.js.map +1 -0
  29. package/dist/src/cli/commands/kobold.js +21 -0
  30. package/dist/src/cli/commands/kobold.js.map +1 -0
  31. package/dist/src/cli/commands/logs.js +27 -0
  32. package/dist/src/cli/commands/logs.js.map +1 -0
  33. package/dist/src/cli/commands/mode.js +121 -0
  34. package/dist/src/cli/commands/mode.js.map +1 -0
  35. package/dist/src/cli/commands/persona.js +261 -0
  36. package/dist/src/cli/commands/persona.js.map +1 -0
  37. package/dist/src/cli/commands/start.js +66 -0
  38. package/dist/src/cli/commands/start.js.map +1 -0
  39. package/dist/src/cli/commands/status.js +117 -0
  40. package/dist/src/cli/commands/status.js.map +1 -0
  41. package/dist/src/cli/commands/stop.js +27 -0
  42. package/dist/src/cli/commands/stop.js.map +1 -0
  43. package/dist/src/cli/commands/system.js +128 -0
  44. package/dist/src/cli/commands/system.js.map +1 -0
  45. package/dist/src/cli/commands/tui.js +103 -0
  46. package/dist/src/cli/commands/tui.js.map +1 -0
  47. package/dist/src/cli/commands/update.js +133 -0
  48. package/dist/src/cli/commands/update.js.map +1 -0
  49. package/dist/src/cli/extensions/discord.js +113 -0
  50. package/dist/src/cli/extensions/discord.js.map +1 -0
  51. package/dist/src/cli/extensions/env.js +91 -0
  52. package/dist/src/cli/extensions/env.js.map +1 -0
  53. package/dist/src/cli/extensions/heartbeat.js +78 -0
  54. package/dist/src/cli/extensions/heartbeat.js.map +1 -0
  55. package/dist/src/cli/index.js +24 -0
  56. package/dist/src/cli/index.js.map +1 -0
  57. package/dist/src/cli/program.js +70 -0
  58. package/dist/src/cli/program.js.map +1 -0
  59. package/dist/src/cli/repl.js +184 -0
  60. package/dist/src/cli/repl.js.map +1 -0
  61. package/dist/src/cli/shared/discord-service.js +102 -0
  62. package/dist/src/cli/shared/discord-service.js.map +1 -0
  63. package/dist/src/config/index.js +10 -0
  64. package/dist/src/config/index.js.map +1 -0
  65. package/dist/src/config/loader.js +401 -0
  66. package/dist/src/config/loader.js.map +1 -0
  67. package/dist/src/config/paths.js +84 -0
  68. package/dist/src/config/paths.js.map +1 -0
  69. package/dist/src/config/types.js +8 -0
  70. package/dist/src/config/types.js.map +1 -0
  71. package/dist/src/context-detector.js +60 -0
  72. package/dist/src/context-detector.js.map +1 -0
  73. package/dist/src/discord/index.js +376 -0
  74. package/dist/src/discord/index.js.map +1 -0
  75. package/dist/src/event-bus/index.js +97 -0
  76. package/dist/src/event-bus/index.js.map +1 -0
  77. package/dist/src/extensions/command-args.js +68 -0
  78. package/dist/src/extensions/command-args.js.map +1 -0
  79. package/dist/src/extensions/core/agent-registry-extension.js +541 -0
  80. package/dist/src/extensions/core/agent-registry-extension.js.map +1 -0
  81. package/dist/src/extensions/core/agent-worker.js +148 -0
  82. package/dist/src/extensions/core/agent-worker.js.map +1 -0
  83. package/dist/src/extensions/core/compaction-safeguard.js +154 -0
  84. package/dist/src/extensions/core/compaction-safeguard.js.map +1 -0
  85. package/dist/src/extensions/core/confirm-destructive.js +43 -0
  86. package/dist/src/extensions/core/confirm-destructive.js.map +1 -0
  87. package/dist/src/extensions/core/context-aware-extension.js +124 -0
  88. package/dist/src/extensions/core/context-aware-extension.js.map +1 -0
  89. package/dist/src/extensions/core/context-pruning/extension.js +124 -0
  90. package/dist/src/extensions/core/context-pruning/extension.js.map +1 -0
  91. package/dist/src/extensions/core/context-pruning/pruner.js +312 -0
  92. package/dist/src/extensions/core/context-pruning/pruner.js.map +1 -0
  93. package/dist/src/extensions/core/context-pruning/runtime.js +48 -0
  94. package/dist/src/extensions/core/context-pruning/runtime.js.map +1 -0
  95. package/dist/src/extensions/core/context-pruning/settings.js +105 -0
  96. package/dist/src/extensions/core/context-pruning/settings.js.map +1 -0
  97. package/dist/src/extensions/core/dirty-repo-guard.js +42 -0
  98. package/dist/src/extensions/core/dirty-repo-guard.js.map +1 -0
  99. package/dist/src/extensions/core/discord-channel-extension.js +205 -0
  100. package/dist/src/extensions/core/discord-channel-extension.js.map +1 -0
  101. package/dist/src/extensions/core/discord-extension.js +142 -0
  102. package/dist/src/extensions/core/discord-extension.js.map +1 -0
  103. package/dist/src/extensions/core/env-loader-extension.js +157 -0
  104. package/dist/src/extensions/core/env-loader-extension.js.map +1 -0
  105. package/dist/src/extensions/core/fileops-extension.js +699 -0
  106. package/dist/src/extensions/core/fileops-extension.js.map +1 -0
  107. package/dist/src/extensions/core/gateway-extension.js +730 -0
  108. package/dist/src/extensions/core/gateway-extension.js.map +1 -0
  109. package/dist/src/extensions/core/git-checkpoint.js +46 -0
  110. package/dist/src/extensions/core/git-checkpoint.js.map +1 -0
  111. package/dist/src/extensions/core/handoff-extension.js +206 -0
  112. package/dist/src/extensions/core/handoff-extension.js.map +1 -0
  113. package/dist/src/extensions/core/heartbeat-extension.js +373 -0
  114. package/dist/src/extensions/core/heartbeat-extension.js.map +1 -0
  115. package/dist/src/extensions/core/mcp-extension.js +413 -0
  116. package/dist/src/extensions/core/mcp-extension.js.map +1 -0
  117. package/dist/src/extensions/core/mode-manager-extension.js +562 -0
  118. package/dist/src/extensions/core/mode-manager-extension.js.map +1 -0
  119. package/dist/src/extensions/core/multi-channel-extension.js +435 -0
  120. package/dist/src/extensions/core/multi-channel-extension.js.map +1 -0
  121. package/dist/src/extensions/core/ollama-provider-extension.js +66 -0
  122. package/dist/src/extensions/core/ollama-provider-extension.js.map +1 -0
  123. package/dist/src/extensions/core/onboarding-extension.js +122 -0
  124. package/dist/src/extensions/core/onboarding-extension.js.map +1 -0
  125. package/dist/src/extensions/core/persona-loader-extension.js +139 -0
  126. package/dist/src/extensions/core/persona-loader-extension.js.map +1 -0
  127. package/dist/src/extensions/core/pi-notify-extension.js +70 -0
  128. package/dist/src/extensions/core/pi-notify-extension.js.map +1 -0
  129. package/dist/src/extensions/core/protected-paths.js +24 -0
  130. package/dist/src/extensions/core/protected-paths.js.map +1 -0
  131. package/dist/src/extensions/core/questionnaire-extension.js +242 -0
  132. package/dist/src/extensions/core/questionnaire-extension.js.map +1 -0
  133. package/dist/src/extensions/core/self-update-extension.js +181 -0
  134. package/dist/src/extensions/core/self-update-extension.js.map +1 -0
  135. package/dist/src/extensions/core/session-bridge-extension.js +78 -0
  136. package/dist/src/extensions/core/session-bridge-extension.js.map +1 -0
  137. package/dist/src/extensions/core/session-manager-extension.js +319 -0
  138. package/dist/src/extensions/core/session-manager-extension.js.map +1 -0
  139. package/dist/src/extensions/core/session-name-extension.js +88 -0
  140. package/dist/src/extensions/core/session-name-extension.js.map +1 -0
  141. package/dist/src/extensions/core/session-pruning-extension.js +480 -0
  142. package/dist/src/extensions/core/session-pruning-extension.js.map +1 -0
  143. package/dist/src/extensions/core/task-manager-extension.js +661 -0
  144. package/dist/src/extensions/core/task-manager-extension.js.map +1 -0
  145. package/dist/src/extensions/core/update-extension.js +438 -0
  146. package/dist/src/extensions/core/update-extension.js.map +1 -0
  147. package/dist/src/extensions/core/websearch-extension.js +463 -0
  148. package/dist/src/extensions/core/websearch-extension.js.map +1 -0
  149. package/dist/src/extensions/index.js +5 -0
  150. package/dist/src/extensions/index.js.map +1 -0
  151. package/dist/src/extensions/loader.js +80 -0
  152. package/dist/src/extensions/loader.js.map +1 -0
  153. package/dist/src/gateway/index.js +353 -0
  154. package/dist/src/gateway/index.js.map +1 -0
  155. package/dist/src/index.js +150 -0
  156. package/dist/src/index.js.map +1 -0
  157. package/dist/src/llm/anthropic.js +86 -0
  158. package/dist/src/llm/anthropic.js.map +1 -0
  159. package/dist/src/llm/index.js +9 -0
  160. package/dist/src/llm/index.js.map +1 -0
  161. package/dist/src/llm/ollama.js +113 -0
  162. package/dist/src/llm/ollama.js.map +1 -0
  163. package/dist/src/llm/router.js +145 -0
  164. package/dist/src/llm/router.js.map +1 -0
  165. package/dist/src/llm/types.js +7 -0
  166. package/dist/src/llm/types.js.map +1 -0
  167. package/dist/src/memory/index.js +5 -0
  168. package/dist/src/memory/index.js.map +1 -0
  169. package/dist/src/memory/store.js +91 -0
  170. package/dist/src/memory/store.js.map +1 -0
  171. package/dist/src/pi-config.js +80 -0
  172. package/dist/src/pi-config.js.map +1 -0
  173. package/dist/src/skills/builtin/file.js +184 -0
  174. package/dist/src/skills/builtin/file.js.map +1 -0
  175. package/dist/src/skills/builtin/shell.js +100 -0
  176. package/dist/src/skills/builtin/shell.js.map +1 -0
  177. package/dist/src/skills/builtin/subagent.js +62 -0
  178. package/dist/src/skills/builtin/subagent.js.map +1 -0
  179. package/dist/src/skills/hello.js +42 -0
  180. package/dist/src/skills/hello.js.map +1 -0
  181. package/dist/src/skills/index.js +11 -0
  182. package/dist/src/skills/index.js.map +1 -0
  183. package/dist/src/skills/loader.js +382 -0
  184. package/dist/src/skills/loader.js.map +1 -0
  185. package/dist/src/skills/types.js +8 -0
  186. package/dist/src/skills/types.js.map +1 -0
  187. package/dist/src/utils/working-dir.js +71 -0
  188. package/dist/src/utils/working-dir.js.map +1 -0
  189. package/package.json +77 -0
  190. package/skills/1password/SKILL.md +70 -0
  191. package/skills/1password/references/cli-examples.md +29 -0
  192. package/skills/1password/references/get-started.md +17 -0
  193. package/skills/apple-notes/SKILL.md +77 -0
  194. package/skills/apple-reminders/SKILL.md +118 -0
  195. package/skills/bear-notes/SKILL.md +107 -0
  196. package/skills/blogwatcher/SKILL.md +69 -0
  197. package/skills/blucli/SKILL.md +47 -0
  198. package/skills/bluebubbles/SKILL.md +131 -0
  199. package/skills/camsnap/SKILL.md +45 -0
  200. package/skills/canvas/SKILL.md +198 -0
  201. package/skills/clawhub/SKILL.md +77 -0
  202. package/skills/coding-agent/SKILL.md +284 -0
  203. package/skills/discord/SKILL.md +197 -0
  204. package/skills/eightctl/SKILL.md +50 -0
  205. package/skills/food-order/SKILL.md +48 -0
  206. package/skills/gemini/SKILL.md +43 -0
  207. package/skills/gh-issues/SKILL.md +865 -0
  208. package/skills/gifgrep/SKILL.md +79 -0
  209. package/skills/github/SKILL.md +163 -0
  210. package/skills/gog/SKILL.md +116 -0
  211. package/skills/goplaces/SKILL.md +52 -0
  212. package/skills/healthcheck/SKILL.md +245 -0
  213. package/skills/himalaya/SKILL.md +257 -0
  214. package/skills/himalaya/references/configuration.md +184 -0
  215. package/skills/himalaya/references/message-composition.md +199 -0
  216. package/skills/imsg/SKILL.md +122 -0
  217. package/skills/mcporter/SKILL.md +61 -0
  218. package/skills/model-usage/SKILL.md +69 -0
  219. package/skills/model-usage/references/codexbar-cli.md +33 -0
  220. package/skills/model-usage/scripts/model_usage.py +310 -0
  221. package/skills/nano-banana-pro/SKILL.md +58 -0
  222. package/skills/nano-banana-pro/scripts/generate_image.py +184 -0
  223. package/skills/nano-pdf/SKILL.md +38 -0
  224. package/skills/notion/SKILL.md +172 -0
  225. package/skills/obsidian/SKILL.md +81 -0
  226. package/skills/openai-image-gen/SKILL.md +89 -0
  227. package/skills/openai-image-gen/scripts/gen.py +240 -0
  228. package/skills/openai-whisper/SKILL.md +38 -0
  229. package/skills/openai-whisper-api/SKILL.md +52 -0
  230. package/skills/openai-whisper-api/scripts/transcribe.sh +85 -0
  231. package/skills/openhue/SKILL.md +112 -0
  232. package/skills/oracle/SKILL.md +125 -0
  233. package/skills/ordercli/SKILL.md +78 -0
  234. package/skills/peekaboo/SKILL.md +190 -0
  235. package/skills/sag/SKILL.md +87 -0
  236. package/skills/session-logs/SKILL.md +115 -0
  237. package/skills/sherpa-onnx-tts/SKILL.md +103 -0
  238. package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +178 -0
  239. package/skills/skill-creator/SKILL.md +370 -0
  240. package/skills/skill-creator/license.txt +202 -0
  241. package/skills/skill-creator/scripts/init_skill.py +378 -0
  242. package/skills/skill-creator/scripts/package_skill.py +111 -0
  243. package/skills/skill-creator/scripts/quick_validate.py +101 -0
  244. package/skills/slack/SKILL.md +144 -0
  245. package/skills/songsee/SKILL.md +49 -0
  246. package/skills/sonoscli/SKILL.md +46 -0
  247. package/skills/spotify-player/SKILL.md +64 -0
  248. package/skills/summarize/SKILL.md +87 -0
  249. package/skills/things-mac/SKILL.md +86 -0
  250. package/skills/tmux/SKILL.md +153 -0
  251. package/skills/tmux/scripts/find-sessions.sh +112 -0
  252. package/skills/tmux/scripts/wait-for-text.sh +83 -0
  253. package/skills/trello/SKILL.md +95 -0
  254. package/skills/video-frames/SKILL.md +46 -0
  255. package/skills/video-frames/scripts/frame.sh +81 -0
  256. package/skills/voice-call/SKILL.md +45 -0
  257. package/skills/wacli/SKILL.md +72 -0
  258. package/skills/weather/SKILL.md +112 -0
@@ -0,0 +1,284 @@
1
+ ---
2
+ name: coding-agent
3
+ description: "Delegate coding tasks to Codex, Claude Code, or Pi agents via background process. Use when: (1) building/creating new features or apps, (2) reviewing PRs (spawn in temp dir), (3) refactoring large codebases, (4) iterative coding that needs file exploration. NOT for: simple one-liner fixes (just edit), reading code (use read tool), or any work in ~/clawd workspace (never spawn agents here). Requires a bash tool that supports pty:true."
4
+ metadata:
5
+ {
6
+ "kobold": { "emoji": "🧩", "requires": { "anyBins": ["claude", "codex", "opencode", "pi"] } },
7
+ }
8
+ ---
9
+
10
+ # Coding Agent (bash-first)
11
+
12
+ Use **bash** (with optional background mode) for all coding agent work. Simple and effective.
13
+
14
+ ## ⚠️ PTY Mode Required!
15
+
16
+ Coding agents (Codex, Claude Code, Pi) are **interactive terminal applications** that need a pseudo-terminal (PTY) to work correctly. Without PTY, you'll get broken output, missing colors, or the agent may hang.
17
+
18
+ **Always use `pty:true`** when running coding agents:
19
+
20
+ ```bash
21
+ # ✅ Correct - with PTY
22
+ bash pty:true command:"codex exec 'Your prompt'"
23
+
24
+ # ❌ Wrong - no PTY, agent may break
25
+ bash command:"codex exec 'Your prompt'"
26
+ ```
27
+
28
+ ### Bash Tool Parameters
29
+
30
+ | Parameter | Type | Description |
31
+ | ------------ | ------- | --------------------------------------------------------------------------- |
32
+ | `command` | string | The shell command to run |
33
+ | `pty` | boolean | **Use for coding agents!** Allocates a pseudo-terminal for interactive CLIs |
34
+ | `workdir` | string | Working directory (agent sees only this folder's context) |
35
+ | `background` | boolean | Run in background, returns sessionId for monitoring |
36
+ | `timeout` | number | Timeout in seconds (kills process on expiry) |
37
+ | `elevated` | boolean | Run on host instead of sandbox (if allowed) |
38
+
39
+ ### Process Tool Actions (for background sessions)
40
+
41
+ | Action | Description |
42
+ | ----------- | ---------------------------------------------------- |
43
+ | `list` | List all running/recent sessions |
44
+ | `poll` | Check if session is still running |
45
+ | `log` | Get session output (with optional offset/limit) |
46
+ | `write` | Send raw data to stdin |
47
+ | `submit` | Send data + newline (like typing and pressing Enter) |
48
+ | `send-keys` | Send key tokens or hex bytes |
49
+ | `paste` | Paste text (with optional bracketed mode) |
50
+ | `kill` | Terminate the session |
51
+
52
+ ---
53
+
54
+ ## Quick Start: One-Shot Tasks
55
+
56
+ For quick prompts/chats, create a temp git repo and run:
57
+
58
+ ```bash
59
+ # Quick chat (Codex needs a git repo!)
60
+ SCRATCH=$(mktemp -d) && cd $SCRATCH && git init && codex exec "Your prompt here"
61
+
62
+ # Or in a real project - with PTY!
63
+ bash pty:true workdir:~/Projects/myproject command:"codex exec 'Add error handling to the API calls'"
64
+ ```
65
+
66
+ **Why git init?** Codex refuses to run outside a trusted git directory. Creating a temp repo solves this for scratch work.
67
+
68
+ ---
69
+
70
+ ## The Pattern: workdir + background + pty
71
+
72
+ For longer tasks, use background mode with PTY:
73
+
74
+ ```bash
75
+ # Start agent in target directory (with PTY!)
76
+ bash pty:true workdir:~/project background:true command:"codex exec --full-auto 'Build a snake game'"
77
+ # Returns sessionId for tracking
78
+
79
+ # Monitor progress
80
+ process action:log sessionId:XXX
81
+
82
+ # Check if done
83
+ process action:poll sessionId:XXX
84
+
85
+ # Send input (if agent asks a question)
86
+ process action:write sessionId:XXX data:"y"
87
+
88
+ # Submit with Enter (like typing "yes" and pressing Enter)
89
+ process action:submit sessionId:XXX data:"yes"
90
+
91
+ # Kill if needed
92
+ process action:kill sessionId:XXX
93
+ ```
94
+
95
+ **Why workdir matters:** Agent wakes up in a focused directory, doesn't wander off reading unrelated files (like your soul.md 😅).
96
+
97
+ ---
98
+
99
+ ## Codex CLI
100
+
101
+ **Model:** `gpt-5.2-codex` is the default (set in ~/.codex/config.toml)
102
+
103
+ ### Flags
104
+
105
+ | Flag | Effect |
106
+ | --------------- | -------------------------------------------------- |
107
+ | `exec "prompt"` | One-shot execution, exits when done |
108
+ | `--full-auto` | Sandboxed but auto-approves in workspace |
109
+ | `--yolo` | NO sandbox, NO approvals (fastest, most dangerous) |
110
+
111
+ ### Building/Creating
112
+
113
+ ```bash
114
+ # Quick one-shot (auto-approves) - remember PTY!
115
+ bash pty:true workdir:~/project command:"codex exec --full-auto 'Build a dark mode toggle'"
116
+
117
+ # Background for longer work
118
+ bash pty:true workdir:~/project background:true command:"codex --yolo 'Refactor the auth module'"
119
+ ```
120
+
121
+ ### Reviewing PRs
122
+
123
+ **⚠️ CRITICAL: Never review PRs in Kobold's own project folder!**
124
+ Clone to temp folder or use git worktree.
125
+
126
+ ```bash
127
+ # Clone to temp for safe review
128
+ REVIEW_DIR=$(mktemp -d)
129
+ git clone https://github.com/user/repo.git $REVIEW_DIR
130
+ cd $REVIEW_DIR && gh pr checkout 130
131
+ bash pty:true workdir:$REVIEW_DIR command:"codex review --base origin/main"
132
+ # Clean up after: trash $REVIEW_DIR
133
+
134
+ # Or use git worktree (keeps main intact)
135
+ git worktree add /tmp/pr-130-review pr-130-branch
136
+ bash pty:true workdir:/tmp/pr-130-review command:"codex review --base main"
137
+ ```
138
+
139
+ ### Batch PR Reviews (parallel army!)
140
+
141
+ ```bash
142
+ # Fetch all PR refs first
143
+ git fetch origin '+refs/pull/*/head:refs/remotes/origin/pr/*'
144
+
145
+ # Deploy the army - one Codex per PR (all with PTY!)
146
+ bash pty:true workdir:~/project background:true command:"codex exec 'Review PR #86. git diff origin/main...origin/pr/86'"
147
+ bash pty:true workdir:~/project background:true command:"codex exec 'Review PR #87. git diff origin/main...origin/pr/87'"
148
+
149
+ # Monitor all
150
+ process action:list
151
+
152
+ # Post results to GitHub
153
+ gh pr comment <PR#> --body "<review content>"
154
+ ```
155
+
156
+ ---
157
+
158
+ ## Claude Code
159
+
160
+ ```bash
161
+ # With PTY for proper terminal output
162
+ bash pty:true workdir:~/project command:"claude 'Your task'"
163
+
164
+ # Background
165
+ bash pty:true workdir:~/project background:true command:"claude 'Your task'"
166
+ ```
167
+
168
+ ---
169
+
170
+ ## OpenCode
171
+
172
+ ```bash
173
+ bash pty:true workdir:~/project command:"opencode run 'Your task'"
174
+ ```
175
+
176
+ ---
177
+
178
+ ## Pi Coding Agent
179
+
180
+ ```bash
181
+ # Install: npm install -g @mariozechner/pi-coding-agent
182
+ bash pty:true workdir:~/project command:"pi 'Your task'"
183
+
184
+ # Non-interactive mode (PTY still recommended)
185
+ bash pty:true command:"pi -p 'Summarize src/'"
186
+
187
+ # Different provider/model
188
+ bash pty:true command:"pi --provider openai --model gpt-4o-mini -p 'Your task'"
189
+ ```
190
+
191
+ **Note:** Pi now has Anthropic prompt caching enabled (PR #584, merged Jan 2026)!
192
+
193
+ ---
194
+
195
+ ## Parallel Issue Fixing with git worktrees
196
+
197
+ For fixing multiple issues in parallel, use git worktrees:
198
+
199
+ ```bash
200
+ # 1. Create worktrees for each issue
201
+ git worktree add -b fix/issue-78 /tmp/issue-78 main
202
+ git worktree add -b fix/issue-99 /tmp/issue-99 main
203
+
204
+ # 2. Launch Codex in each (background + PTY!)
205
+ bash pty:true workdir:/tmp/issue-78 background:true command:"pnpm install && codex --yolo 'Fix issue #78: <description>. Commit and push.'"
206
+ bash pty:true workdir:/tmp/issue-99 background:true command:"pnpm install && codex --yolo 'Fix issue #99 from the approved ticket summary. Implement only the in-scope edits and commit after review.'"
207
+
208
+ # 3. Monitor progress
209
+ process action:list
210
+ process action:log sessionId:XXX
211
+
212
+ # 4. Create PRs after fixes
213
+ cd /tmp/issue-78 && git push -u origin fix/issue-78
214
+ gh pr create --repo user/repo --head fix/issue-78 --title "fix: ..." --body "..."
215
+
216
+ # 5. Cleanup
217
+ git worktree remove /tmp/issue-78
218
+ git worktree remove /tmp/issue-99
219
+ ```
220
+
221
+ ---
222
+
223
+ ## ⚠️ Rules
224
+
225
+ 1. **Always use pty:true** - coding agents need a terminal!
226
+ 2. **Respect tool choice** - if user asks for Codex, use Codex.
227
+ - Orchestrator mode: do NOT hand-code patches yourself.
228
+ - If an agent fails/hangs, respawn it or ask the user for direction, but don't silently take over.
229
+ 3. **Be patient** - don't kill sessions because they're "slow"
230
+ 4. **Monitor with process:log** - check progress without interfering
231
+ 5. **--full-auto for building** - auto-approves changes
232
+ 6. **vanilla for reviewing** - no special flags needed
233
+ 7. **Parallel is OK** - run many Codex processes at once for batch work
234
+ 8. **NEVER start Codex in ~/clawd/** - it'll read your soul docs and get weird ideas about the org chart!
235
+ 9. **NEVER checkout branches in ~/Projects/kobold/** - that's the LIVE Kobold instance!
236
+
237
+ ---
238
+
239
+ ## Progress Updates (Critical)
240
+
241
+ When you spawn coding agents in the background, keep the user in the loop.
242
+
243
+ - Send 1 short message when you start (what's running + where).
244
+ - Then only update again when something changes:
245
+ - a milestone completes (build finished, tests passed)
246
+ - the agent asks a question / needs input
247
+ - you hit an error or need user action
248
+ - the agent finishes (include what changed + where)
249
+ - If you kill a session, immediately say you killed it and why.
250
+
251
+ This prevents the user from seeing only "Agent failed before reply" and having no idea what happened.
252
+
253
+ ---
254
+
255
+ ## Auto-Notify on Completion
256
+
257
+ For long-running background tasks, append a wake trigger to your prompt so Kobold gets notified immediately when the agent finishes (instead of waiting for the next heartbeat):
258
+
259
+ ```
260
+ ... your task here.
261
+
262
+ When completely finished, run this command to notify me:
263
+ kobold system event --text "Done: [brief summary of what was built]" --mode now
264
+ ```
265
+
266
+ **Example:**
267
+
268
+ ```bash
269
+ bash pty:true workdir:~/project background:true command:"codex --yolo exec 'Build a REST API for todos.
270
+
271
+ When completely finished, run: kobold system event --text \"Done: Built todos REST API with CRUD endpoints\" --mode now'"
272
+ ```
273
+
274
+ This triggers an immediate wake event — Skippy gets pinged in seconds, not 10 minutes.
275
+
276
+ ---
277
+
278
+ ## Learnings (Jan 2026)
279
+
280
+ - **PTY is essential:** Coding agents are interactive terminal apps. Without `pty:true`, output breaks or agent hangs.
281
+ - **Git repo required:** Codex won't run outside a git directory. Use `mktemp -d && git init` for scratch work.
282
+ - **exec is your friend:** `codex exec "prompt"` runs and exits cleanly - perfect for one-shots.
283
+ - **submit vs write:** Use `submit` to send input + Enter, `write` for raw data without newline.
284
+ - **Sass works:** Codex responds well to playful prompts. Asked it to write a haiku about being second fiddle to a space lobster, got: _"Second chair, I code / Space lobster sets the tempo / Keys glow, I follow"_ 🦞
@@ -0,0 +1,197 @@
1
+ ---
2
+ name: discord
3
+ description: "Discord ops via the message tool (channel=discord)."
4
+ metadata: { "kobold": { "emoji": "🎮", "requires": { "config": ["channels.discord.token"] } } }
5
+ allowed-tools: ["message"]
6
+ ---
7
+
8
+ # Discord (Via `message`)
9
+
10
+ Use the `message` tool. No provider-specific `discord` tool exposed to the agent.
11
+
12
+ ## Musts
13
+
14
+ - Always: `channel: "discord"`.
15
+ - Respect gating: `channels.discord.actions.*` (some default off: `roles`, `moderation`, `presence`, `channels`).
16
+ - Prefer explicit ids: `guildId`, `channelId`, `messageId`, `userId`.
17
+ - Multi-account: optional `accountId`.
18
+
19
+ ## Guidelines
20
+
21
+ - Avoid Markdown tables in outbound Discord messages.
22
+ - Mention users as `<@USER_ID>`.
23
+ - Prefer Discord components v2 (`components`) for rich UI; use legacy `embeds` only when you must.
24
+
25
+ ## Targets
26
+
27
+ - Send-like actions: `to: "channel:<id>"` or `to: "user:<id>"`.
28
+ - Message-specific actions: `channelId: "<id>"` (or `to`) + `messageId: "<id>"`.
29
+
30
+ ## Common Actions (Examples)
31
+
32
+ Send message:
33
+
34
+ ```json
35
+ {
36
+ "action": "send",
37
+ "channel": "discord",
38
+ "to": "channel:123",
39
+ "message": "hello",
40
+ "silent": true
41
+ }
42
+ ```
43
+
44
+ Send with media:
45
+
46
+ ```json
47
+ {
48
+ "action": "send",
49
+ "channel": "discord",
50
+ "to": "channel:123",
51
+ "message": "see attachment",
52
+ "media": "file:///tmp/example.png"
53
+ }
54
+ ```
55
+
56
+ - Optional `silent: true` to suppress Discord notifications.
57
+
58
+ Send with components v2 (recommended for rich UI):
59
+
60
+ ```json
61
+ {
62
+ "action": "send",
63
+ "channel": "discord",
64
+ "to": "channel:123",
65
+ "message": "Status update",
66
+ "components": "[Carbon v2 components]"
67
+ }
68
+ ```
69
+
70
+ - `components` expects Carbon component instances (Container, TextDisplay, etc.) from JS/TS integrations.
71
+ - Do not combine `components` with `embeds` (Discord rejects v2 + embeds).
72
+
73
+ Legacy embeds (not recommended):
74
+
75
+ ```json
76
+ {
77
+ "action": "send",
78
+ "channel": "discord",
79
+ "to": "channel:123",
80
+ "message": "Status update",
81
+ "embeds": [{ "title": "Legacy", "description": "Embeds are legacy." }]
82
+ }
83
+ ```
84
+
85
+ - `embeds` are ignored when components v2 are present.
86
+
87
+ React:
88
+
89
+ ```json
90
+ {
91
+ "action": "react",
92
+ "channel": "discord",
93
+ "channelId": "123",
94
+ "messageId": "456",
95
+ "emoji": "✅"
96
+ }
97
+ ```
98
+
99
+ Read:
100
+
101
+ ```json
102
+ {
103
+ "action": "read",
104
+ "channel": "discord",
105
+ "to": "channel:123",
106
+ "limit": 20
107
+ }
108
+ ```
109
+
110
+ Edit / delete:
111
+
112
+ ```json
113
+ {
114
+ "action": "edit",
115
+ "channel": "discord",
116
+ "channelId": "123",
117
+ "messageId": "456",
118
+ "message": "fixed typo"
119
+ }
120
+ ```
121
+
122
+ ```json
123
+ {
124
+ "action": "delete",
125
+ "channel": "discord",
126
+ "channelId": "123",
127
+ "messageId": "456"
128
+ }
129
+ ```
130
+
131
+ Poll:
132
+
133
+ ```json
134
+ {
135
+ "action": "poll",
136
+ "channel": "discord",
137
+ "to": "channel:123",
138
+ "pollQuestion": "Lunch?",
139
+ "pollOption": ["Pizza", "Sushi", "Salad"],
140
+ "pollMulti": false,
141
+ "pollDurationHours": 24
142
+ }
143
+ ```
144
+
145
+ Pins:
146
+
147
+ ```json
148
+ {
149
+ "action": "pin",
150
+ "channel": "discord",
151
+ "channelId": "123",
152
+ "messageId": "456"
153
+ }
154
+ ```
155
+
156
+ Threads:
157
+
158
+ ```json
159
+ {
160
+ "action": "thread-create",
161
+ "channel": "discord",
162
+ "channelId": "123",
163
+ "messageId": "456",
164
+ "threadName": "bug triage"
165
+ }
166
+ ```
167
+
168
+ Search:
169
+
170
+ ```json
171
+ {
172
+ "action": "search",
173
+ "channel": "discord",
174
+ "guildId": "999",
175
+ "query": "release notes",
176
+ "channelIds": ["123", "456"],
177
+ "limit": 10
178
+ }
179
+ ```
180
+
181
+ Presence (often gated):
182
+
183
+ ```json
184
+ {
185
+ "action": "set-presence",
186
+ "channel": "discord",
187
+ "activityType": "playing",
188
+ "activityName": "with fire",
189
+ "status": "online"
190
+ }
191
+ ```
192
+
193
+ ## Writing Style (Discord)
194
+
195
+ - Short, conversational, low ceremony.
196
+ - No markdown tables.
197
+ - Mention users as `<@USER_ID>`.
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: eightctl
3
+ description: Control Eight Sleep pods (status, temperature, alarms, schedules).
4
+ homepage: https://eightctl.sh
5
+ metadata:
6
+ {
7
+ "kobold":
8
+ {
9
+ "emoji": "🎛️",
10
+ "requires": { "bins": ["eightctl"] },
11
+ "install":
12
+ [
13
+ {
14
+ "id": "go",
15
+ "kind": "go",
16
+ "module": "github.com/steipete/eightctl/cmd/eightctl@latest",
17
+ "bins": ["eightctl"],
18
+ "label": "Install eightctl (go)",
19
+ },
20
+ ],
21
+ },
22
+ }
23
+ ---
24
+
25
+ # eightctl
26
+
27
+ Use `eightctl` for Eight Sleep pod control. Requires auth.
28
+
29
+ Auth
30
+
31
+ - Config: `~/.config/eightctl/config.yaml`
32
+ - Env: `EIGHTCTL_EMAIL`, `EIGHTCTL_PASSWORD`
33
+
34
+ Quick start
35
+
36
+ - `eightctl status`
37
+ - `eightctl on|off`
38
+ - `eightctl temp 20`
39
+
40
+ Common tasks
41
+
42
+ - Alarms: `eightctl alarm list|create|dismiss`
43
+ - Schedules: `eightctl schedule list|create|update`
44
+ - Audio: `eightctl audio state|play|pause`
45
+ - Base: `eightctl base info|angle`
46
+
47
+ Notes
48
+
49
+ - API is unofficial and rate-limited; avoid repeated logins.
50
+ - Confirm before changing temperature or alarms.
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: food-order
3
+ description: Reorder Foodora orders + track ETA/status with ordercli. Never confirm without explicit user approval. Triggers: order food, reorder, track ETA.
4
+ homepage: https://ordercli.sh
5
+ metadata: {"kobold":{"emoji":"🥡","requires":{"bins":["ordercli"]},"install":[{"id":"go","kind":"go","module":"github.com/steipete/ordercli/cmd/ordercli@latest","bins":["ordercli"],"label":"Install ordercli (go)"}]}}
6
+ ---
7
+
8
+ # Food order (Foodora via ordercli)
9
+
10
+ Goal: reorder a previous Foodora order safely (preview first; confirm only on explicit user “yes/confirm/place the order”).
11
+
12
+ Hard safety rules
13
+
14
+ - Never run `ordercli foodora reorder ... --confirm` unless user explicitly confirms placing the order.
15
+ - Prefer preview-only steps first; show what will happen; ask for confirmation.
16
+ - If user is unsure: stop at preview and ask questions.
17
+
18
+ Setup (once)
19
+
20
+ - Country: `ordercli foodora countries` → `ordercli foodora config set --country AT`
21
+ - Login (password): `ordercli foodora login --email you@example.com --password-stdin`
22
+ - Login (no password, preferred): `ordercli foodora session chrome --url https://www.foodora.at/ --profile "Default"`
23
+
24
+ Find what to reorder
25
+
26
+ - Recent list: `ordercli foodora history --limit 10`
27
+ - Details: `ordercli foodora history show <orderCode>`
28
+ - If needed (machine-readable): `ordercli foodora history show <orderCode> --json`
29
+
30
+ Preview reorder (no cart changes)
31
+
32
+ - `ordercli foodora reorder <orderCode>`
33
+
34
+ Place reorder (cart change; explicit confirmation required)
35
+
36
+ - Confirm first, then run: `ordercli foodora reorder <orderCode> --confirm`
37
+ - Multiple addresses? Ask user for the right `--address-id` (take from their Foodora account / prior order data) and run:
38
+ - `ordercli foodora reorder <orderCode> --confirm --address-id <id>`
39
+
40
+ Track the order
41
+
42
+ - ETA/status (active list): `ordercli foodora orders`
43
+ - Live updates: `ordercli foodora orders --watch`
44
+ - Single order detail: `ordercli foodora order <orderCode>`
45
+
46
+ Debug / safe testing
47
+
48
+ - Use a throwaway config: `ordercli --config /tmp/ordercli.json ...`
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: gemini
3
+ description: Gemini CLI for one-shot Q&A, summaries, and generation.
4
+ homepage: https://ai.google.dev/
5
+ metadata:
6
+ {
7
+ "kobold":
8
+ {
9
+ "emoji": "♊️",
10
+ "requires": { "bins": ["gemini"] },
11
+ "install":
12
+ [
13
+ {
14
+ "id": "brew",
15
+ "kind": "brew",
16
+ "formula": "gemini-cli",
17
+ "bins": ["gemini"],
18
+ "label": "Install Gemini CLI (brew)",
19
+ },
20
+ ],
21
+ },
22
+ }
23
+ ---
24
+
25
+ # Gemini CLI
26
+
27
+ Use Gemini in one-shot mode with a positional prompt (avoid interactive mode).
28
+
29
+ Quick start
30
+
31
+ - `gemini "Answer this question..."`
32
+ - `gemini --model <name> "Prompt..."`
33
+ - `gemini --output-format json "Return JSON"`
34
+
35
+ Extensions
36
+
37
+ - List: `gemini --list-extensions`
38
+ - Manage: `gemini extensions <command>`
39
+
40
+ Notes
41
+
42
+ - If auth is required, run `gemini` once interactively and follow the login flow.
43
+ - Avoid `--yolo` for safety.