earthfile

Generates Earthfiles for repeatable, containerized builds with Earthly.

4|1|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/earthly/skills --skill earthfile
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: earthfile
Source: https://github.com/earthly/skills/tree/main/skills/earthfile
Command: npx skills add https://github.com/earthly/skills --skill earthfile

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the creation of Earthfiles, enabling repeatable, containerized builds for software projects. It simplifies complex build processes by leveraging Earthly's unique syntax and container-first approach.

Core Features & Use Cases

  • Earthfile Generation: Creates Earthfiles for various build scenarios, including multi-stage builds, integration testing with Docker, and cross-repository imports.
  • Build Automation: Simplifies setting up build pipelines for repeatable and efficient software delivery.
  • Use Case: A developer needs to create a new Earthfile for a Go project that requires dependency management, testing, and Docker image creation. They can use this Skill to generate a well-structured Earthfile that covers these requirements.

Quick Start

Use the earthfile skill to generate a basic Earthfile for a Go project.

Frequently Asked Questions about earthfile

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create repeatable, containerized builds for my software project?

To create repeatable, containerized builds, you generate an Earthfile using Earthly, which combines Dockerfile and Makefile concepts for build automation. This simplifies complex processes through a container-first syntax.

What is the best way to structure an Earthfile for a Go project with testing and Docker image creation?

The best way to structure an Earthfile for a Go project is to define separate targets for dependency management, testing, and Docker image creation. This generates a well-structured Earthfile covering these specific build requirements.

Does Earthly work with Docker-in-Docker and cross-repository imports?

Yes, Earthly works with Docker-in-Docker and cross-repository imports. You can generate Earthfiles covering integration testing with Docker, multi-stage builds, and importing targets from other repositories.

How do I set up CI integration and caching in Earthly?

To set up CI integration and caching in Earthly, you generate an Earthfile defining specific targets and utilizing Earthly's caching mechanisms. This ensures repeatable and efficient software delivery pipelines.

When do I need an Earthfile instead of a standard Dockerfile?

You need an Earthfile instead of a standard Dockerfile when your build automation requires repeatable, containerized builds combining Makefile concepts with container-first approaches, such as managing complex multi-stage builds and cross-repository imports.