Makefile generation

From athola/claude-night-market · View interactive version

Makefile generation is an AI agent skill from the GitHub repository athola/claude-night-market. Generates Makefiles with testing, linting, formatting, and automation targets. Use when starting a project or standardizing build automation.

How to use this skill

Skill file

Makefile Generation Skill

Generate a Makefile with standard development targets for Python, Rust, or TypeScript projects.

When To Use

When NOT To Use

Standard Targets

Python Makefile

Common targets:

Rust Makefile

Common targets:

TypeScript Makefile

Common targets:

Workflow

1. Detect Language

# Check for language indicators
if [ -f "pyproject.toml" ]; then
    LANGUAGE="python"
elif [ -f "Cargo.toml" ]; then
    LANGUAGE="rust"
elif [ -f "package.json" ]; then
    LANGUAGE="typescript"
fi

Verification: Run the command with --help flag to verify availability.

2. Load Template

from pathlib import Path

template_path = Path("plugins/attune/templates") / language / "Makefile.template"

Verification: Run the command with --help flag to verify availability.

3. Collect Project Info

metadata = {
    "PROJECT_NAME": "my-project",
    "PROJECT_MODULE": "my_project",
    "PYTHON_VERSION": "3.10",
}

Verification: Run the command with --help flag to verify availability.

4. Render Template

from template_engine import TemplateEngine

engine = TemplateEngine(metadata)
engine.render_file(template_path, Path("Makefile"))

Verification: Run the command with --help flag to verify availability.

5. Verify

make help

Verification: Run make --dry-run to verify build configuration.

Customization

Users can add custom targets after the generated ones:

# ============================================================================
# CUSTOM TARGETS
# ============================================================================

deploy: build ## Deploy to production
	./scripts/deploy.sh

Verification: Run the command with --help flag to verify availability.

Related Skills

Exit Criteria

all standard targets for the detected language (Python: install/lint/format/typecheck/test;

Rust: fmt/lint/check/test/build; TypeScript: install/lint/format/typecheck/test/build).

is valid.

skill reports the detection failure and stops rather than generating a blank Makefile.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.