Skip to content

Commit 752f534

Browse files
committed
docs(skill): fix onboarding to work first time
- Use plain object exports instead of `import { defineConfig } from 'remobi'` which fails when config lives outside a project with remobi installed - Interview Q5: add inline config shape so agents produce `{ strategy: 'wheel' }` not bare `'wheel'` - Add scroll example config - Add guardrails: no remobi import, scroll is an object not a string - Add validation error entries for MODULE_NOT_FOUND and scroll shape
1 parent 1cc2337 commit 752f534

1 file changed

Lines changed: 26 additions & 22 deletions

File tree

β€Ž.agents/skills/remobi-setup/SKILL.mdβ€Ž

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Ask questions **one at a time** β€” don't dump a list. Adapt based on what you l
9393
2. **Do you use popup bindings for tools?** Which ones? (lazygit, yazi, neovim, scratch shell, gh-dash, session picker)
9494
3. **Detected tools** β€” "I detected [lazygit/yazi/btm/etc.] on your system. Would you like popup bindings in tmux and matching drawer buttons in remobi for any of these?" Adapt based on Phase 2 detection. For tools not installed, briefly explain what they are and ask if the user wants to install any.
9595
4. **Custom split bindings?** β€” Stock tmux uses `%` (vertical) and `"` (horizontal). Some configs remap to `|` and `-`. If custom, the drawer buttons need updated escape codes.
96-
5. **Do you want touch scrolling?** β€” `wheel` (default, recommended) sends mouse-wheel events β€” works in vim, less, htop, and any mouse-aware app. `keys` sends PageUp/PageDown β€” simpler, works everywhere including plain tmux copy-mode. Which fits your workflow?
96+
5. **Do you want touch scrolling?** β€” `wheel` (default, recommended) sends mouse-wheel events β€” works in vim, less, htop, and any mouse-aware app. `keys` sends PageUp/PageDown β€” simpler, works everywhere including plain tmux copy-mode. Which fits your workflow? Config shape: `gestures: { scroll: { strategy: 'wheel' } }` or `gestures: { scroll: { strategy: 'keys' } }`.
9797
6. **Auto-zoom on mobile?** When you open remobi on your phone, should the current pane zoom to full screen automatically?
9898
7. **Floating zoom button?** A persistent button overlaid on the terminal for one-tap zoom toggle
9999
8. **Custom theme or Catppuccin Mocha?** (Catppuccin Mocha is the default and looks great β€” only ask if the user's tmux theme is clearly different)
@@ -104,14 +104,12 @@ Skip questions where you already know the answer from phase 2. Summarise what yo
104104

105105
### Phase 4: Generate `remobi.config.ts`
106106

107-
Write the config using `defineConfig()`. Only include keys that differ from defaults β€” omit everything else.
107+
Export a plain config object β€” only include keys that differ from defaults, omit everything else. **Do not** `import { defineConfig } from 'remobi'` β€” the CLI calls `defineConfig()` internally so the config just needs a plain object export.
108108

109109
```typescript
110-
import { defineConfig } from 'remobi'
111-
112-
export default defineConfig({
110+
export default {
113111
// Only non-default overrides here
114-
})
112+
}
115113
```
116114

117115
After writing, validate:
@@ -387,21 +385,17 @@ For a custom prefix (e.g. Ctrl-A): replace `\x02` with `\x01`.
387385
### Minimal β€” default Ctrl-B prefix, custom name only
388386

389387
```typescript
390-
import { defineConfig } from 'remobi'
391-
392-
export default defineConfig({
388+
export default {
393389
name: 'dev',
394-
})
390+
}
395391
```
396392

397393
### Custom prefix β€” Ctrl-A (screen/byobu style)
398394

399395
Replace the default `tmux-prefix` button and update swipe gestures:
400396

401397
```typescript
402-
import { defineConfig } from 'remobi'
403-
404-
export default defineConfig({
398+
export default {
405399
name: 'dev',
406400
toolbar: {
407401
row1: (defaults) => defaults.map(b =>
@@ -427,15 +421,13 @@ export default defineConfig({
427421
return b
428422
}),
429423
},
430-
})
424+
}
431425
```
432426

433427
### Floating buttons + mobile auto-zoom
434428

435429
```typescript
436-
import { defineConfig } from 'remobi'
437-
438-
export default defineConfig({
430+
export default {
439431
mobile: {
440432
initData: '\x02z', // zoom focused pane on mobile load
441433
widthThreshold: 768,
@@ -453,17 +445,25 @@ export default defineConfig({
453445
],
454446
},
455447
],
456-
})
448+
}
449+
```
450+
451+
### Scroll strategy β€” keys instead of wheel
452+
453+
```typescript
454+
export default {
455+
gestures: {
456+
scroll: { strategy: 'keys' },
457+
},
458+
}
457459
```
458460

459461
### Popup-heavy workflow β€” lazygit, yazi, scratch shell
460462

461463
Uses function form to keep default drawer buttons and append popup triggers:
462464

463465
```typescript
464-
import { defineConfig } from 'remobi'
465-
466-
export default defineConfig({
466+
export default {
467467
name: 'dev',
468468
drawer: {
469469
buttons: (defaults) => [
@@ -488,13 +488,14 @@ export default defineConfig({
488488
},
489489
],
490490
},
491-
})
491+
}
492492
```
493493

494494
Requires matching tmux bindings (see `references/tmux-basics.md` popup section).
495495

496496
## Guardrails
497497

498+
- **Do not `import` from `'remobi'`** β€” the CLI calls `defineConfig()` internally, so configs just export a plain object. Using `import { defineConfig } from 'remobi'` fails when the config lives outside a project with remobi installed.
498499
- **Never invent root keys.** The validator rejects unknown keys with a path-based error.
499500
- **Use `drawer.buttons`, never `drawer.commands`** β€” the latter was renamed and no longer works.
500501
- **`send` actions require `data`** β€” omitting it fails validation.
@@ -503,6 +504,7 @@ Requires matching tmux bindings (see `references/tmux-basics.md` popup section).
503504
- **`toolbar` has `row1` and `row2`** β€” there is no `row3` or flat `buttons` key on toolbar.
504505
- **`mobile.initData`** is `string | null` β€” set to `null` to disable, not `false` or `''`.
505506
- **`reconnect`** has only `enabled: boolean` β€” defaults to `true`. Set `{ enabled: false }` to disable.
507+
- **`gestures.scroll` is an object, not a string** β€” use `{ strategy: 'wheel' }` or `{ strategy: 'keys' }`, never a bare `'wheel'` / `'keys'` string.
506508

507509
## Validation
508510

@@ -525,3 +527,5 @@ A zero exit with "Dry run: build" output means the config is valid. Any error ou
525527
| `action.data: expected undefined` | `data` on non-`send` action | Remove `data` from non-`send` actions |
526528
| `floatingButtons[0]: expected object` | Flat `ControlButton[]` | Wrap in group: `{ position: 'top-left', buttons: [...] }` |
527529
| `mobile.initData: expected string or null` | `false` or `0` passed | Use `null` to disable, or a string to send |
530+
| `Cannot find package 'remobi'` | Config uses `import ... from 'remobi'` | Remove the import β€” export a plain object instead. The CLI calls `defineConfig()` internally |
531+
| `gestures.scroll: expected Object, received string` | Bare `'wheel'` / `'keys'` string | Use `{ strategy: 'wheel' }` or `{ strategy: 'keys' }` |

0 commit comments

Comments
Β (0)