@chankov/agent-skills 0.1.0

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 (320) hide show
  1. package/.claude/commands/build.md +18 -0
  2. package/.claude/commands/code-simplify.md +22 -0
  3. package/.claude/commands/design-agent.md +14 -0
  4. package/.claude/commands/doctor.md +13 -0
  5. package/.claude/commands/plan.md +16 -0
  6. package/.claude/commands/prime.md +22 -0
  7. package/.claude/commands/review.md +16 -0
  8. package/.claude/commands/setup.md +19 -0
  9. package/.claude/commands/ship.md +17 -0
  10. package/.claude/commands/spec.md +15 -0
  11. package/.claude/commands/test.md +19 -0
  12. package/.opencode/commands/as-build.md +17 -0
  13. package/.opencode/commands/as-code-simplify.md +16 -0
  14. package/.opencode/commands/as-design-agent.md +15 -0
  15. package/.opencode/commands/as-doctor.md +11 -0
  16. package/.opencode/commands/as-plan.md +16 -0
  17. package/.opencode/commands/as-prime.md +22 -0
  18. package/.opencode/commands/as-review.md +15 -0
  19. package/.opencode/commands/as-setup.md +11 -0
  20. package/.opencode/commands/as-ship.md +16 -0
  21. package/.opencode/commands/as-spec.md +16 -0
  22. package/.opencode/commands/as-test.md +21 -0
  23. package/.pi/agents/agent-chain.yaml +49 -0
  24. package/.pi/agents/bowser.md +19 -0
  25. package/.pi/agents/pi-pi/agent-expert.md +98 -0
  26. package/.pi/agents/pi-pi/cli-expert.md +41 -0
  27. package/.pi/agents/pi-pi/config-expert.md +63 -0
  28. package/.pi/agents/pi-pi/ext-expert.md +43 -0
  29. package/.pi/agents/pi-pi/keybinding-expert.md +134 -0
  30. package/.pi/agents/pi-pi/pi-orchestrator.md +57 -0
  31. package/.pi/agents/pi-pi/prompt-expert.md +70 -0
  32. package/.pi/agents/pi-pi/skill-expert.md +42 -0
  33. package/.pi/agents/pi-pi/theme-expert.md +40 -0
  34. package/.pi/agents/pi-pi/tui-expert.md +85 -0
  35. package/.pi/agents/teams.yaml +31 -0
  36. package/.pi/damage-control-rules.yaml +278 -0
  37. package/.pi/extensions/chrome-devtools-mcp/README.md +39 -0
  38. package/.pi/extensions/chrome-devtools-mcp/index.ts +61 -0
  39. package/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  40. package/.pi/extensions/compact-and-continue/README.md +42 -0
  41. package/.pi/extensions/compact-and-continue/index.ts +120 -0
  42. package/.pi/extensions/compact-and-continue/package.json +6 -0
  43. package/.pi/extensions/mcp-bridge/README.md +46 -0
  44. package/.pi/extensions/mcp-bridge/index.ts +206 -0
  45. package/.pi/extensions/mcp-bridge/package.json +6 -0
  46. package/.pi/extensions/package-lock.json +1143 -0
  47. package/.pi/extensions/package.json +9 -0
  48. package/.pi/harnesses/agent-chain/README.md +37 -0
  49. package/.pi/harnesses/agent-chain/index.ts +795 -0
  50. package/.pi/harnesses/agent-chain/package.json +6 -0
  51. package/.pi/harnesses/agent-team/README.md +38 -0
  52. package/.pi/harnesses/agent-team/index.ts +732 -0
  53. package/.pi/harnesses/agent-team/package.json +6 -0
  54. package/.pi/harnesses/coms/README.md +36 -0
  55. package/.pi/harnesses/coms/index.ts +1595 -0
  56. package/.pi/harnesses/coms/package.json +6 -0
  57. package/.pi/harnesses/coms-net/README.md +46 -0
  58. package/.pi/harnesses/coms-net/index.ts +1637 -0
  59. package/.pi/harnesses/coms-net/package.json +6 -0
  60. package/.pi/harnesses/damage-control/README.md +38 -0
  61. package/.pi/harnesses/damage-control/index.ts +207 -0
  62. package/.pi/harnesses/damage-control/package.json +6 -0
  63. package/.pi/harnesses/damage-control-continue/README.md +37 -0
  64. package/.pi/harnesses/damage-control-continue/index.ts +234 -0
  65. package/.pi/harnesses/damage-control-continue/package.json +6 -0
  66. package/.pi/harnesses/minimal/README.md +27 -0
  67. package/.pi/harnesses/minimal/index.ts +32 -0
  68. package/.pi/harnesses/minimal/package.json +6 -0
  69. package/.pi/harnesses/package-lock.json +35 -0
  70. package/.pi/harnesses/package.json +9 -0
  71. package/.pi/harnesses/pi-pi/README.md +39 -0
  72. package/.pi/harnesses/pi-pi/index.ts +631 -0
  73. package/.pi/harnesses/pi-pi/package.json +6 -0
  74. package/.pi/harnesses/purpose-gate/README.md +27 -0
  75. package/.pi/harnesses/purpose-gate/index.ts +82 -0
  76. package/.pi/harnesses/purpose-gate/package.json +6 -0
  77. package/.pi/harnesses/session-replay/README.md +28 -0
  78. package/.pi/harnesses/session-replay/index.ts +214 -0
  79. package/.pi/harnesses/session-replay/package.json +6 -0
  80. package/.pi/harnesses/subagent-widget/README.md +36 -0
  81. package/.pi/harnesses/subagent-widget/index.ts +479 -0
  82. package/.pi/harnesses/subagent-widget/package.json +6 -0
  83. package/.pi/harnesses/system-select/README.md +39 -0
  84. package/.pi/harnesses/system-select/index.ts +165 -0
  85. package/.pi/harnesses/system-select/package.json +6 -0
  86. package/.pi/harnesses/tilldone/README.md +35 -0
  87. package/.pi/harnesses/tilldone/index.ts +724 -0
  88. package/.pi/harnesses/tilldone/package.json +6 -0
  89. package/.pi/harnesses/tool-counter/README.md +31 -0
  90. package/.pi/harnesses/tool-counter/index.ts +100 -0
  91. package/.pi/harnesses/tool-counter/package.json +6 -0
  92. package/.pi/harnesses/tool-counter-widget/README.md +27 -0
  93. package/.pi/harnesses/tool-counter-widget/index.ts +66 -0
  94. package/.pi/harnesses/tool-counter-widget/package.json +6 -0
  95. package/.pi/prompts/build.md +24 -0
  96. package/.pi/prompts/code-simplify.md +22 -0
  97. package/.pi/prompts/doctor.md +13 -0
  98. package/.pi/prompts/plan.md +16 -0
  99. package/.pi/prompts/review.md +16 -0
  100. package/.pi/prompts/setup.md +19 -0
  101. package/.pi/prompts/ship.md +17 -0
  102. package/.pi/prompts/spec.md +15 -0
  103. package/.pi/prompts/test.md +19 -0
  104. package/.pi/skills/bowser/SKILL.md +114 -0
  105. package/.versions/0.1.0/.claude/commands/build.md +18 -0
  106. package/.versions/0.1.0/.claude/commands/code-simplify.md +22 -0
  107. package/.versions/0.1.0/.claude/commands/design-agent.md +14 -0
  108. package/.versions/0.1.0/.claude/commands/doctor.md +13 -0
  109. package/.versions/0.1.0/.claude/commands/plan.md +16 -0
  110. package/.versions/0.1.0/.claude/commands/prime.md +22 -0
  111. package/.versions/0.1.0/.claude/commands/review.md +16 -0
  112. package/.versions/0.1.0/.claude/commands/setup.md +19 -0
  113. package/.versions/0.1.0/.claude/commands/ship.md +17 -0
  114. package/.versions/0.1.0/.claude/commands/spec.md +15 -0
  115. package/.versions/0.1.0/.claude/commands/test.md +19 -0
  116. package/.versions/0.1.0/.opencode/commands/as-build.md +17 -0
  117. package/.versions/0.1.0/.opencode/commands/as-code-simplify.md +16 -0
  118. package/.versions/0.1.0/.opencode/commands/as-design-agent.md +15 -0
  119. package/.versions/0.1.0/.opencode/commands/as-doctor.md +11 -0
  120. package/.versions/0.1.0/.opencode/commands/as-plan.md +16 -0
  121. package/.versions/0.1.0/.opencode/commands/as-prime.md +22 -0
  122. package/.versions/0.1.0/.opencode/commands/as-review.md +15 -0
  123. package/.versions/0.1.0/.opencode/commands/as-setup.md +11 -0
  124. package/.versions/0.1.0/.opencode/commands/as-ship.md +16 -0
  125. package/.versions/0.1.0/.opencode/commands/as-spec.md +16 -0
  126. package/.versions/0.1.0/.opencode/commands/as-test.md +21 -0
  127. package/.versions/0.1.0/.pi/agents/agent-chain.yaml +49 -0
  128. package/.versions/0.1.0/.pi/agents/bowser.md +19 -0
  129. package/.versions/0.1.0/.pi/agents/pi-pi/agent-expert.md +98 -0
  130. package/.versions/0.1.0/.pi/agents/pi-pi/cli-expert.md +41 -0
  131. package/.versions/0.1.0/.pi/agents/pi-pi/config-expert.md +63 -0
  132. package/.versions/0.1.0/.pi/agents/pi-pi/ext-expert.md +43 -0
  133. package/.versions/0.1.0/.pi/agents/pi-pi/keybinding-expert.md +134 -0
  134. package/.versions/0.1.0/.pi/agents/pi-pi/pi-orchestrator.md +57 -0
  135. package/.versions/0.1.0/.pi/agents/pi-pi/prompt-expert.md +70 -0
  136. package/.versions/0.1.0/.pi/agents/pi-pi/skill-expert.md +42 -0
  137. package/.versions/0.1.0/.pi/agents/pi-pi/theme-expert.md +40 -0
  138. package/.versions/0.1.0/.pi/agents/pi-pi/tui-expert.md +85 -0
  139. package/.versions/0.1.0/.pi/agents/teams.yaml +31 -0
  140. package/.versions/0.1.0/.pi/damage-control-rules.yaml +278 -0
  141. package/.versions/0.1.0/.pi/extensions/chrome-devtools-mcp/README.md +39 -0
  142. package/.versions/0.1.0/.pi/extensions/chrome-devtools-mcp/index.ts +61 -0
  143. package/.versions/0.1.0/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  144. package/.versions/0.1.0/.pi/extensions/compact-and-continue/README.md +42 -0
  145. package/.versions/0.1.0/.pi/extensions/compact-and-continue/index.ts +120 -0
  146. package/.versions/0.1.0/.pi/extensions/compact-and-continue/package.json +6 -0
  147. package/.versions/0.1.0/.pi/extensions/mcp-bridge/README.md +46 -0
  148. package/.versions/0.1.0/.pi/extensions/mcp-bridge/index.ts +206 -0
  149. package/.versions/0.1.0/.pi/extensions/mcp-bridge/package.json +6 -0
  150. package/.versions/0.1.0/.pi/extensions/package-lock.json +1143 -0
  151. package/.versions/0.1.0/.pi/extensions/package.json +9 -0
  152. package/.versions/0.1.0/.pi/harnesses/agent-chain/README.md +37 -0
  153. package/.versions/0.1.0/.pi/harnesses/agent-chain/index.ts +795 -0
  154. package/.versions/0.1.0/.pi/harnesses/agent-chain/package.json +6 -0
  155. package/.versions/0.1.0/.pi/harnesses/agent-team/README.md +38 -0
  156. package/.versions/0.1.0/.pi/harnesses/agent-team/index.ts +732 -0
  157. package/.versions/0.1.0/.pi/harnesses/agent-team/package.json +6 -0
  158. package/.versions/0.1.0/.pi/harnesses/coms/README.md +36 -0
  159. package/.versions/0.1.0/.pi/harnesses/coms/index.ts +1595 -0
  160. package/.versions/0.1.0/.pi/harnesses/coms/package.json +6 -0
  161. package/.versions/0.1.0/.pi/harnesses/coms-net/README.md +46 -0
  162. package/.versions/0.1.0/.pi/harnesses/coms-net/index.ts +1637 -0
  163. package/.versions/0.1.0/.pi/harnesses/coms-net/package.json +6 -0
  164. package/.versions/0.1.0/.pi/harnesses/damage-control/README.md +38 -0
  165. package/.versions/0.1.0/.pi/harnesses/damage-control/index.ts +207 -0
  166. package/.versions/0.1.0/.pi/harnesses/damage-control/package.json +6 -0
  167. package/.versions/0.1.0/.pi/harnesses/damage-control-continue/README.md +37 -0
  168. package/.versions/0.1.0/.pi/harnesses/damage-control-continue/index.ts +234 -0
  169. package/.versions/0.1.0/.pi/harnesses/damage-control-continue/package.json +6 -0
  170. package/.versions/0.1.0/.pi/harnesses/minimal/README.md +27 -0
  171. package/.versions/0.1.0/.pi/harnesses/minimal/index.ts +32 -0
  172. package/.versions/0.1.0/.pi/harnesses/minimal/package.json +6 -0
  173. package/.versions/0.1.0/.pi/harnesses/package-lock.json +35 -0
  174. package/.versions/0.1.0/.pi/harnesses/package.json +9 -0
  175. package/.versions/0.1.0/.pi/harnesses/pi-pi/README.md +39 -0
  176. package/.versions/0.1.0/.pi/harnesses/pi-pi/index.ts +631 -0
  177. package/.versions/0.1.0/.pi/harnesses/pi-pi/package.json +6 -0
  178. package/.versions/0.1.0/.pi/harnesses/purpose-gate/README.md +27 -0
  179. package/.versions/0.1.0/.pi/harnesses/purpose-gate/index.ts +82 -0
  180. package/.versions/0.1.0/.pi/harnesses/purpose-gate/package.json +6 -0
  181. package/.versions/0.1.0/.pi/harnesses/session-replay/README.md +28 -0
  182. package/.versions/0.1.0/.pi/harnesses/session-replay/index.ts +214 -0
  183. package/.versions/0.1.0/.pi/harnesses/session-replay/package.json +6 -0
  184. package/.versions/0.1.0/.pi/harnesses/subagent-widget/README.md +36 -0
  185. package/.versions/0.1.0/.pi/harnesses/subagent-widget/index.ts +479 -0
  186. package/.versions/0.1.0/.pi/harnesses/subagent-widget/package.json +6 -0
  187. package/.versions/0.1.0/.pi/harnesses/system-select/README.md +39 -0
  188. package/.versions/0.1.0/.pi/harnesses/system-select/index.ts +165 -0
  189. package/.versions/0.1.0/.pi/harnesses/system-select/package.json +6 -0
  190. package/.versions/0.1.0/.pi/harnesses/tilldone/README.md +35 -0
  191. package/.versions/0.1.0/.pi/harnesses/tilldone/index.ts +724 -0
  192. package/.versions/0.1.0/.pi/harnesses/tilldone/package.json +6 -0
  193. package/.versions/0.1.0/.pi/harnesses/tool-counter/README.md +31 -0
  194. package/.versions/0.1.0/.pi/harnesses/tool-counter/index.ts +100 -0
  195. package/.versions/0.1.0/.pi/harnesses/tool-counter/package.json +6 -0
  196. package/.versions/0.1.0/.pi/harnesses/tool-counter-widget/README.md +27 -0
  197. package/.versions/0.1.0/.pi/harnesses/tool-counter-widget/index.ts +66 -0
  198. package/.versions/0.1.0/.pi/harnesses/tool-counter-widget/package.json +6 -0
  199. package/.versions/0.1.0/.pi/prompts/build.md +24 -0
  200. package/.versions/0.1.0/.pi/prompts/code-simplify.md +22 -0
  201. package/.versions/0.1.0/.pi/prompts/doctor.md +13 -0
  202. package/.versions/0.1.0/.pi/prompts/plan.md +16 -0
  203. package/.versions/0.1.0/.pi/prompts/review.md +16 -0
  204. package/.versions/0.1.0/.pi/prompts/setup.md +19 -0
  205. package/.versions/0.1.0/.pi/prompts/ship.md +17 -0
  206. package/.versions/0.1.0/.pi/prompts/spec.md +15 -0
  207. package/.versions/0.1.0/.pi/prompts/test.md +19 -0
  208. package/.versions/0.1.0/.pi/skills/bowser/SKILL.md +114 -0
  209. package/.versions/0.1.0/.version +1 -0
  210. package/.versions/0.1.0/agents/builder.md +6 -0
  211. package/.versions/0.1.0/agents/code-reviewer.md +93 -0
  212. package/.versions/0.1.0/agents/documenter.md +6 -0
  213. package/.versions/0.1.0/agents/plan-reviewer.md +22 -0
  214. package/.versions/0.1.0/agents/planner.md +6 -0
  215. package/.versions/0.1.0/agents/scout.md +6 -0
  216. package/.versions/0.1.0/agents/security-auditor.md +97 -0
  217. package/.versions/0.1.0/agents/test-engineer.md +89 -0
  218. package/.versions/0.1.0/hooks/SIMPLIFY-IGNORE.md +90 -0
  219. package/.versions/0.1.0/hooks/hooks.json +14 -0
  220. package/.versions/0.1.0/hooks/session-start.sh +20 -0
  221. package/.versions/0.1.0/hooks/simplify-ignore-test.sh +247 -0
  222. package/.versions/0.1.0/hooks/simplify-ignore.sh +302 -0
  223. package/.versions/0.1.0/references/accessibility-checklist.md +159 -0
  224. package/.versions/0.1.0/references/performance-checklist.md +121 -0
  225. package/.versions/0.1.0/references/prompting-patterns.md +380 -0
  226. package/.versions/0.1.0/references/security-checklist.md +134 -0
  227. package/.versions/0.1.0/references/testing-patterns.md +236 -0
  228. package/.versions/0.1.0/skills/api-and-interface-design/SKILL.md +294 -0
  229. package/.versions/0.1.0/skills/browser-testing-with-devtools/SKILL.md +335 -0
  230. package/.versions/0.1.0/skills/ci-cd-and-automation/SKILL.md +390 -0
  231. package/.versions/0.1.0/skills/code-review-and-quality/SKILL.md +347 -0
  232. package/.versions/0.1.0/skills/code-simplification/SKILL.md +331 -0
  233. package/.versions/0.1.0/skills/context-engineering/SKILL.md +291 -0
  234. package/.versions/0.1.0/skills/debugging-and-error-recovery/SKILL.md +300 -0
  235. package/.versions/0.1.0/skills/deprecation-and-migration/SKILL.md +206 -0
  236. package/.versions/0.1.0/skills/designing-agents/SKILL.md +394 -0
  237. package/.versions/0.1.0/skills/designing-agents/pi-harness-authoring.md +213 -0
  238. package/.versions/0.1.0/skills/documentation-and-adrs/SKILL.md +278 -0
  239. package/.versions/0.1.0/skills/frontend-ui-engineering/SKILL.md +322 -0
  240. package/.versions/0.1.0/skills/git-workflow-and-versioning/SKILL.md +316 -0
  241. package/.versions/0.1.0/skills/guided-workspace-setup/SKILL.md +293 -0
  242. package/.versions/0.1.0/skills/idea-refine/SKILL.md +178 -0
  243. package/.versions/0.1.0/skills/idea-refine/examples.md +238 -0
  244. package/.versions/0.1.0/skills/idea-refine/frameworks.md +99 -0
  245. package/.versions/0.1.0/skills/idea-refine/refinement-criteria.md +113 -0
  246. package/.versions/0.1.0/skills/idea-refine/scripts/idea-refine.sh +15 -0
  247. package/.versions/0.1.0/skills/incremental-implementation/SKILL.md +279 -0
  248. package/.versions/0.1.0/skills/performance-optimization/SKILL.md +350 -0
  249. package/.versions/0.1.0/skills/planning-and-task-breakdown/SKILL.md +237 -0
  250. package/.versions/0.1.0/skills/security-and-hardening/SKILL.md +349 -0
  251. package/.versions/0.1.0/skills/shipping-and-launch/SKILL.md +309 -0
  252. package/.versions/0.1.0/skills/source-driven-development/SKILL.md +194 -0
  253. package/.versions/0.1.0/skills/spec-driven-development/SKILL.md +237 -0
  254. package/.versions/0.1.0/skills/test-driven-development/SKILL.md +379 -0
  255. package/.versions/0.1.0/skills/using-agent-skills/SKILL.md +176 -0
  256. package/CHANGELOG.md +14 -0
  257. package/LICENSE +21 -0
  258. package/README.md +359 -0
  259. package/agents/builder.md +6 -0
  260. package/agents/code-reviewer.md +93 -0
  261. package/agents/documenter.md +6 -0
  262. package/agents/plan-reviewer.md +22 -0
  263. package/agents/planner.md +6 -0
  264. package/agents/scout.md +6 -0
  265. package/agents/security-auditor.md +97 -0
  266. package/agents/test-engineer.md +89 -0
  267. package/bin/cli.js +375 -0
  268. package/bin/lib/detect-agent.js +37 -0
  269. package/bin/lib/doctor.js +209 -0
  270. package/bin/snapshot-version.js +71 -0
  271. package/docs/agent-skills-setup.md +187 -0
  272. package/docs/copilot-setup.md +94 -0
  273. package/docs/cursor-setup.md +67 -0
  274. package/docs/gemini-cli-setup.md +113 -0
  275. package/docs/getting-started.md +162 -0
  276. package/docs/npm-install.md +169 -0
  277. package/docs/opencode-setup.md +241 -0
  278. package/docs/pi-extensions.md +163 -0
  279. package/docs/pi-setup.md +416 -0
  280. package/docs/skill-anatomy.md +129 -0
  281. package/docs/windsurf-setup.md +48 -0
  282. package/hooks/SIMPLIFY-IGNORE.md +90 -0
  283. package/hooks/hooks.json +14 -0
  284. package/hooks/session-start.sh +20 -0
  285. package/hooks/simplify-ignore-test.sh +247 -0
  286. package/hooks/simplify-ignore.sh +302 -0
  287. package/package.json +86 -0
  288. package/references/accessibility-checklist.md +159 -0
  289. package/references/performance-checklist.md +121 -0
  290. package/references/prompting-patterns.md +380 -0
  291. package/references/security-checklist.md +134 -0
  292. package/references/testing-patterns.md +236 -0
  293. package/skills/api-and-interface-design/SKILL.md +294 -0
  294. package/skills/browser-testing-with-devtools/SKILL.md +335 -0
  295. package/skills/ci-cd-and-automation/SKILL.md +390 -0
  296. package/skills/code-review-and-quality/SKILL.md +347 -0
  297. package/skills/code-simplification/SKILL.md +331 -0
  298. package/skills/context-engineering/SKILL.md +291 -0
  299. package/skills/debugging-and-error-recovery/SKILL.md +300 -0
  300. package/skills/deprecation-and-migration/SKILL.md +206 -0
  301. package/skills/designing-agents/SKILL.md +394 -0
  302. package/skills/designing-agents/pi-harness-authoring.md +213 -0
  303. package/skills/documentation-and-adrs/SKILL.md +278 -0
  304. package/skills/frontend-ui-engineering/SKILL.md +322 -0
  305. package/skills/git-workflow-and-versioning/SKILL.md +316 -0
  306. package/skills/guided-workspace-setup/SKILL.md +293 -0
  307. package/skills/idea-refine/SKILL.md +178 -0
  308. package/skills/idea-refine/examples.md +238 -0
  309. package/skills/idea-refine/frameworks.md +99 -0
  310. package/skills/idea-refine/refinement-criteria.md +113 -0
  311. package/skills/idea-refine/scripts/idea-refine.sh +15 -0
  312. package/skills/incremental-implementation/SKILL.md +279 -0
  313. package/skills/performance-optimization/SKILL.md +350 -0
  314. package/skills/planning-and-task-breakdown/SKILL.md +237 -0
  315. package/skills/security-and-hardening/SKILL.md +349 -0
  316. package/skills/shipping-and-launch/SKILL.md +309 -0
  317. package/skills/source-driven-development/SKILL.md +194 -0
  318. package/skills/spec-driven-development/SKILL.md +237 -0
  319. package/skills/test-driven-development/SKILL.md +379 -0
  320. package/skills/using-agent-skills/SKILL.md +176 -0
@@ -0,0 +1,278 @@
1
+ bashToolPatterns:
2
+ - pattern: '\brm\s+(-[^\s]*)*-[rRf]'
3
+ reason: rm with recursive or force flags
4
+ - pattern: '\brm\s+-[rRf]'
5
+ reason: rm with recursive or force flags
6
+ - pattern: '\brm\s+--recursive'
7
+ reason: rm with --recursive flag
8
+ - pattern: '\brm\s+--force'
9
+ reason: rm with --force flag
10
+ - pattern: '\bsudo\s+rm\b'
11
+ reason: sudo rm
12
+ - pattern: '\brmdir\s+--ignore-fail-on-non-empty'
13
+ reason: rmdir ignore-fail
14
+ - pattern: '\bchmod\s+(-[^\s]+\s+)*777\b'
15
+ reason: chmod 777 (world writable)
16
+ - pattern: '\bchmod\s+-[Rr].*777'
17
+ reason: recursive chmod 777
18
+ - pattern: '\bchown\s+-[Rr].*\broot\b'
19
+ reason: recursive chown to root
20
+ - pattern: '\bgit\s+reset\s+--hard\b'
21
+ reason: git reset --hard (use --soft or stash)
22
+ - pattern: '\bgit\s+clean\s+(-[^\s]*)*-[fd]'
23
+ reason: git clean with force/directory flags
24
+ - pattern: '\bgit\s+push\s+.*--force(?!-with-lease)'
25
+ reason: git push --force (use --force-with-lease)
26
+ - pattern: '\bgit\s+push\s+(-[^\s]*)*-f\b'
27
+ reason: git push -f (use --force-with-lease)
28
+ - pattern: '\bgit\s+stash\s+clear\b'
29
+ reason: git stash clear (deletes ALL stashes)
30
+ - pattern: '\bgit\s+reflog\s+expire\b'
31
+ reason: git reflog expire (destroys recovery mechanism)
32
+ - pattern: '\bgit\s+gc\s+.*--prune=now'
33
+ reason: git gc --prune=now (can lose dangling commits)
34
+ - pattern: '\bgit\s+filter-branch\b'
35
+ reason: git filter-branch (rewrites entire history)
36
+ - pattern: '\bgit\s+checkout\s+--\s*\.'
37
+ reason: Discards all uncommitted changes
38
+ ask: true
39
+ - pattern: '\bgit\s+restore\s+\.'
40
+ reason: Discards all uncommitted changes
41
+ ask: true
42
+ - pattern: '\bgit\s+stash\s+drop\b'
43
+ reason: Permanently deletes a stash
44
+ ask: true
45
+ - pattern: '\bgit\s+branch\s+(-[^\s]*)*-D'
46
+ reason: Force deletes branch (even if unmerged)
47
+ ask: true
48
+ - pattern: '\bgit\s+push\s+\S+\s+--delete\b'
49
+ reason: Deletes remote branch
50
+ ask: true
51
+ - pattern: '\bgit\s+push\s+\S+\s+:\S+'
52
+ reason: Deletes remote branch (old syntax)
53
+ ask: true
54
+ - pattern: '\bmkfs\.'
55
+ reason: filesystem format command
56
+ - pattern: '\bdd\s+.*of=/dev/'
57
+ reason: dd writing to device
58
+ - pattern: '\bkill\s+-9\s+-1\b'
59
+ reason: kill all processes
60
+ - pattern: '\bkillall\s+-9\b'
61
+ reason: killall -9
62
+ - pattern: '\bpkill\s+-9\b'
63
+ reason: pkill -9
64
+ - pattern: '\bhistory\s+-c\b'
65
+ reason: clearing shell history
66
+ - pattern: '\baws\s+s3\s+rm\s+.*--recursive'
67
+ reason: aws s3 rm --recursive (deletes all objects)
68
+ - pattern: '\baws\s+s3\s+rb\s+.*--force'
69
+ reason: aws s3 rb --force (force removes bucket)
70
+ - pattern: '\baws\s+ec2\s+terminate-instances\b'
71
+ reason: aws ec2 terminate-instances
72
+ - pattern: '\baws\s+rds\s+delete-db-instance\b'
73
+ reason: aws rds delete-db-instance
74
+ - pattern: '\baws\s+cloudformation\s+delete-stack\b'
75
+ reason: aws cloudformation delete-stack (deletes infrastructure)
76
+ - pattern: '\baws\s+dynamodb\s+delete-table\b'
77
+ reason: aws dynamodb delete-table
78
+ - pattern: '\baws\s+eks\s+delete-cluster\b'
79
+ reason: aws eks delete-cluster
80
+ - pattern: '\baws\s+lambda\s+delete-function\b'
81
+ reason: aws lambda delete-function
82
+ - pattern: '\baws\s+iam\s+delete-role\b'
83
+ reason: aws iam delete-role
84
+ - pattern: '\baws\s+iam\s+delete-user\b'
85
+ reason: aws iam delete-user
86
+ - pattern: '\bgcloud\s+projects\s+delete\b'
87
+ reason: gcloud projects delete (DELETES ENTIRE PROJECT)
88
+ - pattern: '\bgcloud\s+compute\s+instances\s+delete\b'
89
+ reason: gcloud compute instances delete
90
+ - pattern: '\bgcloud\s+sql\s+instances\s+delete\b'
91
+ reason: gcloud sql instances delete
92
+ - pattern: '\bgcloud\s+container\s+clusters\s+delete\b'
93
+ reason: gcloud container clusters delete (GKE)
94
+ - pattern: '\bgcloud\s+storage\s+rm\s+.*-r'
95
+ reason: gcloud storage rm -r (recursive delete)
96
+ - pattern: '\bgcloud\s+functions\s+delete\b'
97
+ reason: gcloud functions delete
98
+ - pattern: '\bgcloud\s+iam\s+service-accounts\s+delete\b'
99
+ reason: gcloud iam service-accounts delete
100
+ - pattern: '\bgcloud\s+run\s+services\s+delete\b'
101
+ reason: gcloud run services delete (deletes Cloud Run service)
102
+ - pattern: '\bgcloud\s+run\s+jobs\s+delete\b'
103
+ reason: gcloud run jobs delete (deletes Cloud Run job)
104
+ - pattern: '\bgcloud\s+services\s+disable\b'
105
+ reason: gcloud services disable (disables GCP APIs)
106
+ - pattern: '\bgcloud\s+iam\s+roles\s+delete\b'
107
+ reason: gcloud iam roles delete (deletes IAM role)
108
+ - pattern: '\bgcloud\s+iam\s+policies\b'
109
+ reason: gcloud iam policies (modifies IAM policies)
110
+ ask: true
111
+ - pattern: '\bfirebase\s+projects:delete\b'
112
+ reason: firebase projects:delete (deletes entire project)
113
+ - pattern: '\bfirebase\s+firestore:delete\s+.*--all-collections'
114
+ reason: firebase firestore:delete --all-collections (wipes all data)
115
+ - pattern: '\bfirebase\s+database:remove\b'
116
+ reason: firebase database:remove (wipes Realtime DB)
117
+ - pattern: '\bfirebase\s+hosting:disable\b'
118
+ reason: firebase hosting:disable
119
+ - pattern: '\bfirebase\s+functions:delete\b'
120
+ reason: firebase functions:delete
121
+ - pattern: '\bvercel\s+remove\s+.*--yes'
122
+ reason: vercel remove --yes (removes deployment)
123
+ - pattern: '\bvercel\s+projects\s+rm\b'
124
+ reason: vercel projects rm (deletes project)
125
+ - pattern: '\bvercel\s+env\s+rm\b'
126
+ reason: vercel env rm (removes env variables)
127
+ - pattern: '\bvercel\s+rm\b'
128
+ reason: vercel rm (removes deployment)
129
+ - pattern: '\bvercel\s+remove\b'
130
+ reason: vercel remove (removes deployment)
131
+ - pattern: '\bvercel\s+domains\s+rm\b'
132
+ reason: vercel domains rm (removes custom domain)
133
+ - pattern: '\bnetlify\s+sites:delete\b'
134
+ reason: netlify sites:delete (deletes entire site)
135
+ - pattern: '\bnetlify\s+functions:delete\b'
136
+ reason: netlify functions:delete
137
+ - pattern: '\bwrangler\s+delete\b'
138
+ reason: wrangler delete (deletes Worker)
139
+ - pattern: '\bwrangler\s+r2\s+bucket\s+delete\b'
140
+ reason: wrangler r2 bucket delete
141
+ - pattern: '\bwrangler\s+kv:namespace\s+delete\b'
142
+ reason: wrangler kv:namespace delete
143
+ - pattern: '\bwrangler\s+d1\s+delete\b'
144
+ reason: wrangler d1 delete (deletes database)
145
+ - pattern: '\bwrangler\s+queues\s+delete\b'
146
+ reason: wrangler queues delete
147
+ - pattern: 'DELETE\s+FROM\s+\w+\s*;'
148
+ reason: DELETE without WHERE clause (will delete ALL rows)
149
+ - pattern: 'DELETE\s+\*\s+FROM'
150
+ reason: DELETE * (will delete ALL rows)
151
+ - pattern: '\bTRUNCATE\s+TABLE\b'
152
+ reason: TRUNCATE TABLE (will delete ALL rows)
153
+ - pattern: '\bDROP\s+TABLE\b'
154
+ reason: DROP TABLE
155
+ - pattern: '\bDROP\s+DATABASE\b'
156
+ reason: DROP DATABASE
157
+ - pattern: '\bDROP\s+SCHEMA\b'
158
+ reason: DROP SCHEMA
159
+ - pattern: '\bDELETE\s+FROM\s+\w+\s+WHERE\b.*\bid\s*='
160
+ reason: SQL DELETE with specific ID
161
+ ask: true
162
+
163
+ zeroAccessPaths:
164
+ - ".env"
165
+ - ".env.local"
166
+ - ".env.development"
167
+ - ".env.production"
168
+ - ".env.staging"
169
+ - ".env.test"
170
+ - ".env.*.local"
171
+ - "*.env"
172
+ - "~/.ssh/"
173
+ - "~/.gnupg/"
174
+ - "~/.aws/"
175
+ - "~/.config/gcloud/"
176
+ - "*-credentials.json"
177
+ - "*serviceAccount*.json"
178
+ - "*service-account*.json"
179
+ - "~/.azure/"
180
+ - "~/.kube/"
181
+ - "kubeconfig"
182
+ - "*-secret.yaml"
183
+ - "secrets.yaml"
184
+ - "~/.docker/"
185
+ - "*.pem"
186
+ - "*.key"
187
+ - "*.p12"
188
+ - "*.pfx"
189
+ - "*.tfstate"
190
+ - "*.tfstate.backup"
191
+ - ".terraform/"
192
+ - ".vercel/"
193
+ - ".netlify/"
194
+ - "firebase-adminsdk*.json"
195
+ - "serviceAccountKey.json"
196
+ - ".supabase/"
197
+ - "~/.netrc"
198
+ - "~/.npmrc"
199
+ - "~/.pypirc"
200
+ - "~/.git-credentials"
201
+ - ".git-credentials"
202
+ - "dump.sql"
203
+ - "backup.sql"
204
+ - "*.dump"
205
+
206
+ readOnlyPaths:
207
+ - /etc/
208
+ - /usr/
209
+ - /bin/
210
+ - /sbin/
211
+ - /boot/
212
+ - /root/
213
+ - ~/.bash_history
214
+ - ~/.zsh_history
215
+ - ~/.node_repl_history
216
+ - ~/.bashrc
217
+ - ~/.zshrc
218
+ - ~/.profile
219
+ - ~/.bash_profile
220
+ - "package-lock.json"
221
+ - "yarn.lock"
222
+ - "pnpm-lock.yaml"
223
+ - "Gemfile.lock"
224
+ - "poetry.lock"
225
+ - "Pipfile.lock"
226
+ - "composer.lock"
227
+ - "Cargo.lock"
228
+ - "go.sum"
229
+ - "flake.lock"
230
+ - "bun.lockb"
231
+ - "uv.lock"
232
+ - "npm-shrinkwrap.json"
233
+ - "*.lock"
234
+ - "*.lockb"
235
+ - "*.min.js"
236
+ - "*.min.css"
237
+ - "*.bundle.js"
238
+ - "*.chunk.js"
239
+ - dist/
240
+ - build/
241
+ - .next/
242
+ - .nuxt/
243
+ - .output/
244
+ - __pycache__/
245
+ - .venv/
246
+ - venv/
247
+ - target/
248
+
249
+ noDeletePaths:
250
+ - ~/.claude/
251
+ - CLAUDE.md
252
+ - "LICENSE"
253
+ - "LICENSE.*"
254
+ - "COPYING"
255
+ - "COPYING.*"
256
+ - "NOTICE"
257
+ - "PATENTS"
258
+ - "README.md"
259
+ - "README.*"
260
+ - "CONTRIBUTING.md"
261
+ - "CHANGELOG.md"
262
+ - "CODE_OF_CONDUCT.md"
263
+ - "SECURITY.md"
264
+ - .git/
265
+ - .gitignore
266
+ - .gitattributes
267
+ - .gitmodules
268
+ - .github/
269
+ - .gitlab-ci.yml
270
+ - .circleci/
271
+ - Jenkinsfile
272
+ - .travis.yml
273
+ - azure-pipelines.yml
274
+ - Dockerfile
275
+ - "Dockerfile.*"
276
+ - docker-compose.yml
277
+ - "docker-compose.*.yml"
278
+ - .dockerignore
@@ -0,0 +1,39 @@
1
+ # chrome-devtools-mcp
2
+
3
+ A pi extension that bridges the [`chrome-devtools-mcp`](https://www.npmjs.com/package/chrome-devtools-mcp) server into pi as native tools.
4
+
5
+ Built on top of `../mcp-bridge/` — this file is a thin wrapper that supplies Chrome-specific config.
6
+
7
+ ## What you get
8
+
9
+ After installing, pi exposes the full Chrome DevTools MCP toolset under the `chrome_devtools__` prefix (e.g. `chrome_devtools__navigate`, `chrome_devtools__click`, etc.). A status command `/chrome_devtools-status` reports whether the bridge connected.
10
+
11
+ This unlocks the workflow described in `skills/browser-testing-with-devtools/` for pi users.
12
+
13
+ ## Install
14
+
15
+ Symlink both extensions from this repo into your project's `.pi/extensions/`:
16
+
17
+ ```bash
18
+ mkdir -p .pi/extensions
19
+ ln -s /path/to/agent-skills/.pi/extensions/mcp-bridge .pi/extensions/mcp-bridge
20
+ ln -s /path/to/agent-skills/.pi/extensions/chrome-devtools-mcp .pi/extensions/chrome-devtools-mcp
21
+ ```
22
+
23
+ `mcp-bridge` is a sibling library; `chrome-devtools-mcp` imports it via the relative path. Runtime dependencies are hoisted to `.pi/extensions/package.json` — run `npm ci` there once after cloning `agent-skills` (see [docs/pi-setup.md](../../../docs/pi-setup.md#optional-pi-extensions)).
24
+
25
+ ## Verify
26
+
27
+ Run `pi` from the project, then:
28
+
29
+ ```
30
+ /chrome_devtools-status
31
+ ```
32
+
33
+ Expect: `Chrome DevTools MCP connected. Registered N tool(s).`
34
+
35
+ Type `chrome_devtools__` in tool autocomplete to see the wrapped tools.
36
+
37
+ ## Note
38
+
39
+ This extension exists because pi does not yet have first-class MCP infrastructure. Once pi supports MCP servers natively, this wrapper will be retired in favor of the native mechanism.
@@ -0,0 +1,61 @@
1
+ import process from "node:process";
2
+ import { createMcpBridgeExtension } from "../mcp-bridge/index.js";
3
+
4
+ const GUI_ENV_KEYS = [
5
+ "DISPLAY",
6
+ "XAUTHORITY",
7
+ "WAYLAND_DISPLAY",
8
+ "XDG_RUNTIME_DIR",
9
+ "XDG_SESSION_TYPE",
10
+ "XDG_CURRENT_DESKTOP",
11
+ "DBUS_SESSION_BUS_ADDRESS",
12
+ ] as const;
13
+
14
+ const NODE_WEBSTORAGE_DISABLE_OPTION = "--no-experimental-webstorage";
15
+
16
+ function appendNodeOption(current: string | undefined, option: string): string {
17
+ const parts = current?.trim() ? current.trim().split(/\s+/) : [];
18
+ if (!parts.includes(option)) parts.push(option);
19
+ return parts.join(" ");
20
+ }
21
+
22
+ function supportsNoExperimentalWebStorage(): boolean {
23
+ const major = Number.parseInt(process.versions.node.split(".")[0] ?? "0", 10);
24
+ return major >= 25;
25
+ }
26
+
27
+ function buildChromeDevToolsEnv(): Record<string, string> {
28
+ const env: Record<string, string> = {};
29
+
30
+ for (const key of GUI_ENV_KEYS) {
31
+ const value = process.env[key];
32
+ if (value) env[key] = value;
33
+ }
34
+
35
+ // Avoid unsolicited update-check output in the MCP child process.
36
+ env.CHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS = "1";
37
+
38
+ // Node 25 exposes experimental Web Storage. A bundled chrome-devtools-mcp
39
+ // dependency probes localStorage at startup, which emits a
40
+ // `--localstorage-file` warning unless Web Storage is disabled for this child.
41
+ if (supportsNoExperimentalWebStorage()) {
42
+ env.NODE_OPTIONS = appendNodeOption(process.env.NODE_OPTIONS, NODE_WEBSTORAGE_DISABLE_OPTION);
43
+ }
44
+
45
+ return env;
46
+ }
47
+
48
+ export default createMcpBridgeExtension({
49
+ prefix: "chrome_devtools__",
50
+ command: "npx",
51
+ args: [
52
+ "-y",
53
+ "chrome-devtools-mcp@latest",
54
+ "--isolated",
55
+ "--no-usage-statistics",
56
+ "--no-performance-crux",
57
+ ],
58
+ env: buildChromeDevToolsEnv(),
59
+ stderr: "pipe",
60
+ labelPrefix: "Chrome DevTools",
61
+ });
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "agent-skills-pi-chrome-devtools-mcp",
3
+ "private": true,
4
+ "type": "module",
5
+ "main": "index.ts"
6
+ }
@@ -0,0 +1,42 @@
1
+ # compact-and-continue
2
+
3
+ A pi extension that registers a single tool, `request_compaction`, for queueing pi context compaction at a safe checkpoint and (optionally) resuming work from a self-contained continuation prompt afterward.
4
+
5
+ ## What it does
6
+
7
+ `request_compaction` does **not** compact immediately. It queues the request, lets the current agent turn finish, then runs compaction on `agent_end`. If a `continuationPrompt` is provided, the extension re-injects it as a new user message after compaction finishes — pi picks up exactly where the summarized plan says to continue.
8
+
9
+ This keeps the user in control: compaction never interrupts a tool call mid-flight, and resumption is explicit (you decide what survives the compaction by what you put in `continuationPrompt`).
10
+
11
+ ## Tool: `request_compaction`
12
+
13
+ | Parameter | Type | Required | Description |
14
+ |---|---|---|---|
15
+ | `customInstructions` | string | no | Instructions for the compaction summary. Defaults to: *"Preserve task goal, completed work, changed/read files, decisions, blockers, and next steps."* |
16
+ | `reason` | string | no | Short explanation recorded in tool details. |
17
+ | `continuationPrompt` | string | no | Self-contained summary of the remaining plan. If provided, pi auto-resumes from this message after compaction. **Do not copy the original prompt verbatim** — restate the next concrete actions. |
18
+
19
+ The tool does not ask for confirmation. Workflows that need confirmation (e.g. `/build`) must ask the user **before** calling it.
20
+
21
+ ## When to use
22
+
23
+ Use only when explicitly requested by the user, a skill, or a prompt template. Do not call it pre-emptively or on a hunch that context is "getting long" — pi has its own autocompaction for that.
24
+
25
+ The canonical usage point in this repo is `/build`: at slice-approval time, the user can pick "Compact & continue" to compact between slices and resume from a summarized remaining plan. See `.pi/prompts/build.md` and `skills/incremental-implementation/SKILL.md`.
26
+
27
+ ## Install
28
+
29
+ Symlink alongside the other extensions (see [docs/pi-setup.md](../../../docs/pi-setup.md#optional-pi-extensions)):
30
+
31
+ ```bash
32
+ ln -s /path/to/agent-skills/.pi/extensions/compact-and-continue .pi/extensions/compact-and-continue
33
+ ```
34
+
35
+ The only runtime dep (`typebox`) is already hoisted at `.pi/extensions/package.json` for the other extensions, so no extra `npm ci` is needed if you've already installed.
36
+
37
+ ## Behavior notes
38
+
39
+ - Multiple queued requests in the same turn are coalesced into one compaction with all reasons concatenated.
40
+ - Only the latest `continuationPrompt` (last queued) is honored.
41
+ - If compaction fails, the error is surfaced via `ctx.ui.notify` and the queue is drained — pi does not auto-retry.
42
+ - The tool returns `terminate: true`, ending the current turn so `agent_end` can fire and the queued compaction can run.
@@ -0,0 +1,120 @@
1
+ import type { CompactionResult, ExtensionAPI, ExtensionContext } from '@mariozechner/pi-coding-agent';
2
+ import { Type } from 'typebox';
3
+
4
+ const DEFAULT_COMPACTION_INSTRUCTIONS = 'Preserve task goal, completed work, changed/read files, decisions, blockers, and next steps.';
5
+
6
+ const RequestCompactionParams = Type.Object({
7
+ customInstructions: Type.Optional(Type.String({
8
+ description: 'Instructions for the compaction summary. Include what must be preserved for continuing safely.',
9
+ })),
10
+ reason: Type.Optional(Type.String({
11
+ description: 'Short explanation recorded in tool details for why immediate compaction was requested.',
12
+ })),
13
+ continuationPrompt: Type.Optional(Type.String({
14
+ description: 'Self-contained summary of the remaining plan to execute after compaction. Do not copy the original prompt verbatim. Include the next concrete actions. If the original plan explicitly requires later compaction checkpoints, include them; otherwise do not repeat the same compaction request.',
15
+ })),
16
+ });
17
+
18
+ function compact(ctx: ExtensionContext, customInstructions: string): Promise<CompactionResult> {
19
+ return new Promise((resolve, reject) => {
20
+ ctx.compact({
21
+ customInstructions,
22
+ onComplete: resolve,
23
+ onError: reject,
24
+ });
25
+ });
26
+ }
27
+
28
+ export default function compactAndContinueExtension(pi: ExtensionAPI) {
29
+ type PendingCompaction = {
30
+ customInstructions: string;
31
+ reason: string;
32
+ continuationPrompt?: string;
33
+ };
34
+
35
+ const pendingCompactions: PendingCompaction[] = [];
36
+ let compactionRunning = false;
37
+
38
+ async function runQueuedCompactions(ctx: ExtensionContext): Promise<void> {
39
+ if (compactionRunning || pendingCompactions.length === 0) {
40
+ return;
41
+ }
42
+
43
+ compactionRunning = true;
44
+ const pending = pendingCompactions.splice(0);
45
+ const customInstructions = pending
46
+ .map((item, index) => [
47
+ `Queued compaction request ${index + 1}/${pending.length}.`,
48
+ `Reason: ${item.reason}`,
49
+ item.customInstructions,
50
+ ].join(' '))
51
+ .join('\n\n');
52
+ const continuationRequest = [...pending].reverse().find(item => item.continuationPrompt !== undefined);
53
+
54
+ try {
55
+ ctx.ui.notify('Compacting queued context request.', 'info');
56
+ await compact(ctx, customInstructions);
57
+ ctx.ui.notify('Queued compaction finished.', 'info');
58
+
59
+ if (continuationRequest?.continuationPrompt) {
60
+ ctx.ui.notify('Continuing summarized plan after compaction.', 'info');
61
+ setTimeout(() => pi.sendUserMessage(continuationRequest.continuationPrompt!), 0);
62
+ }
63
+ } catch (error) {
64
+ const message = error instanceof Error ? error.message : String(error);
65
+ ctx.ui.notify(`Queued compaction failed: ${message}`, 'error');
66
+ } finally {
67
+ compactionRunning = false;
68
+ if (pendingCompactions.length > 0) {
69
+ setTimeout(() => void runQueuedCompactions(ctx), 0);
70
+ }
71
+ }
72
+ }
73
+
74
+ pi.on('agent_end', async (_event, ctx) => {
75
+ if (pendingCompactions.length > 0 && !compactionRunning) {
76
+ setTimeout(() => void runQueuedCompactions(ctx), 0);
77
+ }
78
+ });
79
+
80
+ pi.registerTool({
81
+ name: 'request_compaction',
82
+ label: 'Request Compaction',
83
+ description: 'Queue pi context compaction to run as soon as the current agent turn finishes. Use only when the user, a skill, or a prompt explicitly asks for compaction. If more work should continue after compaction, provide continuationPrompt as a concise summary of the remaining plan rather than the original prompt verbatim. This tool does not ask for confirmation; workflows that need confirmation must ask the user before calling it.',
84
+ promptSnippet: 'request_compaction(customInstructions?, reason?, continuationPrompt?) - queue context compaction after the current turn, then optionally continue from a summarized remaining plan.',
85
+ promptGuidelines: [
86
+ 'Use request_compaction only when compaction was explicitly requested by the user, skill, or prompt.',
87
+ 'If user confirmation is required, ask the user before calling request_compaction; this tool does not ask for confirmation.',
88
+ 'Use request_compaction when the user asks to compact now or before continuing to later steps in the same task.',
89
+ 'Provide customInstructions that preserve goals, decisions, files read/modified, blockers, and next steps.',
90
+ 'When work should continue after compaction, provide continuationPrompt as a concise, self-contained summary of the remaining plan; do not copy the original prompt verbatim.',
91
+ 'If the original plan explicitly requires later compaction checkpoints, include those checkpoints in continuationPrompt so request_compaction can be called again later; otherwise do not repeat the same compaction request.',
92
+ ],
93
+ parameters: RequestCompactionParams,
94
+ executionMode: 'sequential',
95
+ async execute(_toolCallId, params, _signal, _onUpdate, ctx) {
96
+ const customInstructions = params.customInstructions?.trim() || DEFAULT_COMPACTION_INSTRUCTIONS;
97
+ const reason = params.reason?.trim() || 'The current instructions requested immediate context compaction.';
98
+ const continuationPrompt = params.continuationPrompt?.trim() || undefined;
99
+
100
+ pendingCompactions.push({ customInstructions, reason, continuationPrompt });
101
+ ctx.ui.notify(
102
+ continuationPrompt
103
+ ? 'Compaction queued after the current turn. The summarized remaining plan will continue after compaction.'
104
+ : 'Compaction queued after the current turn.',
105
+ 'info',
106
+ );
107
+
108
+ return {
109
+ content: [{
110
+ type: 'text',
111
+ text: continuationPrompt
112
+ ? 'Compaction queued. It will run after this agent turn finishes, then the summarized remaining plan will continue.'
113
+ : 'Compaction queued. It will run after this agent turn finishes.',
114
+ }],
115
+ details: { queued: true, continueAfterCompaction: continuationPrompt !== undefined, customInstructions, reason, continuationPrompt },
116
+ terminate: true,
117
+ };
118
+ },
119
+ });
120
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "agent-skills-pi-compact-and-continue",
3
+ "private": true,
4
+ "type": "module",
5
+ "main": "index.ts"
6
+ }
@@ -0,0 +1,46 @@
1
+ # mcp-bridge
2
+
3
+ A reusable factory for turning any stdio MCP server into a pi extension.
4
+
5
+ This is a **library**, not a standalone pi extension. It is consumed by other extensions in `.pi/extensions/` (for example, `chrome-devtools-mcp/`). pi will not load it directly.
6
+
7
+ ## What it does
8
+
9
+ Given a config describing how to spawn an MCP server, the factory returns a pi extension that:
10
+
11
+ 1. Spawns the MCP server over stdio (`StdioClientTransport`).
12
+ 2. Lists the server's tools via `listTools`.
13
+ 3. Registers each tool with pi under a configurable prefix.
14
+ 4. Forwards calls and normalizes MCP content (`text`, `image`, `resource`) back to pi.
15
+ 5. Registers a status command and cleans up on `session_shutdown`.
16
+
17
+ ## Usage
18
+
19
+ ```ts
20
+ import { createMcpBridgeExtension } from "../mcp-bridge/index.js";
21
+
22
+ export default createMcpBridgeExtension({
23
+ prefix: "my_server__",
24
+ command: "npx",
25
+ args: ["-y", "some-mcp-server@latest"],
26
+ });
27
+ ```
28
+
29
+ ## Config
30
+
31
+ | Field | Required | Default | Description |
32
+ |---|---|---|---|
33
+ | `prefix` | yes | — | Prefix prepended to every registered pi tool name (e.g. `chrome_devtools__`). |
34
+ | `command` | yes | — | Executable used to spawn the MCP server (e.g. `npx`, `node`, an absolute path). |
35
+ | `args` | yes | — | Arguments passed to `command`. |
36
+ | `clientName` | no | `pi-<prefix>` | Identifier sent to the MCP server during connection. |
37
+ | `labelPrefix` | no | humanized `prefix` | Shown in pi tool labels and status messages. |
38
+ | `statusCommandName` | no | `<prefix>-status` | Slash command that reports bridge status. |
39
+
40
+ ## Why this exists
41
+
42
+ pi does not yet have first-class MCP support. This bridge is a **stopgap**: it lets pi consume MCP servers today. When pi gains native MCP support, individual wrapper extensions can be retired or replaced; this library will then be deprecated.
43
+
44
+ ## Dependencies
45
+
46
+ Runtime dependencies (`@modelcontextprotocol/sdk`, `typebox`) are declared once at `.pi/extensions/package.json` and installed via `npm ci` in the cloned `agent-skills` repo. Wrapper extensions resolve them from the hoisted `node_modules/` — no per-wrapper install required. `@mariozechner/pi-coding-agent` is supplied by the pi runtime that loads the extension.