# How to Set Up No-Mistakes with GitHub: A Complete Configuration Guide

> Master no-mistakes GitHub setup. Initialize a Git proxy, push branches, and let AI validation automate pull requests. Get the complete configuration guide.

- Repository: [Kun Chen/no-mistakes](https://github.com/kunchenguid/no-mistakes)
- Tags: how-to-guide
- Published: 2026-06-28

---

**Configure `no-mistakes` by initializing a local Git proxy gate with your fork URL, then pushing branches to the `no-mistakes` remote to trigger AI-driven validation and automatic pull request creation.**

The `kunchenguid/no-mistakes` tool inserts a **local Git proxy remote** between your working copy and GitHub upstream, enabling AI-driven validation before any code reaches your repository. When configured for GitHub, the tool creates a disposable worktree for every push, runs automated checks, and forwards clean branches to your fork while opening pull requests against the upstream repository. This setup ensures that linting, testing, and documentation generation complete successfully before any change becomes public.

## Understanding the GitHub Architecture

`no-mistakes` operates as a **gate** that intercepts Git pushes before they reach GitHub. The architecture requires distinguishing between the upstream repository (where you want to merge) and your fork (where you have write access).

The workflow maintains three distinct endpoints:

- **`origin`** — Points to the upstream repository (e.g., `git@github.com:owner/upstream.git`)
- **`no-mistakes`** — A local proxy remote created by the tool that handles validation
- **Your fork** — Configured as the push target during initialization

When you execute `git push no-mistakes <branch>`, the tool invokes `daemon.Run()` from [`cmd/no-mistakes/main.go`](https://github.com/kunchenguid/no-mistakes/blob/main/cmd/no-mistakes/main.go) (lines 23-34) to spawn an isolated validation environment.

## Initializing the Gate with Your Fork

Before pushing code, you must initialize the gate with your GitHub fork URL. This creates the proxy infrastructure and configures the target destination for validated branches.

First, verify that `origin` points to the upstream repository:

```bash
git remote -v

# Should show: origin git@github.com:upstream-owner/repo.git (fetch)

```

Next, create a fork of the repository through the GitHub web interface. Once forked, initialize `no-mistakes` with your fork's SSH or HTTPS URL:

```bash
no-mistakes init --fork-url git@github.com:yourusername/repo.git

```

According to the source code in [`internal/cli/cli.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/cli/cli.go), the `init` command performs three critical operations:

1. Creates a **gate directory** under `~/.no-mistakes/repos/<random-id>.git` that acts as the local proxy remote
2. Installs the `/no-mistakes` skill for AI agents (Claude, Copilot, etc.) via [`internal/skill/skill.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/skill/skill.go)
3. Stores the fork URL in [`.no-mistakes.yaml`](https://github.com/kunchenguid/no-mistakes/blob/main/.no-mistakes.yaml) for subsequent push forwarding

## The GitHub Push Workflow

After initialization, the daily workflow replaces standard `git push` commands with pushes to the `no-mistakes` remote. This triggers the validation pipeline.

Create and checkout your feature branch:

```bash
git checkout -b my-feature

# ... make your commits ...

```

Push through the gate instead of directly to origin:

```bash
git push no-mistakes my-feature

```

This invokes the pipeline defined in the CLI entry point, which executes the following steps:

- **review** — Runs linting, static analysis, and AI-driven code review
- **test** — Executes the repository's test suite
- **docs** — Validates documentation generation
- **push** — Force-pushes the cleaned branch to your configured fork URL
- **PR** — Opens a pull request against the upstream repository automatically

If any step produces findings requiring human judgment, the tool pauses and presents a TUI (Terminal User Interface) where you can approve, fix, or skip changes.

## Running Headless and Interactive Modes

`no-mistakes` supports both automated and interactive workflows depending on your preference.

For a fully automated, non-interactive run that creates a branch, commits, pushes, and attaches to the run:

```bash
no-mistakes -y

```

To view the interactive Bubble Tea TUI for an active validation run:

```bash
no-mistakes

```

AI agents can also drive the workflow headlessly using the installed skill:

```bash
/no-mistakes lint

```

The skill implementation resides in [`internal/skill/skill.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/skill/skill.go), and the CLI handles installation during the `init` phase.

## Configuration File Structure

The tool maintains per-repository configuration in [`.no-mistakes.yaml`](https://github.com/kunchenguid/no-mistakes/blob/main/.no-mistakes.yaml) at your project root. This file stores the fork URL and gate settings established during initialization.

The gate directory structure under `~/.no-mistakes/repos/` uses Git worktrees to create isolated validation environments for each push, ensuring that your working directory remains untouched while the tool validates and cleans your branch.

## Summary

- **Keep `origin` pointed at the upstream** repository while configuring `no-mistakes` with your fork URL via `no-mistakes init --fork-url`
- **Push to the `no-mistakes` remote** instead of `origin` to trigger the AI-driven validation pipeline
- **Validation runs in `daemon.Run()`** from [`cmd/no-mistakes/main.go`](https://github.com/kunchenguid/no-mistakes/blob/main/cmd/no-mistakes/main.go), creating disposable worktrees for clean testing
- **Automatic PR creation** occurs only after review, test, docs, and push steps complete successfully
- **Configuration persists** in [`.no-mistakes.yaml`](https://github.com/kunchenguid/no-mistakes/blob/main/.no-mistakes.yaml) and the gate directory under `~/.no-mistakes/repos/`

## Frequently Asked Questions

### What happens if I push to `no-mistakes` without initializing first?

The push will fail because the proxy remote does not exist until you run `no-mistakes init --fork-url`. The initialization creates the gate directory at `~/.no-mistakes/repos/<random-id>.git` and configures the push target, which the `daemon.Run()` function requires to route validated branches to your GitHub fork.

### Can I use `no-mistakes` with private GitHub repositories?

Yes, provided your SSH keys or Git credentials have access to both the upstream repository (for reading) and your fork (for writing). The tool uses standard Git authentication mechanisms when pushing to the configured fork URL stored in [`.no-mistakes.yaml`](https://github.com/kunchenguid/no-mistakes/blob/main/.no-mistakes.yaml).

### How does this differ from GitHub Actions?

GitHub Actions runs validation in GitHub's cloud after you push, while `no-mistakes` validates locally before the push reaches GitHub. According to the source code, the tool creates disposable worktrees locally, runs the pipeline including the `/no-mistakes` skill, and only forwards clean branches to your fork, preventing broken commits from ever appearing in the repository history.

### Where is the validation logic configured?

The validation steps (review, test, docs, push, PR) are orchestrated by the daemon in [`cmd/no-mistakes/main.go`](https://github.com/kunchenguid/no-mistakes/blob/main/cmd/no-mistakes/main.go) and executed through the local gate. The AI skill invoked during validation lives in [`internal/skill/skill.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/skill/skill.go), which agents can call directly via the `/no-mistakes` command interface.