Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 7 additions & 32 deletions .claude/skills/swamp-model/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,41 +157,16 @@ in attributes using `${{ inputs.<name> }}` expressions.

## Edit a Model

Open model input file in your editor, or update via stdin in non-interactive
mode.
**Recommended:** Use `swamp model get <name> --json` to get the file path, then
edit directly with the Edit tool, then validate with
`swamp model validate <name> --json`. Never modify the `id` field.

```bash
# Interactive: opens in editor
swamp model edit my-echo
swamp model edit my-echo --resource # Edit resource file instead

# Non-interactive: update from stdin
cat updated-model.yaml | swamp model edit my-echo --json

# With here-doc (agent-friendly)
swamp model edit my-echo --json <<EOF
id: existing-uuid
name: my-echo
version: 1
attributes:
message: "Updated message"
EOF
```
**Alternative methods:**

Without arguments in interactive mode, shows a search interface to select a
model.
- Interactive: `swamp model edit my-echo` (opens in system editor)
- Stdin: `cat updated.yaml | swamp model edit my-echo --json`

**Output shape (when updating via stdin):**

```json
{
"path": ".swamp/definitions/swamp/echo/abc-123.yaml",
"status": "updated",
"name": "my-echo",
"type": "swamp/echo",
"editType": "definition"
}
```
Run `swamp repo index` if search results seem stale after editing.

## Delete a Model

Expand Down
42 changes: 7 additions & 35 deletions .claude/skills/swamp-workflow/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,44 +128,16 @@ jobs:

## Edit a Workflow

Open workflow file in your editor, or update via stdin in non-interactive mode.
**Recommended:** Use `swamp workflow get <name> --json` to get the file path,
then edit directly with the Edit tool, then validate with
`swamp workflow validate <name> --json`. Never modify the `id` field.

```bash
# Interactive: opens in editor
swamp workflow edit my-workflow

# Non-interactive: update from stdin
cat updated-workflow.yaml | swamp workflow edit my-workflow --json

# With here-doc (agent-friendly)
swamp workflow edit my-workflow --json <<EOF
id: existing-uuid
name: my-workflow
version: 1
jobs:
- name: updated-job
steps:
- name: step1
task:
type: shell
command: echo
args: ["updated"]
EOF
```
**Alternative methods:**

Without arguments in interactive mode, shows a search interface to select a
workflow.
- Interactive: `swamp workflow edit my-workflow` (opens in system editor)
- Stdin: `cat updated.yaml | swamp workflow edit my-workflow --json`

**Output shape (when updating via stdin):**

```json
{
"path": ".swamp/workflows/workflow-abc-123.yaml",
"status": "updated",
"name": "my-workflow",
"id": "abc-123"
}
```
Run `swamp repo index` if search results seem stale after editing.

## Delete a Workflow

Expand Down