@maccesar/aiskills 1.16.1 → 1.17.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.
- package/README.md +26 -19
- package/commands/release.md +415 -0
- package/package.json +3 -2
- package/skills/humaniza/SKILL.md +1 -1
- package/skills/refactoring-ui/SKILL.md +35 -41
- package/skills/session-log/SKILL.md +80 -336
- package/skills/session-log/evals/README.md +16 -52
- package/skills/session-log/evals/ab-ronda-1.md +22 -67
- package/skills/session-log/evals/ab-ronda-2.md +28 -113
- package/skills/session-log/evals/defecto-experimento.md +3 -8
- package/skills/session-log/references/file-layout.md +69 -119
- package/skills/session-log/references/verification.md +22 -56
- package/skills/stitch-showcase/SKILL.md +7 -3
- package/skills/stitch-showcase/references/14-troubleshooting-known-issues.md +18 -47
- package/skills/vscode-extension-dev/SKILL.md +54 -50
- package/skills/vscode-extension-dev/references/architecture.md +13 -0
- package/skills/vscode-extension-dev/references/package-json-schema.md +12 -0
|
@@ -1,24 +1,22 @@
|
|
|
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
|
|
|
12
|
-
The SKILL.md alone is an **index** of references. The detail you need
|
|
13
|
-
to give accurate answers lives in the reference files. **Reading this
|
|
14
|
-
SKILL.md is not enough.**
|
|
12
|
+
The SKILL.md alone is an **index** of references. The detail you need to give accurate answers lives in the reference files. **Reading this SKILL.md is not enough.**
|
|
15
13
|
|
|
16
14
|
### Step 1 — Open the relevant reference files
|
|
17
15
|
|
|
18
16
|
| Task involves | Required reading |
|
|
19
17
|
|---|---|
|
|
20
18
|
| 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) |
|
|
19
|
+
| Webview Panel, CSP, postMessage, nonce, `asWebviewUri` | [references/api-webview.md](references/api-webview.md) |
|
|
22
20
|
| QuickPick (simple or async with debounce) | [references/api-quickpick.md](references/api-quickpick.md) |
|
|
23
21
|
| StatusBarItem, codicons, status bar UI | [references/api-statusbar.md](references/api-statusbar.md) |
|
|
24
22
|
| SecretStorage, credential management | [references/api-secretstorage.md](references/api-secretstorage.md) |
|
|
@@ -27,15 +25,14 @@ SKILL.md is not enough.**
|
|
|
27
25
|
| Activation events, project structure, layered architecture, testing | [references/architecture.md](references/architecture.md) |
|
|
28
26
|
| `contributes`, `activationEvents`, `engines`, `scripts`, `keybindings`, esbuild config | [references/package-json-schema.md](references/package-json-schema.md) |
|
|
29
27
|
| 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) |
|
|
28
|
+
| Language Server Protocol, `vscode-languageclient`, server lifecycle, capabilities, diagnostics | [references/lsp.md](references/lsp.md) |
|
|
29
|
+
| Notebook serializers, controllers, renderers, output mime types | [references/notebooks.md](references/notebooks.md) |
|
|
32
30
|
| Debug Adapter Protocol, `DebugAdapterDescriptorFactory`, `DebugConfigurationProvider` | [references/debugger.md](references/debugger.md) |
|
|
33
31
|
| Advanced testing — multi-suite `.vscode-test.mjs`, fixtures, mocking, CI, coverage | [references/testing.md](references/testing.md) |
|
|
34
32
|
|
|
35
33
|
### Step 2 — Output contract
|
|
36
34
|
|
|
37
|
-
Every API symbol, configuration key, command, or behavior you cite MUST
|
|
38
|
-
be backed by a citation in the form:
|
|
35
|
+
Every API symbol, configuration key, command, or behavior you cite MUST be backed by a citation in the form:
|
|
39
36
|
|
|
40
37
|
`[source: references/<file>.md]`
|
|
41
38
|
|
|
@@ -43,27 +40,16 @@ Example: *"Push all subscriptions to `context.subscriptions` so they are dispose
|
|
|
43
40
|
|
|
44
41
|
### Step 3 — If you must answer from memory
|
|
45
42
|
|
|
46
|
-
If you write a claim without having read the reference that backs it,
|
|
47
|
-
prepend `FROM_MEMORY (unverified):` to that claim. Do not hide it.
|
|
43
|
+
If you write a claim without having read the reference that backs it, prepend `FROM_MEMORY (unverified):` to that claim. Do not hide it.
|
|
48
44
|
|
|
49
45
|
### Banned behaviors
|
|
50
46
|
|
|
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
|
|
47
|
+
These four are where extension advice usually goes wrong, so they're worth naming:
|
|
55
48
|
|
|
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)
|
|
49
|
+
- 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.
|
|
50
|
+
- 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.
|
|
51
|
+
- 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.
|
|
52
|
+
- 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
53
|
|
|
68
54
|
## Source
|
|
69
55
|
|
|
@@ -128,32 +114,50 @@ VS Code Extension API documentation (https://code.visualstudio.com/api)
|
|
|
128
114
|
- Mark `vscode` as external (it's provided by the runtime)
|
|
129
115
|
- See `references/package-json-schema.md` for scripts configuration
|
|
130
116
|
|
|
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
117
|
## Anti-Patterns to Avoid
|
|
151
118
|
|
|
119
|
+
**Manifest and activation**
|
|
120
|
+
|
|
152
121
|
- 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]
|
|
122
|
+
- Registering commands without corresponding `contributes.commands` entries [source: references/package-json-schema.md]
|
|
156
123
|
- Bundling `node_modules` instead of using esbuild/webpack [source: references/package-json-schema.md]
|
|
124
|
+
|
|
125
|
+
**Lifecycle and runtime**
|
|
126
|
+
|
|
127
|
+
- Forgetting to dispose subscriptions (causes memory leaks) [source: references/api-additional.md]
|
|
157
128
|
- 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
129
|
- Hardcoding `vscode.workspace.rootPath` (deprecated — use `workspaceFolders`) [source: references/architecture.md]
|
|
130
|
+
- Recreating a TreeView to refresh it instead of firing `onDidChangeTreeData` [source: references/api-treeview.md]
|
|
131
|
+
- Declaring `cancellable: true` and never checking `token.isCancellationRequested` — the Cancel button appears and does nothing [source: references/api-progress.md]
|
|
132
|
+
- 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]
|
|
133
|
+
|
|
134
|
+
**Security**
|
|
135
|
+
|
|
136
|
+
- Missing CSP in Webviews (security vulnerability) [source: references/api-webview.md]
|
|
137
|
+
- Storing secrets in `configuration` instead of `SecretStorage` [source: references/api-secretstorage.md]
|
|
138
|
+
- Setting `innerHTML` from untrusted cell output in a notebook renderer — XSS in the notebook viewer [source: references/notebooks.md]
|
|
139
|
+
|
|
140
|
+
**Publishing**
|
|
141
|
+
|
|
142
|
+
- Shipping `.ts` sources or `node_modules/` inside the VSIX instead of only the bundled output [source: references/publishing.md]
|
|
143
|
+
- Publishing without a `README.md` — it *is* the Marketplace listing page, and the publish fails without one [source: references/publishing.md]
|
|
144
|
+
- A `publisher` field that doesn't match the Marketplace publisher exactly [source: references/publishing.md]
|
|
145
|
+
|
|
146
|
+
**Language servers**
|
|
147
|
+
|
|
148
|
+
- Re-parsing the whole document on every keystroke instead of using `TextDocumentSyncKind.Incremental` [source: references/lsp.md]
|
|
149
|
+
- Heavy work inside `onInitialize` — it blocks editor startup; do it lazily on first request [source: references/lsp.md]
|
|
150
|
+
- Not awaiting `client.stop()` in `deactivate()` — leaves the server process alive [source: references/lsp.md]
|
|
151
|
+
|
|
152
|
+
**Notebooks and debug adapters**
|
|
153
|
+
|
|
154
|
+
- Forgetting `exec.end(...)` — the cell stays in "running" state forever [source: references/notebooks.md]
|
|
155
|
+
- Bundling a notebook renderer with `vscode` as a dependency — renderers run in an iframe and have no `vscode` import [source: references/notebooks.md]
|
|
156
|
+
- Forgetting to send `terminated` — the debug session never closes and "Stop" hangs [source: references/debugger.md]
|
|
157
|
+
- Long-running synchronous work in `DebugAdapterInlineImplementation` — blocks the extension host [source: references/debugger.md]
|
|
158
|
+
|
|
159
|
+
**Testing**
|
|
160
|
+
|
|
161
|
+
- Keeping editor-independent business logic in `extension.ts` — forces every test to spin up Electron [source: references/testing.md]
|
|
162
|
+
- `setTimeout` / sleep to "wait for activation" instead of `await ext.activate()` [source: references/testing.md]
|
|
163
|
+
- 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
|