Skip to content
Agentmart
Submit a tool

excel-to-swallow

Convert an Excel rating workbook (.xls/.xlsx) into a Swallow pricing engine configuration.

Skill by llow-group

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/llow-group-excel-to-swallow

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Convert an Excel rating workbook (.xls/.xlsx) into a Swallow pricing engine configuration. Reads formulas, traces dependencies, and rebuilds as Swallow JSON.

Use cases: spreadsheets

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/excel-to-swallow

What's inside

Skill name
excel-to-swallow
Description
Convert an Excel rating workbook (.xls/.xlsx) into a Swallow pricing engine configuration. Reads formulas, traces dependencies, and rebuilds as Swallow JSON.
License
MIT
Instructions
211 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Excel to Swallow Converter

The user wants to convert an Excel rating workbook into a Swallow pricing engine configuration.

## Inputs

The user will provide:
- **Excel file path** — a `.xls` or `.xlsx` file containing pricing/rating logic
- **Result cell** (optional) — the cell reference containing the final price (e.g. `"Sheet1!C45"` or `"premium!H12"`)

If no result cell is supplied, **auto-detect it** (see Step 2). Only ask the user as a last resort.

## Process

### Step 1 — Read and understand the workbook

Read the Excel file. For each sheet, map out:
- All cells with formulas (these are calculations)
- All cells with static values (these are potential inputs or constants)
- All cells with comments/notes (check for `:::result`, `:::input`, or `:::valid` flags)
- Named ranges and their cell references
- Cross-sheet references

### Step 2 — Identify the result cell

Find the result cell using this priority:

1. **Supplied parameter** — if the user provided a cell reference, use it
2. **`:::result` flag** — scan all cell comments for `:::result`
3. **Auto-detect** — this is the primary method. Find the result cell by:
   a. Build a reference map: for every cell with a formula, record which other cells it references
   b. Invert the map to find which cells are referenced BY other cells
   c. **Terminal formula cells** are cells that have a formula but are NOT referenced by any other formula cell — they are the "end of the chain"
   d. Among terminal cells, rank candidates by:
      - Deepest dependency chain (most steps to reach from inputs) — the final price typically depends on many intermediate calculations
      - Numeric type (the result is almost always a number, not text or boolean)
      - Sheet name heuristics: cells on sheets named "summary", "output", "premium", "result", "quote" rank higher
      - Cell label/header heuristics: cells near labels containing "total", "premium", "price", "result", "final", "gross", "net" rank higher
   e. If there is a single clear winner, use it. If there are 2-3 plausible candidates, present them to the user with their current values and formula descriptions and ask which is the result
4. **Ask the user** — only as last resort if auto-detect produces too many candidates or none

Also look for:
- `:::valid` in comments — the validity/exclusion check cell
- `:::input` in comments — explicitly marked input cells
- Auto-detect validity: terminal boolean formula cells that reference exclusion-like logic

### Step 3 — Trace the dependency tree backwards from result

Starting from the result cell, recursively trace every cell reference in its formula:
- For each referenced cell, check if it has a formula (calculation) or a static value (input/constant)
- For cells with formulas, recurse into their references
- Continue until you reach leaf cells (no formula, no further references)

Build a dependency map:
```
result_cell
  ├── calc_cell_1 (formula: =A1 * B1)
  │   ├── input_cell_A1 (static value: 500)
  │   └── input_cell_B1 (static value: 1.2)
  ├── calc_cell_2 (formula: =VLOOKUP(...))
  │   ├── lookup_table (range of static data)
  │   └── input_cell_C3 (static value: "SW1")
  └── ...
```

### Step 4 — Classify each cell

For every cell in the dependency tree, classify it as:

| Classification | Criteria | Swallow mapping |
|---|---|---|
| **Input** | Leaf cell, no formula, value would change per quote | `input.format` field |
| **Constant** | Leaf cell, no formula, value is fixed (rates, thresholds) | `input.format` field with `static: true` |
| **Lookup table** | Range of static data used by VLOOKUP/INDEX/MATCH | `collection` step |
| **Calculation** | Cell with arithmetic formula | `calculation` step or `transform` step |
| **Conditional** | Cell with IF/AND/OR that determines validity | `exclusion` or `refer` step |
| **Result** | The final price cell | `output.result` |
| **Valid** | The validity check cell | `output.valid` |

When classifying, consider:
- Cells that look like customer data (age, postcode, name, vehicle value) → **Input**
- Cells that look like fixed rates or thresholds (tax rate, commission %, loading factors) → **Constant** (static input)
- Ranges used in VLOOKUP/INDEX/MATCH → **Lookup table** (collection)
- Boolean cells that gate whether a quote is valid → **Conditional** (exclusion)

### Step 5 — Order into Swallow steps

Arrange the cells into an ordered pipeline. Use the dependency depth:
1. **Inputs** (depth 0) — all leaf cells
2. **Collections** (depth 1) — lookup tables
3. **Transforms** (depth 2+) — intermediate calculations, grouped by sheet or logical concern
4. **Exclusions/Refers** — conditional rules
5. **Final calculations** — premium, commission, tax
6. **Output** — result formula and valid expression

### Step 6 — Convert formulas to Swallow expressions

Translate Excel formulas to Swallow syntax:

| Excel | Swallow |
|---|---|
| `=A1 * B1` | `({{input_a}} * {{input_b}})` |
| `=ROUND(A1, 2)` | `round({{input_a}}, 2)` |
| `=IF(A1>50, 1.5, 1.0)` | `({{age}} > 50 ? 1.5 : 1.0)` |
| `=VLOOKUP(A1, Sheet2!A:C, 3, TRUE)` | Collection step: `collection.items.filter(key <= {{lookup_val}}).map(value).last()` |
| `=SUM(A1:A10)` | `_.sum([{{a1}}, {{a2}}, ...])` or collection `collection.items.map(value).sum()` |
| `=INDEX(MATCH(...))` | Collection step with filter/map |
| `=CONCATENATE(A1, B1)` | String template or code step |
| `=AND(A1>18, A1<80)` | Exclusion: `({{age}} < 18 \|\| {{age}} > 80)` (inverted — exclusion triggers on FAIL) |

Key rules:
- Replace all cell references with `{{swallow_property_name}}`
- Use `snake_case` for all property names (derived from cell labels, sheet names, or column headers)
- `id` and `key` must be the same within each step
- Every property needs a `def` (default value) — use the cell's current value. Multiplicative factor defaults must be `1.0` not `0`
- `result` uses `formula`, `valid` uses `exp`
- In calculation `formula` fields: use `and`/`or` not `&&`/`||` (MathJS syntax)
- `min()`/`max()` not supported in transform `exp` — use calculation steps
- Never use `key` as a data column name in collections

From llow-group/swallow-claude-plugin, MIT.

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Mar 26, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from llow-group

Cite this page

excel-to-swallow skill. Agent Mart. https://agentmart.dev/skills/llow-group-excel-to-swallow (last updated 2026-10-24)