사용 방법
- 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
- 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
- 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/kjetilhartveit/kjetils-skills --skill explain-with-code-walkthrough시작 전 확인
- 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
- 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.
Explain with Code Walkthrough
Short steps on the left scroll past a sticky code panel on the right, held in the vertical centre of the viewport. For each step the panel shows the right file and highlights the lines that step is about. The reader watches today's code become the proposed code.
Use this skill when
- The user asks for a visual explanation of changes with a code walkthrough.
- Used by an orchestrator to explain changes visually with a code walkthrough.
Steps
- 4–8 steps, in the order a reader should understand them (usually: today's code → where the change goes → the
new code → who uses it).
- Each step: one bold sentence saying what this step shows, then at most 1–2 short lines.
- The current step gets a mild marker (the kit's
ev-step.is-active: accent edge and a faint tint). Never dim
the other steps.
- Deeper explanation, tables and traces go in one
ev-moretoggle per step whose summary names what's inside
(e.g. "Why 5 rows are enough · Tick trace"). The reader should know what they'd get without clicking.
- Make toggle content visual: highlighted code, groups, status chips, compact tables. No walls of text.
The code panel
- Show real code from the codebase (or the proposed code), with the file path in the panel header. 3–4 snippets
of ≤ 15 lines each are plenty.
- Animate with highlights, not content shifts: dim unfocused lines, glide a focus band to the new range,
cross-fade when the file changes. Don't grow or collapse lines while the reader is looking.
- The panel's first state (file and highlighted lines) belongs to step 1 and must not change while step 1 is
current. The first change happens when step 2 becomes current.
- Scrolling back up restores the earlier step's file and highlight exactly: set the panel from the step number
alone, never from the previous state.
- Mark new lines with a green
+gutter and removed lines with−. - Select lines by stable ids (tag lines in the code data), not by hand-counted line numbers, which drift.
- Keep snippets to the relevant lines plus a little context; mark skipped parts ("⋯ 12 lines hidden") instead of
showing whole files. Avoid lines that need sideways scrolling where possible.
Phones
- Add
ev-side--pinto pin the code panel above the steps on phones; keep lines short (≤ 70 characters) so
nothing scrolls sideways.
Building it
- Build it as a fragment with the
explainer-kitskill (itsSCRIPTS-AND-TABS.mdcoversEV.steps). Use the kit's code block (ev-codewithdata-add,
data-hl, data-groups, data-marks) for inline and toggle code.
- Lay it out with the kit's
ev-side(steps left) +ev-stick(code panel right, sticky and vertically centred
below the top bar). The first step starts at the top of its column, level with the code panel (no top padding or spacer); add bottom padding so the last step can reach the middle. Make steps ev-step boxes and drive the panel with EV.steps(steps, function (i) { … }) (not an IntersectionObserver, which gets the reverse scroll wrong). Initialise in EV.onShow and re-measure the focus band on resize.
- Give each step
id+data-tocso it appears in the chapter list.

