본문으로 건너뛰기
Skillpedia
일반 코딩48k · #5536

puppeteer-skill

하는 일

이 도구는 웹 브라우저에서 작업을 자동화하는 코드를 만듭니다. 웹사이트를 이동하고, 양식을 작성하고, 버튼을 클릭하고, 화면을 캡처하거나 페이지를 PDF로 저장할 수 있습니다.

사용하는 경우

  • ✓웹사이트를 자동으로 방문해 정보를 모으고 싶을 때.
  • ✓웹사이트의 양식을 여러 개 한꺼번에 작성하고 싶을 때.
  • ✓웹 페이지를 PDF 파일로 만들고 싶을 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/puppeteer-skill/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/puppeteer-skill/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Wikipedia 웹사이트를 열고, '고양이'를 검색한 뒤, 페이지를 PDF로 저장하는 스크립트를 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

자동화하고 싶은 작업을 설명하면 도구가 Puppeteer라는 라이브러리를 사용해 코드를 만듭니다. 이 코드는 여러분이 요청한 작업을 수행하라는 브라우저용 지시서와 같습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Puppeteer Automation Skill

When to Use

Use this skill when you need generates Puppeteer scripts for browser automation, scraping, and PDF generation. Triggers on: "Puppeteer", "headless Chrome", "page.goto", "scrape", "PDF generation".

Core Patterns

Basic Script

const puppeteer = require('puppeteer');

(async () => {
    const browser = await puppeteer.launch({ headless: 'new' });
    const page = await browser.newPage();
    await page.setViewport({ width: 1280, height: 720 });

    await page.goto('https://example.com', { waitUntil: 'networkidle0' });
    await page.type('#username', 'user@test.com');
    await page.type('#password', 'password123');
    await page.click('button[type="submit"]');
    await page.waitForNavigation({ waitUntil: 'networkidle0' });

    const title = await page.title();
    console.log('Title:', title);

    await browser.close();
})();

Wait Strategies

// Wait for selector
await page.waitForSelector('.result', { visible: true, timeout: 10000 });

// Wait for navigation
await Promise.all([
    page.waitForNavigation({ waitUntil: 'networkidle0' }),
    page.click('a.nav-link'),
]);

// Wait for function
await page.waitForFunction('document.querySelector(".count").innerText === "5"');

// Wait for network request
const response = await page.waitForResponse(resp =>
    resp.url().includes('/api/data') && resp.status() === 200
);

Screenshot & PDF

await page.screenshot({ path: 'screenshot.png', fullPage: true });
await page.pdf({ path: 'page.pdf', format: 'A4', printBackground: true });

Network Interception

await page.setRequestInterception(true);
page.on('request', request => {
    if (request.resourceType() === 'image') request.abort();
    else request.continue();
});

// Mock API
page.on('request', request => {
    if (request.url().includes('/api/data')) {
        request.respond({
            status: 200,
            contentType: 'application/json',
            body: JSON.stringify({ items: [] }),
        });
    } else request.continue();
});

TestMu AI Cloud

For full setup, capabilities, and shared capability reference, see reference/cloud-integration.md.

const capabilities = {
    browserName: 'Chrome', browserVersion: 'latest',
    'LT:Options': {
        platform: 'Windows 11', build: 'Puppeteer Build',
        user: process.env.LT_USERNAME, accessKey: process.env.LT_ACCESS_KEY,
    },
};

const browser = await puppeteer.connect({
    browserWSEndpoint: `wss://cdp.lambdatest.com/puppeteer?capabilities=${encodeURIComponent(JSON.stringify(capabilities))}`,
});

Quick Reference

Task Code
Launch headed puppeteer.launch({ headless: false })
Evaluate JS await page.evaluate(() => document.title)
Extract text await page.$eval('.el', el => el.textContent)
Extract all await page.$$eval('.items', els => els.map(e => e.textContent))
Set cookie await page.setCookie({ name: 'token', value: 'abc' })
Emulate device await page.emulate(puppeteer.devices['iPhone 12'])

Deep Patterns → reference/playbook.md

§ Section Lines
1 Production Setup & Configuration Launch options, Jest integration
2 Page Object Pattern BasePage, LoginPage, DashboardPage
3 Network Interception & Mocking Request mock, response capture
4 Wait Strategies DOM, network, custom conditions
5 Screenshots, PDF & Media Full page, clip, PDF, video
6 Authentication & Cookies API login, session save/restore
7 iFrame, Dialog & File Operations Upload, download, dialogs
8 Performance & Metrics Web Vitals, Lighthouse, coverage
9 Accessibility Testing axe-core integration
10 CI/CD Integration GitHub Actions, Docker
11 Debugging Quick-Reference 11 common problems
12 Best Practices Checklist 13 items

Limitations

  • Use this skill only when the task clearly matches its upstream source and local project context.
  • Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
  • Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.
자주 묻는 질문

'헤드리스 크롬'이란 무엇인가요?

화면에 창을 띄우지 않고 실행되는 크롬 브라우저입니다. 자동화에 적합합니다.

'스크래핑'은 무엇을 뜻하나요?

웹사이트에서 데이터를 자동으로 추출하는 과정입니다.

이것으로 웹사이트에 로그인할 수 있나요?

네, 생성된 코드에 사용자 이름과 비밀번호를 입력하는 단계를 포함할 수 있습니다.

상세 정보

작성자의 원본 설명

Generates Puppeteer scripts for browser automation, scraping, and PDF generation. Triggers on: "Puppeteer", "headless Chrome", "page.goto", "scrape", "PDF generation".

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5536
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬