Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add natthasath/natthasath-marketplace --skill refactor-shellgit clone --depth 1 https://github.com/natthasath/natthasath-marketplaceWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/natthasath/natthasath-marketplace/refactor-shell)<a href="https://agentmods.dev/skills/natthasath/natthasath-marketplace/refactor-shell"><img src="https://agentmods.dev/badge/skills/natthasath/natthasath-marketplace/refactor-shell/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/natthasath/natthasath-marketplace/refactor-shell"><img src="https://agentmods.dev/badge/skills/natthasath/natthasath-marketplace/refactor-shell.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00099 | $0.01294 |
| Opus 5.5 | $0.00040 | $0.00518 |
| Sonnet 5.5 | $0.00020 | $0.00259 |
| Haiku 4.5 | $0.00010 | $0.00129 |
Grade A, and why
refactor-shell scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Shell Script Standardizer
สร้างไฟล์ Shell Script สำหรับ {xxx} และช่วยปรับปรุงโครงสร้างและ code ของ Shell Script ให้เป็นไปตามมาตรฐานการพัฒนาที่ดี และเรียงลำดับ properties ตามหลักการต่อไปนี้:
shell script ที่มีโครงสร้างดีอ่านง่าย debug ง่าย และลด human error เพราะมี error handling และ logging เป็นระบบ — script ที่ดีควรเป็นเหมือน documentation ของตัวเองได้
Core Rules (Non-negotiable)
- ตอบแบบ Artifact เสมอ เพื่อให้นำไปใช้งานได้ทันที
- ตอบเป็นภาษาไทย (อธิบาย) พร้อม code ภาษา Bash
- ปรับให้ครบทุกข้อตามมาตรฐานใน Workflow ไม่ใช่เลือกทำบางข้อ
- ไม่ต้องอธิบายเหตุผลในทุกบรรทัด — แต่หากมีข้อเสนอแนะในการปรับปรุง script ที่ต่างออกไปจากมาตรฐาน ให้เสนอมาพร้อมอธิบายเหตุผล
- ใช้ skill นี้ทันทีเมื่อผู้ใช้ต้องการ automate งานบน command line หรือแชร์ script ที่ต้องการปรับปรุง แม้จะไม่ได้ขอ refactor โดยตรง
Workflow
1. โครงสร้าง Shell Script
ปรับแต่ง script ให้เรียงลำดับและจัดกลุ่มตามมาตรฐาน:
- #!/bin/bash
- คำอธิบาย script และการใช้งาน
- ประกาศตัวแปรค่าคงที่ (Constants)
- TIMEZONE="Asia/Bangkok"
- ตัวแปรอื่นๆ
- ประกาศฟังก์ชัน (Functions)
- การตรวจสอบเงื่อนไขก่อนทำงาน
- โค้ดหลัก (Main execution)
- สรุปผลการทำงาน
2. Naming Convention
- ตัวแปรค่าคงที่: ใช้ตัวพิมพ์ใหญ่ทั้งหมด เช่น INPUT_FILE, CONFIG_DIR, TIMEZONE
- ตัวแปรทั่วไป: ใช้ตัวพิมพ์เล็ก และ underscore เช่น current_item, total_count
- ฟังก์ชัน: ใช้ตัวพิมพ์เล็ก และ underscore เช่น check_dependencies(), process_item()
- ชื่อฟังก์ชันควรสื่อถึงการกระทำ (action verb) เช่น validate_input(), execute_command()
3. การจัดการข้อผิดพลาด
- กำหนดฟังก์ชัน error_exit() สำหรับแสดงข้อผิดพลาดและออกจากโปรแกรม
- ตรวจสอบพารามิเตอร์และเงื่อนไขก่อนทำงาน
- กำหนดค่า return code ที่ชัดเจน (0=success, 1=general error, 2=missing dependencies)
4. ฟังก์ชัน
แยกโค้ดเป็นฟังก์ชันตามความรับผิดชอบดังนี้:
- log_message() - บันทึกข้อความลงไฟล์ log
- check_dependencies() - ตรวจสอบโปรแกรมที่จำเป็น
- validate_input() - ตรวจสอบความถูกต้องของ input
- process_item() - ประมวลผลรายการแต่ละรายการ
- execute_command() - รันคำสั่งหลัก
- display_summary() - แสดงผลสรุป
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago Changed · +9 lines 4c41ac8c7e36
- 2mo ago First seen · 75 lines · 99 tokens per session scan A 1790a7541f9f
refactor-shell is a skill published in the GitHub repository natthasath/natthasath-marketplace (1 stars, last pushed 13d ago), licensed MIT. It adds 99 tokens to every session and 1,294 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-09.
refactor-shell compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| refactor-shellnatthasath/natthasath-marketplace | Skill | 1 | 13d ago | MIT | A | 99 | Claude Code |
| estimating-and-contingencycbrock84/headcount | Skill | 2.6k | yesterday | MIT | A | 87 | Claude Code |
| support-operationscbrock84/headcount | Skill | 2.6k | yesterday | MIT | A | 77 | Claude Code |
| voice-of-customercbrock84/headcount | Skill | 2.6k | yesterday | MIT | A | 82 | Claude Code |
| ai-ml-governancecbrock84/headcount | Skill | 2.6k | yesterday | MIT | A | 83 | Claude Code |
| seo-strategycbrock84/headcount | Skill | 2.6k | yesterday | MIT | A | 74 | Claude Code |
| customer-onboarding-and-implementationcbrock84/headcount | Skill | 2.6k | yesterday | MIT | A | 94 | Claude Code |