Skip to content

Commit ee5bbfb

Browse files
GenerQAQclaude
andcommitted
docs(SKILL.md): simplify plugin config — ~/.acontext/ is the primary config source
Remove env var configuration examples and explicit apiKey/userId from config tables since both plugins now auto-read from ~/.acontext/ files after login. Update troubleshooting to reference `acontext whoami` instead of env vars. Fix openclaw apiKey resolution comment to match actual priority order. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e301076 commit ee5bbfb

2 files changed

Lines changed: 26 additions & 57 deletions

File tree

landingpage/public/SKILL.md

Lines changed: 25 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ acontext login
4141
- If you're in a Interactive Terminal(TTY), this command will open a browser for OAuth, then guides you through project creation. Your API key is saved automatically.
4242
- If you're in a Non-interactive Terminal(agent/CI), this command will print a login URL for the user to open manually. After user completes, run `acontext login --poll` to finish authentication.
4343
- Set up a project via `acontext dash projects` commands. If Acontext has existing projects, make sure the user wants to use an existing project or create a new project for you.
44-
- Read the cli output to get the api key and user login email, you will need it.
45-
4644
### 3. Add Acontext to Your Agent
4745

46+
Both plugins automatically read your API key and user email from `~/.acontext/credentials.json` and `~/.acontext/auth.json` (written by `acontext login`). No manual configuration is needed after login.
47+
4848
#### Option A: Claude Code Plugin
4949

5050
Add the Acontext marketplace and install the plugin (run inside Claude Code):
@@ -54,15 +54,6 @@ Add the Acontext marketplace and install the plugin (run inside Claude Code):
5454
/plugin install acontext
5555
```
5656

57-
The plugin automatically reads your API key and user email from `~/.acontext/credentials.json` and `~/.acontext/auth.json` (written by `acontext login`). No manual environment variable setup is needed.
58-
59-
If you prefer explicit configuration, you can set environment variables in your shell profile (`~/.bashrc` or `~/.zshrc`) — they serve as fallback when the files are not present:
60-
61-
```bash
62-
export ACONTEXT_API_KEY="<your-api-key>"
63-
export ACONTEXT_USER_ID="<your-login-email>"
64-
```
65-
6657
Restart Claude Code — the plugin auto-captures conversations and syncs skills to `~/.claude/skills/`.
6758

6859
#### Option B: OpenClaw Plugin
@@ -71,7 +62,7 @@ Restart Claude Code — the plugin auto-captures conversations and syncs skills
7162
openclaw plugins install @acontext/openclaw
7263
```
7364

74-
The plugin automatically reads your API key and user email from `~/.acontext/credentials.json` and `~/.acontext/auth.json` (written by `acontext login`). You only need to add a minimal config to `openclaw.json`:
65+
Add a minimal config to `openclaw.json`:
7566

7667
```json5
7768
{
@@ -84,26 +75,7 @@ The plugin automatically reads your API key and user email from `~/.acontext/cre
8475
}
8576
```
8677

87-
If you prefer explicit configuration, add API key and user to your `openclaw.json`:
88-
```json5
89-
{
90-
plugins: {
91-
slots: {
92-
memory: "acontext"
93-
},
94-
entries: {
95-
"acontext": {
96-
enabled: true,
97-
config: {
98-
"apiKey": "${ACONTEXT_API_KEY}",
99-
"userId": "${ACONTEXT_USER_MAIL}"
100-
}
101-
}
102-
}
103-
}
104-
}
105-
```
106-
3. Restart the gateway:
78+
Restart the gateway:
10779

10880
```bash
10981
openclaw gateway
@@ -155,18 +127,16 @@ The directory must contain a `SKILL.md` with name and description in YAML front-
155127

156128
## Claude Code Plugin Configuration
157129

158-
Settings are resolved with priority: `~/.acontext/` files > environment variables > defaults. After running `acontext login`, the plugin works automatically without any env vars.
130+
After `acontext login`, the plugin works automatically — API key and user are read from `~/.acontext/`. The following env vars can override defaults if needed:
159131

160-
| Env Var | Default | Description |
161-
| ------------------------------ | ----------------------------------- | ------------------------------------------------------ |
162-
| `ACONTEXT_API_KEY` | from `~/.acontext/credentials.json` | Acontext API key (auto-detected from CLI login) |
163-
| `ACONTEXT_BASE_URL` | `https://api.acontext.app/api/v1` | API base URL |
164-
| `ACONTEXT_USER_ID` | from `~/.acontext/auth.json` | Scope sessions per user (auto-detected from CLI login) |
165-
| `ACONTEXT_LEARNING_SPACE_ID` | auto-created | Explicit Learning Space ID |
166-
| `ACONTEXT_SKILLS_DIR` | `~/.claude/skills` | Directory where skills are synced |
167-
| `ACONTEXT_AUTO_CAPTURE` | `true` | Store messages after each agent turn |
168-
| `ACONTEXT_AUTO_LEARN` | `true` | Trigger skill distillation after sessions |
169-
| `ACONTEXT_MIN_TURNS_FOR_LEARN` | `4` | Minimum turns before triggering auto-learn |
132+
| Env Var | Default | Description |
133+
| ------------------------------ | --------------------------------- | -------------------------------------- |
134+
| `ACONTEXT_BASE_URL` | `https://api.acontext.app/api/v1` | API base URL |
135+
| `ACONTEXT_LEARNING_SPACE_ID` | auto-created | Explicit Learning Space ID |
136+
| `ACONTEXT_SKILLS_DIR` | `~/.claude/skills` | Directory where skills are synced |
137+
| `ACONTEXT_AUTO_CAPTURE` | `true` | Store messages after each agent turn |
138+
| `ACONTEXT_AUTO_LEARN` | `true` | Trigger skill distillation after sessions |
139+
| `ACONTEXT_MIN_TURNS_FOR_LEARN` | `4` | Minimum turns before triggering auto-learn |
170140

171141
### Claude Code MCP Tools
172142

@@ -182,18 +152,16 @@ Settings are resolved with priority: `~/.acontext/` files > environment variable
182152

183153
## OpenClaw Plugin Configuration
184154

185-
All settings are in `openclaw.json` under the plugin config:
155+
After `acontext login`, the plugin works automatically — API key and user are read from `~/.acontext/`. Optional overrides in `openclaw.json` config:
186156

187-
| Key | Type | Default | Description |
188-
| ------------------ | --------- | --------------------------------- | --------------------------------------------------------------- |
189-
| `apiKey` | `string` || **Required.** Acontext API key (supports `${ACONTEXT_API_KEY}`) |
190-
| `baseUrl` | `string` | `https://api.acontext.app/api/v1` | API base URL |
191-
| `userId` | `string` | `"default"` | Scope sessions per user |
192-
| `learningSpaceId` | `string` | auto-created | Explicit Learning Space ID |
193-
| `skillsDir` | `string` | `~/.openclaw/skills` | Directory where skills are synced |
194-
| `autoCapture` | `boolean` | `true` | Store messages after each agent turn |
195-
| `autoLearn` | `boolean` | `true` | Trigger skill distillation after sessions |
196-
| `minTurnsForLearn` | `number` | `4` | Minimum turns before triggering auto-learn |
157+
| Key | Type | Default | Description |
158+
| ------------------ | --------- | --------------------------------- | ---------------------------------------- |
159+
| `baseUrl` | `string` | `https://api.acontext.app/api/v1` | API base URL |
160+
| `learningSpaceId` | `string` | auto-created | Explicit Learning Space ID |
161+
| `skillsDir` | `string` | `~/.openclaw/skills` | Directory where skills are synced |
162+
| `autoCapture` | `boolean` | `true` | Store messages after each agent turn |
163+
| `autoLearn` | `boolean` | `true` | Trigger skill distillation after sessions |
164+
| `minTurnsForLearn` | `number` | `4` | Minimum turns before triggering auto-learn |
197165

198166
### OpenClaw Agent Tools
199167

@@ -232,16 +200,17 @@ Restart your shell or run `source ~/.bashrc` / `source ~/.zshrc`. The installer
232200

233201
### Claude Code plugin not working
234202

235-
- Ensure `ACONTEXT_API_KEY` is exported in your shell profile
203+
- Run `acontext whoami` to verify you are logged in
204+
- Check that `~/.acontext/credentials.json` exists and has a default project
236205
- Check Claude Code logs for `[info] acontext:` or `[warn] acontext:` messages
237206
- Verify the plugin is installed: `/plugin list`
238207
- Skills should appear in `~/.claude/skills/` after the first session
239208

240209
### OpenClaw plugin not loading
241210

242211
- Confirm `plugins.slots.memory` is set to `"acontext"` in `openclaw.json`
212+
- Run `acontext whoami` to verify you are logged in
243213
- Run `openclaw gateway` to restart
244-
- Check that `ACONTEXT_API_KEY` is exported in your environment
245214

246215
### No projects found
247216

src/packages/openclaw/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export const configSchema = {
155155
const cfg = value as Record<string, unknown>;
156156
assertAllowedKeys(cfg, ALLOWED_KEYS, "acontext config");
157157

158-
// Resolve apiKey: config > ~/.acontext/credentials.json > env var resolution
158+
// Resolve apiKey: ~/.acontext/credentials.json > config/env var
159159
let resolvedApiKey: string | undefined;
160160
resolvedApiKey = loadApiKeyFromCredentials();
161161
if (!resolvedApiKey && typeof cfg.apiKey === "string" && cfg.apiKey) {

0 commit comments

Comments
 (0)