Style Inspector by andreamk/ipsum-claude-marketplace
npx skills add https://github.com/andreamk/ipsum-claude-marketplace --skill 'Style Inspector'从网页的 DOM 元素中提取 CSS 样式(内联样式或计算样式)。
此技能在页面完全渲染后,从元素中获取 CSS 样式。它可以返回元素上的内联样式,也可以返回计算样式(应用所有 CSS 规则后的最终计算值)。
font-size,color,margin)。如果与 --computed 一起使用但省略此参数,则返回所有计算样式。使用 style-inspector.js 脚本配合 Puppeteer 来提取样式。该脚本位于插件的共享 scripts/ 目录中。
运行脚本前,检查插件的脚本目录中是否存在 node_modules。如果不存在,请安装依赖项:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# 检查并在需要时安装(从插件根目录运行)
[ -d "scripts/node_modules" ] || (cd scripts && npm install)
从插件根目录运行:
获取元素的内联样式:
node scripts/style-inspector.js "https://example.com" "h1"
获取特定的计算样式:
node scripts/style-inspector.js "https://example.com" "h1" "font-size,color,margin" --computed
获取所有计算样式(警告:输出可能很长):
node scripts/style-inspector.js "https://example.com" "h1" --computed
脚本位于插件根目录的 scripts/style-inspector.js(在多个技能间共享)。
返回包含请求样式的 JSON:
{
"selector": "h1",
"styles": {
"font-size": "32px",
"color": "rgb(0, 0, 0)",
"margin": "0px"
}
}
每周安装次数
–
代码仓库
GitHub 星标数
1
首次出现时间
–
安全审计
Extract CSS styles (inline or computed) from DOM elements on a web page.
This skill retrieves CSS styles from elements after the page has fully rendered. It can return either inline styles directly on the element or computed styles (the final calculated values after all CSS rules are applied).
font-size,color,margin). If omitted with --computed, returns all computed styles.Use the style-inspector.js script with Puppeteer to extract styles. The script is in the plugin's shared scripts/ directory.
Before running the script, check if node_modules exists in the plugin's scripts directory. If not, install dependencies:
# Check and install if needed (run from plugin root)
[ -d "scripts/node_modules" ] || (cd scripts && npm install)
Run from plugin root directory:
Get inline styles of an element:
node scripts/style-inspector.js "https://example.com" "h1"
Get specific computed styles:
node scripts/style-inspector.js "https://example.com" "h1" "font-size,color,margin" --computed
Get all computed styles (warning: long output):
node scripts/style-inspector.js "https://example.com" "h1" --computed
The script is located at scripts/style-inspector.js in the plugin root directory (shared across skills).
Returns JSON with the requested styles:
{
"selector": "h1",
"styles": {
"font-size": "32px",
"color": "rgb(0, 0, 0)",
"margin": "0px"
}
}
Weekly Installs
–
Repository
GitHub Stars
1
First Seen
–
Security Audits
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
109,600 周安装