# Edit a Soundfish loop with an agent

Use the editor's **Edit with agent** action. It creates a prompt containing the exact current URL, the checked skill address, the two track-type rules, and the required checked verification steps.

## 1. Copy the exact handoff

Open the loop you want to change, choose **Edit with agent**, then choose **Copy prompt**. The prompt contains the complete current `#l1.…` fragment exactly once. Do not shorten or reconstruct it.

Choose **Copy prompt** first. After copying succeeds, **Open ChatGPT** and **Open Claude** become available as native provider links. Their outbound links never contain the loop fragment or prompt. Paste deliberately: a hosted chat provider receives the URL when you paste it into that chat.

## 2. Install the checked skill

The downloadable skill requires Bun 1.3.14. Download [edit-soundfish.zip](https://sound.fish/skills/edit-soundfish.zip), inspect it before extraction, and confirm it contains one top-level `edit-soundfish/` directory. Put that directory in the agent runner's configured skill directory, reload skills if required, and run:

```sh
bun <skill-path>/scripts/soundfish.mjs --help
```

The archive also contains the checked standalone CLI. If Bun is unavailable, stop and install it before continuing; do not claim the skill ran.

## 3. Name the track type

Soundfish has two track types:

- **notes**: pitched events plus one zero-based GM1 program, 0–127;
- **drums**: GM percussion pitches 35–81, no `gmProgram` field, one step per hit.

Tell the agent which type to add or edit when the request could be ambiguous. A type change is a track replacement, not an instrument change.

## 4. Verify the returned URL

The agent must inspect and verify the input, apply the requested operation with the checked CLI, preserve unrelated tracks and checked lineage, verify the result, and return one complete `https://sound.fish/#…` URL. Open that URL in Soundfish and listen before keeping it.

## Copyable installation prompt

```text
Use Soundfish for this MIDI-loop task.

Install the edit-soundfish skill from https://sound.fish/skills/edit-soundfish.zip. Inspect the archive before extracting it: it must contain exactly one top-level edit-soundfish/ directory. Extract that directory into your runner's configured skill directory, then run:

bun <skill-path>/scripts/soundfish.mjs --help

Invoke $edit-soundfish and follow its checked CLI workflow. Soundfish tracks have exactly two distinct types: notes tracks use one zero-based GM1 program, while drums tracks use GM percussion pitches and never have a gmProgram field. Preserve each track's type unless I explicitly request a replacement of another type.

Treat the complete sound.fish URL fragment as the canonical loop document. Do not upload the fragment or decoded loop to a hosted mutation service. If this prompt is pasted into a hosted chat, that chat provider receives the loop URL; do not send it to any additional service.

Determine whether I want to create a new loop or inspect or edit an existing loop. For an inspection or edit, ask for the complete current Soundfish URL if it is missing. For a new loop, do not require a base URL. Ask for any missing musical requirements, then return one verified Soundfish URL and a short description of the result.
```

The skill must not upload a fragment or decoded loop to a mutation service. Any agent provider may receive the loop and CLI output. Only a fully local, offline model and runner keep them on your device; check the provider's data policy before sharing sensitive material.
