$npx -y skills add AgentWorkforce/relay --skill setting-up-relayfileUse when an agent or human needs to set up relayfile end-to-end so agents can read and write provider files through a local mount. Covers relayfile setup, dynamic integration discovery with relayfile integration available/search, Nango and Composio backend selection, Atlassia
| 1 | ### Overview |
| 2 | |
| 3 | Relayfile mounts a provider (Notion, Linear, Slack, GitHub, and other adapter-backed integrations) as ordinary files on disk so an agent can read and write through the filesystem instead of calling APIs. This skill is the canonical setup recipe. Follow it top-to-bottom for first-time setup; jump to **Recovering from breakage** if a working mount has gone wrong. |
| 4 | |
| 5 | ### When to use this skill |
| 6 | |
| 7 | - An agent needs read access to a provider (e.g., "summarize this Notion database"). |
| 8 | - An agent needs to write back to a provider (e.g., "post a review on this Notion page", "update this Linear issue"). |
| 9 | - A human is setting up a mount before delegating work to an agent. |
| 10 | - A mount stopped reflecting changes and you need to diagnose where. |
| 11 | |
| 12 | ### What you get |
| 13 | |
| 14 | #### After setup, files appear under `<local-dir>/<provider>/...`: |
| 15 | |
| 16 | ```text |
| 17 | ~/relayfile-mount/notion/ |
| 18 | ├── databases/ |
| 19 | │ ├── <slug>--<id>/ |
| 20 | │ │ ├── metadata.json ← database schema (read-only) |
| 21 | │ │ └── pages/ |
| 22 | │ │ ├── <slug>--<id>.json ← page metadata |
| 23 | │ │ └── <slug>--<id>/ |
| 24 | │ │ ├── content.md ← page body (READ + WRITE) |
| 25 | │ │ └── blocks/<id>.json ← raw Notion block tree |
| 26 | └── pages/ ← top-level pages (not in a database) |
| 27 | ``` |
| 28 | |
| 29 | ### Prerequisites |
| 30 | |
| 31 | - Recent `relayfile` CLI on `$PATH`. Verify: `relayfile --help` should list `setup`, `integration`, `writeback`, and the `integration available` / `integration search` / `integration set-metadata` subcommands. |
| 32 | - A modern macOS or Linux shell with `jq` for JSON inspection. AWS CLI access is optional and only needed for internal cloud log diagnostics. |
| 33 | - Network access to `agentrelay.com/cloud` (cloud control plane), `api.relayfile.dev` (relayfile API), `connect.nango.dev` (Nango OAuth), and Composio connect endpoints when using `--backend composio`. |
| 34 | |
| 35 | ### Step 1 — Run setup (interactive happy path) |
| 36 | |
| 37 | #### ```bash |
| 38 | |
| 39 | ```bash |
| 40 | relayfile setup \ |
| 41 | --provider notion \ |
| 42 | --workspace my-agent \ |
| 43 | --local-dir ~/relayfile-mount \ |
| 44 | --no-open |
| 45 | ``` |
| 46 | |
| 47 | ### Step 2 — Verify the mount is healthy |
| 48 | |
| 49 | #### ```bash |
| 50 | |
| 51 | ```bash |
| 52 | relayfile status my-agent |
| 53 | ``` |
| 54 | |
| 55 | ### Step 3 — Hand off to an agent |
| 56 | |
| 57 | #### Pattern A: local agent (Claude Code, scripts, Cursor) |
| 58 | |
| 59 | ```bash |
| 60 | export RELAYFILE_LOCAL_DIR=~/relayfile-mount |
| 61 | # point Claude Code at the dir or `cd` in |
| 62 | ``` |
| 63 | |
| 64 | #### Pattern B: remote agent / SDK access (no disk mirror) |
| 65 | |
| 66 | ```ts |
| 67 | import { RelayFileClient } from '@relayfile/sdk'; |
| 68 | |
| 69 | const token = process.env.RELAYFILE_TOKEN; // from ~/.relayfile/credentials.json |
| 70 | const client = new RelayFileClient({ token, server: 'https://api.relayfile.dev' }); |
| 71 | |
| 72 | // Read |
| 73 | const file = await client.getFile('rw_xxxxxxxx', '/notion/pages/xxx/content.md'); |
| 74 | |
| 75 | // Write — triggers writeback automatically |
| 76 | await client.putFile('rw_xxxxxxxx', '/notion/pages/xxx/content.md', { |
| 77 | content: '# New body\n\n…', |
| 78 | contentType: 'text/markdown', |
| 79 | }); |
| 80 | ``` |
| 81 | |
| 82 | ### Step 4 — Verify writeback works (optional but recommended) |
| 83 | |
| 84 | #### Skip-able if the agent only reads. Required if the agent will write. |
| 85 | |
| 86 | ```bash |
| 87 | echo "[writeback test $(date -u +%FT%TZ)]" > ~/relayfile-mount/notion/pages/<throwaway-page>/content.md |
| 88 | ``` |
| 89 | |
| 90 | ### Discover writeback contracts before writing |
| 91 | |
| 92 | #### Do not guess writeback shapes and do not use a magic `new.json` filename. Current relayfile adapters ship discovery documents for writable resources: |
| 93 | |
| 94 | ```text |
| 95 | <provider>/ |
| 96 | ├── .adapter.md ← adapter overview, operations, ID patterns |
| 97 | └── <resource>/ |
| 98 | ├── .schema.json ← full-record JSON Schema, draft 2020-12 |
| 99 | └── .create.example.json ← minimal create payload |
| 100 | ``` |
| 101 | |
| 102 | ### Path conventions per provider |
| 103 | |
| 104 | | Provider | Read paths | Write paths | |
| 105 | | -------- | ------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 106 | | Notion | `/notion/pages/<slug>--<id>/content.md`, `/notion/databases/<id>/pages/.../content.md`, `<slug>.json` (metadata) | same paths overwrite the body / properties |