# Build Dark Factory

Take a PRD and build a dark factory around it - a repository that takes work in as an...

- Repository: https://github.com/coleam00/skills (726 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add coleam00/skills --skill build-dark-factory -g -a claude-code -y`
Codex: `npx skills add coleam00/skills --skill build-dark-factory -g -a codex -y`
Cursor: `npx skills add coleam00/skills --skill build-dark-factory -g -a cursor -y`
Gemini CLI: `npx skills add coleam00/skills --skill build-dark-factory -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add coleam00/skills`

## Description

Take a PRD and build a dark factory around it - a repository that takes work in as an issue and ships validated code out with nobody at the keyboard - one component at a time, into the user's actual repo. Covers the five components in construction order - the guidance layer, the validation harness, the workflow-driven repo, deployment, and the trigger that makes it autonomous - and is agnostic about which coding agent runs underneath (Claude Code, Codex, Archon, the Agent SDK, Cline, Goose, Amp, Pi). It encodes the AI coding process the user already runs rather than replacing it. Requires a PRD as input and deliberately does not write one. Use when the user wants to build a dark factory, an autonomous or self-driving repository, a software factory, an agent that ships its own code, an unattended or overnight coding loop, or asks how to get to level 4 or level 5 of AI coding autonomy; and when they mention dark factory, lights-out coding, autonomous PRs, or a repo that maintains itself.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Build a dark factory

**What the user typed:** $ARGUMENTS

> **Work out the PRD path and the repo path from that line yourself, and do not print a
> parse you have not checked.** The positional split is on whitespace, so anyone who
> types a sentence ("build a dark factory for my repo at C:\code\thing") gets the first
> two *words* as the two paths - three separate test runs opened with `PRD: Build` and
> `Repo: a`, which is a broken-looking first contact for a parse the skill then quietly
> recovered from anyway.
>
> So: read the line, find the thing that looks like a `.md` PRD and the thing that looks
> like a directory, and confirm both back to the user as one sentence before Phase 0. If
> only one is given, work out from its extension which it is and ask for the other. If
> the PRD path does not exist, say so and stop - that is Phase 0a, reached early.

A dark factory is a repository where work goes in one end and shipped code comes out
the other, and there is no human in between. Work arrives as an issue. Workflows plan
it, build it, validate it, and merge it. Deployment carries it to real users. Nobody
reviews the diff.

That last sentence is the whole difficulty. Everything else is plumbing.

**Build the factory into the user's repo. Do not hand them a design document.** Every
phase below ends with files committed and something demonstrably working.

![The five components of a dark factory](dark-factory-diagram.png)

<!-- The diagram is for the HUMAN reading this repo, not for you. Do not describe it back
     to the user and do not narrate it during a build - it is a reference they can open. It
     lives at the skill root rather than in references/, because everything in there is
     agent-read material and this is not. -->
> **The whole system on one page.** All five components, the three governance files, and
> the independence line. Open [`dark-factory-diagram.png`](dark-factory-diagram.png) full
> size if you want the map before the procedure.

---

The rest: https://github.com/coleam00/skills/blob/HEAD/.claude/skills/build-dark-factory/SKILL.md
