用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill new-feature-package命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
基于 SOC 职业分类
正在显示 SKILL.md
| name | new-feature-package |
| description | >- Use when this capability is needed. |
Guide for scaffolding a new feature package in the bigUML Lerna monorepo. Feature packages follow an environment-based folder convention that lets them contribute code to multiple runtime processes (extension host, GLSP server, browser webview) from a single package.
packages/package.json with name, dependencies, and exports maptsconfig.json referencing base configssrc/env/common/, plus others as needed)VscodeFeatureModule (if the package has extension host code)DiagramFeatureModule (if the package has GLSP server code)application/vscode/src/extension.config.ts and/or application/vscode/src/server.main.tsStudy an existing feature package as a template. packages/big-outline/ is a good minimal example. packages/big-property-palette/ is a comprehensive example with all environments.
Read docs/architecture-overview.md for the full environment model and package layer diagram.
packages/big-<name>/
├── package.json
├── tsconfig.json
├── config/
│ ├── tsconfig.node.json
│ └── tsconfig.browser.json # only if package has browser code
├── src/
│ └── env/
│ ├── common/
│ │ └── index.ts
│ ├── vscode/ # if contributing to extension host
│ │ └── index.ts
│ ├── glsp-server/ # if contributing to GLSP server
│ │ └── index.ts
│ ├── glsp-client/ # if contributing to GLSP client
│ │ └── index.ts
│ └── browser/ # if providing a webview UI
│ └── index.ts
└── esbuild.ts # only if package has browser webview
Only create the environment folders that are actually needed. Every package should have common/ at minimum.
Use this template, adjusting the exports map to include only the environments your package uses:
{
"name": "@borkdominik-biguml/big-<name>",
"version": "0.0.0",
"private": true,
"type": "module",
"exports": {
".": {
"types": "./build/env/common/index.d.ts",
"default": "./build/env/common/index.js"
},
"./vscode": {
"types": "./build/env/vscode/index.d.ts",
"default": "./build/env/vscode/index.js"
},
"./glsp-server": {
"types": "./build/env/glsp-server/index.d.ts",
"default": "./build/env/glsp-server/index.js"
Add dependencies based on which environments the package targets:
@borkdominik-biguml/big-vscode, inversify, vscode@borkdominik-biguml/uml-glsp-server, @eclipse-glsp/server@eclipse-glsp/client@borkdominik-biguml/big-components, react, react-domRoot tsconfig.json uses project references:
{
"files": [],
"references": [{ "path": "./config/tsconfig.node.json" }, { "path": "./config/tsconfig.browser.json" }]
}
config/tsconfig.node.json - for common, vscode, and glsp-server code:
{
"extends": "../../../tsconfig.node.json",
"compilerOptions": {
"rootDir": "../src",
"outDir": "../build"
},
"include": ["../src/env/common/**/*.ts", "../src/env/vscode/**/*.ts", "../src/env/glsp-server/**/*.ts"]
}
config/tsconfig.browser.json - for browser and glsp-client code:
{
"extends": "../../../tsconfig.browser.json",
"compilerOptions": {
"rootDir": "../src",
"outDir": "../build"
},
"include": ["../src/env/browser/**/*.ts", "../src/env/browser/**/*.tsx", "../src/env/glsp-client/**/*.ts"]
}
src/env/common/index.ts exports shared types - actions, models, protocol definitions:
// Export action types, models, and protocol shared across environments
export * from './my-feature.action.js';
export * from './my-feature.model.js';
If the package contributes to the extension host, create src/env/vscode/my-feature.module.ts:
import { VscodeFeatureModule } from '@borkdominik-biguml/big-vscode/vscode';
export function myFeatureModule(viewType: string) {
return new VscodeFeatureModule(context => {
// Bind services, commands, webview factories here
});
}
Export from src/env/vscode/index.ts:
export * from './my-feature.module.js';
Register in application/vscode/src/extension.config.ts:
import { myFeatureModule } from '@borkdominik-biguml/big-<name>/vscode';
// Inside createContainer():
container.load(
myFeatureModule(VSCodeSettings.myFeature.viewType)
// ...existing modules
);
If the package contributes action or operation handlers, create src/env/glsp-server/my-feature.module.ts:
import { DiagramFeatureModule } from '@borkdominik-biguml/uml-glsp-server/vscode';
import type { ActionHandlerConstructor, InstanceMultiBinding } from '@eclipse-glsp/server';
import { MyFeatureActionHandler } from './my-feature.action-handler.js';
class MyFeatureDiagramFeatureModule extends DiagramFeatureModule {
override configureActionHandlers(binding: InstanceMultiBinding<ActionHandlerConstructor>): void {
binding.add(MyFeatureActionHandler);
}
}
export const myFeatureGlspModule = new MyFeatureDiagramFeatureModule();
Register in application/vscode/src/server.main.ts:
import { myFeatureGlspModule } from '@borkdominik-biguml/big-<name>/glsp-server';
startGLSPServer({ shared, language: UmlDiagram }, [propertyPaletteModule, outlineModule, advancedSearchGlspModule, myFeatureGlspModule]);
The root package.json should already have "workspaces": ["packages/*", "application/*", "tooling/*"]. If your package is under packages/, it is automatically included.
Run npm install from the workspace root to link the new package.
vscode APIs in browser code, or sprotty directly instead of @eclipse-glsp/client)package.json exports map - consumers will get "module not found" errors"type": "module" in package.json - causes ESM/CJS interop issuesdocs/architecture-overview.md — environment model, startup sequence, package layersdocs/guides/glsp-server-feature-modules.md — how feature modules plug into the GLSP serverdocs/guides/webview-registration.md — if your package includes a webviewSource: borkdominik/bigUML — distributed by TomeVault.