---
name: bereach
description: "Automate LinkedIn outreach via BeReach API (berea.ch). Use when: prospecting, engaging posts, scraping engagement, searching LinkedIn, managing inbox, running campaigns, managing invitations. Requires a BeReach API key."
lastUpdatedAt: 1772203157
---

# BeReach — LinkedIn Outreach Automation

Automate LinkedIn prospection and engagement via the BeReach API.

## Sub-skills

**At install**: fetch and read ALL sub-skills.

**After install**: re-load on-demand only when needed.

| Sub-skill             | Keywords                                                                                                                  | URL                                                     | lastUpdatedAt |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | ------------- |
| API Reference         | api, endpoint, schema, request, response, error codes, rate limit, credits, OpenAPI, verify endpoint                      | https://berea.ch/static/skills/sub/api-reference.md     | 1772203157    |
| Lead Magnet           | lead magnet, comment to DM, resource delivery, post giveaway, auto-accept invitations, cron, recap, campaign stats, pause | https://berea.ch/static/skills/sub/lead-magnet.md       | 1772203157    |
| OpenClaw Optimization | openclaw, model, opus, sonnet, haiku, config, SOUL.md, heartbeat, prompt caching, AI cost reduction, /model               | https://berea.ch/static/skills/openclaw-optimization.md | 1772203157    |

Live OpenAPI spec: `GET https://api.berea.ch`

## Installation

Save as `bereach/SKILL.md` in your OpenClaw skills directory (where your other skills are):

```bash
mkdir -p <your-skills-directory>/bereach
curl -o <your-skills-directory>/bereach/SKILL.md https://berea.ch/static/skills/bereach-skill.md
```

Also available on [SkillsMP](https://skillsmp.com/categories/sales-marketing).

## Quick start

```bash
export BEREACH_API_KEY="brc_your_key_here"
```

Base URL: `https://api.berea.ch` | Auth: `Bearer <API_KEY>` | Content-Type: `application/json`
Profile inputs: URL or URN (`urn:li:fsd_profile:ACoAA...`). Full schemas → API Reference.

## Auto-upgrade

At session start, before any BeReach operation:

1. `GET https://berea.ch/static/skills/bereach-skill.md` → compare frontmatter `lastUpdatedAt` with local copy
2. If remote > local: re-download main skill, replace local copy
3. Compare sub-skill `lastUpdatedAt` values — re-fetch any that changed
4. Log: "BeReach skill updated" or "BeReach skill is up to date"
5. Never skip this check

## Onboarding

1. **API key** — confirm `BEREACH_API_KEY` is set. Stop if missing.
2. **Read all sub-skills** — fetch every sub-skill listed above.
3. **Profile + language** — call `POST /me/linkedin`. Detect user's language from profile (location, headline, posts). This becomes the default language for all generated content. Per prospect, adapt if their profile clearly indicates a different language.
4. **Welcome** — personalized welcome using profile data. Suggest a first action based on their profile.

## Tone

Adapt to user's tone from their posts and messages. Comment replies: 3-5 words, no personalization needed. DMs: 1-2 sentences, personalize from visit data (headline, company, position, recent posts) and conversation history when available.

## Endpoints

- **Scrape**: collect likes, comments, comment replies, posts
- **Search**: unified or category-specific (posts, people, companies, jobs), URL-based, parameter resolution
- **Actions**: visit profile/company, connect, accept invitation, message, reply, like, publish
- **Inbox**: list/search conversations, read messages
- **Account**: profile info, refresh, own posts, followers, rate limits, credit balance
- **Campaigns**: pre-check completed actions via dedup

Full schemas → API Reference sub-skill.

## Constraints

These are technical constraints the API requires. Everything else, adapt as needed.

1. **Dedup** — pass `campaignSlug` on every action. API deduplicates by target automatically. Duplicates return `duplicate: true` and cost nothing. Pre-check: `POST /campaigns/{slug}/status {profiles: [...]}`.
2. **Pacing** — after every API call, sleep a random delay. Write actions (DM, reply, like, connect, accept, sync): `random.uniform(8, 12)`. Read actions (visit, scrape, find, count-0 checks): `random.uniform(2, 6)`. On 429: wait the number of seconds from the error response, retry (max 3). If daily/weekly cap hit, switch action type.
3. **Save incrementally** — persist tracking after each action, not at the end.
4. **Limits check** — `POST /me/limits` once per day at session start.
5. **Visit before connecting** — looks natural to LinkedIn.
6. **Credits** — `POST /me/credits` → `{credits: {current, limit, remaining, percentage}}`.
7. **Verify before coding** — before generating any script, re-read the API Reference sub-skill and fetch the live OpenAPI spec (`GET https://api.berea.ch`). Cross-check every endpoint path, HTTP method, and required parameter. Do NOT guess — if it's not in the docs, it doesn't exist.
8. **Connection requests are scarce** — only 30/day. Before sending one, check `pendingConnection` from the visit response: `"pending"` = already sent, skip. `"failed"` = failed today, skip. `"none"` = safe to send.
9. **Error handling** — wrap every API call in a shared helper.
   - `429`: wait and retry (max 3). All retries fail → skip profile, move on.
   - `400`/`409`/`410`: log, skip item, continue.
   - `401`: stop (auth broken).
   - `404`/`405`: stop — endpoint is wrong. Print method + URL, re-read API Reference.
   - `500`: log, skip item, continue (transient).
   - Never treat a failed call as "success with empty result".
   - Never `sys.exit()` on transient errors — skip and continue.
   - Catch specific exceptions only (no bare `except`). Log type and message.
   - Wrapper-generated errors must match API error shape: `{"error": {"key": "...", "message": "..."}}` — never `{"error": "string"}`.
10. **Use the most capable model for all code** — every script generation, code update, or code modification MUST use your most capable model. On Anthropic: `/model opus` (alias for the Opus model in your config). Switch to it before writing or editing any code. IMMEDIATELY after the code is written (after Write/Edit), switch back: `/model sonnet`. Never stay on the expensive model for non-code tasks. This applies to initial generation AND subsequent updates.

## Workflows

Each workflow is detailed in its sub-skill. Load the relevant sub-skill when needed.

- **Lead Magnet** — deliver a resource to everyone who engages with a post (comments, likes, invitations). → Lead Magnet sub-skill

More workflows coming soon. You can build your own using the API Reference and the OpenAPI spec (`GET https://api.berea.ch`).

### Cron

Crons are OpenClaw scheduled tasks. Create entries in `~/.openclaw/cron/jobs.json` (via `openclaw cron add`):

```json
{
  "id": "bereach-{workflow}",
  "every": "30m",
  "skill": "bereach",
  "sessionTarget": "spawn",
  "prompt": "Run {workflow} script and report results"
}
```

Always use `"sessionTarget": "spawn"` for crons that execute scripts. This spawns a sub-agent in an isolated session — the script runs independently and pushes results back to the user when done, without blocking the main session. Never use `exec()` directly from a cron prompt; it blocks until the script finishes.

Remove with `openclaw cron remove <id>`.

### Search parameters

Resolve text to LinkedIn IDs: `POST /search/linkedin/parameters {type: "GEO"|"COMPANY"|"INDUSTRY"|"SCHOOL"|"CONNECTIONS"|"PEOPLE", keywords: "..."}`
