소스 정보
- 저장소
- webiny/stdlib
- 최근 소스 활동
- 2026년 7월 28일 13:05
- 감지된 SKILL.md 언어
- 영어
- 스타
- 0
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/webiny/stdlib --skill adding-a-feature명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | adding-a-feature |
| description | Step-by-step guide for adding a new tool or service to @webiny/stdlib. |
| context | guides |
This mirrors the "Step-by-step: Adding a New Tool to an Existing Package" section in the repo's AGENTS.md, which is the authoritative source — check there if this drifts.
First decide which slice the tool belongs in, based on its runtime dependencies:
| Uses only JS built-ins / standard lib | → @webiny/stdlib root (src/) |
| Uses node:* APIs or Node-only npm packages | → @webiny/stdlib/node (src/node/) |
| Uses window, document, React, browser APIs | → @webiny/stdlib/browser (src/browser/) |
src/node/ and src/browser/ must NOT import from each other. Both may import common code via ~/common/index.js.
Example below: adding HttpTool to @webiny/stdlib/node. Substitute the appropriate slice and path for your tool.
Create the abstraction at src/node/features/HttpTool/abstractions/HttpTool.ts:
interface IHttpTool with JSDoc on each method.const HttpTool = createAbstraction<IHttpTool>("Core/HttpTool").namespace HttpTool { export type Interface = IHttpTool }.Create the abstraction barrel at src/node/features/HttpTool/abstractions/index.ts:
export { HttpTool } from "./HttpTool.js";Create the implementation at src/node/features/HttpTool/HttpTool.ts:
import { HttpTool as HttpToolAbstraction } from "./abstractions/HttpTool.js";import { Logger } from "~/common/index.js";class HttpToolImpl implements HttpToolAbstraction.Interface { ... }export const HttpTool = HttpToolAbstraction.createImplementation({ implementation: HttpToolImpl, dependencies: [...] })dependencies array order must match the constructor parameter order exactly.Create the feature at src/node/features/HttpTool/feature.ts:
export const HttpToolFeature = createFeature({ name: "Core/HttpToolFeature", register(container) { container.register(HttpTool).inSingletonScope(); } })Create the feature index at src/node/features/HttpTool/index.ts:
export { HttpTool } from "./abstractions/index.js";export { HttpToolFeature } from "./feature.js";createImplementation output.Create the feature README at src/node/features/HttpTool/README.md:
createXxx() factory function.name, description, context) so the README is discoverable by the MCP server — see the front-matter block at the top of any existing feature README for the exact shape.README.md table to add a row pointing to the new feature README.Add to the slice barrel src/node/index.ts:
export { HttpTool, HttpToolFeature } from "./features/HttpTool/index.js";Write tests at __tests__/node/HttpTool.test.ts:
makeContainer() helper — see the testing-patterns skill.// @vitest-environment directive (only browser tests do).Run the pre-commit chain until fully clean:
yarn && yarn adio && yarn format:fix && yarn lint:fix && yarn typecheck && yarn build && yarn test:coverage
All steps must pass with zero errors and zero warnings before staging and committing. If any step fails, fix the issue and run the full chain again from the start.
tsconfig.json must pass..js extensions in package source imports — under src/, import { Foo } from "./Foo.js" (not .ts); tsgo resolves .js to .ts at compile time. (Exception: scripts/, which runs directly under Node 24 and needs real .ts extensions.)node: prefix for Node built-ins — import { readFileSync } from "node:fs", never "fs"..inSingletonScope() unless there's a reason not to."Domain/ToolName" format — "Core/" prefix for common utils, "Node/" prefix for Node-specific ones.namespace ToolName { export type Interface = IToolName } alongside the token.See the di-patterns skill for the underlying abstraction/implementation/feature mechanics, and AGENTS.md's "Step-by-step: Adding a New Slice to @webiny/stdlib" section if you're adding an entirely new runtime environment rather than a tool within an existing one.