# Publish a script with your agent

> Let Claude Code, Codex or another coding agent prepare a script in your repository, test it, and publish it only when you say so.

Your coding agent can prepare a script you already have for your team. Once it’s published, the script’s inputs become a form and an agent tool, and its secrets stay out of the code. The agent proves the draft works before you decide to publish.

## 1. Connect the agent

Connect the agent to Reminix’s [MCP server](/docs/mcp/), or let it use the [CLI](/docs/cli/). Claude Code and Codex can use either, and so can another coding agent that supports MCP or can run commands in a terminal. Through the CLI, an agent can do anything its token allows. When you sign in with `reminix login`, keep the access at **Publish and run scripts**, which covers publishing and running and nothing more.

## 2. Paste this prompt

```text
Read https://reminix.com/docs/skill/SKILL.md and follow it. List the scripts in this project that people run by hand, one line each, and wait for me to pick one to publish to Reminix.
```

The prompt has the agent read Reminix’s [agent skill](/docs/agents/), which holds every step below. You can paste the prompt as it is. The agent lists your scripts and changes nothing until you pick one.

## 3. What it does

1. It searches the team’s scripts first, in case one already does the job.

2. It runs `reminix upload --dry-run` to see what Reminix works out from the folder: the script’s name, its command and its inputs. A dry run uploads nothing and leaves your code as it is.

3. It adds a `reminix.json` to describe the inputs with titles and examples, starting from the one `reminix init` writes. It also writes a `README.md`.

4. It runs `reminix upload` to upload a **draft** version. Your team can’t run the draft yet.

5. It test-runs the draft:

   ```bash
   reminix run <slug> --number <version> -f <name>=<value> --log
   ```

   The flag is `--number`, not `--version`, because `--version` prints the CLI’s own version. Reminix marks the run as a test run, and a test run starts no triggers or webhooks. It still counts toward the month’s runs, like any run.

6. It shows you the result and asks you to publish that version, in the app or with `reminix publish --number <version>`. If your workspace requires a second person to publish, you get an approval link.

## Test runs

The person who uploaded a version, the script’s owner, workspace owners and admins, and workspace API keys can test-run that version:

```bash
curl -X POST https://api.reminix.com/v1/scripts/monthly-report/versions/3/runs \
  -H "Authorization: Bearer $REMINIX_TOKEN" -H "X-Workspace: acme" \
  -H "Content-Type: application/json" -d '{ "inputs": { "month": "2026-09" } }'
```

The script’s approval policy still applies to test runs.
