@neocode-ai/web 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +54 -0
  2. package/astro.config.mjs +145 -0
  3. package/config.mjs +14 -0
  4. package/package.json +41 -0
  5. package/public/robots.txt +6 -0
  6. package/public/theme.json +183 -0
  7. package/src/assets/lander/check.svg +2 -0
  8. package/src/assets/lander/copy.svg +2 -0
  9. package/src/assets/lander/screenshot-github.png +0 -0
  10. package/src/assets/lander/screenshot-splash.png +0 -0
  11. package/src/assets/lander/screenshot-vscode.png +0 -0
  12. package/src/assets/lander/screenshot.png +0 -0
  13. package/src/assets/logo-dark.svg +20 -0
  14. package/src/assets/logo-light.svg +20 -0
  15. package/src/assets/logo-ornate-dark.svg +18 -0
  16. package/src/assets/logo-ornate-light.svg +18 -0
  17. package/src/assets/web/web-homepage-active-session.png +0 -0
  18. package/src/assets/web/web-homepage-new-session.png +0 -0
  19. package/src/assets/web/web-homepage-see-servers.png +0 -0
  20. package/src/components/Head.astro +50 -0
  21. package/src/components/Header.astro +128 -0
  22. package/src/components/Hero.astro +11 -0
  23. package/src/components/Lander.astro +713 -0
  24. package/src/components/Share.tsx +634 -0
  25. package/src/components/SiteTitle.astro +59 -0
  26. package/src/components/icons/custom.tsx +87 -0
  27. package/src/components/icons/index.tsx +4454 -0
  28. package/src/components/share/common.tsx +77 -0
  29. package/src/components/share/content-bash.module.css +85 -0
  30. package/src/components/share/content-bash.tsx +67 -0
  31. package/src/components/share/content-code.module.css +26 -0
  32. package/src/components/share/content-code.tsx +32 -0
  33. package/src/components/share/content-diff.module.css +153 -0
  34. package/src/components/share/content-diff.tsx +231 -0
  35. package/src/components/share/content-error.module.css +64 -0
  36. package/src/components/share/content-error.tsx +24 -0
  37. package/src/components/share/content-markdown.module.css +154 -0
  38. package/src/components/share/content-markdown.tsx +75 -0
  39. package/src/components/share/content-text.module.css +63 -0
  40. package/src/components/share/content-text.tsx +37 -0
  41. package/src/components/share/copy-button.module.css +30 -0
  42. package/src/components/share/copy-button.tsx +28 -0
  43. package/src/components/share/part.module.css +428 -0
  44. package/src/components/share/part.tsx +780 -0
  45. package/src/components/share.module.css +832 -0
  46. package/src/content/docs/1-0.mdx +67 -0
  47. package/src/content/docs/acp.mdx +156 -0
  48. package/src/content/docs/agents.mdx +720 -0
  49. package/src/content/docs/cli.mdx +597 -0
  50. package/src/content/docs/commands.mdx +323 -0
  51. package/src/content/docs/config.mdx +683 -0
  52. package/src/content/docs/custom-tools.mdx +170 -0
  53. package/src/content/docs/ecosystem.mdx +76 -0
  54. package/src/content/docs/enterprise.mdx +170 -0
  55. package/src/content/docs/formatters.mdx +130 -0
  56. package/src/content/docs/github.mdx +321 -0
  57. package/src/content/docs/gitlab.mdx +195 -0
  58. package/src/content/docs/ide.mdx +48 -0
  59. package/src/content/docs/index.mdx +359 -0
  60. package/src/content/docs/keybinds.mdx +191 -0
  61. package/src/content/docs/lsp.mdx +188 -0
  62. package/src/content/docs/mcp-servers.mdx +511 -0
  63. package/src/content/docs/models.mdx +223 -0
  64. package/src/content/docs/modes.mdx +331 -0
  65. package/src/content/docs/network.mdx +57 -0
  66. package/src/content/docs/permissions.mdx +237 -0
  67. package/src/content/docs/plugins.mdx +362 -0
  68. package/src/content/docs/providers.mdx +1889 -0
  69. package/src/content/docs/rules.mdx +180 -0
  70. package/src/content/docs/sdk.mdx +391 -0
  71. package/src/content/docs/server.mdx +286 -0
  72. package/src/content/docs/share.mdx +128 -0
  73. package/src/content/docs/skills.mdx +220 -0
  74. package/src/content/docs/themes.mdx +369 -0
  75. package/src/content/docs/tools.mdx +345 -0
  76. package/src/content/docs/troubleshooting.mdx +300 -0
  77. package/src/content/docs/tui.mdx +390 -0
  78. package/src/content/docs/web.mdx +136 -0
  79. package/src/content/docs/windows-wsl.mdx +113 -0
  80. package/src/content/docs/zen.mdx +251 -0
  81. package/src/content.config.ts +7 -0
  82. package/src/pages/[...slug].md.ts +18 -0
  83. package/src/pages/s/[id].astro +113 -0
  84. package/src/styles/custom.css +405 -0
  85. package/src/types/lang-map.d.ts +27 -0
  86. package/tsconfig.json +9 -0
@@ -0,0 +1,286 @@
1
+ ---
2
+ title: Server
3
+ description: Interact with neocode server over HTTP.
4
+ ---
5
+
6
+ import config from "../../../config.mjs"
7
+ export const typesUrl = `${config.github}/blob/dev/packages/sdk/js/src/gen/types.gen.ts`
8
+
9
+ The `neocode serve` command runs a headless HTTP server that exposes an OpenAPI endpoint that an neocode client can use.
10
+
11
+ ---
12
+
13
+ ### Usage
14
+
15
+ ```bash
16
+ neocode serve [--port <number>] [--hostname <string>] [--cors <origin>]
17
+ ```
18
+
19
+ #### Options
20
+
21
+ | Flag | Description | Default |
22
+ | ------------ | ----------------------------------- | ----------- |
23
+ | `--port` | Port to listen on | `4096` |
24
+ | `--hostname` | Hostname to listen on | `127.0.0.1` |
25
+ | `--mdns` | Enable mDNS discovery | `false` |
26
+ | `--cors` | Additional browser origins to allow | `[]` |
27
+
28
+ `--cors` can be passed multiple times:
29
+
30
+ ```bash
31
+ neocode serve --cors http://localhost:5173 --cors https://app.example.com
32
+ ```
33
+
34
+ ---
35
+
36
+ ### Authentication
37
+
38
+ Set `NEOCODE_SERVER_PASSWORD` to protect the server with HTTP basic auth. The username defaults to `neocode`, or set `NEOCODE_SERVER_USERNAME` to override it. This applies to both `neocode serve` and `neocode web`.
39
+
40
+ ```bash
41
+ NEOCODE_SERVER_PASSWORD=your-password neocode serve
42
+ ```
43
+
44
+ ---
45
+
46
+ ### How it works
47
+
48
+ When you run `neocode` it starts a TUI and a server. Where the TUI is the
49
+ client that talks to the server. The server exposes an OpenAPI 3.1 spec
50
+ endpoint. This endpoint is also used to generate an [SDK](/docs/sdk).
51
+
52
+ :::tip
53
+ Use the neocode server to interact with neocode programmatically.
54
+ :::
55
+
56
+ This architecture lets neocode support multiple clients and allows you to interact with neocode programmatically.
57
+
58
+ You can run `neocode serve` to start a standalone server. If you have the
59
+ neocode TUI running, `neocode serve` will start a new server.
60
+
61
+ ---
62
+
63
+ #### Connect to an existing server
64
+
65
+ When you start the TUI it randomly assigns a port and hostname. You can instead pass in the `--hostname` and `--port` [flags](/docs/cli). Then use this to connect to its server.
66
+
67
+ The [`/tui`](#tui) endpoint can be used to drive the TUI through the server. For example, you can prefill or run a prompt. This setup is used by the NeoCode [IDE](/docs/ide) plugins.
68
+
69
+ ---
70
+
71
+ ## Spec
72
+
73
+ The server publishes an OpenAPI 3.1 spec that can be viewed at:
74
+
75
+ ```
76
+ http://<hostname>:<port>/doc
77
+ ```
78
+
79
+ For example, `http://localhost:4096/doc`. Use the spec to generate clients or inspect request and response types. Or view it in a Swagger explorer.
80
+
81
+ ---
82
+
83
+ ## APIs
84
+
85
+ The neocode server exposes the following APIs.
86
+
87
+ ---
88
+
89
+ ### Global
90
+
91
+ | Method | Path | Description | Response |
92
+ | ------ | ---------------- | ------------------------------ | ------------------------------------ |
93
+ | `GET` | `/global/health` | Get server health and version | `{ healthy: true, version: string }` |
94
+ | `GET` | `/global/event` | Get global events (SSE stream) | Event stream |
95
+
96
+ ---
97
+
98
+ ### Project
99
+
100
+ | Method | Path | Description | Response |
101
+ | ------ | ------------------ | ----------------------- | --------------------------------------------- |
102
+ | `GET` | `/project` | List all projects | <a href={typesUrl}><code>Project[]</code></a> |
103
+ | `GET` | `/project/current` | Get the current project | <a href={typesUrl}><code>Project</code></a> |
104
+
105
+ ---
106
+
107
+ ### Path & VCS
108
+
109
+ | Method | Path | Description | Response |
110
+ | ------ | ------- | ------------------------------------ | ------------------------------------------- |
111
+ | `GET` | `/path` | Get the current path | <a href={typesUrl}><code>Path</code></a> |
112
+ | `GET` | `/vcs` | Get VCS info for the current project | <a href={typesUrl}><code>VcsInfo</code></a> |
113
+
114
+ ---
115
+
116
+ ### Instance
117
+
118
+ | Method | Path | Description | Response |
119
+ | ------ | ------------------- | ---------------------------- | --------- |
120
+ | `POST` | `/instance/dispose` | Dispose the current instance | `boolean` |
121
+
122
+ ---
123
+
124
+ ### Config
125
+
126
+ | Method | Path | Description | Response |
127
+ | ------- | ------------------- | --------------------------------- | ---------------------------------------------------------------------------------------- |
128
+ | `GET` | `/config` | Get config info | <a href={typesUrl}><code>Config</code></a> |
129
+ | `PATCH` | `/config` | Update config | <a href={typesUrl}><code>Config</code></a> |
130
+ | `GET` | `/config/providers` | List providers and default models | `{ providers: `<a href={typesUrl}>Provider[]</a>`, default: { [key: string]: string } }` |
131
+
132
+ ---
133
+
134
+ ### Provider
135
+
136
+ | Method | Path | Description | Response |
137
+ | ------ | -------------------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- |
138
+ | `GET` | `/provider` | List all providers | `{ all: `<a href={typesUrl}>Provider[]</a>`, default: {...}, connected: string[] }` |
139
+ | `GET` | `/provider/auth` | Get provider authentication methods | `{ [providerID: string]: `<a href={typesUrl}>ProviderAuthMethod[]</a>` }` |
140
+ | `POST` | `/provider/{id}/oauth/authorize` | Authorize a provider using OAuth | <a href={typesUrl}><code>ProviderAuthAuthorization</code></a> |
141
+ | `POST` | `/provider/{id}/oauth/callback` | Handle OAuth callback for a provider | `boolean` |
142
+
143
+ ---
144
+
145
+ ### Sessions
146
+
147
+ | Method | Path | Description | Notes |
148
+ | -------- | ---------------------------------------- | ------------------------------------- | ---------------------------------------------------------------------------------- |
149
+ | `GET` | `/session` | List all sessions | Returns <a href={typesUrl}><code>Session[]</code></a> |
150
+ | `POST` | `/session` | Create a new session | body: `{ parentID?, title? }`, returns <a href={typesUrl}><code>Session</code></a> |
151
+ | `GET` | `/session/status` | Get session status for all sessions | Returns `{ [sessionID: string]: `<a href={typesUrl}>SessionStatus</a>` }` |
152
+ | `GET` | `/session/:id` | Get session details | Returns <a href={typesUrl}><code>Session</code></a> |
153
+ | `DELETE` | `/session/:id` | Delete a session and all its data | Returns `boolean` |
154
+ | `PATCH` | `/session/:id` | Update session properties | body: `{ title? }`, returns <a href={typesUrl}><code>Session</code></a> |
155
+ | `GET` | `/session/:id/children` | Get a session's child sessions | Returns <a href={typesUrl}><code>Session[]</code></a> |
156
+ | `GET` | `/session/:id/todo` | Get the todo list for a session | Returns <a href={typesUrl}><code>Todo[]</code></a> |
157
+ | `POST` | `/session/:id/init` | Analyze app and create `AGENTS.md` | body: `{ messageID, providerID, modelID }`, returns `boolean` |
158
+ | `POST` | `/session/:id/fork` | Fork an existing session at a message | body: `{ messageID? }`, returns <a href={typesUrl}><code>Session</code></a> |
159
+ | `POST` | `/session/:id/abort` | Abort a running session | Returns `boolean` |
160
+ | `POST` | `/session/:id/share` | Share a session | Returns <a href={typesUrl}><code>Session</code></a> |
161
+ | `DELETE` | `/session/:id/share` | Unshare a session | Returns <a href={typesUrl}><code>Session</code></a> |
162
+ | `GET` | `/session/:id/diff` | Get the diff for this session | query: `messageID?`, returns <a href={typesUrl}><code>FileDiff[]</code></a> |
163
+ | `POST` | `/session/:id/summarize` | Summarize the session | body: `{ providerID, modelID }`, returns `boolean` |
164
+ | `POST` | `/session/:id/revert` | Revert a message | body: `{ messageID, partID? }`, returns `boolean` |
165
+ | `POST` | `/session/:id/unrevert` | Restore all reverted messages | Returns `boolean` |
166
+ | `POST` | `/session/:id/permissions/:permissionID` | Respond to a permission request | body: `{ response, remember? }`, returns `boolean` |
167
+
168
+ ---
169
+
170
+ ### Messages
171
+
172
+ | Method | Path | Description | Notes |
173
+ | ------ | --------------------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
174
+ | `GET` | `/session/:id/message` | List messages in a session | query: `limit?`, returns `{ info: `<a href={typesUrl}>Message</a>`, parts: `<a href={typesUrl}>Part[]</a>`}[]` |
175
+ | `POST` | `/session/:id/message` | Send a message and wait for response | body: `{ messageID?, model?, agent?, noReply?, system?, tools?, parts }`, returns `{ info: `<a href={typesUrl}>Message</a>`, parts: `<a href={typesUrl}>Part[]</a>`}` |
176
+ | `GET` | `/session/:id/message/:messageID` | Get message details | Returns `{ info: `<a href={typesUrl}>Message</a>`, parts: `<a href={typesUrl}>Part[]</a>`}` |
177
+ | `POST` | `/session/:id/prompt_async` | Send a message asynchronously (no wait) | body: same as `/session/:id/message`, returns `204 No Content` |
178
+ | `POST` | `/session/:id/command` | Execute a slash command | body: `{ messageID?, agent?, model?, command, arguments }`, returns `{ info: `<a href={typesUrl}>Message</a>`, parts: `<a href={typesUrl}>Part[]</a>`}` |
179
+ | `POST` | `/session/:id/shell` | Run a shell command | body: `{ agent, model?, command }`, returns `{ info: `<a href={typesUrl}>Message</a>`, parts: `<a href={typesUrl}>Part[]</a>`}` |
180
+
181
+ ---
182
+
183
+ ### Commands
184
+
185
+ | Method | Path | Description | Response |
186
+ | ------ | ---------- | ----------------- | --------------------------------------------- |
187
+ | `GET` | `/command` | List all commands | <a href={typesUrl}><code>Command[]</code></a> |
188
+
189
+ ---
190
+
191
+ ### Files
192
+
193
+ | Method | Path | Description | Response |
194
+ | ------ | ------------------------ | ---------------------------------- | ------------------------------------------------------------------------------------------- |
195
+ | `GET` | `/find?pattern=<pat>` | Search for text in files | Array of match objects with `path`, `lines`, `line_number`, `absolute_offset`, `submatches` |
196
+ | `GET` | `/find/file?query=<q>` | Find files and directories by name | `string[]` (paths) |
197
+ | `GET` | `/find/symbol?query=<q>` | Find workspace symbols | <a href={typesUrl}><code>Symbol[]</code></a> |
198
+ | `GET` | `/file?path=<path>` | List files and directories | <a href={typesUrl}><code>FileNode[]</code></a> |
199
+ | `GET` | `/file/content?path=<p>` | Read a file | <a href={typesUrl}><code>FileContent</code></a> |
200
+ | `GET` | `/file/status` | Get status for tracked files | <a href={typesUrl}><code>File[]</code></a> |
201
+
202
+ #### `/find/file` query parameters
203
+
204
+ - `query` (required) — search string (fuzzy match)
205
+ - `type` (optional) — limit results to `"file"` or `"directory"`
206
+ - `directory` (optional) — override the project root for the search
207
+ - `limit` (optional) — max results (1–200)
208
+ - `dirs` (optional) — legacy flag (`"false"` returns only files)
209
+
210
+ ---
211
+
212
+ ### Tools (Experimental)
213
+
214
+ | Method | Path | Description | Response |
215
+ | ------ | ------------------------------------------- | ---------------------------------------- | -------------------------------------------- |
216
+ | `GET` | `/experimental/tool/ids` | List all tool IDs | <a href={typesUrl}><code>ToolIDs</code></a> |
217
+ | `GET` | `/experimental/tool?provider=<p>&model=<m>` | List tools with JSON schemas for a model | <a href={typesUrl}><code>ToolList</code></a> |
218
+
219
+ ---
220
+
221
+ ### LSP, Formatters & MCP
222
+
223
+ | Method | Path | Description | Response |
224
+ | ------ | ------------ | -------------------------- | -------------------------------------------------------- |
225
+ | `GET` | `/lsp` | Get LSP server status | <a href={typesUrl}><code>LSPStatus[]</code></a> |
226
+ | `GET` | `/formatter` | Get formatter status | <a href={typesUrl}><code>FormatterStatus[]</code></a> |
227
+ | `GET` | `/mcp` | Get MCP server status | `{ [name: string]: `<a href={typesUrl}>MCPStatus</a>` }` |
228
+ | `POST` | `/mcp` | Add MCP server dynamically | body: `{ name, config }`, returns MCP status object |
229
+
230
+ ---
231
+
232
+ ### Agents
233
+
234
+ | Method | Path | Description | Response |
235
+ | ------ | -------- | ------------------------- | ------------------------------------------- |
236
+ | `GET` | `/agent` | List all available agents | <a href={typesUrl}><code>Agent[]</code></a> |
237
+
238
+ ---
239
+
240
+ ### Logging
241
+
242
+ | Method | Path | Description | Response |
243
+ | ------ | ------ | ------------------------------------------------------------ | --------- |
244
+ | `POST` | `/log` | Write log entry. Body: `{ service, level, message, extra? }` | `boolean` |
245
+
246
+ ---
247
+
248
+ ### TUI
249
+
250
+ | Method | Path | Description | Response |
251
+ | ------ | ----------------------- | ------------------------------------------- | ---------------------- |
252
+ | `POST` | `/tui/append-prompt` | Append text to the prompt | `boolean` |
253
+ | `POST` | `/tui/open-help` | Open the help dialog | `boolean` |
254
+ | `POST` | `/tui/open-sessions` | Open the session selector | `boolean` |
255
+ | `POST` | `/tui/open-themes` | Open the theme selector | `boolean` |
256
+ | `POST` | `/tui/open-models` | Open the model selector | `boolean` |
257
+ | `POST` | `/tui/submit-prompt` | Submit the current prompt | `boolean` |
258
+ | `POST` | `/tui/clear-prompt` | Clear the prompt | `boolean` |
259
+ | `POST` | `/tui/execute-command` | Execute a command (`{ command }`) | `boolean` |
260
+ | `POST` | `/tui/show-toast` | Show toast (`{ title?, message, variant }`) | `boolean` |
261
+ | `GET` | `/tui/control/next` | Wait for the next control request | Control request object |
262
+ | `POST` | `/tui/control/response` | Respond to a control request (`{ body }`) | `boolean` |
263
+
264
+ ---
265
+
266
+ ### Auth
267
+
268
+ | Method | Path | Description | Response |
269
+ | ------ | ----------- | --------------------------------------------------------------- | --------- |
270
+ | `PUT` | `/auth/:id` | Set authentication credentials. Body must match provider schema | `boolean` |
271
+
272
+ ---
273
+
274
+ ### Events
275
+
276
+ | Method | Path | Description | Response |
277
+ | ------ | -------- | ----------------------------------------------------------------------------- | ------------------------- |
278
+ | `GET` | `/event` | Server-sent events stream. First event is `server.connected`, then bus events | Server-sent events stream |
279
+
280
+ ---
281
+
282
+ ### Docs
283
+
284
+ | Method | Path | Description | Response |
285
+ | ------ | ------ | ------------------------- | --------------------------- |
286
+ | `GET` | `/doc` | OpenAPI 3.1 specification | HTML page with OpenAPI spec |
@@ -0,0 +1,128 @@
1
+ ---
2
+ title: Share
3
+ description: Share your NeoCode conversations.
4
+ ---
5
+
6
+ NeoCode's share feature allows you to create public links to your NeoCode conversations, so you can collaborate with teammates or get help from others.
7
+
8
+ :::note
9
+ Shared conversations are publicly accessible to anyone with the link.
10
+ :::
11
+
12
+ ---
13
+
14
+ ## How it works
15
+
16
+ When you share a conversation, NeoCode:
17
+
18
+ 1. Creates a unique public URL for your session
19
+ 2. Syncs your conversation history to our servers
20
+ 3. Makes the conversation accessible via the shareable link — `opncd.ai/s/<share-id>`
21
+
22
+ ---
23
+
24
+ ## Sharing
25
+
26
+ NeoCode supports three sharing modes that control how conversations are shared:
27
+
28
+ ---
29
+
30
+ ### Manual (default)
31
+
32
+ By default, NeoCode uses manual sharing mode. Sessions are not shared automatically, but you can manually share them using the `/share` command:
33
+
34
+ ```
35
+ /share
36
+ ```
37
+
38
+ This will generate a unique URL that'll be copied to your clipboard.
39
+
40
+ To explicitly set manual mode in your [config file](/docs/config):
41
+
42
+ ```json title="neocode.json"
43
+ {
44
+ "$schema": "https://opncd.ai/config.json",
45
+ "share": "manual"
46
+ }
47
+ ```
48
+
49
+ ---
50
+
51
+ ### Auto-share
52
+
53
+ You can enable automatic sharing for all new conversations by setting the `share` option to `"auto"` in your [config file](/docs/config):
54
+
55
+ ```json title="neocode.json"
56
+ {
57
+ "$schema": "https://opncd.ai/config.json",
58
+ "share": "auto"
59
+ }
60
+ ```
61
+
62
+ With auto-share enabled, every new conversation will automatically be shared and a link will be generated.
63
+
64
+ ---
65
+
66
+ ### Disabled
67
+
68
+ You can disable sharing entirely by setting the `share` option to `"disabled"` in your [config file](/docs/config):
69
+
70
+ ```json title="neocode.json"
71
+ {
72
+ "$schema": "https://opncd.ai/config.json",
73
+ "share": "disabled"
74
+ }
75
+ ```
76
+
77
+ To enforce this across your team for a given project, add it to the `neocode.json` in your project and check into Git.
78
+
79
+ ---
80
+
81
+ ## Un-sharing
82
+
83
+ To stop sharing a conversation and remove it from public access:
84
+
85
+ ```
86
+ /unshare
87
+ ```
88
+
89
+ This will remove the share link and delete the data related to the conversation.
90
+
91
+ ---
92
+
93
+ ## Privacy
94
+
95
+ There are a few things to keep in mind when sharing a conversation.
96
+
97
+ ---
98
+
99
+ ### Data retention
100
+
101
+ Shared conversations remain accessible until you explicitly unshare them. This
102
+ includes:
103
+
104
+ - Full conversation history
105
+ - All messages and responses
106
+ - Session metadata
107
+
108
+ ---
109
+
110
+ ### Recommendations
111
+
112
+ - Only share conversations that don't contain sensitive information.
113
+ - Review conversation content before sharing.
114
+ - Unshare conversations when collaboration is complete.
115
+ - Avoid sharing conversations with proprietary code or confidential data.
116
+ - For sensitive projects, disable sharing entirely.
117
+
118
+ ---
119
+
120
+ ## For enterprises
121
+
122
+ For enterprise deployments, the share feature can be:
123
+
124
+ - **Disabled** entirely for security compliance
125
+ - **Restricted** to users authenticated through SSO only
126
+ - **Self-hosted** on your own infrastructure
127
+
128
+ [Learn more](/docs/enterprise) about using neocode in your organization.
@@ -0,0 +1,220 @@
1
+ ---
2
+ title: "Agent Skills"
3
+ description: "Define reusable behavior via SKILL.md definitions"
4
+ ---
5
+
6
+ Agent skills let NeoCode discover reusable instructions from your repo or home directory.
7
+ Skills are loaded on-demand via the native `skill` tool—agents see available skills and can load the full content when needed.
8
+
9
+ ---
10
+
11
+ ## Place files
12
+
13
+ Create one folder per skill name and put a `SKILL.md` inside it.
14
+ NeoCode searches these locations:
15
+
16
+ - Project config: `.neocode/skills/<name>/SKILL.md`
17
+ - Global config: `~/.config/neocode/skills/<name>/SKILL.md`
18
+ - Project Claude-compatible: `.claude/skills/<name>/SKILL.md`
19
+ - Global Claude-compatible: `~/.claude/skills/<name>/SKILL.md`
20
+
21
+ ---
22
+
23
+ ## Understand discovery
24
+
25
+ For project-local paths, NeoCode walks up from your current working directory until it reaches the git worktree.
26
+ It loads any matching `skills/*/SKILL.md` in `.neocode/` and any matching `.claude/skills/*/SKILL.md` along the way.
27
+
28
+ Global definitions are also loaded from `~/.config/neocode/skills/*/SKILL.md` and `~/.claude/skills/*/SKILL.md`.
29
+
30
+ ---
31
+
32
+ ## Write frontmatter
33
+
34
+ Each `SKILL.md` must start with YAML frontmatter.
35
+ Only these fields are recognized:
36
+
37
+ - `name` (required)
38
+ - `description` (required)
39
+ - `license` (optional)
40
+ - `compatibility` (optional)
41
+ - `metadata` (optional, string-to-string map)
42
+
43
+ Unknown frontmatter fields are ignored.
44
+
45
+ ---
46
+
47
+ ## Validate names
48
+
49
+ `name` must:
50
+
51
+ - Be 1–64 characters
52
+ - Be lowercase alphanumeric with single hyphen separators
53
+ - Not start or end with `-`
54
+ - Not contain consecutive `--`
55
+ - Match the directory name that contains `SKILL.md`
56
+
57
+ Equivalent regex:
58
+
59
+ ```text
60
+ ^[a-z0-9]+(-[a-z0-9]+)*$
61
+ ```
62
+
63
+ ---
64
+
65
+ ## Follow length rules
66
+
67
+ `description` must be 1-1024 characters.
68
+ Keep it specific enough for the agent to choose correctly.
69
+
70
+ ---
71
+
72
+ ## Use an example
73
+
74
+ Create `.neocode/skills/git-release/SKILL.md` like this:
75
+
76
+ ```markdown
77
+ ---
78
+ name: git-release
79
+ description: Create consistent releases and changelogs
80
+ license: MIT
81
+ compatibility: neocode
82
+ metadata:
83
+ audience: maintainers
84
+ workflow: github
85
+ ---
86
+
87
+ ## What I do
88
+
89
+ - Draft release notes from merged PRs
90
+ - Propose a version bump
91
+ - Provide a copy-pasteable `gh release create` command
92
+
93
+ ## When to use me
94
+
95
+ Use this when you are preparing a tagged release.
96
+ Ask clarifying questions if the target versioning scheme is unclear.
97
+ ```
98
+
99
+ ---
100
+
101
+ ## Recognize tool description
102
+
103
+ NeoCode lists available skills in the `skill` tool description.
104
+ Each entry includes the skill name and description:
105
+
106
+ ```xml
107
+ <available_skills>
108
+ <skill>
109
+ <name>git-release</name>
110
+ <description>Create consistent releases and changelogs</description>
111
+ </skill>
112
+ </available_skills>
113
+ ```
114
+
115
+ The agent loads a skill by calling the tool:
116
+
117
+ ```
118
+ skill({ name: "git-release" })
119
+ ```
120
+
121
+ ---
122
+
123
+ ## Configure permissions
124
+
125
+ Control which skills agents can access using pattern-based permissions in `neocode.json`:
126
+
127
+ ```json
128
+ {
129
+ "permission": {
130
+ "skill": {
131
+ "*": "allow",
132
+ "pr-review": "allow",
133
+ "internal-*": "deny",
134
+ "experimental-*": "ask"
135
+ }
136
+ }
137
+ }
138
+ ```
139
+
140
+ | Permission | Behavior |
141
+ | ---------- | ----------------------------------------- |
142
+ | `allow` | Skill loads immediately |
143
+ | `deny` | Skill hidden from agent, access rejected |
144
+ | `ask` | User prompted for approval before loading |
145
+
146
+ Patterns support wildcards: `internal-*` matches `internal-docs`, `internal-tools`, etc.
147
+
148
+ ---
149
+
150
+ ## Override per agent
151
+
152
+ Give specific agents different permissions than the global defaults.
153
+
154
+ **For custom agents** (in agent frontmatter):
155
+
156
+ ```yaml
157
+ ---
158
+ permission:
159
+ skill:
160
+ "documents-*": "allow"
161
+ ---
162
+ ```
163
+
164
+ **For built-in agents** (in `neocode.json`):
165
+
166
+ ```json
167
+ {
168
+ "agent": {
169
+ "plan": {
170
+ "permission": {
171
+ "skill": {
172
+ "internal-*": "allow"
173
+ }
174
+ }
175
+ }
176
+ }
177
+ }
178
+ ```
179
+
180
+ ---
181
+
182
+ ## Disable the skill tool
183
+
184
+ Completely disable skills for agents that shouldn't use them:
185
+
186
+ **For custom agents**:
187
+
188
+ ```yaml
189
+ ---
190
+ tools:
191
+ skill: false
192
+ ---
193
+ ```
194
+
195
+ **For built-in agents**:
196
+
197
+ ```json
198
+ {
199
+ "agent": {
200
+ "plan": {
201
+ "tools": {
202
+ "skill": false
203
+ }
204
+ }
205
+ }
206
+ }
207
+ ```
208
+
209
+ When disabled, the `<available_skills>` section is omitted entirely.
210
+
211
+ ---
212
+
213
+ ## Troubleshoot loading
214
+
215
+ If a skill does not show up:
216
+
217
+ 1. Verify `SKILL.md` is spelled in all caps
218
+ 2. Check that frontmatter includes `name` and `description`
219
+ 3. Ensure skill names are unique across all locations
220
+ 4. Check permissions—skills with `deny` are hidden from agents