Makefile Creator

    by Sect0R

    1

    Generate production-ready Makefiles for Docker Compose with environment guards, safe DB dumps, and TTY-safe commands.

    Free

    Security scanned

    Works with the AI Agents you already use

    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

    1. Copy this content into a file named Makefile in your root directory.
    2. Ensure MYSQL_PWD is defined in your .env file for the dump target.
    3. Test the guard by running make up (should fail) then make 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, and build using 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 077 protection.
    • 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

    1. Point the agent at your project root containing Docker or Compose files.
    2. Request a new Makefile or an update to an existing one with specific targets like migrate or dump.
    3. The skill scans for service names, environment file structures, and database types to scaffold the logic.
    4. Review the generated Makefile which includes the env-required guard and TTY-safe EXEC macros.

    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 update target 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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-cliGit

    Permissions

    Read Files
    Write Files
    Listed7 days ago

    What's inside

    Creator

    Sect0R

    Sect0R

    Frequently Asked Questions

    This skill generates Makefiles that use TTY-safe execution macros and specific security patterns, such as pipefail options and umask protection for database dumps, which standard LLM prompts often overlook.

    It is designed to work with any AI agent that has file-system access or code generation capabilities, specifically targeting projects using Docker Compose, GNU Make, and Bash.

    Yes, the skill can analyze your existing project structure, including `.env` files and `docker-compose.yml`, to append new targets like database migrations or log tailing to your current Makefile.

    The generated Makefiles include an 'env-required' guard that forces you to specify the target environment, preventing accidental execution of development commands against production stacks.

    The skill is optimized for Linux and macOS environments using GNU Make and Bash; it currently generates the self-documenting help menu in Russian.

    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.

    Free