ワンクリックで
prepare-package-for-claude
Prepare a Datagrok package so that Claude (or any coding agent) can work on it effectively from a naive prompt
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Prepare a Datagrok package so that Claude (or any coding agent) can work on it effectively from a naive prompt
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use whenever you need the Datagrok browser to actually execute JavaScript — adding viewers, filtering, modifying the view, or returning a result widget to the chat. Open this skill before calling the datagrok_exec tool.
Filter rows of a Datagrok DataFrame inside a datagrok-exec block through the Filters panel — by range, equals/contains/in-set, multi-value, boolean, free-text row expressions, or substructure (SMILES / SMARTS / molblock). Also covers clearing, inverting, the show-only-filtered vs destructive-drop split, and the filter event lifecycle (onRowsFiltering / onFilterChanged / onRowsFiltered). Use whenever the user says "filter", "show only", "hide rows where", "narrow to subset", "find rows that", "contains", "substructure search", "categorical filter", "range filter", "invert", "clear the filter", "clear filters", "drop rows", or asks for the filtered subset as a new table. Does NOT cover selection (separate skill) or generic DataFrame cloning (datagrok-df-and-columns).
Add a calculated, formula-based column to a dataframe inside a datagrok-exec block. Use whenever the user asks to compute, derive, add, or create a new column from existing columns — LipE, ratios, log/round, heavy atom count, any expression in the Datagrok formula DSL. Replaces hand-written addNewFloat/addNewInt + for-loop with a single formula-attached column that recomputes when source columns change.
Find, describe, add, remove, rename, clone, or set metadata on columns of a Datagrok DataFrame inside a datagrok-exec block. Use whenever the user asks to locate "the X column", summarize a column, add a typed/empty/values-filled/virtual column, set semantic type / units / format / friendly name, apply linear or categorical or conditional color coding, drop or rename columns, or copy a DataFrame. Covers everything in DataFrame.columns and Column.meta — but not row filtering/selection (datagrok-filtering, datagrok-selection) and not formula-only columns (datagrok-calc-column).
Sort, hide, show, reorder, resize, pin, format, and color-code columns in a Datagrok TableView grid from a datagrok-exec block. Use whenever the user asks to sort by a column (any direction), multi-sort, hide / show / reorder / pin / resize columns, freeze the first N columns, change number-format display, color-code cells (defaults and grid-only tint here; full per-type reference in datagrok-df-and-columns), set row height, or reset the grid back to defaults. Distinct from datagrok-df-and-columns (which owns column-level data metadata like semType, units, friendlyName, and is also where canonical color-coding lives) and from datagrok-viewers (which owns scatter plot / histogram / etc.). Does NOT cover filtering (`datagrok-filtering`), selection (`datagrok-selection`), custom cell renderer authoring (`create-cell-renderer`), saving / restoring layouts, or grid event handlers.
Add a viewer, configure a viewer, change viewer options, find viewer, close viewer, view a scatter plot, bar chart, histogram, line chart, box plot, pie chart, heat map, correlation plot, 3D scatter, trellis, density plot, statistics, on a Datagrok TableView inside a datagrok-exec block. Use whenever the user asks to plot, chart, visualize, show a graph, draw a distribution, color by a column, swap a viewer's axis, toggle a legend / regression line / log scale, replace one viewer with another, close every chart, reset the view to just the grid, or find an existing viewer by type. Plugin viewers like "Chem space", "sequence space", "activity cliffs" are NOT viewer types — they're registered functions — route those to `grok.functions.call`. Does NOT cover filtering (separate skill `datagrok-filtering`), selection (`datagrok-selection`), grid cell rendering (`datagrok-grid-customization`), layout save/restore, or custom-viewer authoring.
| name | prepare-package-for-claude |
| description | Prepare a Datagrok package so that Claude (or any coding agent) can work on it effectively from a naive prompt |
| when-to-use | When the user wants to make a package "Claude-ready" — so that a developer can describe a feature in plain language and Claude implements it correctly without hand-holding |
| context | fork |
| effort | high |
Help the user turn a Datagrok package into a codebase Claude can work on from simple prompts. The output is not exhaustive documentation — it's a minimal harness (per-package CLAUDE.md + possibly small supporting files) proven to carry real tasks.
Three rules govern every decision:
CLAUDE.md content only to address gaps a real agent actually hit on a real task. Don't speculate. Documentation that isn't load-bearing rots fast.CLAUDE.md must pull weight. Terse pointers beat thorough prose. If an agent can derive it from code in under 30 seconds, don't document it.Write a per-package CLAUDE.md that covers, at minimum:
See templates/CLAUDE.md.template for a ready-to-fill skeleton.
Do not at this stage:
ls.CLAUDE.md already covers.The core of the process. Phase 2 is interactive: the user runs tasks in fresh sessions manually and returns feedback. Do not simulate naive-dev runs inside this session — context contamination defeats the test.
Per-task loop:
Propose 2–4 candidate task prompts. Cover a mix of categories (feature, refactor, bug, docs) — see templates/phase-2-tasks.md for what makes a task informative and templates/naive-dev-prompt.md for prompt discipline (no jargon, no file paths, no "use helper X"). Present them as a numbered list and stop.
Every proposed prompt must end with an explicit feedback request so the fresh agent self-reports what it had to guess. Append this block verbatim to each task:
When done, report:
- Files changed, helpers reused.
- Anything you had to guess or infer that the codebase / CLAUDE.md did not spell out.
User selects one and runs it manually in a fresh Claude Code session (no carry-over context). The user collects the agent's feedback — especially anything the agent reports it had to guess, infer, or search around for.
User returns the collected feedback. Review it and triage each item:
CLAUDE.md.CLAUDE.md.
Present the proposed CLAUDE.md edits to the user and stop for approval.User approves (or edits) the proposed changes. Apply them to CLAUDE.md. Then roll back the code changes the fresh agent produced (the task was a harness test — the code artifact is secondary) so the next run starts from the same baseline plus the new harness.
User re-runs the same task in another fresh session with the updated CLAUDE.md. Return to step 3.
Repeat the loop until the task finishes with minimal or acceptable guesses. At that point, decide with the user whether to keep, revert, or modify the final code artifact.
Continue with the next task from the list in step 1 (or propose a new batch).
When to stop: the user decides when Phase 2 is done and Phase 3 can begin. Do not auto-advance. Good convergence signals to surface for the user: two consecutive tasks end with zero harness gaps, or the remaining guesses are all genuine product decisions.
Signals a task was well-designed:
Do not in Phase 2:
CLAUDE.md before the user approves the proposed changes.With the harness proven, review the package as a whole and clean up what a reviewer would call out.
Do NOT:
General reporting rules (both steps):
file:line and a one-line description per finding.package.g.ts / package-api.ts — regenerated by grok api.Step 1 — Reviewer read
Run the prompt below in two independent sub-agent sessions (same prompt, separate runs), then union the reports. Empirically, two Opus-4.6 runs of the same prompt overlap only ~50% of findings — running once loses half the achievable coverage for no real saving.
Prompt to run in each sub-agent:
Analyze the source code in
public/packages/<PackageName>/src. Find bugs, typos, code smells, and dead code. Suggest improvements and refactorings to make the code shorter, simpler, and easier to maintain. Group findings by file and includefile:linefor each. Skip generated files (*.g.ts,*-api.ts).
After both runs return:
file:line (same line, same finding = one entry).Step 2 — ESLint (optional, ask first)
After Step 1 is applied, ask the user: "Run eslint for anything Step 1 missed?" If no, skip.
If yes, and package.json has a lint script, run:
npm run lint
If lint output is dominated by style noise, re-run with style rules disabled so only semantic findings remain:
npx eslint "src/**/*.ts" --rule '{"indent":"off","quotes":"off","semi":"off","max-len":"off","no-trailing-spaces":"off","object-curly-spacing":"off","curly":"off","comma-dangle":"off","eol-last":"off","padded-blocks":"off","space-before-function-paren":"off","keyword-spacing":"off","space-infix-ops":"off","no-multi-spaces":"off","no-multiple-empty-lines":"off","brace-style":"off"}'
Report findings grouped by file; present a numbered list; ask the user which to fix; apply selected; re-run to confirm.
If there is no lint script, skip. Do not install eslint or hunt for a bundled binary.
Each step above is self-contained: report → user selects → fix → next step.
Final validation: npm run build (catches type errors via ts-loader and regenerates .g.ts).
Acceptance test. Hand the package + new CLAUDE.md to a fresh Claude Code session (or a different model entirely) and give it a new task — not one from the Phase 2 portfolio. Re-running a Phase 2 task whose code you kept tests nothing; the agent would see the existing implementation and mimic it.
The Phase 4 task should:
Reading the result:
This step is the one most likely to be skipped. Don't skip it. A harness that only works with the author in the room isn't a harness.
createCDDTableView," you're not testing the harness, you're testing the prompt. Strip hints.CLAUDE.md has no speculative sections — every line was added because something broke without it.v.next changelog reflects what changed.When you're done:
CLAUDE.md at the package root..md files under .claude/ if the package has a large feature area that deserves its own doc (rare — only if the Phase 2 loop demanded it).CHANGELOG.md v.next entries for any code changes.