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 15d 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.
- 15d ago Changed · +9 lines 4c41ac8c7e36
- 1mo 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 10d 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.
Other skills, from other repositories
seo-strategy
Audits and improves organic search performance — technical health, site architecture, internal linking, structured data, and the content decisions that determine what can rank. Use this to run an SEO audit, diagnose why pages are not ranking or were deindexed, plan a site's URL and navigation structure, add structured…
quantitative-analysis
Answers a business question with data without fooling yourself — framing the question so an answer would change something, choosing the right comparison, checking the data before trusting it, recognizing the traps that produce confident wrong answers (aggregation reversals, survivorship, regression to the mean…
financial-statement-analysis
Reads a set of financial statements and establishes what changed and why — fluctuation analysis against prior period and against budget, profitability, liquidity, solvency and efficiency ratios, benchmarking, and the non-GAAP measures presented alongside them. Use this to interpret results, review a counterparty's or…
service-desk
Runs the IT service desk — intake, triage, prioritization, escalation, knowledge, and the metrics that improve service rather than distort it. Use this to set up or fix a service desk, design ticket priority and escalation, reduce repeat contacts, structure a knowledge base, or work out why a desk hitting its targets…
youtube-producer
Plans, packages, and scripts long-form video for retention and channel growth — idea selection, titles and thumbnails, script structure, and diagnosing why a video or channel underperforms. Use this for video ideas, packaging, scripting, a retention teardown, or channel strategy — including when someone describes a…
employment-compliance
Covers the employment rules that carry real penalties — exempt and non-exempt classification, overtime and hours, employee versus contractor status, work authorization and recordkeeping, accommodation requests, and the notices and retention obligations that go with them. Use this to classify a role, review a…