dagger
/dagger
Use when building CI/CD pipelines as code with Dagger. Covers Dagger Functions, modules, container-based execution, caching, and SDK usage in TypeScript, Python, and Go. USE FOR: CI/CD pipelines as code, Dagger Functions and modules, container-based build steps, reproducible pipelines DO NOT USE FOR: cloud infrastructure provisioning (use terraform or pulumi), container image authoring (use docker), Kubernetes deployment (use kubernetes)
- Author
- Tyler-R-Kendrick ↗
- Repository
- agent-skills ↗
- Licence
- MIT
- Last repository change
- 09.06.2026
Assessment and security
- Files in this package
- 12
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 2
No signals detected. Repository changed on 09.06.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when building CI/CD pipelines as code with Dagger. Covers Dagger Functions, modules, container-based execution, caching, and SDK usage in TypeScript, Python, and Go. USE FOR: CI/CD pipelines as code, Dagger Functions and modules, container-based build steps, reproducible pipelines DO NOT USE FOR: cloud infrastructure provisioning (use terraform or pulumi), container image authoring (use docker), Kubernetes deployment (use kubernetes)
Original author description
Use when building CI/CD pipelines as code with Dagger. Covers Dagger Functions, modules, container-based execution, caching, and SDK usage in TypeScript, Python, and Go. USE FOR: CI/CD pipelines as code, Dagger Functions and modules, container-based build steps, reproducible pipelines DO NOT USE FOR: cloud infrastructure provisioning (use terraform or pulumi), container image authoring (use docker), Kubernetes deployment (use kubernetes)
How it works
- Overview
- Core Concepts
- TypeScript Example
- Python Example
- CLI Usage
- Key Features
- Using Existing Modules
- Best Practices
SKILL.md preview
---
name: dagger
description: |
Use when building CI/CD pipelines as code with Dagger. Covers Dagger Functions, modules, container-based execution, caching, and SDK usage in TypeScript, Python, and Go.
USE FOR: CI/CD pipelines as code, Dagger Functions and modules, container-based build steps, reproducible pipelines
DO NOT USE FOR: cloud infrastructure provisioning (use terraform or pulumi), container image authoring (use docker), Kubernetes deployment (use kubernetes)
license: MIT
metadata:
displayName: "Dagger"
author: "Tyler-R-Kendrick"
compatibility: claude, copilot, cursor
references:
- title: "Dagger Documentation"
url: "https://docs.dagger.io"
- title: "Dagger GitHub Repository"
url: "https://github.com/dagger/dagger"
---
# Dagger
## Overview
Dagger is an open-source runtime for composable software workflows. It lets you write CI/CD pipelines in real programming languages (TypeScript, Python, Go) that run in containers, providing automatic caching, reproducibility, and portability across local dev and CI environments.
## Core Concepts
- **Functions** — typed, cacheable units of work that run in containers
- **Modules** — collections of related functions, shareable and composable
- **Dagger Engine** — runs functions in containers with automatic caching
## TypeScript Example
```typescript
import { dag, Container, Directory, object, func } from "@dagger.io/dagger";
@object()
class MyPipeline {
@func()
async build(source: Directory): Promise<Container> {
return dag
.container()
.from("node:22")
.withDirectory("/app", source)
.withWorkdir("/app")
.withExec(["npm", "ci"])
.withExec(["npm", "run", "build"]);
}
@func()
async test(source: Directory): Promise<string> {
return this.build(source)
.then(ctr => ctr.withExec(["npm", "test"]).stdout());
}
@func()
async publish(source: Directory, tag: string): Promise<string> {
const built = await this.build(source);
return built
.withEntrypoint(["node", "dist/index.js"])
.publish(`ttl.sh/my-app:${tag}`);
}
}
```
## Python Example
```python
import dagger
from dagger import dag, function, object_type
@object_type
class MyPipeline:
@function
async def build(self, source: dagger.Directory) -> dagger.Container:
return (
dag.container()
.from_("python:3.12")
.with_directory("/app", source)
.with_workdir("/app")
.with_exec(["pip", "install", "-r", "requirements.txt"])
)
@function
async def test(self, source: dagger.Directory) -> str:
return await (
(await self.build(source))
.with_exec(["pytest"])
.stdout()
)
```
## CLI Usage
```bash
# Initialize a new Dagger module
dagger init --sdk=typescript
# Call a function
dagger call build --source=.
# Run tests
dagger call test --source=.
# Publish a container
dagger call publish --source=. --tag=latest
```
## Key Features
| Feature | Description |
|---------|-------------|
| **Automatic caching** | Every function result is cached by inputs; unchanged steps are skipped |
| **Container isolation** | Functions run in containers, ensuring reproducibility |
| **Type safety** | Full type checking from your language's SDK |
| **Composability** | Call functions from other modules |
| **Local + CI parity** | Same pipeline runs identically on your laptop and in CI |
## Using Existing Modules
```bash
# Use a community module
dagger call -m github.com/dagger/dagger/modules/wolfi container --packages=curl,git
```
## Best Practices
- Write functions as small, composable units — each function should do one thing.
- Use `withDirectory` to pass source code into containers rather than bind-mounting.
- Leverage automatic caching — structure functions so unchanged inputs skip work.
- Use `dagger call` locally to test pipelines before pushing to CI.
- Use Dagger modules from the community instead of reimplementing common tasks (linting, testing, publishing).
- Keep secrets out of function arguments — use Dagger's `Secret` type for sensitive values.
Files in this package (12)
- AGENTS.md 3 KB
- README.md 1 KB
- SKILL.md 4 KB
- metadata.json 1 KB
- rules/_sections.md 1 KB
- rules/_template.md 1 KB
- rules/dagger-keep-secrets-out-of-function-arguments.md 1 KB
- rules/dagger-leverage-automatic-caching.md 1 KB
- rules/dagger-use-dagger-call-locally-to-test-pipelines-before-pushing.md 1 KB
- rules/dagger-use-dagger-modules-from-the-community-instead-of.md 1 KB
- rules/dagger-use-withdirectory-to-pass-source-code-into-containers.md 1 KB
- rules/dagger-write-functions-as-small-composable-units.md 1 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · Tyler-R-Kendrick/agent-skills | 100 | MIT |
| TerminalSkills/skills | 100 | Apache-2.0 |
Database snapshot: 13.11.2026 · package version 029a49f965ee (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100docker
Use when writing Dockerfiles, Docker Compose files, or managing container images. Covers multi-stage builds, layer caching, Compose services, and image best practices. USE FOR: Dockerfiles, Docker Compose, multi-stage builds, container image optimization, local service… - 100dang-dagger-modules
Authoring Dagger modules in Dang — dagger.json setup, the main type & constructor, what becomes module API, self-calls (supported; annotate returns as Dagger.<Type>!), dependencies, enums/interfaces/scalars, directives (@check, @cache, @defaultPath, @agent), Workspace args, and… - 100dagger-design-proposals
Write design proposals for Dagger features. Use when asked to draft, review, or iterate on Dagger design documents, RFCs, or proposals. - 100devops-deployment
CI/CD, containers and infrastructure as code: GitHub Actions, Docker, Kubernetes, Helm, Terraform. Use when setting up pipelines or deployments. - 90devops-pulumi
Pulumi Infrastructure as Code using real programming languages (TypeScript, Python, Go, C#). Covers: Pulumi CLI, stack management, state backends, AWS/Azure/GCP providers, Kubernetes provider, component resources, Automation API, secrets, policy as code, migration from… - 100infrastructure-engineer
Design and implement cloud infrastructure. Cover cloud architecture, IaC (Terraform, Pulumi), CI/CD pipelines, container orchestration (Kubernetes), networking, observability, and security hardening. Triggers on "design cloud infrastructure", "set up Terraform", "configure…