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
Markdown
[](/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)
- {
- "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
- "name": "pordee",
- "description": "Terse Thai+English communication mode for Claude Code. ~60-75% fewer output tokens.",
- "owner": {
- "name": "Vatunyoo Suwannapisit"
- },
- "plugins": [
- {
- "name": "pordee",
- "description": "พอดี — พูดไทยสั้นๆ ลด output token 60-75% โดยไม่เสีย technical accuracy",
- "source": "./",
- "category": "productivity"
- }
- ]
- }
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)
- # pordee (พอดี)
- > ทำไมใช้คำเยอะ ตอบสั้นๆ ก็เข้าใจ
- ได้แรงบันดาลใจมาจาก [caveman](https://github.com/JuliusBrussee/caveman) — pordee เป็นรุ่นภาษาไทยที่ลดเฉพาะ **output token** โดยไม่เสียความถูกต้องทาง technical
- ---
- `pordee` คือ Claude Code plugin สั่งให้ agent ตอบภาษาไทยกระชับ — ตัดคำสุภาพ (ครับ/ค่ะ/นะคะ), คำลังเล (อาจจะ/น่าจะ), และคำเชื่อมที่ไม่จำเป็นทิ้ง เก็บ technical term อังกฤษไว้ตามเดิม
- ผล: ลด output token 60-75% เนื้อหาเท่าเดิม
- ---
- ## ติดตั้งได้หลายวิธี
- ### One-line installer (แนะนำ)
- ตรวจสอบ agent บนเครื่องที่มีอยู่และติดตั้งได้ทันที
- **macOS · Linux · WSL · Git Bash**
- ```bash
- 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
- ```
- **Windows · PowerShell 5.1+**
- ```powershell
- irm https://raw.githubusercontent.com/kerlos/pordee/main/install.ps1 | iex
- Note: Runs a downloaded PowerShell script (iex / Invoke-Expression)
- Line 30 on GitHub
- ```
- ### ผ่าน skills registry
- ```bash
- npx skills add kerlos/pordee
- ```
- สำหรับ agent ที่รองรับ skills registry (Cursor, Windsurf, Cline, Codex, ฯลฯ) เปิดใช้ต่อ session ด้วย `/pordee`
- ### ลง agent แยกแต่ละตัว
- ดูคำสั่งเฉพาะ agent ทั้งหมดและ flags ต่าง ๆ ใน [INSTALL.md](./INSTALL.md)
- ---
- ## วิธีใช้
- ### Slash command
- | คำสั่ง | ผล |
- |---|---|
- | `/pordee` | เปิด default level (full) |
- | `/pordee lite` | โหมดเบา — ตัดคำสุภาพและ filler ออก แต่ grammar เต็ม |
- | `/pordee full` | โหมดเต็ม — ตัดให้สั้นที่สุด |
- | `/pordee stop` | ปิด |
- | `/pordee-stats` | ดูสถิติ token ของ session ปัจจุบัน |
- | `/pordee-stats --share` | สรุปสถิติ 1 บรรทัด (copy-paste ได้) |
- ### Keyword (ไม่ต้องพิมพ์ slash)
- พิมพ์คำเหล่านี้เป็นข้อความปกติในแชต — pordee จะเปิด/ปิดให้อัตโนมัติ ต้องเป็นข้อความทั้งบรรทัด ไม่ใช่ส่วนหนึ่งของประโยค
- | Keyword | ผล |
- |---|---|
- | `พอดี` | เปิด |
- | `พอดีโหมด` | เปิด |
- | `พูดสั้นๆ` | เปิด |
- | `หยุดพอดี` | ปิด |
- | `พูดปกติ` | ปิด |
- ---
- ## ระดับ (Levels)
- ### 🪶 Lite — `/pordee lite`
- ตัดคำสุภาพ (ครับ/ค่ะ/นะคะ), คำลังเลใจ (อาจจะ/น่าจะ/จริงๆแล้ว), และคำทักทาย (ได้เลยครับ/แน่นอน) ทิ้ง แต่เก็บ grammar เต็ม อ่านแล้วยังเป็นภาษาไทยปกติ professional
- ### ⚡ Full — `/pordee` หรือ `/pordee full` (default)
- ตัดเหมือน lite + ตัด particle ที่ซ้ำซ้อน (ที่/ซึ่ง/ว่า/อยู่/กำลัง) + ตัด nominalizer (การ-, ความ-) + ใช้คำสั้น (ดู ไม่ใช่ ตรวจสอบ) + ประโยคสั้นได้
- Pattern: `[ของ] [ทำ] [เหตุผล]. [ขั้นต่อ].`
- ---
- ## ก่อน / หลัง (Before / After)
- ### ตัวอย่าง 1 — "ทำไม React component ถึง re-render?"
- <table>
- <tr>
- <th width="34%">🗣️ Normal<br><sub>~80 output tokens</sub></th>
- <th width="33%">🪶 Lite<br><sub>~45 output tokens · 44% saved</sub></th>
- <th width="33%">⚡ Full<br><sub>~22 output tokens · 73% saved</sub></th>
- </tr>
- <tr>
- <td>"แน่นอนครับ ผมยินดีจะอธิบายให้นะครับ จริงๆ แล้วเหตุผลที่ React component ของคุณ re-render นั้น น่าจะเกิดจากการที่คุณส่ง object reference ใหม่เป็น prop ในทุกครั้งที่ component ถูก render ซึ่งทำให้ React มองว่า prop เปลี่ยน และทำการ re-render component ลูก ดังนั้นคุณอาจจะลองใช้ useMemo เพื่อ memoize object นั้นดูครับ"</td>
- <td>"React component re-render เพราะส่ง object reference ใหม่เป็น prop ทุกครั้งที่ render ทำให้ React มองว่า prop เปลี่ยน และ re-render component ลูก ลองใช้ useMemo เพื่อ memoize object นั้น"</td>
- <td>"Object ref ใหม่ทุก render. Inline object prop = ref ใหม่ = re-render. ห่อด้วย <code>useMemo</code>."</td>
- </tr>
- </table>
- ```
- ┌─────────────────────────────────────┐
- │ Lite ████░░░░░░ 44% saved │
- │ Full ███████░░░ 73% saved │
- └─────────────────────────────────────┘
- ```
- ---
- ### ตัวอย่าง 2 — "อธิบาย database connection pooling"
- <table>
- <tr>
- <th width="34%">🗣️ Normal<br><sub>~70 output tokens</sub></th>
- <th width="33%">🪶 Lite<br><sub>~35 output tokens · 50% saved</sub></th>
- <th width="33%">⚡ Full<br><sub>~18 output tokens · 74% saved</sub></th>
- </tr>
- <tr>
- <td>"ครับ การทำ database connection pooling นั้น โดยทั่วไปแล้วก็คือการที่เราเก็บ connection ของ database ที่เปิดไว้แล้ว เพื่อนำกลับมาใช้ใหม่อีกครั้ง แทนที่จะต้องเปิด connection ใหม่ทุกครั้งที่มี request เข้ามา ซึ่งจะช่วยลด overhead ของการทำ TCP handshake และ authentication ได้อย่างมีประสิทธิภาพ"</td>
- <td>"Connection pooling เก็บ connection database ที่เปิดไว้แล้ว เพื่อนำกลับมาใช้ใหม่ ไม่ต้องเปิดใหม่ทุก request ลด overhead ของ TCP handshake และ authentication"</td>
- <td>"Pool reuse connection ที่เปิดไว้. ไม่เปิดใหม่ทุก request. ข้าม TCP handshake."</td>
- </tr>
- </table>
- ```
- ┌─────────────────────────────────────┐
- │ Lite █████░░░░░ 50% saved │
- │ Full ███████░░░ 74% saved │
- └─────────────────────────────────────┘
- ```
- ---
- ### ตัวอย่าง 3 — Bug report (auth middleware)
- <table>
- <tr>
- <th width="34%">🗣️ Normal<br><sub>~55 output tokens</sub></th>
- <th width="33%">🪶 Lite<br><sub>~30 output tokens · 45% saved</sub></th>
- <th width="33%">⚡ Full<br><sub>~14 output tokens · 75% saved</sub></th>
- </tr>
- <tr>
- <td>"ครับ ผมตรวจสอบให้แล้วนะครับ ปัญหาที่คุณเจอน่าจะเกิดจาก bug ใน auth middleware ครับ จริงๆ แล้วในส่วนของ token expiry check นั้น โค้ดใช้เครื่องหมาย <code><</code> แทนที่จะเป็น <code><=</code> ซึ่งทำให้ token ที่หมดอายุพอดีไม่ถูก reject ดังนั้นเราควรจะแก้ตรงจุดนี้ครับ"</td>
- <td>"Bug อยู่ที่ auth middleware ส่วน token expiry check ใช้ <code><</code> แทนที่จะเป็น <code><=</code> ทำให้ token ที่หมดอายุพอดีไม่ถูก reject แก้:"</td>
- <td>"Bug ที่ auth middleware. Token expiry ใช้ <code><</code> ไม่ใช่ <code><=</code>. Fix:"</td>
- </tr>
- </table>
- ```
- ┌─────────────────────────────────────┐
- │ Lite █████░░░░░ 45% saved │
- │ Full ████████░░ 75% saved │
- └─────────────────────────────────────┘
- ```
- ---
- ### ตัวอย่าง 4 — "แนะนำอาหารกลางวันให้หน่อย"
- <table>
- <tr>
- <th width="34%">🗣️ Normal<br><sub>~70 output tokens</sub></th>
- <th width="33%">🪶 Lite<br><sub>~32 output tokens · 54% saved</sub></th>
- <th width="33%">⚡ Full<br><sub>~14 output tokens · 80% saved</sub></th>
- </tr>
- <tr>
- <td>"ได้เลยครับ จริงๆ แล้วการเลือกอาหารกลางวันก็ขึ้นอยู่กับหลายปัจจัยนะครับ เช่น งบประมาณ เวลาที่มี และความต้องการทางโภชนาการของคุณ ถ้าคุณอยากทานอาหารที่ทำง่ายและมีประโยชน์ ผมขอแนะนำว่าน่าจะลองทำสลัดไก่ย่างดูครับ เพราะว่ามีโปรตีนสูงและไม่ใช้เวลาเตรียมนานเลย"</td>
- <td>"อาหารกลางวันขึ้นอยู่กับงบ เวลา และโภชนาการ ถ้าอยากกินง่ายและมีประโยชน์ ลองสลัดไก่ย่าง โปรตีนสูงและเตรียมไม่นาน"</td>
- <td>"งบ + เวลา + โภชนาการ. ง่ายและดี → สลัดไก่ย่าง. โปรตีนสูง, เตรียมเร็ว."</td>
- </tr>
- </table>
- ```
- ┌─────────────────────────────────────┐
- │ Lite █████░░░░░ 54% saved │
- │ Full ████████░░ 80% saved │
- └─────────────────────────────────────┘
- ```
- ---
- ### ตัวอย่าง 5 — "เที่ยวเชียงใหม่ ไปเดือนไหนดี"
- <table>
- <tr>
- <th width="34%">🗣️ Normal<br><sub>~75 output tokens</sub></th>
- <th width="33%">🪶 Lite<br><sub>~30 output tokens · 60% saved</sub></th>
- <th width="33%">⚡ Full<br><sub>~12 output tokens · 84% saved</sub></th>
- </tr>
- <tr>
- <td>"ครับ ถ้าคุณอยากไปเที่ยวเชียงใหม่ ผมแนะนำว่าน่าจะไปช่วงเดือนพฤศจิกายนถึงกุมภาพันธ์ครับ เพราะว่าเป็นช่วงที่อากาศเย็นสบาย ไม่ร้อนเกินไป และไม่มีฝนตกบ่อยเหมือนช่วงอื่นๆ จริงๆ แล้วเดือนธันวาคมก็เป็นเดือนที่นิยมที่สุดเลยนะครับ แต่ก็จะคนเยอะหน่อย"</td>
- <td>"ไปเชียงใหม่ ช่วงพฤศจิกายน-กุมภาพันธ์ดีที่สุด อากาศเย็นสบาย ไม่ร้อน ฝนน้อย ธันวาคมนิยมที่สุดแต่คนเยอะ"</td>
- <td>"พ.ย.-ก.พ. ดีสุด. อากาศเย็น, ฝนน้อย. ธ.ค. คนเยอะ."</td>
- </tr>
- </table>
- ```
- ┌─────────────────────────────────────┐
- │ Lite ██████░░░░ 60% saved │
- │ Full ████████░░ 84% saved │
- └─────────────────────────────────────┘
- ```
- ---
- ### ตัวอย่าง 6 — "วิธีนอนหลับให้สนิท"
- <table>
- <tr>
- <th width="34%">🗣️ Normal<br><sub>~70 output tokens</sub></th>
- <th width="33%">🪶 Lite<br><sub>~32 output tokens · 54% saved</sub></th>
- <th width="33%">⚡ Full<br><sub>~14 output tokens · 80% saved</sub></th>
- </tr>
- <tr>
- <td>"ครับ การนอนหลับให้สนิทนั้นมีหลายวิธีนะครับ ก่อนอื่นเลย คุณควรจะหลีกเลี่ยงการดื่มกาแฟหรือเครื่องดื่มที่มีคาเฟอีนหลังบ่ายสาม จริงๆ แล้วก็ควรจะปิดหน้าจอทุกชนิดอย่างน้อย 30 นาทีก่อนนอนนะครับ และพยายามเข้านอนเวลาเดิมทุกวันเพื่อให้ร่างกายปรับนาฬิกาชีวิต"</td>
- <td>"นอนหลับสนิทมีหลายวิธี เลี่ยงคาเฟอีนหลังบ่ายสาม ปิดหน้าจอ 30 นาทีก่อนนอน เข้านอนเวลาเดิมทุกวันเพื่อปรับนาฬิกาชีวิต"</td>
- <td>"เลี่ยงคาเฟอีนหลังบ่าย 3. ปิดจอ 30 นาทีก่อนนอน. เข้านอนเวลาเดิม → ปรับ circadian."</td>
- </tr>
- </table>
- ```
- ┌─────────────────────────────────────┐
- │ Lite █████░░░░░ 54% saved │
- │ Full ████████░░ 80% saved │
- └─────────────────────────────────────┘
- ```
- ---
- ## กลไกการทำงาน
- 1. ติดตั้ง plugin → Claude Code register hook ของ pordee อัตโนมัติ
- 2. เริ่ม session ใหม่ → SessionStart hook อ่าน state ที่ `~/.pordee/state.json`
- 3. ถ้า `enabled=true` → inject กฎ pordee เข้า context ของ session
- 4. ทุก turn ที่ user พิมพ์ → UserPromptSubmit hook
- - ตรวจ trigger ใน prompt (`/pordee`, `พอดี`, `หยุดพอดี`, ฯลฯ)
- - update state ถ้าเจอ trigger
- - ฉีด reminder ของ level ปัจจุบันเข้า context (กันไม่ให้ model drift)
- 5. State อยู่ที่ `~/.pordee/state.json` — ถาวรข้าม session
- ---
- ## สถิติ (Stats)
- `/pordee-stats` แสดง token usage ของ session ปัจจุบัน + ประมาณการ token ที่ประหยัดได้จากการใช้ pordee
- ```
- พอดี Stats
- ──────────────────────────────────
- Session: ...projects/demo/session.jsonl
- Turns: 12
- ──────────────────────────────────
- Output tokens: 8,450
- Cache-read tokens: 2,100
- ──────────────────────────────────
- Est. without pordee: 21,667
- Est. tokens saved: 13,217 (~61%)
- Est. saved (USD): ~$0.198
- Savings est. from benchmarks/ (median per-task). Actual varies by task.
- ```
- | คำสั่ง | ผล |
- |---|---|
- | `/pordee-stats` | สถิติ session ปัจจุบัน + lifetime summary |
- | `/pordee-stats --share` | สรุป 1 บรรทัด — เช่น `⚡ Saved 13,217 output tokens (~$0.198) across 12 turns this session — pordee` |
- | `/pordee-stats --all` | สถิติรวมทุก session (lifetime) |
- | `/pordee-stats --since 7d` | สถิติย้อนหลัง 7 วัน |
- ### Benchmark
- compression ratio ที่ stats ใช้มาจาก `benchmarks/compression.json` — สร้างจากการรัน prompt ชุดทดสอบภาษาไทย 8 ข้อ ผ่าน API แบบปกติ vs pordee แล้วคิด median
- ```bash
- # รัน benchmark (ต้องมี ANTHROPIC_API_KEY)
- export ANTHROPIC_BASE_URL=https://api.kimi.com/coding/v1
- node benchmarks/run.js --level full
- node benchmarks/run.js --level lite
- ```
- หรือใช้ `--dry-run` สร้าง mock data สำหรับทดสอบ:
- ```bash
- node benchmarks/run.js --dry-run --level full
- ```
- ---
- ## ตอนไหน pordee จะหยุดเอง
- บางสถานการณ์ การพูดสั้นเกินไปอันตรายหรือคนอ่านอาจเข้าใจผิด pordee จะปิดตัวเองชั่วคราว ตอบเป็นภาษาไทยปกติเต็มประโยค จบแล้วค่อยกลับมา
- ถ้าผู้ใช้ต้องการให้อธิบายชัด ๆ พิมพ์คำต่อไปนี้ pordee จะหยุดและตอบยาวขึ้น:
- | คำที่ผู้ใช้พิมพ์ | ความหมาย |
- |---|---|
- | `อะไรนะ` | ฟังไม่ทัน ขอใหม่ |
- | `พูดอีกที` | ขอตอบซ้ำ |
- | `อธิบายชัดๆ` | ขอละเอียดกว่านี้ |
- | `ขยายความ` | ขอรายละเอียด |
- นอกจากนี้ pordee จะหยุดเองเมื่อ:
- - มี **security warning** หรือ ⚠️ ในคำตอบ
- - คำสั่งที่ย้อนกลับไม่ได้ — `DROP TABLE`, `rm -rf`, `git push --force`, `git reset --hard`, `git branch -D`
- - ขั้นตอนหลายสเต็ปที่ลำดับสำคัญ และ ประโยคสั้นเสี่ยงทำให้สับสน
- หลังจบส่วนที่ต้องชัด pordee กลับมาโหมดเดิมทันที
- ---
- ## ข้อจำกัด
- - ตอนนี้รองรับเฉพาะ Claude Code (v1) — โปรแกรมอื่นๆ จะเพิ่มเข้ามาในทีหลัง
- ---
- ## License
- MIT
bin/install.js · Bundled script · 632 lines · 2 findings marked
- #!/usr/bin/env node
- // pordee — unified cross-platform installer.
- //
- // One Node script handles detection + install/uninstall across agents.
- // Run locally: node bin/install.js [flags]
- // curl|bash: delegated from install.sh shim → npx -y github:kerlos/pordee -- [flags]
- // Windows: delegated from install.ps1 shim → same npx delegation
- //
- // Pure stdlib, zero npm runtime deps.
- 'use strict';
- const fs = require('fs');
- const os = require('os');
- const path = require('path');
- const { spawnSync, execSync } = require('child_process');
- const REPO = 'kerlos/pordee';
- const SKILL_CMD = 'npx skills add';
- const SKILL_REMOVE_CMD = 'npx skills remove';
- const RULE_SOURCE = path.join(__dirname, '..', 'src', 'rules', 'pordee-activate.md');
- const PORDEE_STATE_DIR = path.join(os.homedir(), '.pordee');
- const MARKER_START = '<!-- PORDEE-RULES-START -->';
- const MARKER_END = '<!-- PORDEE-RULES-END -->';
- const MARKER_NOTE = '<!-- Generated by pordee installer. Do not edit between markers. -->';
- function hasCmd(name) {
- if (!name) return false;
- if (process.platform === 'win32') {
- return spawnSync('where', [name], { shell: true, stdio: 'ignore' }).status === 0;
- }
- return spawnSync('command', ['-v', name], { stdio: 'ignore' }).status === 0;
- }
- function exists(p) {
- return p ? fs.existsSync(p) : false;
- }
- function homeDot(name) {
- return path.join(os.homedir(), name);
- }
- function cwd(p) {
- return path.join(process.cwd(), p);
- }
- // Providers are ordered roughly by popularity / detection reliability.
- const PROVIDERS = [
- {
- id: 'claude',
- name: 'Claude Code',
- detect: () => hasCmd('claude') || exists(homeDot('.claude')),
- install: () => [
- 'claude plugin marketplace add kerlos/pordee',
- 'claude plugin install pordee@pordee'
- ],
- uninstall: () => ['claude plugin uninstall pordee'],
- auto: true
- },
- {
- id: 'gemini',
- name: 'Gemini CLI',
- profile: 'gemini',
- detect: () => hasCmd('gemini') || exists(homeDot('.gemini')),
- auto: true
- },
- {
- id: 'codex',
- name: 'Codex CLI',
- profile: 'codex',
- detect: () => hasCmd('codex') || exists(homeDot('.codex')),
- auto: false
- },
- {
- id: 'cursor',
- name: 'Cursor',
- profile: 'cursor',
- detect: () => hasCmd('cursor') || exists(homeDot('.cursor')) || exists(cwd('.cursor')),
- ruleDests: [{ type: 'file', path: cwd('.cursor/rules/pordee.mdc') }],
- auto: false
- },
- {
- id: 'windsurf',
- name: 'Windsurf',
- profile: 'windsurf',
- detect: () => hasCmd('windsurf') || exists(homeDot('.windsurf')) || exists(cwd('.windsurf')),
- ruleDests: [{ type: 'file', path: cwd('.windsurf/rules/pordee.md') }],
- auto: false
- },
- {
- id: 'cline',
- name: 'Cline',
- profile: 'cline',
- detect: () => exists(homeDot('.cline')) || exists(cwd('.clinerules')),
- ruleDests: [{ type: 'file', path: cwd('.clinerules/pordee.md') }],
- auto: false
- },
- {
- id: 'continue',
- name: 'Continue',
- profile: 'continue',
- detect: () => exists(homeDot('.continue')) || exists(cwd('.continue')),
- auto: false
- },
- {
- id: 'copilot',
- name: 'GitHub Copilot',
- profile: 'copilot',
- detect: () => false, // soft probe
- ruleDests: [{ type: 'append', path: cwd('.github/copilot-instructions.md') }],
- auto: false,
- softProbe: true
- },
- {
- id: 'opencode',
- name: 'opencode',
- profile: 'opencode',
- detect: () => hasCmd('opencode') || exists(homeDot('.config/opencode')),
- ruleDests: [{ type: 'append', path: cwd('AGENTS.md') }],
- auto: true
- },
- {
- id: 'openclaw',
- name: 'OpenClaw',
- profile: 'openclaw',
- detect: () => exists(homeDot('.openclaw/workspace')),
- ruleDests: [{ type: 'append', path: homeDot('.openclaw/workspace/SOUL.md') }],
- auto: true
- },
- {
- id: 'kilo',
- name: 'Kilo Code',
- profile: 'kilo',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'roo',
- name: 'Roo Code',
- profile: 'roo',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'augment',
- name: 'Augment Code',
- profile: 'augment',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'aider-desk',
- name: 'Aider Desk',
- profile: 'aider-desk',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'amp',
- name: 'Sourcegraph Amp',
- profile: 'amp',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'bob',
- name: 'IBM Bob',
- profile: 'bob',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'crush',
- name: 'Crush',
- profile: 'crush',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'devin',
- name: 'Devin (terminal)',
- profile: 'devin',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'droid',
- name: 'Droid (Factory)',
- profile: 'droid',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'forgecode',
- name: 'ForgeCode',
- profile: 'forgecode',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'goose',
- name: 'Block Goose',
- profile: 'goose',
- detect: () => hasCmd('goose') || exists(homeDot('.goose')),
- auto: false
- },
- {
- id: 'iflow-cli',
- name: 'iFlow CLI',
- profile: 'iflow-cli',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'kiro-cli',
- name: 'Kiro CLI',
- profile: 'kiro-cli',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'mistral-vibe',
- name: 'Mistral Vibe',
- profile: 'mistral-vibe',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'openhands',
- name: 'OpenHands',
- profile: 'openhands',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'qwen-code',
- name: 'Qwen Code',
- profile: 'qwen-code',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'rovodev',
- name: 'Atlassian Rovo Dev',
- profile: 'rovodev',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'tabnine-cli',
- name: 'Tabnine CLI',
- profile: 'tabnine-cli',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'trae',
- name: 'Trae',
- profile: 'trae',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'warp',
- name: 'Warp',
- profile: 'warp',
- detect: () => hasCmd('warp') || exists(homeDot('.warp')),
- auto: false
- },
- {
- id: 'replit',
- name: 'Replit Agent',
- profile: 'replit',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'junie',
- name: 'JetBrains Junie',
- profile: 'junie',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'qoder',
- name: 'Qoder',
- profile: 'qoder',
- detect: () => false,
- auto: false,
- softProbe: true
- },
- {
- id: 'antigravity',
- name: 'Google Antigravity',
- profile: 'antigravity',
- detect: () => false,
- auto: false,
- softProbe: true
- }
- ];
- function skillsInstallCmd(profile) {
- return `${SKILL_CMD} ${REPO} -a ${profile}`;
- }
- function getInstallCommands(provider) {
- if (provider.install) return provider.install();
- if (provider.profile) return [skillsInstallCmd(provider.profile)];
- return [];
- }
- function getUninstallCommands(provider) {
- if (provider.uninstall) return provider.uninstall();
- if (provider.profile) return [`${SKILL_REMOVE_CMD} pordee`];
- return [];
- }
- function run(cmd, dryRun) {
- if (dryRun) {
- console.log(` [dry-run] ${cmd}`);
- return true;
- }
- try {
- execSync(cmd, { stdio: 'inherit' });
- return true;
- } catch (err) {
- console.error(` failed: ${cmd}`);
- return false;
- }
- }
- function readRule() {
- if (!exists(RULE_SOURCE)) {
- console.error(`Rule source missing: ${RULE_SOURCE}`);
- return '';
- }
- return fs.readFileSync(RULE_SOURCE, 'utf8');
- }
- function stripMarkerBlock(text) {
- const lines = text.split('\n');
- const out = [];
- let inside = false;
- for (const line of lines) {
- if (line.trim() === MARKER_START) {
- inside = true;
- continue;
- }
- if (line.trim() === MARKER_END) {
- inside = false;
- continue;
- }
- if (!inside) out.push(line);
- }
- // Remove extra blank lines left by removed block.
- return out.join('\n').replace(/\n{3,}/g, '\n\n').trim();
- }
- function buildBlock(ruleText) {
- return [MARKER_START, MARKER_NOTE, '', ruleText.trim(), '', MARKER_END].join('\n');
- }
- function writeRuleFile(destPath, ruleText, dryRun) {
- if (dryRun) {
- console.log(` [dry-run] write ${destPath}`);
- return;
- }
- fs.mkdirSync(path.dirname(destPath), { recursive: true });
- fs.writeFileSync(destPath, ruleText, 'utf8');
- console.log(` wrote ${destPath}`);
- }
- function appendRuleFile(destPath, ruleText, dryRun) {
- if (dryRun) {
- console.log(` [dry-run] append to ${destPath}`);
- return;
- }
- fs.mkdirSync(path.dirname(destPath), { recursive: true });
- let existing = '';
- if (exists(destPath)) {
- existing = fs.readFileSync(destPath, 'utf8');
- existing = stripMarkerBlock(existing);
- if (existing && !existing.endsWith('\n')) existing += '\n';
- }
- const block = buildBlock(ruleText);
- fs.writeFileSync(destPath, existing + '\n' + block + '\n', 'utf8');
- console.log(` appended ${destPath}`);
- }
- function removeRuleFile(destPath, dryRun) {
- if (dryRun) {
- console.log(` [dry-run] remove ${destPath}`);
- return;
- }
- if (!exists(destPath)) return;
- const content = fs.readFileSync(destPath, 'utf8');
- if (content.includes(MARKER_START)) {
- const cleaned = stripMarkerBlock(content);
- if (cleaned.trim()) {
- fs.writeFileSync(destPath, cleaned + '\n', 'utf8');
- console.log(` cleaned markers from ${destPath}`);
- } else {
- fs.unlinkSync(destPath);
- console.log(` removed ${destPath}`);
- }
- } else {
- fs.unlinkSync(destPath);
- console.log(` removed ${destPath}`);
- }
- }
- function installRules(provider, dryRun) {
- if (!provider.ruleDests || !provider.ruleDests.length) return;
- const ruleText = readRule();
- if (!ruleText) return;
- console.log(` rules for ${provider.name}:`);
- for (const dest of provider.ruleDests) {
- if (dest.type === 'append') {
- appendRuleFile(dest.path, ruleText, dryRun);
- } else {
- writeRuleFile(dest.path, ruleText, dryRun);
- }
- }
- }
- function uninstallRules(provider, dryRun) {
- if (!provider.ruleDests || !provider.ruleDests.length) return;
- console.log(` removing rules for ${provider.name}:`);
- for (const dest of provider.ruleDests) {
- removeRuleFile(dest.path, dryRun);
- }
- }
- function removeState(dryRun) {
- if (dryRun) {
- console.log(` [dry-run] rm -rf ${PORDEE_STATE_DIR}`);
- return;
- }
- if (exists(PORDEE_STATE_DIR)) {
- fs.rmSync(PORDEE_STATE_DIR, { recursive: true, force: true });
- console.log(` removed ${PORDEE_STATE_DIR}`);
- }
- }
- function printList() {
- console.log('pordee agent matrix');
- console.log('');
- const idWidth = Math.max(...PROVIDERS.map(p => p.id.length));
- const nameWidth = Math.max(...PROVIDERS.map(p => p.name.length));
- console.log(`${'id'.padEnd(idWidth)} ${'name'.padEnd(nameWidth)} profile detected auto-activate install command`);
- console.log('-'.repeat(idWidth + nameWidth + 80));
- for (const p of PROVIDERS) {
- const detected = p.detect() ? 'yes' : 'no';
- const auto = p.auto ? 'yes' : 'no';
- const profile = (p.profile || '-').padEnd(11);
- const cmds = getInstallCommands(p).join(' && ');
- console.log(`${p.id.padEnd(idWidth)} ${p.name.padEnd(nameWidth)} ${profile} ${detected.padEnd(8)} ${auto.padEnd(14)} ${cmds}`);
- }
- }
- function printHelp() {
- console.log(`pordee installer
- One-line install:
- 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
- irm https://raw.githubusercontent.com/kerlos/pordee/main/install.ps1 | iex
- Note: Runs a downloaded PowerShell script (iex / Invoke-Expression)
- Line 487 on GitHub
- Usage: node bin/install.js [flags]
- Flags:
- --all Install for every detected agent.
- --only <id> Install for one agent. Repeatable.
- --dry-run Print commands, change nothing.
- --list Print agent matrix and exit.
- --with-init Write always-on rule files for supported agents.
- --force Re-run even if already installed.
- --uninstall Remove pordee from detected agents + delete state.
- --help Show this help.
- `);
- }
- function parseArgs(argv) {
- const flags = {
- all: false,
- only: [],
- dryRun: false,
- list: false,
- withInit: false,
- force: false,
- uninstall: false,
- help: false
- };
- for (let i = 2; i < argv.length; i++) {
- const arg = argv[i];
- switch (arg) {
- case '--all':
- flags.all = true;
- break;
- case '--only':
- if (i + 1 >= argv.length) throw new Error('--only requires an agent id');
- flags.only.push(argv[++i]);
- break;
- case '--dry-run':
- flags.dryRun = true;
- break;
- case '--list':
- flags.list = true;
- break;
- case '--with-init':
- flags.withInit = true;
- break;
- case '--force':
- flags.force = true;
- break;
- case '--uninstall':
- flags.uninstall = true;
- break;
- case '--help':
- case '-h':
- flags.help = true;
- break;
- default:
- throw new Error(`Unknown flag: ${arg}`);
- }
- }
- return flags;
- }
- function main() {
- let flags;
- try {
- flags = parseArgs(process.argv);
- } catch (err) {
- console.error(err.message);
- process.exit(1);
- }
- if (flags.help) {
- printHelp();
- return;
- }
- if (flags.list) {
- printList();
- return;
- }
- let selected;
- if (flags.only.length) {
- selected = flags.only
- .map(id => {
- const p = PROVIDERS.find(p => p.id === id);
- if (!p) throw new Error(`Unknown agent id: ${id}`);
- return p;
- });
- } else if (flags.all) {
- selected = PROVIDERS;
- } else {
- selected = PROVIDERS.filter(p => p.detect());
- if (selected.length === 0) {
- console.log('No supported agents detected.');
- console.log('Run with --all to try every known agent, or --only <id> for a specific one.');
- console.log('See --list for the full matrix.');
- return;
- }
- }
- if (flags.uninstall) {
- console.log('Uninstalling pordee...');
- let ranSkillsRemove = false;
- for (const p of selected) {
- console.log(`\n${p.name}:`);
- const cmds = getUninstallCommands(p);
- for (const cmd of cmds) {
- // Avoid duplicate npx skills remove calls.
- if (cmd === `${SKILL_REMOVE_CMD} pordee`) {
- if (ranSkillsRemove) continue;
- ranSkillsRemove = true;
- }
- run(cmd, flags.dryRun);
- }
- uninstallRules(p, flags.dryRun);
- }
- removeState(flags.dryRun);
- console.log('\nUninstall complete.');
- return;
- }
- console.log(flags.dryRun ? 'Dry-run install plan:' : 'Installing pordee...');
- for (const p of selected) {
- console.log(`\n${p.name}:`);
- const cmds = getInstallCommands(p);
- if (cmds.length === 0 && !p.ruleDests) {
- console.log(' nothing to do');
- continue;
- }
- for (const cmd of cmds) {
- run(cmd, flags.dryRun);
- }
- if (flags.withInit) {
- installRules(p, flags.dryRun);
- }
- }
- console.log('\nDone.');
- if (!flags.withInit) {
- console.log('Tip: use --with-init to drop always-on rule files into this repo.');
- }
- }
- main();
install.ps1 · Bundled script · 55 lines · 1 finding marked
- # pordee — installer shim (Windows / PowerShell).
- #
- # Thin wrapper around bin/install.js (the unified Node installer). Every flag
- # you'd pass to bin/install.js can be passed here; we just forward them.
- #
- # One-line install:
- # irm https://raw.githubusercontent.com/kerlos/pordee/main/install.ps1 | iex
- Note: Runs a downloaded PowerShell script (iex / Invoke-Expression)
- Line 7 on GitHub
- #
- # Local clone:
- # pwsh install.ps1 [flags]
- function Install-Pordee {
- param(
- [string[]]$InstallerArgs = @()
- )
- $ErrorActionPreference = "Stop"
- $Repo = "kerlos/pordee"
- $node = Get-Command node -ErrorAction SilentlyContinue
- if (-not $node) {
- Write-Error @"
- pordee: Node.js (>=18) required. Install:
- - winget install OpenJS.NodeJS.LTS
- - or download from https://nodejs.org
- "@
- exit 1
- }
- $nodeMajor = [int](& node -p "process.versions.node.split('.')[0]")
- if ($nodeMajor -lt 18) {
- Write-Error "pordee: Node $nodeMajor too old. Need Node >=18."
- exit 1
- }
- if ($PSCommandPath) {
- $here = Split-Path -Parent $PSCommandPath
- $local = Join-Path $here "bin/install.js"
- if (Test-Path $local) {
- & node $local @InstallerArgs
- exit $LASTEXITCODE
- }
- }
- $npx = Get-Command npx -ErrorAction SilentlyContinue
- if (-not $npx) {
- Write-Error "pordee: npx required (ships with Node >=18)."
- exit 1
- }
- & npx -y "github:$Repo" @InstallerArgs
- exit $LASTEXITCODE
- }
- Install-Pordee -InstallerArgs $args
install.sh · Bundled script · 41 lines · 2 findings marked
- #!/usr/bin/env bash
- # pordee — installer shim.
- #
- # Thin wrapper around bin/install.js (the unified Node installer). Every flag
- # you'd pass to bin/install.js can be passed here; we just forward them.
- #
- # One-line install:
- # 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
- # 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
- #
- # Local clone:
- # bash install.sh [flags]
- set -euo pipefail
- REPO="kerlos/pordee"
- if ! command -v node >/dev/null 2>&1; then
- echo "pordee: Node.js (≥18) required. Install:" >&2
- echo " macOS: brew install node" >&2
- echo " Linux: see https://nodejs.org or use nvm" >&2
- exit 1
- fi
- NODE_MAJOR=$(node -p "process.versions.node.split('.')[0]")
- if [ "$NODE_MAJOR" -lt 18 ]; then
- echo "pordee: Node $NODE_MAJOR too old. Need Node ≥18." >&2
- exit 1
- fi
- here="$(cd "$(dirname "${BASH_SOURCE[0]:-}")" 2>/dev/null && pwd)" || here=""
- if [ -n "$here" ] && [ -f "$here/bin/install.js" ]; then
- exec node "$here/bin/install.js" "$@"
- fi
- if ! command -v npx >/dev/null 2>&1; then
- echo "pordee: npx required (ships with Node ≥18)." >&2
- exit 1
- fi
- exec npx -y "github:$REPO" "$@"
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.