Agent skill

Selector Self Heal

by DanielSuo117 in DanielSuo117/velocitai

复核运行期自愈提案并写回 PageObject。触发:选择器失效、定位符漂移、自愈提案、proposals.jsonl、用例误报不通过。

MITAuto-check passedSales & Support

Install Selector Self Heal

skills CLI
$ npx skills add DanielSuo117/velocitai --skill selector-self-heal -a claude-code

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

GitHub CLI
$ gh skill install DanielSuo117/velocitai selector-self-heal --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/DanielSuo117/velocitai.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/selector-self-heal .claude/skills/selector-self-heal && 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-self-heal
GitHub stars
158
Token cost
~459 tokens
SKILL.md length
102 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
MIT

At a glance

复核运行期自愈提案并写回 PageObject。触发:选择器失效、定位符漂移、自愈提案、proposals.jsonl、用例误报不通过。

  • Works in 4 steps: 读提案 → 逐条判定 → 写回 → …
  • Tasks that involve Proposals and quotes
  • SKILL.md covers 适用场景, 机制分工, 复核流程 and 禁止事项
  • Calls python3

What it does

Selector Self Heal is an agent skill from DanielSuo117/velocitai. 复核运行期自愈提案并写回 PageObject。触发:选择器失效、定位符漂移、自愈提案、proposals.jsonl、用例误报不通过。

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

It sits in Sales & Support, covering Proposals and quotes. The repository describes itself as: Next-generation UI automation harness powered by Python & Playwright. Chat with AI Agents to seamlessly generate, architect, and execute enterprise-grade UI test code. The licence is MIT.

When your agent uses it

  • Tasks that involve Proposals and quotes

Example prompts

  • “/selector-self-heal”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. 读提案
  2. 逐条判定
  3. 写回
  4. 收尾

What it can do on your machine

Read from SKILL.md and the folder at commit dfcca7e. 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

    Shell commands in SKILL.md call:

    • python3

    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 Self Heal loads about 459 tokens when it runs. Until then it costs about 22 tokens; SKILL.md has 102 words of instructions outside code blocks.

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

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 DanielSuo117/velocitai at commit dfcca7e, republished under its MIT licence (© DanielSuo117). 102 words, ~459 tokens.

Download SKILL.mdSave it as .claude/skills/selector-self-heal/SKILL.md (or your agent's skills folder).
name
selector-self-heal
description
复核运行期自愈提案并写回 PageObject。触发:选择器失效、定位符漂移、自愈提案、proposals.jsonl、用例误报不通过。

选择器自愈 — 复核与写回

适用场景

  • 带 --self-heal=on|strict 跑完回归后,终端汇总里出现「选择器自愈」段落
  • 用例失败但功能实际正常,怀疑是定位符过期而非真实缺陷
  • 需要把运行期的临时修复固化回源码

不适用:首次编写定位符(用 locator-replacer);页面真的少了元素(那是真缺陷,不是漂移)。


机制分工

运行期只做两件事:找出可用的替代定位符让用例继续,并把提案写进 reports/self-heal/proposals.jsonl。运行期绝不改源码。 写回是本 skill 的职责,且要经人确认与落库闸门。

这条分界不是洁癖。测试进程里自动改源码,意味着一次跑飞的回归可以静默重写 整个 PageObject 层,而改动淹没在测试输出里没人看见。


复核流程

1. 读提案
bash
python3 -c "import json;[print(json.dumps(json.loads(l),ensure_ascii=False,indent=2)) for l in open('reports/self-heal/proposals.jsonl')]"

每条提案含:intent(常量名、原选择器、注释说明、历史指纹)、 candidates(全部候选及置信度与理由)、chosen(运行期实际采用者,可能为 null)。

2. 逐条判定
现象结论
chosen 为 null,且候选列表为空元素真的不在了 → 真缺陷,不要写回,去查功能
chosen 的 strategy 是 testid 或 id锚点稳定 → 可写回
chosen 的 strategy 是 text文案改动即失效 → 写回前先找有没有 testid 可用
chosen 的 strategy 是 stable-class样式重构即失效 → 优先向前端要 testid
同一常量反复出现在提案里该定位符本身选得不好 → 重新设计,别反复打补丁

触发:chosen 非 null 但 intent 的指纹字段全为 null 时,必须人工确认—— 没有历史指纹意味着判定只依赖注释说明,证据比平时弱。

3. 写回

写回目标是 PageObject 类顶部的定位符常量,只改选择器字符串,不动常量名:

python
# 改前
LOGIN_BUTTON = "#login-btn"          # P0: 登录按钮
# 改后
LOGIN_BUTTON = '[data-testid="login-submit"]'   # P0: 登录按钮

常量名是全项目引用点,改名会波及所有用例;注释是下次自愈的意图来源, 删掉等于自断依据。

4. 收尾
  • 写回后重跑该用例,不带 --self-heal,确认真绿
  • 确认后清空 proposals.jsonl,避免旧提案被反复复核
  • 若修改涉及定位策略的通用经验,按自我进化机制沉淀(先过落库闸门)

禁止事项

  • 不要把 chosen 为 null 的提案「想办法修好」——那是真缺陷的信号
  • 不要为了让用例变绿而放宽 MIN_CONFIDENCE
  • 不要批量写回:逐条看 strategy 与 confidence,低置信的宁可留着人工处理

相关:自愈边界规则 · locator-replacer · 落库闸门

© DanielSuo117, MIT. 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 skills/selector-self-heal of DanielSuo117/velocitai.

Open the folder on GitHubat commit dfcca7e

Compare with similar skills

Selector Self Heal 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 Self Heal compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Selector Self Heal this skillDanielSuo117/velocitai158—~459Automated safety check: PassMIT
Doc Coauthoringaws-samples/sample-strands-agent-with-agentcore19540 repos~3.2kAutomated safety check: PassMIT
Audit Onboarding Proposalhoangnb24/repository-harness1.2k—~4kAutomated safety check: PassMIT
No Negative EchoLB623/no-negative-echo900—~965Automated safety check: PassMIT
GEO Service Proposal Generatorzubair-trabzada/geo-seo-claude11k—~3kAutomated safety check: NotesMIT
Architectural ProposalsFritzAndFriends/SharpSite1452 repos~1.6kAutomated safety check: PassMIT

Similar skills

  • Doc Coauthoring

    aws-samples/sample-strands-agent-with-agentcore

    Official

    Guide users through a structured workflow for co-authoring documentation.

    195 GitHub starsUsed in 40 repos~3.2k tokens
    Sales & SupportAuto-check passed
  • Audit Onboarding Proposal

    hoangnb24/repository-harness

    Use only when the user explicitly invokes $audit-onboarding-proposal.

    1.2k GitHub stars~4k tokensUpdated 6 days ago
    Sales & SupportAuto-check passed
  • No Negative Echo

    LB623/no-negative-echo

    Prevent 此地无银三百两式 residue: finalize artifacts without echoing rejected session-only alternatives into labels, metadata, commits, PRs, or handoffs.

    900 GitHub stars~965 tokensUpdated 1 mo ago
    Sales & SupportAuto-check passed
  • GEO Service Proposal Generator

    zubair-trabzada/geo-seo-claude

    Builds a client-ready AI-search-optimization proposal from an existing GEO audit, with pricing tiers, an ROI estimate and a markdown document ready to send.

    11k GitHub stars~3k tokensUpdated today
    Sales & SupportAuto-check: notes
  • Architectural Proposals

    FritzAndFriends/SharpSite

    How to write comprehensive architectural proposals that drive alignment before code is written

    145 GitHub starsUsed in 2 repos~1.6k tokens
    Sales & SupportAuto-check passed
  • Counter Proposal Generator

    zubair-trabzada/ai-legal-claude

    Generates specific counter-proposals for every unfavorable clause, with replacement language, negotiation talking points, and a ready-to-send email template

    1.8k GitHub stars~2.4k tokensUpdated 6 mo ago
    Sales & SupportAuto-check passed

More from DanielSuo117/velocitai

All 13 skills in this repo
  • Architecture

    DanielSuo117/velocitai

    POM 分层与 context 共享决策树。触发:架构、分层、POM、Page Object、基类设计、新增角色. An agent skill from DanielSuo117/velocitai.

    158 GitHub stars~726 tokensUpdated 12 days ago
    Auto-check passed
  • Locator Replacer

    DanielSuo117/velocitai

    替换占位定位符为真实选择器(六级优先级)。触发:替换定位符、locator、selector、定位失败、元素找不到、DOM 分析。

    158 GitHub stars~703 tokensUpdated 12 days ago
    Auto-check passed
  • Page Load Assertion

    DanielSuo117/velocitai

    ispageloaded() 四种验证模式与调用层级。触发:页面断言、ispageloaded、page loaded、页面加载验证。

    158 GitHub stars~776 tokensUpdated 12 days ago
    Auto-check passed
  • Quick Debug

    DanielSuo117/velocitai

    测试失败时免登跳转原地排查修复。触发:排查、纠错、debug、定位符失败、超时、元素找不到、断言失败. An agent skill from DanielSuo117/velocitai.

    158 GitHub stars~471 tokensUpdated 12 days ago
    Auto-check passed
  • Save Verify Strategy

    DanielSuo117/velocitai

    表单保存后验证(Toast / 重定向 / 数据对比 / 富文本清空)。触发:保存验证、toast、重定向检测、Meta+A、保存成功判断。

    158 GitHub stars~547 tokensUpdated 12 days ago
    Auto-check passed
  • Test Runner

    DanielSuo117/velocitai

    运行 pytest + 结构化分析失败原因。触发:运行测试、跑测试、run test、pytest、失败分析、allure。

    158 GitHub stars~404 tokensUpdated 12 days ago
    Auto-check passed

Categories

Questions about Selector Self Heal

What does Selector Self Heal do?

复核运行期自愈提案并写回 PageObject。触发:选择器失效、定位符漂移、自愈提案、proposals.jsonl、用例误报不通过。. Selector Self Heal is an agent skill from DanielSuo117/velocitai.

When should I use Selector Self Heal?

Selector Self Heal fits situations like: tasks that involve Proposals and quotes.

How do I install Selector Self Heal in Claude Code?

Run `npx skills add DanielSuo117/velocitai --skill selector-self-heal -a claude-code`. Or copy the skill folder (skills/selector-self-heal in DanielSuo117/velocitai) into .claude/skills/selector-self-heal in your project. Claude Code loads it when a task matches its description.

How do I install Selector Self Heal in Codex?

Run `npx skills add DanielSuo117/velocitai --skill selector-self-heal -a codex`. Or copy the skill folder (skills/selector-self-heal in DanielSuo117/velocitai) into .agents/skills/selector-self-heal in your project. Codex loads it when a task matches its description.

Can I use Selector Self Heal 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 DanielSuo117/velocitai --skill selector-self-heal -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-self-heal, .gemini/skills/selector-self-heal, .github/skills/selector-self-heal and .opencode/skills/selector-self-heal in your project.

What does Selector Self Heal need to run?

Going by SKILL.md and its folder, Selector Self Heal needs the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Selector Self Heal 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 Self Heal 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 Self Heal use?

Selector Self Heal is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Selector Self Heal use?

About 459 tokens (SKILL.md is roughly 1.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 Self Heal?

Skills that share tags, products or a category with Selector Self Heal: Doc Coauthoring (aws-samples/sample-strands-agent-with-agentcore, 195 stars), Audit Onboarding Proposal (hoangnb24/repository-harness, 1.2k stars), No Negative Echo (LB623/no-negative-echo, 900 stars) and GEO Service Proposal Generator (zubair-trabzada/geo-seo-claude, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Selector Self Heal?

DanielSuo117 (a GitHub user) maintains it in DanielSuo117/velocitai, which has 158 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on September 27, 2026.

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