IntelliJ `AnAction` 클래스를 구현하거나 수정하고 `plugin.xml`에 등록하도록 안내합니다. 표시 이름과 설명은 메시지 번들에 두고, 필요하면 아이콘을 설정하며, 이벤트 코루틴 범위에서 중단 함수를 실행해 동기식 처리로 IDE가 멈추는 일을 방지합니다.
- IDE 메뉴에 새 동작 추가
- 동작 등록이나 아이콘 변경
- 동작 이름과 설명 정리
성능 실험을 재현할 수 있는 Jupyter 노트북을 만들고 측정 조건, 분석, 그래프를 정리합니다. 다른 컴퓨터에서도 다시 실행할 수 있도록 커밋, 실행 명령, 코드 변경 사항을 기록합니다.
Create reproducible Jupyter notebooks for performance experiments.
실행 점수 미검증
설치 방법 보기이 스킬은 성능 실험 절차, 측정 데이터 읽기, 통계 분석, 표와 그래프를 한데 모은 Jupyter 노트북을 만들거나 갱신합니다. 다른 엔지니어가 다른 컴퓨터에서도 실험을 다시 실행할 수 있도록 측정 당시의 커밋, 정확한 실행 명령, 필요한 코드 변경 사항을 기록하는 구성을 안내합니다. 함께 제공되는 nb.py 도구로 노트북 셀을 조작하고 실행하거나 HTML로 내보낼 수 있으며, 실행에 필요한 의존성은 uv로 관리합니다.
성능 결과를 임시 로그나 개인 메모로 남기는 대신 조건과 분석 방법을 함께 공유하고 싶을 때 활용할 수 있습니다. 구성별 측정값을 비교하거나 실험 코드 변경 사항을 보존할 때도 유용합니다. 무작위성이나 환경 의존성이 있는 실험이라면 시작 전에 안정성을 확인합니다.
uv가 필요하며 nb.py는 반드시 uv run을 통해 실행해야 합니다. IntelliJ 모노레포에서는 안내된 고정 버전 래퍼도 사용할 수 있습니다. 결과 재현을 위해 안정 브랜치의 커밋, 실행 명령, 코드 변경 사항을 기록해야 합니다.
이 소개문은 공개된 SKILL.md를 바탕으로 AI(OpenAI Codex)가 작성했습니다. 정확한 사양은 아래 원문을 확인하세요.
AI가 SKILL.md의 내용에서 주의가 필요한 작업과 도입 전제를 확인했습니다. 점수는 실제로 실행한 결과(실행 검증)만으로 매깁니다.
점수에는 넣지 않았습니다. 2026년 10월 28일 기준으로 AI(OpenAI Codex)가 판정했습니다. 참고용이므로 설치 전에 원문도 확인해 주세요.
설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
uv is the recommended tool for running notebooks — it requires no global Jupyter installation,
pins exact dependency versions per invocation, and keeps each invocation's environment isolated.
There are no conflicts with system Python or existing virtualenvs.
Install on macOS / Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
Install on Windows (PowerShell):
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
Inside the IntelliJ monorepo, use the pinned wrapper instead of a system uv.
It downloads and caches the right version automatically:
# Full monorepo layout (project root contains community/):
./community/tools/uv.cmd run ...
# Community-only checkout (project root IS community/):
./tools/uv.cmd run ...
${CLAUDE_SKILL_DIR}/scripts/nb.py is a small CLI that covers the
most common notebook operations without requiring a running Jupyter server:
# List all cells (index, type, first line)
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py list-cells notebook.ipynb
# Print source of cell N (0-based)
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py get-cell notebook.ipynb 3
# Replace cell N with content from stdin (use a file path instead of '-' to read from a file)
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py set-cell notebook.ipynb 3 -
# Insert a new cell at position N (shifts later cells down); reads from stdin or a file
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py insert-cell notebook.ipynb 6 markdown < description.md
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py insert-cell notebook.ipynb 11 code snippet.py
# Delete cell N
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py delete-cell notebook.ipynb 5
# Collapse all code cells except the config cell (cell 1) so the notebook
# opens with only the editable config visible; use expand-cells to reverse
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py collapse-cells notebook.ipynb
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py expand-cells notebook.ipynb
# Keep a non-standard cell visible by tagging it nb:visible, or with --keep:
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py collapse-cells notebook.ipynb --keep 1 4
# Apply the patch(es) embedded in the last cell to a git repo
# --repo is required when the notebook and repo are on different paths
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py apply-patch notebook.ipynb --repo /path/to/repo
# Apply the patch(es) embedded in a specific cell
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py apply-patch notebook.ipynb 12 --repo /path/to/repo
# Bake the current git diff back into the diff fence of the last cell
# (the inverse of apply-patch — use after iterating on the patch)
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py update-patch notebook.ipynb --repo /path/to/repo
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py update-patch notebook.ipynb --repo /path/to/repo --staged
# Execute all cells in place (overwrites outputs)
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py execute notebook.ipynb
# Export to HTML (writes alongside the notebook; use -o for a custom directory).
# Cells collapsed via collapse-cells have their source omitted in the HTML output.
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py export-html notebook.ipynb
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py export-html notebook.ipynb -o out/
# Start JupyterLab for interactive editing (opens in browser)
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py serve notebook.ipynb
Always invoke nb.py via uv run — this ensures a compatible Python is used.
nb.py carries inline dependency metadata (PEP 723), so uv installs the required packages
(nbconvert, jupyter-client, ipykernel, numpy, pandas, matplotlib, plotly) automatically
for commands that need them.
If system uv is not available, use the pinned monorepo wrapper instead:
# Full monorepo layout:
./community/tools/uv.cmd run ${CLAUDE_SKILL_DIR}/scripts/nb.py list-cells notebook.ipynb
# Community-only checkout:
./tools/uv.cmd run ${CLAUDE_SKILL_DIR}/scripts/nb.py list-cells notebook.ipynb
PowerShell and cmd.exe handle escaping poorly for arguments containing backslashes, spaces, or special characters (e.g. JVM options with UNC paths). Store the value in an environment variable first to sidestep the problem.
Bash:
export WSL_PROJECT='\\wsl.localhost\Ubuntu-24.04\home\yourname\idea'
./tests.cmd --jvm-option "-Dijent.wsl.project.root=$WSL_PROJECT"
PowerShell:
$env:WSL_PROJECT = '\\wsl.localhost\Ubuntu-24.04\home\yourname\idea'
./tests.cmd --jvm-option "-Dijent.wsl.project.root=$env:WSL_PROJECT"
The same technique applies for any argument that would be hard to inline-escape: paths, output
directories, or flags that differ per engineer. The Kotlin side can read the value via
System.getProperty("...") or System.getenv("...").
By convention, notebooks should open with all boilerplate code collapsed so the
reader only sees the config cell they need to edit. Use collapse-cells after
finishing the notebook structure:
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py collapse-cells notebook.ipynb
This hides all code cells except cell 1 (the standard config cell). To mark a
different cell as permanently visible, add the tag nb:visible to its metadata:
# In a one-off update script:
nb["cells"][4]["metadata"].setdefault("tags", []).append("nb:visible")
When any code cell carries nb:visible, the tag takes precedence over --keep.
After collapsing, open the notebook in the browser to verify the layout before committing:
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py serve notebook.ipynb
| # | Type | Purpose |
|---|---|---|
| 0 | markdown | Title; what is measured; exact shell command(s) to collect data |
| 1 | code | Config — only user-editable variables (e.g. repo_root = Path(r'...')) |
| 2 | code | Machine info (host, OS, CPU, RAM) |
| 3 | code | Imports + data loading |
| 4..N | code | Analysis — parse, stats, plots, tables |
| last | markdown | Full patch(es) needed to reproduce the data, as fenced diff blocks |
Every notebook must be self-contained enough for a different engineer on a different machine to re-run it and get the same results.
Required elements:
origin/master or a release branch (three-digit major version and maybe a minor version after a dot, e.g. origin/261, origin/261.12345).
Feature branches are deleted after merging, so a hash reachable only from a feature branch becomes inaccessible to anyone trying to reproduce the results.git diff $(git merge-base <stable branch> <hash>) <hash>
PowerShell:
git diff (git merge-base <stable branch> <hash>) <hash>
If an instrumentation patch was applied separately (not merged), include it too.Before writing the notebook, verify the test workload is deterministic and noise-free. Ask the user if uncertain. Red flags:
| Risk | Mitigation |
|---|---|
| Index caches reused across runs | preserveSystemDir = false (IDE Starter default) |
| Pre-built / shared indexes downloaded | .setSharedIndexesDownload(false) |
| Background telemetry uploads | .disableReportingStatisticsToProduction(), .disableFusSendingOnIdeClose() |
| Test runs on wrong filesystem | Verify the actual runtime path (e.g. WSL or Docker path vs Windows host path). For WSL/Docker tests, check that resolvedProjectHome points inside the target environment. A common pitfall: hook APIs that return a new context but the caller discards the return value, silently keeping the old path. |
| Non-deterministic algorithms | Verify fixed seeds, disabled sampling, etc. |
| Competing background processes | Identify and disable anything that shares the measured resource. |
If a test result depends on any random or session-specific factor, ask the user before proceeding.
The fewer steps a user needs to collect data, the better. The ideal: apply one patch, run one command, open the notebook.
Aim for a single test invocation. Put all measurements in one test class. If measurements
share setup (e.g. opening and indexing a project), run them in sequence inside one test method,
or as @Order-annotated methods that always run together as a group.
Use a single patch. Combine instrumentation and test changes into one diff. Two patches double the preparation steps for anyone trying to reproduce the results.
Anti-pattern: a notebook that requires running an indexing test and a rename test as separate
invocations (different --module flags, different log files to locate) forces a two-step recipe.
Merge the measurements into one test class so a single command generates all data.
Verify that the experiment code compiles before embedding the patch in the notebook.
Run ./tests.cmd --module <module> --test <FQN> — Bazel compilation runs as part of the
test launch even if the test fails at runtime. Fix any compilation errors before the diff
goes into the patch cell.
See reference/machine-info.md for a stdlib-only implementation that works on Windows, macOS, and Linux.
See reference/log-files.md for patterns covering IDE Starter tests and regular (non-Starter) tests.
Some notebooks measure multiple configurations, and a user may
have run only one of them. In those cases the data-loading cell should set a boolean flag and
every subsequent analysis cell that depends on that data should check it before running.
This lets execute (or "Run All") complete without errors even when only partial data exists.
For two variants the pattern is straightforward:
# In the data-loading cell — set flags for each optional configuration:
try:
async_log = find_log('my-test-async')
_async_sizes = parse_sizes(async_log)
except FileNotFoundError as e:
print(f'Skipping async mode: {e}')
_async_sizes = []
_async_ok = bool(_async_sizes)
# In each analysis cell that uses async data:
if not _async_ok:
print('No async data — run the async variant of the test first.')
else:
# ... analysis code ...
For three or more variants, keep the loading block uniform and collect results into a dict so analysis cells stay readable regardless of how many variants exist:
# In the data-loading cell:
_VARIANTS = ['baseline', 'nagle', 'nodelay']
_data: dict[str, list] = {}
for _variant in _VARIANTS:
try:
_log = find_log(f'my-test-{_variant}')
_data[_variant] = parse_sizes(_log)
print(f'{_variant}: {len(_data[_variant])} samples')
except FileNotFoundError as e:
print(f'Skipping {_variant}: {e}')
_data[_variant] = []
# In each analysis cell — iterate only over variants that have data:
_available = {k: v for k, v in _data.items() if v}
if not _available:
print('No data available — run at least one test variant first.')
else:
for variant, sizes in _available.items():
# ... per-variant analysis ...
pass
This scales to any number of variants without duplicating the guard logic.
Never raise or sys.exit() inside an analysis cell — that aborts the entire notebook execution.
The find_log function is intentionally different: it raises because it guards a hard prerequisite
(the test must have run), while availability guards handle optional configurations.
To change cell content without running a full Jupyter server:
For a single cell — use nb.py set-cell with - to read from stdin:
Bash (macOS / Linux / Git Bash):
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py set-cell notebook.ipynb 3 - <<'EOF'
import pandas as pd
df = pd.read_csv(log_path)
EOF
PowerShell:
@"
import pandas as pd
df = pd.read_csv(log_path)
"@ | uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py set-cell notebook.ipynb 3 -
Passing a file path instead of - is also supported when the content is already on disk.
set-cell preserves the existing cell type — replacing a markdown cell with a .md
file leaves it as markdown; replacing a code cell leaves it as code. Outputs are
cleared only for code cells (stale outputs from old code would be misleading).
For multi-cell edits — write a temporary Python script that manipulates the JSON directly, run it, then delete the script:
import json, pathlib
nb_path = pathlib.Path('notebook.ipynb')
nb = json.loads(nb_path.read_text(encoding='utf-8'))
def set_src(cells, n, text):
lines = text.splitlines(keepends=True)
if lines and lines[-1].endswith('\n'):
lines[-1] = lines[-1][:-1]
cells[n]['source'] = lines
set_src(nb['cells'], 1, 'repo_root = ...\n')
set_src(nb['cells'], 3, 'import ...\n')
nb_path.write_text(json.dumps(nb, indent=1, ensure_ascii=False) + '\n', encoding='utf-8')
After modifying experiment source files (Kotlin, Java, Rust, etc.) that are part
of the patch — run update-patch to bake the updated diff back into the last cell:
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py update-patch notebook.ipynb \
--repo /path/to/repo
# or, if you have staged the changes instead:
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py update-patch notebook.ipynb \
--repo /path/to/repo --staged
Do this after every iteration on the experiment code so the patch cell always reflects exactly what was applied when the data was collected. Forgetting this step is a common source of stale patches in committed notebooks.
Re-execute to refresh all outputs:
uv run ${CLAUDE_SKILL_DIR}/scripts/nb.py execute notebook.ipynb
The notebook file itself is the artifact to commit; keep any update scripts temporary.
print()A code cell that only calls print("...") or print("""...""") with literal strings should
be a Markdown cell instead. Markdown cells render with proper headings, bold, tables, and
links; print() output is plain monospace with no formatting.
Do — markdown cell:
## Key finding
The root cause is …
Don't — code cell:
print("""Key finding\n\nThe root cause is …""")
Only use print() for values computed at runtime (log paths, parsed numbers, verdicts that
depend on data).
Every cell that produces a table of measured values should also (or instead) produce a
matplotlib figure. Prefer:
Use plt.show() so outputs are embedded in the notebook. When data for a configuration is
unavailable (guarded by an _ok flag), skip its bars rather than crashing.
When an analysis cell produces a table — comparison results, per-variant stats, ranked lists — use
a pandas DataFrame instead of building ASCII tables with print() and string formatting.
Jupyter renders DataFrames as HTML automatically; the output is sortable, readable, and
copy-paste friendly.
Do — DataFrame output:
import pandas as pd
rows = [
{"variant": "baseline", "p50_ms": 120, "p99_ms": 340},
{"variant": "nagle", "p50_ms": 118, "p99_ms": 310},
{"variant": "nodelay", "p50_ms": 95, "p99_ms": 270},
]
df = pd.DataFrame(rows)
display(df)
Don't — manual ASCII table:
print(f"{'variant':<10} {'p50_ms':>8} {'p99_ms':>8}")
for r in rows:
print(f"{r['variant']:<10} {r['p50_ms']:>8} {r['p99_ms']:>8}")
Use pandas for the full data lifecycle inside notebook cells:
pd.read_csv(log_path) or construct from parsed dicts/lists.df.groupby(...).agg(...), df.assign(delta=df.after - df.before).display(df) (HTML table) or display(df.describe()) for quick stats.df.plot.bar(x="variant", y=["p50_ms", "p99_ms"]) integrates directly with matplotlib.Declare pandas in the imports cell (cell 3) so it is available to all subsequent analysis cells.
raise / sys.exit() on missing data — breaks "run all cells".아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
IntelliJ `AnAction` 클래스를 구현하거나 수정하고 `plugin.xml`에 등록하도록 안내합니다. 표시 이름과 설명은 메시지 번들에 두고, 필요하면 아이콘을 설정하며, 이벤트 코루틴 범위에서 중단 함수를 실행해 동기식 처리로 IDE가 멈추는 일을 방지합니다.
IntelliJ JPS 테스트 모듈을 Bazel로 옮기고 Bazel에서만 발생하는 실패를 조사하는 안내서입니다. 의존성, 플러그인, 테스트 데이터와 runfiles 문제를 확인하고 생성된 대상과 이전된 테스트를 검증합니다.
IntelliJ 프로젝트 규칙에 맞춰 Kotlin과 Java 코드를 작성하거나 검토합니다. 언어 선택, 서식, 봉인 타입, 스레드 주석, 제어 흐름 예외 처리를 확인합니다.
이 가이드는 IntelliJ 프로젝트의 변경 사항을 목적별로 나누고 프로젝트 형식에 맞는 커밋 메시지를 작성하도록 돕습니다. 티켓이 있으면 번호와 변경 설명을, 없으면 레이블과 하위 시스템명을 사용하며 필요에 따라 이유와 판단을 본문에 담습니다.
여러 Python 타입 검사기로 코드 조각이나 파일의 타입 추론과 오류 판정을 비교합니다. 도구별 결과, 실행 시간, 진단 내용을 Markdown 보고서로 모아 저장할 수 있습니다.
Compose Desktop 화면을 구성할 때 컴포저블은 렌더링을 맡고 프레젠터나 코디네이터는 앱 결정을 맡도록 구조를 정리합니다. 상태 소유권, Effect, 재사용 컴포넌트 API, 지연 목록 키, 애니메이션과 성능을 개별 UI 변경에 맞춰 살펴봅니다.