跳到正文
Skillpedia
测试10k · #11891

break

它能做什么

这个技能会在每一种可能出现的情况下展示某个界面部件,例如极长的文字或缺失的数据。适合希望查看组件在哪些情况下会失败的开发者和设计师。

适用场景

  • ✓当你想看看按钮、表单字段或卡片在超长文字或数据缺失时的表现的时候。
  • ✓当你需要在发布前检查单个组件的视觉问题时。
  • ✓当你想要一份并排显示所有场景、并突出失败之处的报告的时候。

技能链接

https://github.com/jakubkrehel/skills/blob/main/skills/break/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/jakubkrehel/skills/blob/main/skills/break/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请对我的个人资料名称输入框进行压力测试,并在测试页面上展示它可能出错的每一种方式。”

每周 5 个新技能,1 分钟读完。

工作原理

该技能会为每个现实场景(例如超长或空白内容)在一个临时页面上渲染该组件。然后你会得到一份可滚动的报告,其中标出了各个问题。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Break

This skill takes one component and renders it on a harness page under every scenario that can actually reach it. That page is the deliverable: a visual report the user scrolls through, every scenario side by side, with the breaks marked.

It observes rather than judges. A finding here is something that visibly broke on the page, named in the vocabulary of the domain skill that owns the fix. Reviewing code against a standard is interface-review and better-interface; exploring design alternatives is variant; working through a component's product states one at a time is state-machine.

Where variant insists on the real page, this skill isolates on purpose. You are not judging how the component looks in context. You are checking whether it defends itself when the content is worst-case.

The whole run is build, look once, report: minutes, not a session. Nothing in it justifies instrumentation, browser debugging or a second pass.

1. Scope one component

One component per run. "The settings page" is not a component; the profile form's text input is. Where the request spans several, list the candidates and ask which one to test.

Restate what the component is in one sentence: what it accepts, what it renders and where it will live.

2. Infer the scenarios from the component

Stress only what varies. A scenario earns a slot when the component accepts something that can take that shape in production. So read the component first: its props, its slots, its states and the data it renders.

scenarios.md holds the axes, the values on each and the cue that says whether an axis applies. Walk it against the component and keep only the axes whose cue matches. A text input gets content length and states, never item quantity. A static icon button with a fixed label gets container and environment, never long text.

Write the kept scenarios down before building, one line each. Then say which axes you dropped and why, in one line, so a wrong inference is cheap to catch.

3. Build the harness page

The harness page renders the component once per scenario in a single column, with a short text label above each instance.

A scratch route inside the app holds the real component, imported from the project and untouched. The route inherits the app's layout, fonts, global styles and providers for free.

Where the framework splits server from client components, the page is client code, "use client" in Next. Otherwise fixture data can silently vanish crossing that boundary, and the page renders empty.

Labels, container widths and fixture props are everything the page adds. No fonts or styles of its own, no simulated themes or token swaps, no probes. A component observed under any of those is a different component.

Feed scenarios as props and fixture data. The harness never imports production state, never wires to live data and production never imports from the harness.

4. Look once

Load the page once in a browser already at hand, skim every scenario top to bottom and note what visibly broke. "Text escapes the field's right edge", never "spacing feels tight". A predicted failure is not a finding.

With no browser at hand, say so and hand the URL over for the user to check. Launching, window-wrangling or debugging a browser is out of budget. When you skipped the look, the report is the URL and the scenario list, with no findings table and no page notes.

Then mark each break you did see on the page, a one-line note under that scenario's label, in a single edit. The page has to read as the report on its own.

5. Report what broke and stop

Report findings as a table, broken scenarios first:

Scenario Observed Owner
One unbreakable 60-character string Overflows the card, no wrap and no truncation better-typography
Zero items Blank region with no message better-writing

This skill owns no domain rules and issues no verdict.

"Everything survived" is a complete and useful report. Say which scenarios are on the page and where it is running, so the user can see every one themselves. End there rather than padding the result with preferences.

Do not fix anything unasked. On a request to fix, follow the owner skill's rules, then re-render the failing scenarios to confirm.

6. Leave the page up, delete it on request

The page is half the report, so it outlives the findings table. Leave it running. Delete it and its fixtures only when the user says they ar

常见问题

这会修改我的组件代码吗?

该技能会建立一个临时测试页面来观察组件。任何修复都是单独的步骤。

它能一次测试整个页面吗?

不能。它一次只针对一个组件,因此请选择页面中的一个部分,例如某个表单字段。

临时页面会保留在我的项目中吗?

该页面是临时的,因此完成后请让你的智能体将其删除。

详情

作者的原始描述

Renders a component you choose under every scenario that can reach it on a temporary page and stress tests it.

repo: jakubkrehel/skills

热度

GitHub 星标
10k
排名
#11891
许可证
MIT
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能