setup-open-index — Claude Code skill: context for a domain agent
Wires Open Index into a domain-specialized agent as a context layer it can search, traverse and maintain — legal, support, infrastructure or similar.
npx skills add DrDroidLab/open-index --skill setup-open-index -a claude-codeWhat setup-open-index does
The skill walks through the whole setup: installing Open Index, initializing a domain brain, pointing an MCP server at it and confirming the agent can reach the tools. Read and write access is the default; --read-only is for agents that must never touch domain knowledge.
Steps come in order. A virtual environment and pip install -e '.[mcp]' from a local checkout, then open-index init <brain-name>, open-index validate and open-index index. The sample note schema is meant to be swapped for concepts that fit the domain — matters, clauses, obligations and precedents for legal work, for instance. The server itself starts with open-index mcp --brain /absolute/path/to/<brain-name>, and the client config follows the usual mcpServers shape under the open-index key. In Claude the adapter file is .mcp.json.
Verification covers five tools: navigation_guidelines, search_brain, get_entity, put_entity, create_doc_type. A smoke test creates a synthetic entity, fetches it by ID and removes it again. Under read-only mode put_entity and create_doc_type should not show up at all. Shared or multi-writer deployments call for the OpenSearch backend, and secrets belong in environment variables — not in brain.yaml, skill files or logs. The skill also says not to call the setup finished until tool discovery and a synthetic query both pass.
What it helps with
- connect Open Index to an agent over MCP
- define a domain brain and its schema
- check which tools the agent can actually see
- restrict an agent to read-only access
- move credentials out of config files
Example prompts for the agent
- Set up Open Index as the context layer for my support agent
- Connect the Open Index MCP server to this project
- Verify the Open Index connection with a synthetic query
How to install setup-open-index
1Skills CLI (Vercel)
npx skills add DrDroidLab/open-index --skill setup-open-index -a claude-code2Manually: put the files in place
~/.claude/skills/setup-open-index/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/setup-open-index/
1Skills CLI (Vercel)
npx skills add DrDroidLab/open-index --skill setup-open-index -a codex2Manually: put the files in place
.agents/skills/setup-open-index/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add DrDroidLab/open-index --skill setup-open-index -a cursor2Manually: put the files in place
.cursor/skills/setup-open-index/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install DrDroidLab/open-index setup-open-index2Manually: put the files in place
.github/skills/setup-open-index/SKILL.md1Skills CLI (Vercel)
npx skills add DrDroidLab/open-index --skill setup-open-index -a gemini-cli2Platform CLI
gemini skills install https://github.com/DrDroidLab/open-index --path skills/setup-open-indexManually: put the files in place
.devin/skills/setup-open-index/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add DrDroidLab/open-index --skill setup-open-index -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about setup-open-index
How do I install setup-open-index in Claude Code?
Run npx skills add DrDroidLab/open-index --skill setup-open-index -a claude-code. The skill then sits at ~/.claude/skills/setup-open-index/SKILL.md.
What does setup-open-index do?
It installs and configures Open Index as the context layer for a domain agent: install, brain initialization, MCP server connection and a tool check.
When should I use read-only mode?
Add --read-only when the agent must never update domain knowledge. It is not part of the default setup.
Source text
SKILL.md · MIT
---
name: setup-open-index
description: >-
Install and configure Open Index as the read/write context layer for a
domain-specialized agent. Use when setting up a legal, marketing, customer
support, sales, infrastructure, or other domain agent with Open Index over MCP.
---
# Set up Open Index for a domain agent
Open Index gives a domain-specialized agent structured context it can search,
traverse, and maintain. It is read/write by default; use `--read-only` only when
the agent must never update domain knowledge.
## 1. Install
From a local checkout:
```bash
python -m venv .venv
. .venv/bin/activate
pip install -e '.[mcp]'
```
If Open Index is published as a package, install the equivalent `open-index[mcp]`
release instead. Never invent or hardcode credentials during setup.
## 2. Initialize the domain brain
Choose a short directory name and describe the actual domain in `brain.yaml`:
```bash
open-index init <brain-name>
cd <brain-name>
open-index validate
open-index index
```
Replace the example `note` schema with concepts meaningful to the domain. For
example, a legal agent might model matters, clauses, obligations, and precedents;
a support agent might model products, issues, customer segments, and resolutions.
## 3. Connect the MCP server
Configure the agent runtime to launch this command from the brain directory:
```bash
open-index mcp --brain /absolute/path/to/<brain-name>
```
Generic MCP configuration shape:
```json
{
"mcpServers": {
"open-index": {
"command": "open-index",
"args": ["mcp", "--brain", "/absolute/path/to/<brain-name>"]
}
}
}
```
Adapt the location of this configuration to the selected client. Claude Code's
optional adapter is `.mcp.json`; OpenClaw and Hermes may install this `SKILL.md`
in their own skills directory while their MCP connection is configured according
to that runtime's current documentation.
For retrieval-only access, append `--read-only`. Do not add it by default.
## 4. Verify the agent connection
Confirm the connected server exposes these default tools:
- `navigation_guidelines`
- `search_brain`
- `get_entity`
- `put_entity`
- `create_doc_type`
The MCP host should inject the server's dynamic domain-context instructions into
the agent prompt. `navigation_guidelines()` is a refresh/fallback for hosts that
do not support server instructions or after the schema/index changes.
Run a safe smoke test using synthetic content:
1. Search the brain and confirm the welcome entity is returned.
2. Create a synthetic entity that matches an existing doc type.
3. Fetch it by ID and verify its fields.
4. Remove it if the setup should remain clean.
In read-only mode, verify `put_entity` and `create_doc_type` are absent.
## 5. Production setup
Use `open-index serve` for a remote MCP endpoint and configure authentication.
Use the OpenSearch backend for shared or multi-writer deployments. Keep secrets in
environment variables, never in `brain.yaml`, skill files, examples, or logs.
## Guardrails
- Treat the brain's domain context according to its sensitivity and access policy.
- Do not put credentials, private keys, tokens, or unrelated personal data in it.
- Reuse existing doc types and relationship meanings before creating new ones.
- Run `open-index validate` after changing file-backed schemas or entities.
- Do not claim setup is complete until tool discovery and a synthetic query pass.
© DrDroidLab · MIT · DrDroidLab/open-index