refactor-compose

refactor-compose is a skill for Claude Code from natthasath/natthasath-marketplace. It costs 119 tokens per session (1,782 once invoked), scanned A, original, MIT.

A guide for creating and cleaning up Docker Compose and environment files. Docker Compose defines multiple containers and how they run together, while an environment file stores configuration values.

In plain words
What is it for?
Use it to organize services, environment variables, ports, volumes, networks, startup dependencies, and health checks in a Compose project.
Why use it?
It reduces configuration mistakes and keeps service names, settings, and development or production environments more consistent.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the refactor plugin — 5 skills shipped together

Good fit Use it to organize services, environment variables, ports, volumes, networks, startup dependencies, and health checks in a Compose project.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/natthasath/natthasath-marketplace/refactor-compose
Install

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.

Any agent
npx skills add natthasath/natthasath-marketplace --skill refactor-compose
Clone the repo
git clone --depth 1 https://github.com/natthasath/natthasath-marketplace

Made for: Claude Code.

Or install refactor, the plugin that ships this one along with the rest of its 5 skills.

Wrote 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.

agentmods badge for refactor-compose

README.md
[![agentmods](https://agentmods.dev/badge/skills/natthasath/natthasath-marketplace/refactor-compose/github.svg)](https://agentmods.dev/skills/natthasath/natthasath-marketplace/refactor-compose)
Your own site
<a href="https://agentmods.dev/skills/natthasath/natthasath-marketplace/refactor-compose"><img src="https://agentmods.dev/badge/skills/natthasath/natthasath-marketplace/refactor-compose/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.

agentmods 80×15 button for refactor-compose

Your own site · 80×15
<a href="https://agentmods.dev/skills/natthasath/natthasath-marketplace/refactor-compose"><img src="https://agentmods.dev/badge/skills/natthasath/natthasath-marketplace/refactor-compose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 119 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,782 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00119 $0.01782
Opus 5.5 $0.00048 $0.00713
Sonnet 5.5 $0.00024 $0.00356
Haiku 4.5 $0.00012 $0.00178

Measured 15d ago against content hash 8d25b19f1e3d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

refactor-compose 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.

plugins/refactor/skills/refactor-compose/SKILL.md · 139 lines

How it starts

The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Docker Compose Standardizer

คุณทำหน้าที่เป็นผู้เชี่ยวชาญด้าน Docker & DevOps สำหรับการสร้างและปรับปรุงไฟล์ docker-compose.yml และ .env ให้เป็นมาตรฐาน ครอบคลุมทั้ง service ordering, naming convention, environment variables, และ production readiness

docker-compose ที่มีมาตรฐานชัดเจนทำให้ทีมเข้าใจโครงสร้างได้ทันที ลด configuration error และทำให้ environment ระหว่าง dev/staging/prod สอดคล้องกัน — ซึ่งป้องกัน "works on my machine" ได้ในระยะยาว

Core Rules (Non-negotiable)

  1. ตอบแบบ Artifact เสมอ เพื่อให้นำไปใช้งานได้ทันที
  2. ตอบเป็นภาษาไทย (อธิบาย) พร้อม code ภาษาอังกฤษ — ไม่ต้องอธิบายเหตุผลทุกบรรทัดที่แก้ แต่ถ้ามีข้อเสนอแนะที่ต่างจาก standard ให้ระบุเหตุผลกำกับไว้เสมอ
  3. ปรับให้ตรงตามมาตรฐานทุกข้อใน Workflow เสมอ ไม่ใช่เลือกทำบางข้อ รวมถึงข้อกำหนดพิเศษในขั้นตอนที่ 6
  4. ค่าทั้งหมดใน docker-compose.yml ต้องมาจาก .env เท่านั้น ห้ามกำหนดค่าเริ่มต้น (default) ไว้ใน compose file ตรงๆ
  5. ใช้ skill นี้ทันทีเมื่อผู้ใช้แชร์ docker config, บอกชื่อ service ที่ต้องการ deploy, หรือถามว่าจะ setup Docker stack ยังไง

Workflow

1. โครงสร้าง Docker Compose

หลักการ: การเรียง properties ตามลำดับมาตรฐานทำให้ review และ debug ง่ายขึ้นมาก

ปรับแต่ง docker-compose.yml ให้เรียงลำดับ properties ตามมาตรฐาน:

- name: ${GLOBAL_NAME}
- services:
  - container_name
  - image หรือ build
  - restart
  - environment
  - ports
  - volumes
  - networks
  - depends_on
  - command (ถ้าจำเป็น)
  - healthcheck
- networks
- volumes

2. Naming Convention

หลักการ: ชื่อที่ consistent ตาม tech ทำให้รู้ว่า service ไหนคืออะไรโดยไม่ต้องอ่าน config ทั้งหมด

  • กำหนด service name ใน docker-compose.yml ตาม {tech} ที่ใช้ เช่น nginx, mongodb, postgres
  • หากชื่อ service มี spacebar ให้ใช้ underscore ในการเชื่อม เช่น Uptime Kuma เป็น uptime_kuma
  • กำหนด container_name เป็น {service}_app สำหรับ Web Service และ {service}db สำหรับ Database นอกนั้นกำหนดเป็น {service}{tech}
  • สำหรับ networks และ volumes กำหนด driver ให้เหมาะสม และให้ใช้รูปแบบนี้
    networks:
      default:
        name: ${SERVICE_CONTAINER_NAME}_network
        driver: bridge
    
    volumes:
      default:
        name: ${SERVICE_CONTAINER_NAME}_data
        driver: local
    

Read the full file on GitHub · 139 lines

Changes

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.

  1. 15d ago Changed · +9 lines 8d25b19f1e3d
  2. 1mo ago First seen · 130 lines · 119 tokens per session scan A c977ea03f8df

Subscribe to this mod's changes

refactor-compose is a skill published in the GitHub repository natthasath/natthasath-marketplace (1 stars, last pushed 10d ago), licensed MIT. It adds 119 tokens to every session and 1,782 once invoked, about $0.0005 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.

Related

Other skills, from other repositories

companion-clis

Companion CLIs for Runpod workflows — HuggingFace, GitHub, Docker, and AWS.

gaelic-ghost/socket · 26 tokens

dockerized-service-release-deployment-workflow

Create a Dockerized-service release contract with clean GitHub Actions builds, main-anchored tags, immutable digest manifests, published-release deployments, production approval, health checks, and exact-digest rollback.

gaelic-ghost/socket · 49 tokens

linux-development-vm-workflow

Prepare and reset persistent Linux development guests on macOS. Use when comparing container machine, Lima or Colima, and full VMs for distros, init systems, services, custom boot, disks, Rosetta, or nested virtualization.

gaelic-ghost/socket · 54 tokens

select-analysis-isolation

Select isolation before inspecting or executing untrusted content. Use for local analysis, a container, Linux or macOS VM, remote sandbox, or spare device with defined network, mounts, credentials, snapshots, evidence export, and teardown.

gaelic-ghost/socket · 51 tokens

devops-engineer

Act as a DevOps Engineer to design CI/CD pipelines, manage infrastructure as code, configure monitoring and alerting, implement containerization, and automate deployment workflows. Use when users need help with CI/CD pipeline design (GitHub Actions, GitLab CI, Jenkins), infrastructure as code (Terraform, Pulumi…

CrashBytes/claude-role-skills · 150 tokens

deploy-planner

Deployment and DevOps agent that generates Dockerfiles, CI/CD configs, and step-by-step deployment guides for free hosting platforms. Triggers on: deploy, launch, hosting, Docker, CI/CD, production, go live, ship it.

batterfried-philosophy172/Agent-Startup-Skills · 52 tokens