- Home
- Skills
- Workflow Automation
- Makefile Creator
Makefile Creator
by Sect0R
Generate production-ready Makefiles for Docker Compose with environment guards, safe DB dumps, and TTY-safe commands.
Free
Makefile Creator
Example session with this skill installed
Create a Makefile for my project. I have docker-compose.yml and docker-compose.prod.yml. I need dev/prod targets for up, logs, and a safe db dump.
- Read your context and instructions
- Compiled the makefile creator
I have analyzed your project structure and created a production-ready Makefile. It includes the env-required guard, TTY-safe execution for Docker commands, and the requested safe dump logic.
Generated Makefile
.DEFAULT_GOAL := help
SHELL := /bin/bash
# Configuration
COMPOSE_dev := docker-compose.yml
COMPOSE_prod := docker-compose.prod.yml
# Check environment
ifeq ($(filter dev prod,$(firstword $(MAKECMDGOALS))),)
ENV_ERROR := 1
endif
env-required:
@if [ "$(ENV_ERROR)" = "1" ]; then \
echo "Ошибка: Укажите окружение (dev или prod). Пример: make dev up"; \
exit 1; \
fi
# TTY-safe docker exec
EXEC = docker compose -f $(COMPOSE_$(firstword $(MAKECMDGOALS))) exec $$([ -t 0 ] || echo -T)
.PHONY: help dev prod up logs dump
dev prod: env-required
@:
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
up: ## Запустить контейнеры: make <env> up
docker compose -f $(COMPOSE_$(firstword $(MAKECMDGOALS))) up -d
logs: ## Просмотр логов: make <env> logs [SERVICE=] [TAIL=100]
docker compose -f $(COMPOSE_$(firstword $(MAKECMDGOALS))) logs -f --tail=$(or $(TAIL),100) $(SERVICE)
dump: ## Создать безопасный дамп БД: make <env> dump
@umask 077; \
set -o pipefail; \
mkdir -p ./dumps; \
$(EXEC) db mysqldump -u user --password=$${MYSQL_PWD} db_name > ./dumps/db.sql.part && \
mv ./dumps/db.sql.part ./dumps/db_$$(date +%Y%m%d_%H%M%S).sql
Next steps
- Copy this content into a file named
Makefilein your root directory. - Ensure
MYSQL_PWDis defined in your.envfile for thedumptarget. - Test the guard by running
make up(should fail) thenmake dev up.
Connects securely to your tools. The creator never sees your data.
About this skill
Stop writing fragile shell scripts or guessing docker-compose commands. This skill generates and maintains strict, production-ready Makefiles for containerized environments. It enforces a standardized interface for managing development and production stacks without repetitive manual configuration.
What it does
- Standardizes Environments Enforces a
make <env> <action>pattern to prevent accidental commands against the wrong environment. - Automates Docker Ops Generates targets for
up,down,restart,logs, andbuildusing TTY-safe execution for CI/CD compatibility. - Secures DB Tasks Creates safe database dump and migration targets that handle passwords via stdin and include
umask 077protection. - Self-Documenting Help Automatically builds a Russian-language help menu so every team member knows available targets and parameters.
- Project Detection Analyzes your existing
.env,docker-compose.yml, and CLI entrypoints to map services correctly.
How it works
- Point the agent at your project root containing Docker or Compose files.
- Request a new Makefile or an update to an existing one with specific targets like
migrateordump. - The skill scans for service names, environment file structures, and database types to scaffold the logic.
- Review the generated Makefile which includes the
env-requiredguard and TTY-safeEXECmacros.
Frameworks & tools
Works with docker-compose, bash, GNU Make, and any application stack running in containers (Node.js, Python, PHP). Optimized for Linux and macOS environments.
Why this beats prompting it yourself
Generic prompts often produce Makefiles that leak passwords in ps output or fail in non-interactive shells. This skill implements specific safety patterns like .part file renaming for dumps and pipefail shell options that are easily overlooked.
Use cases
- Scaffold a new project with dev and prod compose file switching.
- Add safe database migration targets with mandatory production confirmation.
- Implement a centralized
updatetarget for remote production deployments. - Standardize log tailing across multiple microservices.
Known limitations
Requires GNU Make and bash. Help output is currently hardcoded to Russian. Does not support simultaneous multi-environment invocations.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 7 days ago
- Free with an Agensi account
- Software
Node.jssequelize-cli
Git
Permissions
What's inside
Creator
Sect0R
Frequently Asked Questions
New in Workflow Automation
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Workflow Automation.