Skip to content
Scaffolding
Skill

/debug

Debug an Apps in Toss mini-app across two environments — local browser (devtools panel, `window.__ait`, browser DevTools) and on-device intoss-private candidate (real Toss WebView via `ait-debugger` MCP relay-staging QR attach). Branches by what it observes, then runs an

From plugin
apps-in-toss-harness
19312 skills4 commands

Claude Code

$ npx -y skills add toss/apps-in-toss-harness --skill debug --agent claude-code

SKILL.md

debug.SKILL.md
name: debug
description: |
  Debug an Apps in Toss mini-app across two environments — local browser
  (devtools panel, `window.__ait`, browser DevTools) and on-device
  intoss-private candidate (real Toss WebView via `ait-debugger` MCP
  relay-staging QR attach). Branches by what it observes, then runs an
  autonomous observe → hypothesize → minimal-fix → re-verify loop and hands off
  when it stalls (§6). Triggered by
  `/ait:debug` (no args). Distinct from `status`/`logs` (console-side, not
  live device state).
argument-hint: ''
adapter-note: '§5 (on-device MCP attach) is Claude Code-only — run_in_background, /mcp auto-start and notifications/tools/list_changed handling are Claude Code-specific. Not supported on Codex or Cursor; environment 1 (browser) works there unchanged. Replace §5 with an adapter-specific overlay when targeting other agents.'

debug skill

목적

`/ait:debug`는 미니앱을 **두 겹의 환경**에서 디버깅하는 경로를 안내한다. 한 명령이 관찰 결과에 따라 환경을 분기한다 (환경 모델·fidelity 사다리: 로컬 `docs/design/three-environments-fidelity.md` — maintainer-internal 문서, repo 미포함):

| 환경 | 실행 면 | 이 skill의 경로 | |---|---|---| | 1. 로컬 브라우저 | desktop Chromium + mock SDK + Panel | 2-A/2-B/3 — panel · `window.__ait` · 브라우저 DevTools | | 3. intoss-private relay dev | 실기기 토스 앱 WebView(dogfood) + CDP relay | 5 — `start_attach({mode:'relay-staging', scheme_url})` 1호출 QR attach |

환경 번호는 fidelity 사다리의 원 번호를 그대로 쓴다 — 중간 단(환경 2, PWA Sandbox launcher)은 2026-08-10 결정으로 제거됐고 남은 두 단의 번호는 바꾸지 않았다.

**디버깅이 아니라 "실제 토스 앱에서 한 번 돌려보고 싶다"면 `/ait:test-on-device`가 정규 경로다** — 번들 빌드 → 콘솔 업로드 → 컴파일 확인 → 도구가 돌려준 링크로 열기. 이 skill(환경 3)은 그렇게 확인한 뒤 **폰에서만 재현되는 문제를 CDP로 관측**할 때 쓴다.

  • **환경 1**은 지금 바로, 의존 없이 쓴다:
  • `@apps-in-toss/devtools`의 floating panel — mock 상태(권한·위치·IAP·이벤트 등)를

실시간 관찰·조작 (12개 탭). 증상별로 어느 탭을 볼지는 `references/panel-tabs.md` 참조.

  • `window.__ait` — 런타임 mock SDK 상태 객체. 콘솔이나 에이전트가 직접 읽는다.
  • 브라우저 기본 DevTools — console / network / sources.
  • **환경 3**은 `ait-debugger` MCP 서버로 닿는다. 이 서버는 **프로젝트 opt-in**이다 —

`/ait:setup-debugger`가 프로젝트 `.mcp.json`에 배선하고, 세션에 로드돼 있으면 `/ait:debug`는 새 서버를 띄우지 않고 **`start_attach({mode:'relay-staging', scheme_url})`로 환경 전환과 QR attach 경로 발급을 한 호출로** 처리한다(아래 5). bootstrap 도구가 세션에 안 보이면 배선이 안 된 것 — `/ait:setup-debugger`를 먼저 안내한다. QR은 intoss-private deep-link라 토스 앱 WebView가 연다. attach 전에는 bootstrap 도구 (`start_attach`·`stop_attach`·`switch_environment`·`get_status`·`get_page`, 5종)만 보이고, 폰이 relay에 붙으면 나머지 도구가 같은 세션에서 동적 등록된다.

두 환경 모두 attach 후 `run_tests`로 미니앱 test case 파일(glob)을 그 환경에서 실행할 수 있다 — 환경 1은 mock + 로컬 CDP, 환경 3은 실 토스 WebView에서 같은 테스트를 돌려 환경별 거동 차이를 본다. 상세는 `references/attach-tools.md`.

생성·수정하는 모든 메시지에 과장·홍보성 문구를 넣지 않는다. 생성하는 안내는 관찰·진단을 설명하는 최소한으로.

의존

  • **`@apps-in-toss/devtools`가 devDependencies에 있어야** floating panel을 쓸 수 있다.

없으면 `/ait:inject-devtools`를 먼저 안내한다 (없어도 브라우저 기본 DevTools 가이드는 진행 가능).

  • **웹 프로젝트면 `package.json`이 cwd에 있어야 한다**. 없으면 프로젝트 루트로 이동 안내.

Unity처럼 `package.json`이 없는 스택은 아래 1단계를 따른다.

  • **환경 1**: 에이전트가 필요 시 dev 서버를 자동 기동한다(아래 2-A 사전 기동 블록).
  • **환경 3**: `ait-debugger` MCP 서버(`@apps-in-toss/debugger`)가 세션에 로드돼 있어야 한다 —

프로젝트 `.mcp.json`에 배선돼 있지 않으면 `/ait:setup-debugger`를 먼저 안내한다(opt-in).

  • **환경 3**: 프로젝트에 `@apps-in-toss/debugger-client`(0.3.0 이하의 옛 이름 `@apps-in-toss/debug-console`은 업그레이드 대상)이 `devDependencies`로 설치되고 진입점에 `__DEBUG_BUILD__` 게이트 import가 배선돼 있어야 한다. candidate 빌드는 `AIT_DEBUG_BUILD=1`로 만들어 이 값을 `true`로 접는다(없으면 `/ait:inject-debugger-client` 먼저 안내 — `inject` skill의 debugger-client facet).

> 이 skill은 콘솔 인증을 요구하지 않는다. 브라우저 디버깅은 로컬 전용.

입력

`/ait:debug`는 인자를 받지 않는다. 사용자가 증상을 자연어로 설명하면 (예: "로그인 버튼을 눌러도 authorizationCode가 안 옴", "swipe로 뒤로 가면 앱이 종료됨") 그 증상에 맞는 관찰 지점을 골라 안내한다.

실행 순서

1. 환경 확인

ls package.json

없으면 프로젝트 루트가 아닌 곳에서 실행했을 수 있다. 하위 디렉터리에 프로젝트가 있는지 보고, 없으면 알린다:

package.json이 없습니다. 프로젝트 루트 디렉토리에서 다시 실행해주세요.
예: cd <project-root> && /ait:debug

Unity나 엔진 HTML5 빌드처럼 `package.json`이 없는 스택이면 중단하지 않는다. 그 스택의 dev 실행 방식(Unity는 Dev Server 빌드 프로필 — `../feature/references/stack-pitfalls.md`)과 빌드 절차는 프로젝트 문서와 SDK 패키지 문서를 읽어 정하고, 모호하면 사용자에게 묻는다. devtools panel은 `@apps-in-toss/devtools` 전제라 2-A는 건너뛰고 2-B 이후를 쓴다. 환경 3의 `@apps-in-toss/debugger-client` 설치는 `package.json` 기반이라 이 스택에서 어떻게 넣는지는 이 skill이 확인하지 못했다 — 환경 3으로 올라갈 때 사용자에게 알리고 어떻게 할지 묻는다.

`package.json`이 있으면 `Read`로 읽어 `@apps-in-toss/devtools`가 `devDependencies`에 있는지 확인한다.

  • **있으면**: floating panel 경로(아래 2-A)를 우선 안내.
  • **없으면**: 브라우저 기본 DevTools 경로(2-B)만 안내하고, panel을 원하면

`/ait:inject-devtools`를 먼저 실행하라고 덧붙인다.

2-A. devtools floating panel로 mock 상태 관찰

**dev 서버 사전 기동 (idempotent)**:

에이전트는 패널 안내 전에 dev 서버가 이미 기동 중인지 확인하고, 아닐 경우 자동으로 띄운다.

1. **dev 명령 확인**: `package.json`의 `scripts`를 읽어 dev 서버를 띄우는 스크립트(보통 `dev`, 없으면 `start`·`serve` 등)와 그 스크립트가 부르는 명령을 확인한다. 패키지 매니저는 lockfile로 판별한다. 후보가 여럿이거나 어느 것이 브라우저용 dev 서버인지 모호하면 추측하지 말고 사용자에게 묻는다. 포트는 가정하지 않는다. 스크립트 인자(`--port`·`-p`)나 프로젝트 설정 파일, 패키지 README가 포트를 명시하면 그 값을 쓰고, 명시가 없으면 기동 후 출력에서 읽는다.

2. **기동 여부 확인**: 위에서 포트가 확정됐으면 응답하는지 확인한다.

   # $PORT = 1단계에서 확정한 포트
   curl -s -o /dev/null -w "%{http_code}" "http://localhost:$PORT/" || true

200 응답이면 이미 기동 중이다. 기동 단계를 건너뛴다. 연결 거부(exit code ≠ 0 또는 000)이면 아직 미기동이다. 포트가 확정되지 않았으면 묻지 않고 3단계로 간다. 기동 출력이 포트가 사용 중이라 다른 포트로 떴다고 알리면, 사용자가 이미 띄운 서버가 있을 수 있다고 4단계 안내에 함께 적는다.

3. **미기동 시 백그라운드 기동**: `run_in_background: true`로 1단계의 dev 스크립트를 실행한다 (`<패키지 매니저> run <dev 스크립트>`).

4. **URL 출력**: 서버가 stdout에 찍는 로컬 주소(`http://localhost:<port>` 형태의 줄)를 읽어 사용자에게 URL을 명시적으로 알린다. 출력 형식은 도구마다 다르다. 주소를 찾지 못하면 출력 원문을 근거로 사용자에게 묻는다.

   dev 서버가 기동됐습니다: http://localhost:<port>/
   브라우저에서 이 주소를 열어주세요. (브라우저는 직접 여세요 — 에이전트는 URL만 알려드립니다.)

브라우저에서 연 뒤 화면 하단의 **AIT** 버튼을 누르면 패널이 열린다. 증상별로 어느 탭을 볼지는 `references/panel-tabs.md`에 정리돼 있다 — **상세가 필요하면 Read <이 skill의 base directory>/references/panel-tabs.md**.

2-B. 브라우저 기본 DevTools

panel 유무와 무관하게 항상 가능한 관찰:

  • **Console**: 앱 코드의 `console.*` 출력, 던져진 예외 스택. devtools mock은

미구현 SDK API 접근 시 **throw**

Read more
@toss
Ships withapps-in-toss-harness

앱인토스 미니앱을 AI 코딩 에이전트와 대화하며 만드는 플러그인 ait가 들어 있는 저장소입니다. "출석 체크 미니앱 만들고 싶어"라고 말하면 에이전트가 기획을 정리하고, 프로젝트를 만들고, 화면을 그리고, 내 폰의 토스 앱에 띄워 보여 줍니다. 검수 요청도 에이전트 안에서 합니다. Claude Code, Codex, Cursor에서 쓸 수 있습니다. 0.3.x 이하에서 올라오는 분은 먼저 .github/updating.md를 읽어 주세요.

Stars on GitHub

Momentum

stars in total
193
Star history of toss/apps-in-toss-harness on GitHub, a chart by star-history.com

Other skills on apps-in-toss-harness.

design

design

Build and fix mini-app screens. Run it for "화면 만들어줘", "출석 체크 화면 그려줘", "화면이 구린데 예쁘게 해줘", "디자인 좀 봐줘" — it writes and edits the…

feature

feature

Implement an Apps in Toss SDK feature in the user's existing project: banner / interstitial / rewarded ads, in-app purchase…

inject

inject

Patch an existing Apps in Toss mini-app's build setup. Three facets: `/ait:inject-devtools` adds the `@apps-in-toss/devtools`…

launch

launch

Pre-launch check, review request and rejection handling for an Apps in Toss mini-app (검수 = the Apps in Toss app review, not code…

new-miniapp

new-miniapp

Scaffold a new Apps in Toss mini-app by driving the official `create-ait-app` CLI non-interactively (`--inline`, always…

plan

plan

Take a mini-app from a vague idea to a plan — ideate when the user has no concrete idea yet, shape a lightweight PRD, look up…

More skills from other plugins.

next-forge

next-forge

Expert assistance for next-forge — a production-grade Turborepo template for Next.js SaaS apps. Triggers on questions about…

next-forge5mo7.8k
@vercel@vercelInstall Skill
blog-style

blog-style

Use when drafting or editing a blog post or long-form article in the house voice.

eve3d5.9k
@vercel@vercelInstall Skill
build-every-app

build-every-app

Build or change an app on EveryApp: create one, add a feature, a page, a table, an AI tool, a capability, a public route or a…

@every-app@every-appInstall Skill
nubase

nubase

Use when the user mentions Nubase broadly, wants a backend for an AI-generated app, or needs to deploy/publish generated code…

nubase13d621
@ottermind@ottermindInstall Skill

Questions about debug.

Which coding agents can use debug?
debug installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.