Agent skill

Selector Generator

by revfactory in revfactory/harness-100

웹 페이지 데이터 추출을 위한 CSS/XPath 선택자를 체계적으로 생성하고 검증하는 스킬. An agent skill from revfactory/harness-100.

Apache-2.0Auto-check passed

Install Selector Generator

skills CLI
$ npx skills add revfactory/harness-100 --skill selector-generator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install revfactory/harness-100 selector-generator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .claude/skills && cp -r skills-src/ko/37-web-scraper/.claude/skills/selector-generator .claude/skills/selector-generator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
selector-generator
GitHub stars
1.3k
Token cost
~702 tokens
SKILL.md length
106 words
Files
1
Skills in repo
464
Repo updated
First seen
Licence
Apache-2.0

At a glance

웹 페이지 데이터 추출을 위한 CSS/XPath 선택자를 체계적으로 생성하고 검증하는 스킬. An agent skill from revfactory/harness-100.

  • SKILL.md covers 대상 에이전트, 선택자 전략 우선순위, 선택자 패턴 레시피 and XPath vs CSS 판단 기준, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Selector Generator is an agent skill from revfactory/harness-100. 웹 페이지 데이터 추출을 위한 CSS/XPath 선택자를 체계적으로 생성하고 검증하는 스킬. '선택자 만들어줘', 'CSS 선택자', 'XPath 작성', '데이터 추출 패턴', '파싱 규칙' 등 선택자 설계 시 사용한다. 단, 브라우저 DevTools 직접 조작은 이 스킬의 범위가 아니다.

Its SKILL.md is about 700 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The licence is Apache-2.0.

Example prompts

  • “CSS 선택자”
  • “XPath 작성”
  • “/selector-generator”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 8e8d35c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Selector Generator loads about 702 tokens when it runs. Until then it costs about 46 tokens; SKILL.md has 106 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~702

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from revfactory/harness-100 at commit 8e8d35c, republished under its Apache-2.0 licence (© revfactory). 106 words, ~702 tokens.

Download SKILL.mdSave it as .claude/skills/selector-generator/SKILL.md (or your agent's skills folder).
name
selector-generator
description
웹 페이지 데이터 추출을 위한 CSS/XPath 선택자를 체계적으로 생성하고 검증하는 스킬. '선택자 만들어줘', 'CSS 선택자', 'XPath 작성', '데이터 추출 패턴', '파싱 규칙' 등 선택자 설계 시 사용한다. 단, 브라우저 DevTools 직접 조작은 이 스킬의 범위가 아니다.

Selector Generator — CSS/XPath 선택자 생성 + 검증

parser-engineer의 선택자 작성 역량을 강화하는 스킬.

대상 에이전트

  • parser-engineer — HTML 파싱 시 정확한 선택자 설계
  • monitor-operator — 선택자 변경 감지 로직 구현

선택자 전략 우선순위

1순위: 고유 ID           → #product-price
2순위: data-* 속성       → [data-testid="price"]
3순위: 시맨틱 클래스      → .product-price
4순위: ARIA 속성         → [aria-label="가격"]
5순위: 구조적 선택자      → article > .info > span
6순위: 텍스트 XPath      → //span[contains(text(),"원")]
피해야 할 패턴
패턴문제점대안
.css-1a2b3cCSS-in-JS 해시 변경상위 시맨틱 요소
div>div>div>span구조 변경 취약의미 있는 클래스
:nth-child(7) 단독요소 변경 시 깨짐클래스+nth 조합

선택자 패턴 레시피

상품 목록
python
selectors = {
    "container": "ul.product-list > li",
    "name": ".product-name, h3.title",
    "price": {
        "current": ".sale-price, [data-price]",
        "original": ".original-price, del"
    },
    "image": "img.product-image::attr(src)",
    "link": "a.product-link::attr(href)",
    "pagination": {
        "next": "a.next, [rel='next']",
        "total": ".total-pages"
    }
}
게시판/뉴스
python
selectors = {
    "article_list": "article, .post-item",
    "title": "h2 > a, .article-title",
    "author": ".author, .writer",
    "date": "time::attr(datetime), .date",
    "content": "article .content, .post-body"
}
테이블
python
def table_to_dicts(html):
    headers = [th.text for th in select("thead th")]
    return [
        {h: cell.text for h, cell in zip(headers, row.select("td"))}
        for row in select("tbody tr")
    ]

XPath vs CSS 판단 기준

상황추천예시
ID/클래스 기반CSS#price
텍스트 포함 검색XPath//span[contains(text(),"원")]
부모 방향 탐색XPath//span[@class="price"]/parent::div
형제 관계XPath//dt[text()="가격"]/following-sibling::dd
조건부XPath//div[@class="item" and .//span[@class="sale"]]

선택자 견고성 점수 (0-100)

+30: ID 기반
+25: data-testid
+20: 시맨틱 클래스
+15: ARIA 속성
-10: nth-child 단독
-20: 해시 클래스
-30: 5단계+ 중첩

80-100: 안정 | 60-79: 보통 | 40-59: 취약 | 0-39: 위험

변경 감지 패턴

python
selector_health = {
    "selector": ".product-price",
    "expected_pattern": r"[\d,]+원",
    "expected_count_min": 1,
    "fallback_selectors": ["[data-price]", "span.price"],
    "status": "active"  # active | degraded | broken
}

데이터 정제 파이프라인

python
def clean_price(raw: str) -> int:
    return int(re.sub(r'[^\d]', '', raw))

def clean_date(raw: str) -> str:
    # 다양한 형식 → ISO 8601 변환

def clean_url(raw: str, base: str) -> str:
    return urljoin(base, raw)

© revfactory, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in ko/37-web-scraper/.claude/skills/selector-generator of revfactory/harness-100.

Open the folder on GitHubat commit 8e8d35c

Compare with similar skills

Selector Generator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Selector Generator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Selector Generator this skillrevfactory/harness-1001.3k—~702Automated safety check: PassApache-2.0
Generatealirezarezvani/claude-skills28k1 repos~1.1kAutomated safety check: PassMIT
Has Selectorthedaviddias/Front-End-Checklist74k—~547Automated safety check: PassMIT
Fal Generatenexu-io/open-design100k—~306Automated safety check: PassApache-2.0
Video Generationbytedance/deer-flow83k3 repos~1.4kAutomated safety check: PassMIT
CSS Minificationthedaviddias/Front-End-Checklist74k—~415Automated safety check: PassMIT

Similar skills

  • Generate

    alirezarezvani/claude-skills

    Generate Playwright tests. An agent skill from alirezarezvani/claude-skills.

    28k GitHub starsUsed in 1 repo~1.1k tokens
    Testing & QAAuto-check passed
  • Has Selector

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing stylesheets or components that use JavaScript to toggle classes on parent elements based on child state, form input values, or content presence — :has() may…

    74k GitHub stars~547 tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Fal Generate

    nexu-io/open-design

    Generate images and videos using fal.ai AI models. An agent skill from nexu-io/open-design.

    100k GitHub stars~306 tokensUpdated today
    Media & CreativeAuto-check passed
  • Video Generation

    bytedance/deer-flow

    Generates short videos from a structured JSON prompt, optionally guided by a reference image used as the first or last frame.

    83k GitHub starsUsed in 3 repos~1.4k tokens
    Media & CreativeAuto-check passed
  • CSS Minification

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing stylesheets, component styles, and responsive behavior related to Minify all CSS files.

    74k GitHub stars~415 tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • CSS Order

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing stylesheets, component styles, and responsive behavior related to Order CSS files correctly.

    74k GitHub stars~404 tokensUpdated yesterday
    Frontend & DesignAuto-check passed

More from revfactory/harness-100

All 464 skills in this repo
  • Anti Bot Analyzer

    revfactory/harness-100

    A skill for analyzing website anti-bot defense mechanisms and developing legitimate evasion strategies.

    1.3k GitHub stars~1.1k tokensUpdated 6 mo ago
    Auto-check passed
  • API Error Design Patterns

    revfactory/harness-100

    Reference for designing how an API reports failures: structured error codes, response shapes, client-friendly messages, an error catalog and retry or fallback advice.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed
  • API Security Checklist

    revfactory/harness-100

    Walks a backend-dev agent through OWASP API Top 10 checks, authentication and authorization patterns, and defense code during API design.

    1.3k GitHub stars~1.7k tokensUpdated 6 mo ago
    Auto-check passed
  • Arg Parser Generator

    revfactory/harness-100

    Methodology for systematically designing and generating CLI tool argument parser structures.

    1.3k GitHub stars~1.2k tokensUpdated 6 mo ago
    Auto-check passed
  • Audience Segmentation

    revfactory/harness-100

    Audience segmentation skill used by the analyst and curator agents.

    1.3k GitHub stars~1.3k tokensUpdated 6 mo ago
    Auto-check passed
  • Audio Storytelling

    revfactory/harness-100

    Audio storytelling skill used by the podcast scriptwriter and show note editor.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed

Questions about Selector Generator

What does Selector Generator do?

웹 페이지 데이터 추출을 위한 CSS/XPath 선택자를 체계적으로 생성하고 검증하는 스킬. An agent skill from revfactory/harness-100. Selector Generator is an agent skill from revfactory/harness-100. 웹 페이지 데이터 추출을 위한 CSS/XPath 선택자를 체계적으로 생성하고 검증하는 스킬.

How do I install Selector Generator in Claude Code?

Run `npx skills add revfactory/harness-100 --skill selector-generator -a claude-code`. Or copy the skill folder (ko/37-web-scraper/.claude/skills/selector-generator in revfactory/harness-100) into .claude/skills/selector-generator in your project. Claude Code loads it when a task matches its description.

How do I install Selector Generator in Codex?

Run `npx skills add revfactory/harness-100 --skill selector-generator -a codex`. Or copy the skill folder (ko/37-web-scraper/.claude/skills/selector-generator in revfactory/harness-100) into .agents/skills/selector-generator in your project. Codex loads it when a task matches its description.

Can I use Selector Generator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add revfactory/harness-100 --skill selector-generator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/selector-generator, .gemini/skills/selector-generator, .github/skills/selector-generator and .opencode/skills/selector-generator in your project.

What does Selector Generator need to run?

SKILL.md names no scripts, command-line tools or credentials: Selector Generator is instructions for the agent only. Our summary lists: Python 3.

Does Selector Generator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Selector Generator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Selector Generator use?

Selector Generator is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Selector Generator use?

About 702 tokens (SKILL.md is roughly 2.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Selector Generator?

Skills that share tags, products or a category with Selector Generator: Generate (alirezarezvani/claude-skills, 28k stars), Has Selector (thedaviddias/Front-End-Checklist, 74k stars), Fal Generate (nexu-io/open-design, 100k stars) and Video Generation (bytedance/deer-flow, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Selector Generator?

revfactory (a GitHub user) maintains it in revfactory/harness-100, which has 1,290 GitHub stars. The repository holds 464 skills in this directory. The repository was last updated on March 22, 2026.

Source: revfactory/harness-100 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.