---
slug: "code-submit"
source_type: "readme"
source_url: "https://cdn.jsdelivr.net/gh/AlvaroRausell/code-submit@main/README.md"
repo: "https://github.com/AlvaroRausell/code-submit"
source_file: "README.md"
branch: "main"
---
# code-submit

Project-local Pi skill and extension for submission-oriented workflows.

**Repo:** https://github.com/AlvaroRausell/code-submit

## Install

```bash
pi install git:github.com/AlvaroRausell/code-submit
```

Or from npm (once published):

```bash
pi install npm:code-submit
```

## What you get

- **Skill** `/skill:code-submit` — implements changes, generates `.submissions/<change-slug>.html`, opens a GitHub draft PR
- **TUI command** `/submissions` — browses submission HTML files with filter, sort, and preview

## TUI controls

| Key             | Action                                      |
|-----------------|---------------------------------------------|
| `↑` / `↓`      | Navigate the file list                      |
| type any text   | Filter by title, path, headings, or summary |
| `Backspace`     | Delete last filter character                 |
| `Ctrl+S`        | Cycle sort order: name → newest → largest   |
| `Enter`         | Open selected submission in the browser      |
| `Esc`           | Clear filter, or cancel if filter is empty   |

### Sort modes

1. **name** — alphabetical by filename (default)
2. **newest** — most recently modified first
3. **largest** — biggest file size first

### Filter

Typing any printable character appends it to the filter query. The filter matches against the file path, report title, headings, and summary text. Matching is case-insensitive. The file list and preview update in real time as you type.

## Skill usage

```bash
/skill:code-submit
```

The skill will:

1. implement the requested changes
2. run tests and lint if configured (non-blocking)
3. derive a `<change-slug>` from the task title (e.g. `Fix cache bug` → `fix-cache-bug`)
4. generate `.submissions/<change-slug>.html`
5. create a branch and commit
6. open a **GitHub draft PR**
7. return a summary with branch, commit, PR URL, report path, and validation results

## Interactive TUI harness

For local development:

```bash
./scripts/test-submissions-browser.sh
```

This seeds a sample submission and launches Pi so you can test `/submissions` interactively.