Communitygithub.com

vercel-labs/slack

브라우저 자동화를 사용하여 Slack 워크스페이스와 상호작용합니다. 사용자가 읽지 않은 채널 확인, Slack 탐색, 메시지 전송, 데이터 추출, 정보 검색, 대화 검색 또는 Slack 작업 자동화가 필요할 때 사용하세요.

slack란 무엇인가요?

이 스킬은 `agent-browser` CLI 도구를 사용하여 Slack 웹 인터페이스를 자동으로 제어합니다. 이를 통해 개발자는 Slack API 없이도 브라우저 세션에 연결하여 읽지 않은 메시지 확인, 채널 탐색, 메시지 검색, 채널 정보 추출 등 다양한 작업을 수행할 수 있습니다. 주로 Claude Code, Cursor, Codex와 같은 터미널 기반 AI 에이전트에서 사용되며, `agent-browser connect 9222` 명령어로 이미 열려 있는 Slack 브라우저 세션에 연결하거나 `agent-browser open https://app.slack.com`으로 새로 열 수 있습니다. 각 요소는 고유 참조 번호(`@e1`, `@e2` 등)로 식별되며, 스냅샷을 통해 현재 페이지의 상호작용 가능한 요소들을 확인한 후 클릭, 입력 등의 명령을 실행합니다. JSON 스냅샷을 활용하면 구조화된 데이터를 추출할 수 있어, 읽지 않은 메시지 수를 세거나 채널 목록을 파싱하는 등의 고급 작업이 가능합니다. 주의할 점은 Slack API를 사용하지 않으므로 OAuth나 웹훅이 필요 없지만, 현재 브라우저 세션에 종속되며 Slack의 속도 제한이 발생할 수 있습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/vercel-labs/agent-browser/tree/main/skill-data/slack

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Slack 자동화

Slack 워크스페이스와 상호작용하여 메시지를 확인하고, 데이터를 추출하며, 일반적인 작업을 자동화합니다.

빠른 시작

기존 Slack 브라우저 세션에 연결하거나 Slack을 엽니다:

# 이미 열려 있는 Slack의 포트 9222에 연결 (일반적인 경우)
agent-browser connect 9222

# 또는 Slack이 실행 중이지 않으면 열기
agent-browser open https://app.slack.com

그런 다음 스냅샷을 찍어 사용 가능한 요소를 확인합니다:

agent-browser snapshot -i

핵심 워크플로우

  1. 연결/이동: Slack을 열거나 연결합니다.
  2. 스냅샷: 참조(@e1, @e2 등)가 포함된 상호작용 요소를 가져옵니다.
  3. 이동: 탭을 클릭하거나 섹션을 확장하거나 특정 채널로 이동합니다.
  4. 추출/상호작용: 데이터를 읽거나 작업을 수행합니다.
  5. 스크린샷: 결과를 캡처합니다.
# 예: 읽지 않은 채널 확인
agent-browser connect 9222
agent-browser snapshot -i
# "더 보기" 버튼 찾기
agent-browser click @e21  # "더 보기" 버튼 참조
agent-browser screenshot slack-unreads.png

일반적인 작업

읽지 않은 메시지 확인

# Slack에 연결
agent-browser connect 9222

# 스냅샷을 찍어 읽지 않은 메시지 버튼 위치 파악
agent-browser snapshot -i

# 다음 요소 찾기:
# - "더 보기" 버튼 (보통 사이드바 상단 근처)
# - 활동 탭의 "읽지 않음" 토글 (읽지 않은 개수 표시)
# - 읽지 않은 메시지가 있는 배지/볼드체 채널 이름

# 활동 탭으로 이동하여 모든 읽지 않은 메시지를 한 번에 보기
agent-browser click @e14  # 활동 탭 (참조는 다를 수 있음)
agent-browser wait 1000
agent-browser screenshot activity-unreads.png

# 또는 DM 탭 확인
agent-browser click @e13  # DM 탭
agent-browser screenshot dms.png

# 또는 사이드바에서 "더 보기" 확장
agent-browser click @e21  # 더 보기 버튼
agent-browser wait 500
agent-browser screenshot expanded-unreads.png

채널로 이동

# 사이드바 또는 이름으로 채널 검색
agent-browser snapshot -i

# 목록에서 채널 이름 찾기 (예: "engineering", "product-design")
# 채널 treeitem 참조 클릭
agent-browser click @e94  # 예: engineering 채널 참조
# 클릭한 채널 이름으로 `engineering`을 대체하여 이전 채널 헤더가
# 새 채널이 렌더링되는 동안 조건을 만족하지 않도록 합니다.
agent-browser wait --fn "document.querySelector('[data-qa=\"channel_header\"]')?.innerText.includes('engineering')"
agent-browser screenshot channel.png

메시지/스레드 찾기

# Slack 검색 사용
agent-browser snapshot -i
agent-browser click @e5  # 검색 버튼 (일반적인 참조)
agent-browser fill @e_search "키워드"
agent-browser press Enter
# 제출된 검색어와 일치시켜 반복 검색이 이전 경로를 재사용하지 못하도록 합니다.
agent-browser wait --fn "location.pathname.includes('/search') && new URL(location.href).searchParams.get('q') === '키워드'"
agent-browser screenshot search-results.png

채널 정보 추출

# 보이는 모든 채널 목록 가져오기
agent-browser snapshot --json > slack-snapshot.json

# 채널 이름과 메타데이터 파싱
# 섹션 아래의 하위 채널을 나타내는 level=2 treeitem 요소 찾기

채널 세부 정보 확인

# 채널 열기
agent-browser click @e_channel_ref
agent-browser wait 1000

# 채널 정보 가져오기 (멤버, 설명 등)
agent-browser snapshot -i
agent-browser screenshot channel-details.png

# 메시지 스크롤
agent-browser scroll down 500
agent-browser screenshot channel-messages.png

결과 기록/상태 캡처

Slack에서 찾은 내용을 문서화해야 할 때:

# 주석이 포함된 스크린샷 (요소 번호 표시)
agent-browser screenshot --annotate slack-state.png

# 전체 페이지 스크린샷
agent-browser screenshot --full slack-full.png

# 참조용 현재 URL 가져오기
agent-browser get url

# 페이지 제목 가져오기
agent-browser get title

사이드바 구조

Slack 사이드바를 이해하면 효율적으로 탐색할 수 있습니다:

- 스레드
- 허들
- 임시 보관함 및 보낸 메시지
- 디렉토리
- [섹션 헤더 - 외부 연결, 즐겨찾기, 채널 등]
  - [채널이 treeitem으로 나열됨]
- 다이렉트 메시지
  - [DM 나열]
- 앱
  - [앱 바로가기]
- [더 보기] 버튼 (읽지 않은 채널 목록 토글)

찾아야 할 주요 참조:

  • @e12 - 홈 탭 (보통)
  • @e13 - DM 탭
  • @e14 - 활동 탭
  • @e5 - 검색 버튼
  • @e21 - 더 보기 버튼 (세션에 따라 다름)

Slack의 탭

채널을 클릭하면 다음 탭이 표시됩니다:

  • 메시지 - 채널 대화
  • 파일 - 공유 파일
  • 고정된 메시지 - 고정된 메시지
  • 캔버스 추가 - 협업 캔버스
  • 워크스페이스 설정에 따라 기타 탭

탭 참조를 클릭하여 보기를 전환하고 다양한 정보를 가져옵니다.

Slack에서 데이터 추출

텍스트 콘텐츠 가져오기

# 메시지 또는 요소의 텍스트 가져오기
agent-browser get text @e_message_ref

접근성 트리 파싱

# 프로그래밍 방식 파싱을 위한 전체 JSON 스냅샷
agent-browser snapshot --json > output.json

# 다음 요소 찾기:
# - 채널 이름 (treeitem의 name 필드)
# - 메시지 내용 (listitem/document 요소)
# - 사용자 이름 (사용자 정보가 있는 button 요소)
# - 타임스탬프 (시간 정보가 있는 link 요소)

읽지 않은 메시지 개수 세기

# 읽지 않은 섹션을 확장한 후:
agent-browser snapshot -i | grep -c "treeitem"
# 읽지 않은 섹션에 있는 각 treeitem(채널 이름 포함)은 읽지 않은 메시지 하나를 나타냅니다.

모범 사례

  • 기존 세션에 연결: Slack이 이미 열려 있으면 agent-browser connect 9222를 사용하세요. 새 브라우저를 여는 것보다 빠릅니다.
  • 클릭 전 스냅샷: 버튼을 클릭하기 전에 항상 snapshot -i로 참조를 확인하세요.
  • 이동 후 다시 스냅샷: 새 채널이나 섹션으로 이동한 후 새 스냅샷을 찍어 새 참조를 찾으세요.
  • 파싱용 JSON 스냅샷: 구조화된 데이터를 추출해야 할 때는 snapshot --json을 사용하여 기계가 읽을 수 있는 출력을 얻으세요.
  • 상호작용 간격 두기: 빠른 상호작용 사이에 sleep 1을 추가하여 UI가 업데이트되도록 하세요.
  • 접근성 트리 확인: 접근성 트리는 스크린 리더(및 자동화 도구)가 볼 수 있는 것을 보여줍니다. 요소가 스냅샷에 없으면 숨겨져 있거나 스크롤이 필요할 수 있습니다.
  • 사이드바 스크롤: agent-browser scroll down 300 --selector ".p-sidebar"를 사용하여 채널 목록이 길 경우 Slack 사이드바 내에서 스크롤하세요.

제한 사항

  • Slack API 접근 불가: 이 도구는 Slack API가 아닌 브라우저 자동화를 사용합니다. OAuth, 웹훅 또는 봇 토큰이 필요하지 않습니다.
  • 세션 종속성: 스크린샷과 스냅샷은 현재 브라우저 세션에 연결됩니다.
  • 속도 제한: Slack은 빠른 상호작용에 속도 제한을 걸 수 있습니다. 필요한 경우 명령 사이에 지연을 추가하세요.
  • 워크스페이스별: 자신의 워크스페이스와만 상호작용합니다. 교차 워크스페이스 자동화는 지원되지 않습니다.

디버깅

콘솔에서 오류 확인

agent-browser console
agent-browser errors

현재 페이지 상태 가져오기

agent-browser get url
agent-browser get title
agent-browser screenshot page-state.png

예시: 전체 읽지 않은 메시지 확인

#!/bin/bash

# Slack에 연결
agent-browser connect 9222

# 초기 스냅샷
에코 "=== Slack 읽지 않은 메시지 확인 ==="
agent-browser snapshot -i > snapshot.txt

# 활동 탭에서 읽지 않은 메시지 확인
agent-browser click @e14  # 활동 탭
agent-browser wait 1000
agent-browser screenshot activity.png
ACTIVITY_RESULT=$(agent-browser get text @e_main_area)
에코 "활동: $ACTIVITY_RESULT"

# DM 확인
agent-browser click @e13  # DM 탭
agent-browser wait 1000
agent-browser screenshot dms.png

# 사이드바에서 읽지 않은 채널 확인
agent-browser click @e21  # 더 보기 버튼
agent-browser wait 500
agent-browser snapshot -i > unreads-expanded.txt
agent-browser screenshot unreads.png

# 요약
에코 "=== 요약 ==="
에코 "자세한 내용은 activity.png, dms.png, unreads.png 파일을 참조하세요"

참고 자료

Individual skills in this repo

This repo contains 8 individual skills — each has its own dedicated page.

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to

vercel-labs/agentcore

Run agent-browser on AWS Bedrock AgentCore cloud browsers. Use when the user wants to use AgentCore, run browser automation on AWS, use a cloud browser with AWS credentials, or needs a managed browser session backed by AWS infrastructure. Triggers include "use agentcore", "run on AWS", "cloud browser with AWS", "bedrock browser", "agentcore session", or any task requiring AWS-hosted browser automation.

vercel-labs/derive-client

Reverse-engineer a website's internal API by recording browser traffic into a HAR file, then generate a standalone client or CLI that calls the endpoints directly, with no browser needed after the first recording. Use when asked to "derive a client", "build a CLI for <site>", "reverse engineer this site's API", "record network requests", "turn this site into an API", or when the same site will be automated repeatedly and direct HTTP calls would beat driving the browser every time.

vercel-labs/dogfood

Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to "dogfood", "QA", "exploratory test", "find issues", "bug hunt", "test this app/site/platform", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.

vercel-labs/electron

Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include "automate Slack app", "control VS Code", "interact with Discord app", "test this Electron app", "connect to desktop app", or any task requiring automation of a native Electron application.

vercel-labs/protected-vercel-deployments

Access and test Vercel deployments protected by Vercel Authentication, SSO, or Deployment Protection with agent-browser. Use when a preview or production URL redirects to a Vercel login page, returns a protection 401 or 403, or needs short-lived Trusted Sources OIDC authentication instead of a static bypass secret or public exception.

vercel-labs/vercel-sandbox

Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include "Vercel Sandbox browser", "microVM Chrome", "agent-browser in sandbox", "browser automation on Vercel", or any task requiring Chrome in a Vercel Sandbox.

vercel-labs/webmcp-gen

Build and validate experimental WebMCP tools for an existing web page. Use when an agent needs to expose a site's real workflows as page tools, create webmcp.init.js, define deterministic checks, or compare WebMCP with accessibility-tree automation.

관련 스킬