ob1-local-http
ob1-local-http enables capture and semantic search of notes within air-gapped or MCP-disabled environments by making curl requests to a locally hosted Open Brain instance. Use this skill when the user wants to save thoughts, search previous notes, or review recent captures, provided the BRAIN_URL and BRAIN_ANON_KEY environment variables are configured on the development host.
git clone --depth 1 https://github.com/NateBJones-Projects/OB1 /tmp/ob1-local-http && cp -r /tmp/ob1-local-http/skills/ob1-local-http ~/.claude/skills/ob1-local-httpSKILL.md
# OB1 Local HTTP
## Problem
The canonical Open Brain stack assumes Claude Code can talk to a remote
Supabase MCP server. In environments that disable MCP entirely -- corporate
networks, air-gapped offices, restricted Claude Code builds -- that path is
not available. This skill replaces it with `curl` calls to a LAN-resident
Open Brain (see the `local-brain-no-mcp` recipe), keeping the same
capture-and-recall behavior without any MCP protocol involvement.
## When to Use
- The user wants to remember, record, save, capture, or note something.
- The user wants to search, recall, retrieve, find, or look up something
they previously captured.
- The user wants to see recent thoughts (e.g. "what have I been thinking
about", "show me today's notes").
## When Not to Use
- The environment has a working remote Open Brain MCP connection -- prefer
the canonical MCP-based capture/search tools.
- The required environment variables `BRAIN_URL` and `BRAIN_ANON_KEY` are
not set on the dev host -- this skill cannot function without them; ask
the user to follow `local-brain-no-mcp`'s install instructions first.
## Required Environment
On each dev host that will use this skill, the user must export:
```sh
export BRAIN_URL="http://<brain-host>:8000" # Supabase Kong gateway
export BRAIN_ANON_KEY="eyJhbGciOi..." # written by setup.sh
```
If either is missing, stop and tell the user. Do not guess values.
## Process
### Capture
When the user says something like "remember X" or "save this thought":
```sh
curl -fsS -X POST "$BRAIN_URL/functions/v1/capture" \
-H "apikey: $BRAIN_ANON_KEY" \
-H "Authorization: Bearer $BRAIN_ANON_KEY" \
-H "Content-Type: application/json" \
-d '{"content":"<the thought>","metadata":{"source":"claude-code"}}'
```
Optional `metadata` fields: `source`, `tags` (array of strings),
`thread_id`, anything else useful. The server fingerprints content and
de-duplicates -- re-capturing identical text returns the existing id.
### Search
When the user wants to recall:
```sh
curl -fsS -X POST "$BRAIN_URL/functions/v1/search" \
-H "apikey: $BRAIN_ANON_KEY" \
-H "Authorization: Bearer $BRAIN_ANON_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"<what to find>","match_count":10,"match_threshold":0.65}'
```
`match_threshold` defaults to 0.7. Lower it to 0.5-0.65 for broader recall;
raise to 0.8+ for precision. Cap `match_count` at 100.
### Browse recent
When the user asks "what have I been thinking about" or wants a list rather
than a similarity search:
```sh
curl -fsS "$BRAIN_URL/functions/v1/list?limit=20" \
-H "apikey: $BRAIN_ANON_KEY" \
-H "Authorization: Bearer $BRAIN_ANON_KEY"
```
## Output
- For captures: confirm the id and the de-dupe fingerprint to the user in
one sentence. Don't paraphrase the captured content back at them.
- For searches: surface the top results with similarity scores and
created_at timestamps. Order by similarity descending. If no results
cross the threshold, say so plainly and suggest lowering it.
- For browse: a compact bullet list with truncated content (first ~120
chars) and timestamps.
## Failure Modes
- HTTP 502 with "unable to reach Ollama": the brain host's Ollama service
is down. Tell the user to `docker compose ps` on the brain host.
- HTTP 502 with "did you 'ollama pull...'": the embedding model isn't
loaded. Tell the user to run the documented `ollama pull` step.
- HTTP 502 with "embedding-dim mismatch": the brain's `EMBED_DIM` env was
changed after the volume was initialized. Tell the user to read the
"one-way door" section of `local-brain-no-mcp`'s README.
- HTTP 401 or 403: `BRAIN_ANON_KEY` is wrong or expired. Tell the user to
check `supabase-docker/docker/.env` on the brain host.
- Network timeout: the brain host is unreachable. Tell the user to ping
the brain host from this dev host.
## Notes
- Never log or echo `BRAIN_ANON_KEY` -- it's a long-lived JWT.
- This skill never installs or invokes any MCP server, by design.
- The brain host generates embeddings itself; this dev host doesn't need
Ollama or any model files.Use Nate Jones OB1 Agent Memory from OpenClaw with provenance, scope, review, and use-policy discipline.
Continuous learning system that extracts reusable knowledge from work sessions. Triggers: (1) /aiception command, (2) 'save this as a skill' or 'extract a skill from this', (3) 'what did we learn?', (4) after non-obvious debugging or trial-and-error discovery. Creates new skills when valuable reusable knowledge is identified. Integrates with Open Brain to prevent duplicates.
Morning digest of yesterday's Open Brain thoughts, drafted to Gmail
Generate infographic images from any research doc, Open Brain thoughts, or analysis. Auto-chunks content, writes prompts, generates images via Gemini API (free tier), and saves to media/. Use --premium for better text rendering.
|
Use when processing voice transcripts, brain dumps, stream-of-consciousness notes, or any raw multi-topic capture. Extracts every idea thread, then evaluates each one with deep brainstorming, then captures results to Open Brain. Trigger on transcripts, exports, "process this", "pan for gold", "brain dump", "what did I say", or multi-topic markdown files.
|