본문으로 건너뛰기
cccskills
무료GitHub에 공개

create-package

Scaffold, build, and publish a new Datagrok package

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md3.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Create a Datagrok Package

Help the user scaffold a new Datagrok package, add functions to it, build, and publish.

Usage

/create-package [package-name] [--test] [--js]

Instructions

1. Scaffold the package

Run from the directory where the package folder should be created:

grok create <PackageName> --test
  • Package name must be PascalCase (e.g., TextStats, MyAnalysis).
  • The --test flag adds a test scaffold. Use --js for plain JavaScript instead of TypeScript.
  • After creation, install dependencies:
cd <PackageName>
npm install

2. Understand the package structure

The created package contains:

  • src/package.ts -- main entry point for functions, viewers, panels, apps
  • detectors.js -- semantic type detectors (loaded separately from the bundle)
  • webpack.config.js -- webpack configuration (do not modify the externals)
  • package.json -- metadata and dependencies

3. Add functions to the package

Functions are defined with annotation comments above the export. Common types:

Panel function (appears in context panel for matching data):

//name: MyPanel
//tags: panel, widgets
//input: string str {semType: text}
//output: widget result
export function myPanel(str: string) {
  return new DG.Widget(ui.divV([
    ui.divText('Result: ' + str.length)
  ]));
}

Add more function types via CLI:

grok add app <name>        # Application entry point
grok add viewer <name>     # Custom viewer
grok add detector <name>   # Semantic type detector

4. Build the package

npm run build

This runs grok api (auto-generates wrappers), grok check --soft (validates), and webpack (bundles). Do not modify the build script in package.json.

5. Publish the package

Publish to a configured server:

grok publish dev           # Debug mode (only visible to you)
grok publish dev --release # Release mode (visible to shared groups)

Return code 0 means success. After publishing in debug mode, find the package under Manage | Packages prefixed with v..

6. Share and release

  • Share the package to user groups via right-click menu on the package in Manage | Packages.
  • For public release: grok publish public --release.

Behavior

  • Always ask for the package name if not provided.
  • Use PascalCase for the package name.
  • Default to TypeScript unless the user requests JavaScript.
  • Include the --test flag unless the user says otherwise.
  • After scaffolding, remind the user to run npm install.
  • Follow Datagrok coding conventions: no excessive comments, no curly brackets for one-line if/for, catch/else-if on new line.
  • When adding functions, use the annotation comment format (//name:, //tags:, //input:, //output:).
  • Warn if webpack externals are modified (datagrok-api, rxjs, cash-dom, dayjs, wu, openchemlib/full are provided by the platform).

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Add support for a new curve data format in the Curves package converter system

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

datagrok-ai/public742026년 10월 22일 업데이트

Create info panels that appear in the context panel based on semantic types

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

datagrok-ai/public742026년 10월 22일 업데이트

Add a new single-objective optimization algorithm to the sci-comp library. Use when the user asks to implement a new optimizer (e.g. gradient descent, BFGS, simulated annealing, differential evolution).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

datagrok-ai/public742026년 10월 22일 업데이트

Add unit tests to a Datagrok package

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

datagrok-ai/public742026년 10월 22일 업데이트

Answer a "how do I …" question about the platform with a Gherkin scenario on @datagrok-libraries/bdd that is filmed into a how-to video (grok-bdd guide), so the answer is demonstrated, sent as a video plus numbered steps, and kept as a regression test; the same scenarios, filmed in help mode, are the GIFs of the help pages

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

datagrok-ai/public742026년 10월 22일 업데이트

Translate hand-written Playwright specs (or any existing UI tests) into Gherkin features on @datagrok-libraries/bdd, then prove the features test what they claim by backward-matching them against the originals with independent reviewers, and fix the gaps in the core, the library and the features

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

datagrok-ai/public742026년 10월 22일 업데이트

datagrok-ai의 스킬 모두 보기

이 스킬의 문제 신고