@maccesar/aiskills 1.16.0 → 1.17.0
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.
- package/README.md +25 -16
- package/commands/release.md +417 -0
- package/lib/claude-plugin.js +105 -0
- package/lib/commands/doctor.js +50 -3
- package/lib/commands/skills.js +19 -4
- package/lib/commands/update.js +4 -0
- package/lib/config.js +11 -0
- package/lib/installer.js +18 -0
- package/lib/symlink.js +5 -10
- package/package.json +3 -2
- package/skills/humaniza/SKILL.md +1 -1
- package/skills/refactoring-ui/SKILL.md +32 -34
- package/skills/session-log/SKILL.md +9 -37
- package/skills/session-log/references/file-layout.md +48 -0
- package/skills/stitch-showcase/SKILL.md +7 -3
- package/skills/vscode-extension-dev/SKILL.md +51 -43
- package/skills/vscode-extension-dev/references/architecture.md +13 -0
- package/skills/vscode-extension-dev/references/package-json-schema.md +12 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vscode-extension-dev
|
|
3
|
-
description: '
|
|
3
|
+
description: 'VS Code extension development grounded in the official Extension API docs. Use this whenever someone is creating, scaffolding, debugging, testing, bundling or publishing a VS Code extension — TreeView, QuickPick, Webview, StatusBar, SecretStorage, Language Server Protocol, Debug Adapter Protocol, notebooks — and also when they never say "extension" but the work clearly is one: editing `package.json` `contributes` / `activationEvents` / `keybindings`, an `activate(context)` function, importing from `vscode`, leaking disposables, `yo code`, `vsce`, `.vscodeignore`, bundling with esbuild, publishing to the Marketplace or Open VSX, Webview CSP/nonce/postMessage, or testing with @vscode/test-electron. Not for: configuring your own editor, Claude Code plugins or MCP servers, or general TypeScript/Node questions with no extension host involved.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# VS Code Extension Development Skill
|
|
7
7
|
|
|
8
|
-
You are a VS Code extension development advisor.
|
|
8
|
+
You are a VS Code extension development advisor. Ground every answer in the reference files below rather than in training data: the Extension API moves fast, deprecates surfaces, and adds new ones every release, so a remembered signature is often a signature that used to be right.
|
|
9
9
|
|
|
10
10
|
## Required workflow (read before responding)
|
|
11
11
|
|
|
@@ -18,7 +18,7 @@ SKILL.md is not enough.**
|
|
|
18
18
|
| Task involves | Required reading |
|
|
19
19
|
|---|---|
|
|
20
20
|
| TreeView, TreeDataProvider, sidebar trees | [references/api-treeview.md](references/api-treeview.md) |
|
|
21
|
-
| Webview Panel, CSP, postMessage, nonce | [references/api-webview.md](references/api-webview.md) |
|
|
21
|
+
| Webview Panel, CSP, postMessage, nonce, `asWebviewUri` | [references/api-webview.md](references/api-webview.md) |
|
|
22
22
|
| QuickPick (simple or async with debounce) | [references/api-quickpick.md](references/api-quickpick.md) |
|
|
23
23
|
| StatusBarItem, codicons, status bar UI | [references/api-statusbar.md](references/api-statusbar.md) |
|
|
24
24
|
| SecretStorage, credential management | [references/api-secretstorage.md](references/api-secretstorage.md) |
|
|
@@ -27,8 +27,8 @@ SKILL.md is not enough.**
|
|
|
27
27
|
| Activation events, project structure, layered architecture, testing | [references/architecture.md](references/architecture.md) |
|
|
28
28
|
| `contributes`, `activationEvents`, `engines`, `scripts`, `keybindings`, esbuild config | [references/package-json-schema.md](references/package-json-schema.md) |
|
|
29
29
|
| Marketplace publishing, vsce, Open VSX, CI/CD, `.vscodeignore`, versioning | [references/publishing.md](references/publishing.md) |
|
|
30
|
-
| Language Server Protocol, `vscode-languageclient`,
|
|
31
|
-
| Notebook serializers, controllers, renderers | [references/notebooks.md](references/notebooks.md) |
|
|
30
|
+
| Language Server Protocol, `vscode-languageclient`, server lifecycle, capabilities, diagnostics | [references/lsp.md](references/lsp.md) |
|
|
31
|
+
| Notebook serializers, controllers, renderers, output mime types | [references/notebooks.md](references/notebooks.md) |
|
|
32
32
|
| Debug Adapter Protocol, `DebugAdapterDescriptorFactory`, `DebugConfigurationProvider` | [references/debugger.md](references/debugger.md) |
|
|
33
33
|
| Advanced testing — multi-suite `.vscode-test.mjs`, fixtures, mocking, CI, coverage | [references/testing.md](references/testing.md) |
|
|
34
34
|
|
|
@@ -48,22 +48,12 @@ prepend `FROM_MEMORY (unverified):` to that claim. Do not hide it.
|
|
|
48
48
|
|
|
49
49
|
### Banned behaviors
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
- ❌ Importing from anywhere other than the `'vscode'` module
|
|
53
|
-
- ❌ Suggesting deprecated APIs (e.g. `vscode.workspace.rootPath`) without flagging them as deprecated
|
|
54
|
-
- ❌ Marking the answer complete without listing which reference files you read
|
|
51
|
+
These four are where extension advice usually goes wrong, so they're worth naming:
|
|
55
52
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
- User needs help with package.json contributes, activationEvents, or keybindings
|
|
61
|
-
- User is debugging extension activation, disposables, or memory leaks
|
|
62
|
-
- User asks about bundling extensions with esbuild or webpack
|
|
63
|
-
- User wants to publish an extension to the VS Code Marketplace or Open VSX
|
|
64
|
-
- User asks about Webview CSP, nonce, or postMessage communication
|
|
65
|
-
- User asks about SecretStorage or credential management in extensions
|
|
66
|
-
- User needs help with extension testing (@vscode/test-electron)
|
|
53
|
+
- Inventing API methods, event names, or configuration keys not in the references. A plausible-looking `vscode.*` call fails at runtime, in the extension host, where the stack trace is least helpful.
|
|
54
|
+
- Sourcing editor APIs from anywhere other than the `'vscode'` module. That module is injected by the host at runtime rather than installed, which is why it's marked `external` in the bundler config — ordinary npm dependencies are fine and get bundled normally.
|
|
55
|
+
- Suggesting deprecated APIs (`vscode.workspace.rootPath` and friends) without flagging them. They still work today, which is exactly why they get copied into new code.
|
|
56
|
+
- Marking the answer complete without listing which reference files you read. The list is what lets the reader tell a grounded answer from a remembered one.
|
|
67
57
|
|
|
68
58
|
## Source
|
|
69
59
|
|
|
@@ -128,32 +118,50 @@ VS Code Extension API documentation (https://code.visualstudio.com/api)
|
|
|
128
118
|
- Mark `vscode` as external (it's provided by the runtime)
|
|
129
119
|
- See `references/package-json-schema.md` for scripts configuration
|
|
130
120
|
|
|
131
|
-
## Reference Files
|
|
132
|
-
|
|
133
|
-
| File | Topics |
|
|
134
|
-
| ------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
135
|
-
| `references/api-treeview.md` | TreeDataProvider, TreeView registration |
|
|
136
|
-
| `references/api-webview.md` | Webview Panel, CSP/nonce, postMessage, asWebviewUri |
|
|
137
|
-
| `references/api-quickpick.md` | Simple and async QuickPick with debounced search |
|
|
138
|
-
| `references/api-statusbar.md` | StatusBarItem, codicons, dynamic updates |
|
|
139
|
-
| `references/api-secretstorage.md` | Credential manager pattern, onDidChange |
|
|
140
|
-
| `references/api-progress.md` | withProgress (Notification + Window), cancellation tokens |
|
|
141
|
-
| `references/api-additional.md` | FileSystemWatcher, Disposable cleanup, Diagnostics, OutputChannel, ContextKeys, TextDocumentContentProvider |
|
|
142
|
-
| `references/architecture.md` | Project structure, layered architecture, testing strategy |
|
|
143
|
-
| `references/package-json-schema.md` | contributes, activationEvents, engines, scripts, devDependencies |
|
|
144
|
-
| `references/publishing.md` | vsce, .vscodeignore, CI/CD, Open VSX, versioning |
|
|
145
|
-
| `references/lsp.md` | LSP client setup, server lifecycle, capabilities, diagnostics |
|
|
146
|
-
| `references/notebooks.md` | Notebook serializers, controllers, renderers, output mime types |
|
|
147
|
-
| `references/debugger.md` | DAP: descriptor factory, configuration provider, adapter lifecycle |
|
|
148
|
-
| `references/testing.md` | Multi-suite test config, workspace fixtures, mocking `vscode`, CI, coverage |
|
|
149
|
-
|
|
150
121
|
## Anti-Patterns to Avoid
|
|
151
122
|
|
|
123
|
+
**Manifest and activation**
|
|
124
|
+
|
|
152
125
|
- Using `*` activation event in production (activates on every VS Code start) [source: references/package-json-schema.md]
|
|
153
|
-
-
|
|
154
|
-
- Forgetting to dispose subscriptions (causes memory leaks) [source: references/api-additional.md]
|
|
155
|
-
- Missing CSP in Webviews (security vulnerability) [source: references/api-webview.md]
|
|
126
|
+
- Registering commands without corresponding `contributes.commands` entries [source: references/package-json-schema.md]
|
|
156
127
|
- Bundling `node_modules` instead of using esbuild/webpack [source: references/package-json-schema.md]
|
|
128
|
+
|
|
129
|
+
**Lifecycle and runtime**
|
|
130
|
+
|
|
131
|
+
- Forgetting to dispose subscriptions (causes memory leaks) [source: references/api-additional.md]
|
|
157
132
|
- Using synchronous file I/O in the extension host (blocks the UI) [source: references/architecture.md]
|
|
158
|
-
- Registering commands without corresponding `contributes.commands` entries [source: references/package-json-schema.md]
|
|
159
133
|
- Hardcoding `vscode.workspace.rootPath` (deprecated — use `workspaceFolders`) [source: references/architecture.md]
|
|
134
|
+
- Recreating a TreeView to refresh it instead of firing `onDidChangeTreeData` [source: references/api-treeview.md]
|
|
135
|
+
- Declaring `cancellable: true` and never checking `token.isCancellationRequested` — the Cancel button appears and does nothing [source: references/api-progress.md]
|
|
136
|
+
- Querying on every keystroke in a QuickPick without debouncing, and leaving the in-flight request running when the picker hides [source: references/api-quickpick.md]
|
|
137
|
+
|
|
138
|
+
**Security**
|
|
139
|
+
|
|
140
|
+
- Missing CSP in Webviews (security vulnerability) [source: references/api-webview.md]
|
|
141
|
+
- Storing secrets in `configuration` instead of `SecretStorage` [source: references/api-secretstorage.md]
|
|
142
|
+
- Setting `innerHTML` from untrusted cell output in a notebook renderer — XSS in the notebook viewer [source: references/notebooks.md]
|
|
143
|
+
|
|
144
|
+
**Publishing**
|
|
145
|
+
|
|
146
|
+
- Shipping `.ts` sources or `node_modules/` inside the VSIX instead of only the bundled output [source: references/publishing.md]
|
|
147
|
+
- Publishing without a `README.md` — it *is* the Marketplace listing page, and the publish fails without one [source: references/publishing.md]
|
|
148
|
+
- A `publisher` field that doesn't match the Marketplace publisher exactly [source: references/publishing.md]
|
|
149
|
+
|
|
150
|
+
**Language servers**
|
|
151
|
+
|
|
152
|
+
- Re-parsing the whole document on every keystroke instead of using `TextDocumentSyncKind.Incremental` [source: references/lsp.md]
|
|
153
|
+
- Heavy work inside `onInitialize` — it blocks editor startup; do it lazily on first request [source: references/lsp.md]
|
|
154
|
+
- Not awaiting `client.stop()` in `deactivate()` — leaves the server process alive [source: references/lsp.md]
|
|
155
|
+
|
|
156
|
+
**Notebooks and debug adapters**
|
|
157
|
+
|
|
158
|
+
- Forgetting `exec.end(...)` — the cell stays in "running" state forever [source: references/notebooks.md]
|
|
159
|
+
- Bundling a notebook renderer with `vscode` as a dependency — renderers run in an iframe and have no `vscode` import [source: references/notebooks.md]
|
|
160
|
+
- Forgetting to send `terminated` — the debug session never closes and "Stop" hangs [source: references/debugger.md]
|
|
161
|
+
- Long-running synchronous work in `DebugAdapterInlineImplementation` — blocks the extension host [source: references/debugger.md]
|
|
162
|
+
|
|
163
|
+
**Testing**
|
|
164
|
+
|
|
165
|
+
- Keeping editor-independent business logic in `extension.ts` — forces every test to spin up Electron [source: references/testing.md]
|
|
166
|
+
- `setTimeout` / sleep to "wait for activation" instead of `await ext.activate()` [source: references/testing.md]
|
|
167
|
+
- Running `xvfb-run` on macOS or Windows — it's only needed on Linux [source: references/testing.md]
|
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Layered architecture, project structure, and testing strategy for VS Code extensions.
|
|
4
4
|
|
|
5
|
+
<!-- TOC-START -->
|
|
6
|
+
## Contents
|
|
7
|
+
|
|
8
|
+
- [Directory Structure](#directory-structure)
|
|
9
|
+
- [Layered Architecture](#layered-architecture)
|
|
10
|
+
- [Debug Configuration](#debug-configuration)
|
|
11
|
+
- [Testing Strategy](#testing-strategy)
|
|
12
|
+
- [Extension Entry Point Pattern](#extension-entry-point-pattern)
|
|
13
|
+
- [Extension Host Runtime](#extension-host-runtime)
|
|
14
|
+
- [Workspace Folders (`rootPath` is deprecated)](#workspace-folders-rootpath-is-deprecated)
|
|
15
|
+
|
|
16
|
+
<!-- TOC-END -->
|
|
17
|
+
|
|
5
18
|
## Directory Structure
|
|
6
19
|
|
|
7
20
|
```
|
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Complete reference for VS Code extension `package.json` configuration.
|
|
4
4
|
|
|
5
|
+
<!-- TOC-START -->
|
|
6
|
+
## Contents
|
|
7
|
+
|
|
8
|
+
- [Minimal Valid Extension](#minimal-valid-extension)
|
|
9
|
+
- [engines.vscode](#enginesvscode)
|
|
10
|
+
- [activationEvents](#activationevents)
|
|
11
|
+
- [contributes](#contributes)
|
|
12
|
+
- [scripts (esbuild)](#scripts-esbuild)
|
|
13
|
+
- [devDependencies](#devdependencies)
|
|
14
|
+
|
|
15
|
+
<!-- TOC-END -->
|
|
16
|
+
|
|
5
17
|
## Minimal Valid Extension
|
|
6
18
|
|
|
7
19
|
```json
|