Skip to content
Back to search

pordee

MarketplaceWorks with Claude CodeGitHub

Terse Thai+English communication mode for Claude Code. ~60-75% fewer output tokens.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/kerlos-pordee/badge.svg)](/listings/kerlos-pordee)

HTML

<a href="/listings/kerlos-pordee"><img src="/api/listings/kerlos-pordee/badge.svg" alt="findsafeskills safety rating" /></a>

Install

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 16 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
  3. "name": "pordee",
  4. "description": "Terse Thai+English communication mode for Claude Code. ~60-75% fewer output tokens.",
  5. "owner": {
  6. "name": "Vatunyoo Suwannapisit"
  7. },
  8. "plugins": [
  9. {
  10. "name": "pordee",
  11. "description": "พอดี — พูดไทยสั้นๆ ลด output token 60-75% โดยไม่เสีย technical accuracy",
  12. "source": "./",
  13. "category": "productivity"
  14. }
  15. ]
  16. }
README.md · README · 323 lines · 2 findings marked

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # pordee (พอดี)
  2. > ทำไมใช้คำเยอะ ตอบสั้นๆ ก็เข้าใจ
  3. ได้แรงบันดาลใจมาจาก [caveman](https://github.com/JuliusBrussee/caveman) — pordee เป็นรุ่นภาษาไทยที่ลดเฉพาะ **output token** โดยไม่เสียความถูกต้องทาง technical
  4. ---
  5. `pordee` คือ Claude Code plugin สั่งให้ agent ตอบภาษาไทยกระชับ — ตัดคำสุภาพ (ครับ/ค่ะ/นะคะ), คำลังเล (อาจจะ/น่าจะ), และคำเชื่อมที่ไม่จำเป็นทิ้ง เก็บ technical term อังกฤษไว้ตามเดิม
  6. ผล: ลด output token 60-75% เนื้อหาเท่าเดิม
  7. ---
  8. ## ติดตั้งได้หลายวิธี
  9. ### One-line installer (แนะนำ)
  10. ตรวจสอบ agent บนเครื่องที่มีอยู่และติดตั้งได้ทันที
  11. **macOS · Linux · WSL · Git Bash**
  12. ```bash
  13. curl -fsSL https://raw.githubusercontent.com/kerlos/pordee/main/install.sh | bash
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 24 on GitHub
  14. ```
  15. **Windows · PowerShell 5.1+**
  16. ```powershell
  17. irm https://raw.githubusercontent.com/kerlos/pordee/main/install.ps1 | iex
  18. ```
  19. ### ผ่าน skills registry
  20. ```bash
  21. npx skills add kerlos/pordee
  22. ```
  23. สำหรับ agent ที่รองรับ skills registry (Cursor, Windsurf, Cline, Codex, ฯลฯ) เปิดใช้ต่อ session ด้วย `/pordee`
  24. ### ลง agent แยกแต่ละตัว
  25. ดูคำสั่งเฉพาะ agent ทั้งหมดและ flags ต่าง ๆ ใน [INSTALL.md](./INSTALL.md)
  26. ---
  27. ## วิธีใช้
  28. ### Slash command
  29. | คำสั่ง | ผล |
  30. |---|---|
  31. | `/pordee` | เปิด default level (full) |
  32. | `/pordee lite` | โหมดเบา — ตัดคำสุภาพและ filler ออก แต่ grammar เต็ม |
  33. | `/pordee full` | โหมดเต็ม — ตัดให้สั้นที่สุด |
  34. | `/pordee stop` | ปิด |
  35. | `/pordee-stats` | ดูสถิติ token ของ session ปัจจุบัน |
  36. | `/pordee-stats --share` | สรุปสถิติ 1 บรรทัด (copy-paste ได้) |
  37. ### Keyword (ไม่ต้องพิมพ์ slash)
  38. พิมพ์คำเหล่านี้เป็นข้อความปกติในแชต — pordee จะเปิด/ปิดให้อัตโนมัติ ต้องเป็นข้อความทั้งบรรทัด ไม่ใช่ส่วนหนึ่งของประโยค
  39. | Keyword | ผล |
  40. |---|---|
  41. | `พอดี` | เปิด |
  42. | `พอดีโหมด` | เปิด |
  43. | `พูดสั้นๆ` | เปิด |
  44. | `หยุดพอดี` | ปิด |
  45. | `พูดปกติ` | ปิด |
  46. ---
  47. ## ระดับ (Levels)
  48. ### 🪶 Lite — `/pordee lite`
  49. ตัดคำสุภาพ (ครับ/ค่ะ/นะคะ), คำลังเลใจ (อาจจะ/น่าจะ/จริงๆแล้ว), และคำทักทาย (ได้เลยครับ/แน่นอน) ทิ้ง แต่เก็บ grammar เต็ม อ่านแล้วยังเป็นภาษาไทยปกติ professional
  50. ### ⚡ Full — `/pordee` หรือ `/pordee full` (default)
  51. ตัดเหมือน lite + ตัด particle ที่ซ้ำซ้อน (ที่/ซึ่ง/ว่า/อยู่/กำลัง) + ตัด nominalizer (การ-, ความ-) + ใช้คำสั้น (ดู ไม่ใช่ ตรวจสอบ) + ประโยคสั้นได้
  52. Pattern: `[ของ] [ทำ] [เหตุผล]. [ขั้นต่อ].`
  53. ---
  54. ## ก่อน / หลัง (Before / After)
  55. ### ตัวอย่าง 1 — "ทำไม React component ถึง re-render?"
  56. <table>
  57. <tr>
  58. <th width="34%">🗣️ Normal<br><sub>~80 output tokens</sub></th>
  59. <th width="33%">🪶 Lite<br><sub>~45 output tokens · 44% saved</sub></th>
  60. <th width="33%">⚡ Full<br><sub>~22 output tokens · 73% saved</sub></th>
  61. </tr>
  62. <tr>
  63. <td>"แน่นอนครับ ผมยินดีจะอธิบายให้นะครับ จริงๆ แล้วเหตุผลที่ React component ของคุณ re-render นั้น น่าจะเกิดจากการที่คุณส่ง object reference ใหม่เป็น prop ในทุกครั้งที่ component ถูก render ซึ่งทำให้ React มองว่า prop เปลี่ยน และทำการ re-render component ลูก ดังนั้นคุณอาจจะลองใช้ useMemo เพื่อ memoize object นั้นดูครับ"</td>
  64. <td>"React component re-render เพราะส่ง object reference ใหม่เป็น prop ทุกครั้งที่ render ทำให้ React มองว่า prop เปลี่ยน และ re-render component ลูก ลองใช้ useMemo เพื่อ memoize object นั้น"</td>
  65. <td>"Object ref ใหม่ทุก render. Inline object prop = ref ใหม่ = re-render. ห่อด้วย <code>useMemo</code>."</td>
  66. </tr>
  67. </table>
  68. ```
  69. ┌─────────────────────────────────────┐
  70. │ Lite ████░░░░░░ 44% saved │
  71. │ Full ███████░░░ 73% saved │
  72. └─────────────────────────────────────┘
  73. ```
  74. ---
  75. ### ตัวอย่าง 2 — "อธิบาย database connection pooling"
  76. <table>
  77. <tr>
  78. <th width="34%">🗣️ Normal<br><sub>~70 output tokens</sub></th>
  79. <th width="33%">🪶 Lite<br><sub>~35 output tokens · 50% saved</sub></th>
  80. <th width="33%">⚡ Full<br><sub>~18 output tokens · 74% saved</sub></th>
  81. </tr>
  82. <tr>
  83. <td>"ครับ การทำ database connection pooling นั้น โดยทั่วไปแล้วก็คือการที่เราเก็บ connection ของ database ที่เปิดไว้แล้ว เพื่อนำกลับมาใช้ใหม่อีกครั้ง แทนที่จะต้องเปิด connection ใหม่ทุกครั้งที่มี request เข้ามา ซึ่งจะช่วยลด overhead ของการทำ TCP handshake และ authentication ได้อย่างมีประสิทธิภาพ"</td>
  84. <td>"Connection pooling เก็บ connection database ที่เปิดไว้แล้ว เพื่อนำกลับมาใช้ใหม่ ไม่ต้องเปิดใหม่ทุก request ลด overhead ของ TCP handshake และ authentication"</td>
  85. <td>"Pool reuse connection ที่เปิดไว้. ไม่เปิดใหม่ทุก request. ข้าม TCP handshake."</td>
  86. </tr>
  87. </table>
  88. ```
  89. ┌─────────────────────────────────────┐
  90. │ Lite █████░░░░░ 50% saved │
  91. │ Full ███████░░░ 74% saved │
  92. └─────────────────────────────────────┘
  93. ```
  94. ---
  95. ### ตัวอย่าง 3 — Bug report (auth middleware)
  96. <table>
  97. <tr>
  98. <th width="34%">🗣️ Normal<br><sub>~55 output tokens</sub></th>
  99. <th width="33%">🪶 Lite<br><sub>~30 output tokens · 45% saved</sub></th>
  100. <th width="33%">⚡ Full<br><sub>~14 output tokens · 75% saved</sub></th>
  101. </tr>
  102. <tr>
  103. <td>"ครับ ผมตรวจสอบให้แล้วนะครับ ปัญหาที่คุณเจอน่าจะเกิดจาก bug ใน auth middleware ครับ จริงๆ แล้วในส่วนของ token expiry check นั้น โค้ดใช้เครื่องหมาย <code>&lt;</code> แทนที่จะเป็น <code>&lt;=</code> ซึ่งทำให้ token ที่หมดอายุพอดีไม่ถูก reject ดังนั้นเราควรจะแก้ตรงจุดนี้ครับ"</td>
  104. <td>"Bug อยู่ที่ auth middleware ส่วน token expiry check ใช้ <code>&lt;</code> แทนที่จะเป็น <code>&lt;=</code> ทำให้ token ที่หมดอายุพอดีไม่ถูก reject แก้:"</td>
  105. <td>"Bug ที่ auth middleware. Token expiry ใช้ <code>&lt;</code> ไม่ใช่ <code>&lt;=</code>. Fix:"</td>
  106. </tr>
  107. </table>
  108. ```
  109. ┌─────────────────────────────────────┐
  110. │ Lite █████░░░░░ 45% saved │
  111. │ Full ████████░░ 75% saved │
  112. └─────────────────────────────────────┘
  113. ```
  114. ---
  115. ### ตัวอย่าง 4 — "แนะนำอาหารกลางวันให้หน่อย"
  116. <table>
  117. <tr>
  118. <th width="34%">🗣️ Normal<br><sub>~70 output tokens</sub></th>
  119. <th width="33%">🪶 Lite<br><sub>~32 output tokens · 54% saved</sub></th>
  120. <th width="33%">⚡ Full<br><sub>~14 output tokens · 80% saved</sub></th>
  121. </tr>
  122. <tr>
  123. <td>"ได้เลยครับ จริงๆ แล้วการเลือกอาหารกลางวันก็ขึ้นอยู่กับหลายปัจจัยนะครับ เช่น งบประมาณ เวลาที่มี และความต้องการทางโภชนาการของคุณ ถ้าคุณอยากทานอาหารที่ทำง่ายและมีประโยชน์ ผมขอแนะนำว่าน่าจะลองทำสลัดไก่ย่างดูครับ เพราะว่ามีโปรตีนสูงและไม่ใช้เวลาเตรียมนานเลย"</td>
  124. <td>"อาหารกลางวันขึ้นอยู่กับงบ เวลา และโภชนาการ ถ้าอยากกินง่ายและมีประโยชน์ ลองสลัดไก่ย่าง โปรตีนสูงและเตรียมไม่นาน"</td>
  125. <td>"งบ + เวลา + โภชนาการ. ง่ายและดี → สลัดไก่ย่าง. โปรตีนสูง, เตรียมเร็ว."</td>
  126. </tr>
  127. </table>
  128. ```
  129. ┌─────────────────────────────────────┐
  130. │ Lite █████░░░░░ 54% saved │
  131. │ Full ████████░░ 80% saved │
  132. └─────────────────────────────────────┘
  133. ```
  134. ---
  135. ### ตัวอย่าง 5 — "เที่ยวเชียงใหม่ ไปเดือนไหนดี"
  136. <table>
  137. <tr>
  138. <th width="34%">🗣️ Normal<br><sub>~75 output tokens</sub></th>
  139. <th width="33%">🪶 Lite<br><sub>~30 output tokens · 60% saved</sub></th>
  140. <th width="33%">⚡ Full<br><sub>~12 output tokens · 84% saved</sub></th>
  141. </tr>
  142. <tr>
  143. <td>"ครับ ถ้าคุณอยากไปเที่ยวเชียงใหม่ ผมแนะนำว่าน่าจะไปช่วงเดือนพฤศจิกายนถึงกุมภาพันธ์ครับ เพราะว่าเป็นช่วงที่อากาศเย็นสบาย ไม่ร้อนเกินไป และไม่มีฝนตกบ่อยเหมือนช่วงอื่นๆ จริงๆ แล้วเดือนธันวาคมก็เป็นเดือนที่นิยมที่สุดเลยนะครับ แต่ก็จะคนเยอะหน่อย"</td>
  144. <td>"ไปเชียงใหม่ ช่วงพฤศจิกายน-กุมภาพันธ์ดีที่สุด อากาศเย็นสบาย ไม่ร้อน ฝนน้อย ธันวาคมนิยมที่สุดแต่คนเยอะ"</td>
  145. <td>"พ.ย.-ก.พ. ดีสุด. อากาศเย็น, ฝนน้อย. ธ.ค. คนเยอะ."</td>
  146. </tr>
  147. </table>
  148. ```
  149. ┌─────────────────────────────────────┐
  150. │ Lite ██████░░░░ 60% saved │
  151. │ Full ████████░░ 84% saved │
  152. └─────────────────────────────────────┘
  153. ```
  154. ---
  155. ### ตัวอย่าง 6 — "วิธีนอนหลับให้สนิท"
  156. <table>
  157. <tr>
  158. <th width="34%">🗣️ Normal<br><sub>~70 output tokens</sub></th>
  159. <th width="33%">🪶 Lite<br><sub>~32 output tokens · 54% saved</sub></th>
  160. <th width="33%">⚡ Full<br><sub>~14 output tokens · 80% saved</sub></th>
  161. </tr>
  162. <tr>
  163. <td>"ครับ การนอนหลับให้สนิทนั้นมีหลายวิธีนะครับ ก่อนอื่นเลย คุณควรจะหลีกเลี่ยงการดื่มกาแฟหรือเครื่องดื่มที่มีคาเฟอีนหลังบ่ายสาม จริงๆ แล้วก็ควรจะปิดหน้าจอทุกชนิดอย่างน้อย 30 นาทีก่อนนอนนะครับ และพยายามเข้านอนเวลาเดิมทุกวันเพื่อให้ร่างกายปรับนาฬิกาชีวิต"</td>
  164. <td>"นอนหลับสนิทมีหลายวิธี เลี่ยงคาเฟอีนหลังบ่ายสาม ปิดหน้าจอ 30 นาทีก่อนนอน เข้านอนเวลาเดิมทุกวันเพื่อปรับนาฬิกาชีวิต"</td>
  165. <td>"เลี่ยงคาเฟอีนหลังบ่าย 3. ปิดจอ 30 นาทีก่อนนอน. เข้านอนเวลาเดิม → ปรับ circadian."</td>
  166. </tr>
  167. </table>
  168. ```
  169. ┌─────────────────────────────────────┐
  170. │ Lite █████░░░░░ 54% saved │
  171. │ Full ████████░░ 80% saved │
  172. └─────────────────────────────────────┘
  173. ```
  174. ---
  175. ## กลไกการทำงาน
  176. 1. ติดตั้ง plugin → Claude Code register hook ของ pordee อัตโนมัติ
  177. 2. เริ่ม session ใหม่ → SessionStart hook อ่าน state ที่ `~/.pordee/state.json`
  178. 3. ถ้า `enabled=true` → inject กฎ pordee เข้า context ของ session
  179. 4. ทุก turn ที่ user พิมพ์ → UserPromptSubmit hook
  180. - ตรวจ trigger ใน prompt (`/pordee`, `พอดี`, `หยุดพอดี`, ฯลฯ)
  181. - update state ถ้าเจอ trigger
  182. - ฉีด reminder ของ level ปัจจุบันเข้า context (กันไม่ให้ model drift)
  183. 5. State อยู่ที่ `~/.pordee/state.json` — ถาวรข้าม session
  184. ---
  185. ## สถิติ (Stats)
  186. `/pordee-stats` แสดง token usage ของ session ปัจจุบัน + ประมาณการ token ที่ประหยัดได้จากการใช้ pordee
  187. ```
  188. พอดี Stats
  189. ──────────────────────────────────
  190. Session: ...projects/demo/session.jsonl
  191. Turns: 12
  192. ──────────────────────────────────
  193. Output tokens: 8,450
  194. Cache-read tokens: 2,100
  195. ──────────────────────────────────
  196. Est. without pordee: 21,667
  197. Est. tokens saved: 13,217 (~61%)
  198. Est. saved (USD): ~$0.198
  199. Savings est. from benchmarks/ (median per-task). Actual varies by task.
  200. ```
  201. | คำสั่ง | ผล |
  202. |---|---|
  203. | `/pordee-stats` | สถิติ session ปัจจุบัน + lifetime summary |
  204. | `/pordee-stats --share` | สรุป 1 บรรทัด — เช่น `⚡ Saved 13,217 output tokens (~$0.198) across 12 turns this session — pordee` |
  205. | `/pordee-stats --all` | สถิติรวมทุก session (lifetime) |
  206. | `/pordee-stats --since 7d` | สถิติย้อนหลัง 7 วัน |
  207. ### Benchmark
  208. compression ratio ที่ stats ใช้มาจาก `benchmarks/compression.json` — สร้างจากการรัน prompt ชุดทดสอบภาษาไทย 8 ข้อ ผ่าน API แบบปกติ vs pordee แล้วคิด median
  209. ```bash
  210. # รัน benchmark (ต้องมี ANTHROPIC_API_KEY)
  211. export ANTHROPIC_BASE_URL=https://api.kimi.com/coding/v1
  212. node benchmarks/run.js --level full
  213. node benchmarks/run.js --level lite
  214. ```
  215. หรือใช้ `--dry-run` สร้าง mock data สำหรับทดสอบ:
  216. ```bash
  217. node benchmarks/run.js --dry-run --level full
  218. ```
  219. ---
  220. ## ตอนไหน pordee จะหยุดเอง
  221. บางสถานการณ์ การพูดสั้นเกินไปอันตรายหรือคนอ่านอาจเข้าใจผิด pordee จะปิดตัวเองชั่วคราว ตอบเป็นภาษาไทยปกติเต็มประโยค จบแล้วค่อยกลับมา
  222. ถ้าผู้ใช้ต้องการให้อธิบายชัด ๆ พิมพ์คำต่อไปนี้ pordee จะหยุดและตอบยาวขึ้น:
  223. | คำที่ผู้ใช้พิมพ์ | ความหมาย |
  224. |---|---|
  225. | `อะไรนะ` | ฟังไม่ทัน ขอใหม่ |
  226. | `พูดอีกที` | ขอตอบซ้ำ |
  227. | `อธิบายชัดๆ` | ขอละเอียดกว่านี้ |
  228. | `ขยายความ` | ขอรายละเอียด |
  229. นอกจากนี้ pordee จะหยุดเองเมื่อ:
  230. - มี **security warning** หรือ ⚠️ ในคำตอบ
  231. - คำสั่งที่ย้อนกลับไม่ได้ — `DROP TABLE`, `rm -rf`, `git push --force`, `git reset --hard`, `git branch -D`
  232. - ขั้นตอนหลายสเต็ปที่ลำดับสำคัญ และ ประโยคสั้นเสี่ยงทำให้สับสน
  233. หลังจบส่วนที่ต้องชัด pordee กลับมาโหมดเดิมทันที
  234. ---
  235. ## ข้อจำกัด
  236. - ตอนนี้รองรับเฉพาะ Claude Code (v1) — โปรแกรมอื่นๆ จะเพิ่มเข้ามาในทีหลัง
  237. ---
  238. ## License
  239. MIT
bin/install.js · Bundled script · 632 lines · 2 findings marked
  1. #!/usr/bin/env node
  2. // pordee — unified cross-platform installer.
  3. //
  4. // One Node script handles detection + install/uninstall across agents.
  5. // Run locally: node bin/install.js [flags]
  6. // curl|bash: delegated from install.sh shim → npx -y github:kerlos/pordee -- [flags]
  7. // Windows: delegated from install.ps1 shim → same npx delegation
  8. //
  9. // Pure stdlib, zero npm runtime deps.
  10. 'use strict';
  11. const fs = require('fs');
  12. const os = require('os');
  13. const path = require('path');
  14. const { spawnSync, execSync } = require('child_process');
  15. const REPO = 'kerlos/pordee';
  16. const SKILL_CMD = 'npx skills add';
  17. const SKILL_REMOVE_CMD = 'npx skills remove';
  18. const RULE_SOURCE = path.join(__dirname, '..', 'src', 'rules', 'pordee-activate.md');
  19. const PORDEE_STATE_DIR = path.join(os.homedir(), '.pordee');
  20. const MARKER_START = '<!-- PORDEE-RULES-START -->';
  21. const MARKER_END = '<!-- PORDEE-RULES-END -->';
  22. const MARKER_NOTE = '<!-- Generated by pordee installer. Do not edit between markers. -->';
  23. function hasCmd(name) {
  24. if (!name) return false;
  25. if (process.platform === 'win32') {
  26. return spawnSync('where', [name], { shell: true, stdio: 'ignore' }).status === 0;
  27. }
  28. return spawnSync('command', ['-v', name], { stdio: 'ignore' }).status === 0;
  29. }
  30. function exists(p) {
  31. return p ? fs.existsSync(p) : false;
  32. }
  33. function homeDot(name) {
  34. return path.join(os.homedir(), name);
  35. }
  36. function cwd(p) {
  37. return path.join(process.cwd(), p);
  38. }
  39. // Providers are ordered roughly by popularity / detection reliability.
  40. const PROVIDERS = [
  41. {
  42. id: 'claude',
  43. name: 'Claude Code',
  44. detect: () => hasCmd('claude') || exists(homeDot('.claude')),
  45. install: () => [
  46. 'claude plugin marketplace add kerlos/pordee',
  47. 'claude plugin install pordee@pordee'
  48. ],
  49. uninstall: () => ['claude plugin uninstall pordee'],
  50. auto: true
  51. },
  52. {
  53. id: 'gemini',
  54. name: 'Gemini CLI',
  55. profile: 'gemini',
  56. detect: () => hasCmd('gemini') || exists(homeDot('.gemini')),
  57. auto: true
  58. },
  59. {
  60. id: 'codex',
  61. name: 'Codex CLI',
  62. profile: 'codex',
  63. detect: () => hasCmd('codex') || exists(homeDot('.codex')),
  64. auto: false
  65. },
  66. {
  67. id: 'cursor',
  68. name: 'Cursor',
  69. profile: 'cursor',
  70. detect: () => hasCmd('cursor') || exists(homeDot('.cursor')) || exists(cwd('.cursor')),
  71. ruleDests: [{ type: 'file', path: cwd('.cursor/rules/pordee.mdc') }],
  72. auto: false
  73. },
  74. {
  75. id: 'windsurf',
  76. name: 'Windsurf',
  77. profile: 'windsurf',
  78. detect: () => hasCmd('windsurf') || exists(homeDot('.windsurf')) || exists(cwd('.windsurf')),
  79. ruleDests: [{ type: 'file', path: cwd('.windsurf/rules/pordee.md') }],
  80. auto: false
  81. },
  82. {
  83. id: 'cline',
  84. name: 'Cline',
  85. profile: 'cline',
  86. detect: () => exists(homeDot('.cline')) || exists(cwd('.clinerules')),
  87. ruleDests: [{ type: 'file', path: cwd('.clinerules/pordee.md') }],
  88. auto: false
  89. },
  90. {
  91. id: 'continue',
  92. name: 'Continue',
  93. profile: 'continue',
  94. detect: () => exists(homeDot('.continue')) || exists(cwd('.continue')),
  95. auto: false
  96. },
  97. {
  98. id: 'copilot',
  99. name: 'GitHub Copilot',
  100. profile: 'copilot',
  101. detect: () => false, // soft probe
  102. ruleDests: [{ type: 'append', path: cwd('.github/copilot-instructions.md') }],
  103. auto: false,
  104. softProbe: true
  105. },
  106. {
  107. id: 'opencode',
  108. name: 'opencode',
  109. profile: 'opencode',
  110. detect: () => hasCmd('opencode') || exists(homeDot('.config/opencode')),
  111. ruleDests: [{ type: 'append', path: cwd('AGENTS.md') }],
  112. auto: true
  113. },
  114. {
  115. id: 'openclaw',
  116. name: 'OpenClaw',
  117. profile: 'openclaw',
  118. detect: () => exists(homeDot('.openclaw/workspace')),
  119. ruleDests: [{ type: 'append', path: homeDot('.openclaw/workspace/SOUL.md') }],
  120. auto: true
  121. },
  122. {
  123. id: 'kilo',
  124. name: 'Kilo Code',
  125. profile: 'kilo',
  126. detect: () => false,
  127. auto: false,
  128. softProbe: true
  129. },
  130. {
  131. id: 'roo',
  132. name: 'Roo Code',
  133. profile: 'roo',
  134. detect: () => false,
  135. auto: false,
  136. softProbe: true
  137. },
  138. {
  139. id: 'augment',
  140. name: 'Augment Code',
  141. profile: 'augment',
  142. detect: () => false,
  143. auto: false,
  144. softProbe: true
  145. },
  146. {
  147. id: 'aider-desk',
  148. name: 'Aider Desk',
  149. profile: 'aider-desk',
  150. detect: () => false,
  151. auto: false,
  152. softProbe: true
  153. },
  154. {
  155. id: 'amp',
  156. name: 'Sourcegraph Amp',
  157. profile: 'amp',
  158. detect: () => false,
  159. auto: false,
  160. softProbe: true
  161. },
  162. {
  163. id: 'bob',
  164. name: 'IBM Bob',
  165. profile: 'bob',
  166. detect: () => false,
  167. auto: false,
  168. softProbe: true
  169. },
  170. {
  171. id: 'crush',
  172. name: 'Crush',
  173. profile: 'crush',
  174. detect: () => false,
  175. auto: false,
  176. softProbe: true
  177. },
  178. {
  179. id: 'devin',
  180. name: 'Devin (terminal)',
  181. profile: 'devin',
  182. detect: () => false,
  183. auto: false,
  184. softProbe: true
  185. },
  186. {
  187. id: 'droid',
  188. name: 'Droid (Factory)',
  189. profile: 'droid',
  190. detect: () => false,
  191. auto: false,
  192. softProbe: true
  193. },
  194. {
  195. id: 'forgecode',
  196. name: 'ForgeCode',
  197. profile: 'forgecode',
  198. detect: () => false,
  199. auto: false,
  200. softProbe: true
  201. },
  202. {
  203. id: 'goose',
  204. name: 'Block Goose',
  205. profile: 'goose',
  206. detect: () => hasCmd('goose') || exists(homeDot('.goose')),
  207. auto: false
  208. },
  209. {
  210. id: 'iflow-cli',
  211. name: 'iFlow CLI',
  212. profile: 'iflow-cli',
  213. detect: () => false,
  214. auto: false,
  215. softProbe: true
  216. },
  217. {
  218. id: 'kiro-cli',
  219. name: 'Kiro CLI',
  220. profile: 'kiro-cli',
  221. detect: () => false,
  222. auto: false,
  223. softProbe: true
  224. },
  225. {
  226. id: 'mistral-vibe',
  227. name: 'Mistral Vibe',
  228. profile: 'mistral-vibe',
  229. detect: () => false,
  230. auto: false,
  231. softProbe: true
  232. },
  233. {
  234. id: 'openhands',
  235. name: 'OpenHands',
  236. profile: 'openhands',
  237. detect: () => false,
  238. auto: false,
  239. softProbe: true
  240. },
  241. {
  242. id: 'qwen-code',
  243. name: 'Qwen Code',
  244. profile: 'qwen-code',
  245. detect: () => false,
  246. auto: false,
  247. softProbe: true
  248. },
  249. {
  250. id: 'rovodev',
  251. name: 'Atlassian Rovo Dev',
  252. profile: 'rovodev',
  253. detect: () => false,
  254. auto: false,
  255. softProbe: true
  256. },
  257. {
  258. id: 'tabnine-cli',
  259. name: 'Tabnine CLI',
  260. profile: 'tabnine-cli',
  261. detect: () => false,
  262. auto: false,
  263. softProbe: true
  264. },
  265. {
  266. id: 'trae',
  267. name: 'Trae',
  268. profile: 'trae',
  269. detect: () => false,
  270. auto: false,
  271. softProbe: true
  272. },
  273. {
  274. id: 'warp',
  275. name: 'Warp',
  276. profile: 'warp',
  277. detect: () => hasCmd('warp') || exists(homeDot('.warp')),
  278. auto: false
  279. },
  280. {
  281. id: 'replit',
  282. name: 'Replit Agent',
  283. profile: 'replit',
  284. detect: () => false,
  285. auto: false,
  286. softProbe: true
  287. },
  288. {
  289. id: 'junie',
  290. name: 'JetBrains Junie',
  291. profile: 'junie',
  292. detect: () => false,
  293. auto: false,
  294. softProbe: true
  295. },
  296. {
  297. id: 'qoder',
  298. name: 'Qoder',
  299. profile: 'qoder',
  300. detect: () => false,
  301. auto: false,
  302. softProbe: true
  303. },
  304. {
  305. id: 'antigravity',
  306. name: 'Google Antigravity',
  307. profile: 'antigravity',
  308. detect: () => false,
  309. auto: false,
  310. softProbe: true
  311. }
  312. ];
  313. function skillsInstallCmd(profile) {
  314. return `${SKILL_CMD} ${REPO} -a ${profile}`;
  315. }
  316. function getInstallCommands(provider) {
  317. if (provider.install) return provider.install();
  318. if (provider.profile) return [skillsInstallCmd(provider.profile)];
  319. return [];
  320. }
  321. function getUninstallCommands(provider) {
  322. if (provider.uninstall) return provider.uninstall();
  323. if (provider.profile) return [`${SKILL_REMOVE_CMD} pordee`];
  324. return [];
  325. }
  326. function run(cmd, dryRun) {
  327. if (dryRun) {
  328. console.log(` [dry-run] ${cmd}`);
  329. return true;
  330. }
  331. try {
  332. execSync(cmd, { stdio: 'inherit' });
  333. return true;
  334. } catch (err) {
  335. console.error(` failed: ${cmd}`);
  336. return false;
  337. }
  338. }
  339. function readRule() {
  340. if (!exists(RULE_SOURCE)) {
  341. console.error(`Rule source missing: ${RULE_SOURCE}`);
  342. return '';
  343. }
  344. return fs.readFileSync(RULE_SOURCE, 'utf8');
  345. }
  346. function stripMarkerBlock(text) {
  347. const lines = text.split('\n');
  348. const out = [];
  349. let inside = false;
  350. for (const line of lines) {
  351. if (line.trim() === MARKER_START) {
  352. inside = true;
  353. continue;
  354. }
  355. if (line.trim() === MARKER_END) {
  356. inside = false;
  357. continue;
  358. }
  359. if (!inside) out.push(line);
  360. }
  361. // Remove extra blank lines left by removed block.
  362. return out.join('\n').replace(/\n{3,}/g, '\n\n').trim();
  363. }
  364. function buildBlock(ruleText) {
  365. return [MARKER_START, MARKER_NOTE, '', ruleText.trim(), '', MARKER_END].join('\n');
  366. }
  367. function writeRuleFile(destPath, ruleText, dryRun) {
  368. if (dryRun) {
  369. console.log(` [dry-run] write ${destPath}`);
  370. return;
  371. }
  372. fs.mkdirSync(path.dirname(destPath), { recursive: true });
  373. fs.writeFileSync(destPath, ruleText, 'utf8');
  374. console.log(` wrote ${destPath}`);
  375. }
  376. function appendRuleFile(destPath, ruleText, dryRun) {
  377. if (dryRun) {
  378. console.log(` [dry-run] append to ${destPath}`);
  379. return;
  380. }
  381. fs.mkdirSync(path.dirname(destPath), { recursive: true });
  382. let existing = '';
  383. if (exists(destPath)) {
  384. existing = fs.readFileSync(destPath, 'utf8');
  385. existing = stripMarkerBlock(existing);
  386. if (existing && !existing.endsWith('\n')) existing += '\n';
  387. }
  388. const block = buildBlock(ruleText);
  389. fs.writeFileSync(destPath, existing + '\n' + block + '\n', 'utf8');
  390. console.log(` appended ${destPath}`);
  391. }
  392. function removeRuleFile(destPath, dryRun) {
  393. if (dryRun) {
  394. console.log(` [dry-run] remove ${destPath}`);
  395. return;
  396. }
  397. if (!exists(destPath)) return;
  398. const content = fs.readFileSync(destPath, 'utf8');
  399. if (content.includes(MARKER_START)) {
  400. const cleaned = stripMarkerBlock(content);
  401. if (cleaned.trim()) {
  402. fs.writeFileSync(destPath, cleaned + '\n', 'utf8');
  403. console.log(` cleaned markers from ${destPath}`);
  404. } else {
  405. fs.unlinkSync(destPath);
  406. console.log(` removed ${destPath}`);
  407. }
  408. } else {
  409. fs.unlinkSync(destPath);
  410. console.log(` removed ${destPath}`);
  411. }
  412. }
  413. function installRules(provider, dryRun) {
  414. if (!provider.ruleDests || !provider.ruleDests.length) return;
  415. const ruleText = readRule();
  416. if (!ruleText) return;
  417. console.log(` rules for ${provider.name}:`);
  418. for (const dest of provider.ruleDests) {
  419. if (dest.type === 'append') {
  420. appendRuleFile(dest.path, ruleText, dryRun);
  421. } else {
  422. writeRuleFile(dest.path, ruleText, dryRun);
  423. }
  424. }
  425. }
  426. function uninstallRules(provider, dryRun) {
  427. if (!provider.ruleDests || !provider.ruleDests.length) return;
  428. console.log(` removing rules for ${provider.name}:`);
  429. for (const dest of provider.ruleDests) {
  430. removeRuleFile(dest.path, dryRun);
  431. }
  432. }
  433. function removeState(dryRun) {
  434. if (dryRun) {
  435. console.log(` [dry-run] rm -rf ${PORDEE_STATE_DIR}`);
  436. return;
  437. }
  438. if (exists(PORDEE_STATE_DIR)) {
  439. fs.rmSync(PORDEE_STATE_DIR, { recursive: true, force: true });
  440. console.log(` removed ${PORDEE_STATE_DIR}`);
  441. }
  442. }
  443. function printList() {
  444. console.log('pordee agent matrix');
  445. console.log('');
  446. const idWidth = Math.max(...PROVIDERS.map(p => p.id.length));
  447. const nameWidth = Math.max(...PROVIDERS.map(p => p.name.length));
  448. console.log(`${'id'.padEnd(idWidth)} ${'name'.padEnd(nameWidth)} profile detected auto-activate install command`);
  449. console.log('-'.repeat(idWidth + nameWidth + 80));
  450. for (const p of PROVIDERS) {
  451. const detected = p.detect() ? 'yes' : 'no';
  452. const auto = p.auto ? 'yes' : 'no';
  453. const profile = (p.profile || '-').padEnd(11);
  454. const cmds = getInstallCommands(p).join(' && ');
  455. console.log(`${p.id.padEnd(idWidth)} ${p.name.padEnd(nameWidth)} ${profile} ${detected.padEnd(8)} ${auto.padEnd(14)} ${cmds}`);
  456. }
  457. }
  458. function printHelp() {
  459. console.log(`pordee installer
  460. One-line install:
  461. curl -fsSL https://raw.githubusercontent.com/kerlos/pordee/main/install.sh | bash
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 486 on GitHub
  462. irm https://raw.githubusercontent.com/kerlos/pordee/main/install.ps1 | iex
  463. Usage: node bin/install.js [flags]
  464. Flags:
  465. --all Install for every detected agent.
  466. --only <id> Install for one agent. Repeatable.
  467. --dry-run Print commands, change nothing.
  468. --list Print agent matrix and exit.
  469. --with-init Write always-on rule files for supported agents.
  470. --force Re-run even if already installed.
  471. --uninstall Remove pordee from detected agents + delete state.
  472. --help Show this help.
  473. `);
  474. }
  475. function parseArgs(argv) {
  476. const flags = {
  477. all: false,
  478. only: [],
  479. dryRun: false,
  480. list: false,
  481. withInit: false,
  482. force: false,
  483. uninstall: false,
  484. help: false
  485. };
  486. for (let i = 2; i < argv.length; i++) {
  487. const arg = argv[i];
  488. switch (arg) {
  489. case '--all':
  490. flags.all = true;
  491. break;
  492. case '--only':
  493. if (i + 1 >= argv.length) throw new Error('--only requires an agent id');
  494. flags.only.push(argv[++i]);
  495. break;
  496. case '--dry-run':
  497. flags.dryRun = true;
  498. break;
  499. case '--list':
  500. flags.list = true;
  501. break;
  502. case '--with-init':
  503. flags.withInit = true;
  504. break;
  505. case '--force':
  506. flags.force = true;
  507. break;
  508. case '--uninstall':
  509. flags.uninstall = true;
  510. break;
  511. case '--help':
  512. case '-h':
  513. flags.help = true;
  514. break;
  515. default:
  516. throw new Error(`Unknown flag: ${arg}`);
  517. }
  518. }
  519. return flags;
  520. }
  521. function main() {
  522. let flags;
  523. try {
  524. flags = parseArgs(process.argv);
  525. } catch (err) {
  526. console.error(err.message);
  527. process.exit(1);
  528. }
  529. if (flags.help) {
  530. printHelp();
  531. return;
  532. }
  533. if (flags.list) {
  534. printList();
  535. return;
  536. }
  537. let selected;
  538. if (flags.only.length) {
  539. selected = flags.only
  540. .map(id => {
  541. const p = PROVIDERS.find(p => p.id === id);
  542. if (!p) throw new Error(`Unknown agent id: ${id}`);
  543. return p;
  544. });
  545. } else if (flags.all) {
  546. selected = PROVIDERS;
  547. } else {
  548. selected = PROVIDERS.filter(p => p.detect());
  549. if (selected.length === 0) {
  550. console.log('No supported agents detected.');
  551. console.log('Run with --all to try every known agent, or --only <id> for a specific one.');
  552. console.log('See --list for the full matrix.');
  553. return;
  554. }
  555. }
  556. if (flags.uninstall) {
  557. console.log('Uninstalling pordee...');
  558. let ranSkillsRemove = false;
  559. for (const p of selected) {
  560. console.log(`\n${p.name}:`);
  561. const cmds = getUninstallCommands(p);
  562. for (const cmd of cmds) {
  563. // Avoid duplicate npx skills remove calls.
  564. if (cmd === `${SKILL_REMOVE_CMD} pordee`) {
  565. if (ranSkillsRemove) continue;
  566. ranSkillsRemove = true;
  567. }
  568. run(cmd, flags.dryRun);
  569. }
  570. uninstallRules(p, flags.dryRun);
  571. }
  572. removeState(flags.dryRun);
  573. console.log('\nUninstall complete.');
  574. return;
  575. }
  576. console.log(flags.dryRun ? 'Dry-run install plan:' : 'Installing pordee...');
  577. for (const p of selected) {
  578. console.log(`\n${p.name}:`);
  579. const cmds = getInstallCommands(p);
  580. if (cmds.length === 0 && !p.ruleDests) {
  581. console.log(' nothing to do');
  582. continue;
  583. }
  584. for (const cmd of cmds) {
  585. run(cmd, flags.dryRun);
  586. }
  587. if (flags.withInit) {
  588. installRules(p, flags.dryRun);
  589. }
  590. }
  591. console.log('\nDone.');
  592. if (!flags.withInit) {
  593. console.log('Tip: use --with-init to drop always-on rule files into this repo.');
  594. }
  595. }
  596. main();
install.ps1 · Bundled script · 55 lines · 1 finding marked
  1. # pordee — installer shim (Windows / PowerShell).
  2. #
  3. # Thin wrapper around bin/install.js (the unified Node installer). Every flag
  4. # you'd pass to bin/install.js can be passed here; we just forward them.
  5. #
  6. # One-line install:
  7. # irm https://raw.githubusercontent.com/kerlos/pordee/main/install.ps1 | iex
    • Note: Runs a downloaded PowerShell script (iex / Invoke-Expression)
    • Line 7 on GitHub
  8. #
  9. # Local clone:
  10. # pwsh install.ps1 [flags]
  11. function Install-Pordee {
  12. param(
  13. [string[]]$InstallerArgs = @()
  14. )
  15. $ErrorActionPreference = "Stop"
  16. $Repo = "kerlos/pordee"
  17. $node = Get-Command node -ErrorAction SilentlyContinue
  18. if (-not $node) {
  19. Write-Error @"
  20. pordee: Node.js (>=18) required. Install:
  21. - winget install OpenJS.NodeJS.LTS
  22. - or download from https://nodejs.org
  23. "@
  24. exit 1
  25. }
  26. $nodeMajor = [int](& node -p "process.versions.node.split('.')[0]")
  27. if ($nodeMajor -lt 18) {
  28. Write-Error "pordee: Node $nodeMajor too old. Need Node >=18."
  29. exit 1
  30. }
  31. if ($PSCommandPath) {
  32. $here = Split-Path -Parent $PSCommandPath
  33. $local = Join-Path $here "bin/install.js"
  34. if (Test-Path $local) {
  35. & node $local @InstallerArgs
  36. exit $LASTEXITCODE
  37. }
  38. }
  39. $npx = Get-Command npx -ErrorAction SilentlyContinue
  40. if (-not $npx) {
  41. Write-Error "pordee: npx required (ships with Node >=18)."
  42. exit 1
  43. }
  44. & npx -y "github:$Repo" @InstallerArgs
  45. exit $LASTEXITCODE
  46. }
  47. Install-Pordee -InstallerArgs $args
install.sh · Bundled script · 41 lines · 2 findings marked
  1. #!/usr/bin/env bash
  2. # pordee — installer shim.
  3. #
  4. # Thin wrapper around bin/install.js (the unified Node installer). Every flag
  5. # you'd pass to bin/install.js can be passed here; we just forward them.
  6. #
  7. # One-line install:
  8. # curl -fsSL https://raw.githubusercontent.com/kerlos/pordee/main/install.sh | bash
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 8 on GitHub
  9. # curl -fsSL https://raw.githubusercontent.com/kerlos/pordee/main/install.sh | bash -s -- --all
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 9 on GitHub
  10. #
  11. # Local clone:
  12. # bash install.sh [flags]
  13. set -euo pipefail
  14. REPO="kerlos/pordee"
  15. if ! command -v node >/dev/null 2>&1; then
  16. echo "pordee: Node.js (≥18) required. Install:" >&2
  17. echo " macOS: brew install node" >&2
  18. echo " Linux: see https://nodejs.org or use nvm" >&2
  19. exit 1
  20. fi
  21. NODE_MAJOR=$(node -p "process.versions.node.split('.')[0]")
  22. if [ "$NODE_MAJOR" -lt 18 ]; then
  23. echo "pordee: Node $NODE_MAJOR too old. Need Node ≥18." >&2
  24. exit 1
  25. fi
  26. here="$(cd "$(dirname "${BASH_SOURCE[0]:-}")" 2>/dev/null && pwd)" || here=""
  27. if [ -n "$here" ] && [ -f "$here/bin/install.js" ]; then
  28. exec node "$here/bin/install.js" "$@"
  29. fi
  30. if ! command -v npx >/dev/null 2>&1; then
  31. echo "pordee: npx required (ships with Node ≥18)." >&2
  32. exit 1
  33. fi
  34. exec npx -y "github:$REPO" "$@"

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.