Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计通过

axe-core斧芯

Agent Skill

用于辅助无障碍访问检查、页面可用性审计和前端可访问性改进。它适合让 Agent 检查语义标签、键盘操作、颜色对比、ARIA 属性和自动化检测结果。使用时需要结合真实页面和浏览器验证,不应只依赖静态文本判断;涉及修复建议时,应兼顾设计系统、组件复用和 WCAG 等通用无障碍规范。

总安装

774

周安装

31

GitHub Stars

12

下载量

250
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:axe-core(斧芯)
来源仓库:https://github.com/claude-dev-suite/claude-dev-suite
仓库路径:skills/axe-core
安装命令:
npx skills add https://github.com/claude-dev-suite/claude-dev-suite --skill axe-core
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/claude-dev-suite/claude-dev-suite --skill axe-core

简介

用于前端无障碍访问自动化检测,支持语义标签、键盘操作和颜色对比检查。

  • 集成 axe-core 规则集,提供快速参考和 npm 安装配置说明。
  • 不替代手动屏幕阅读器测试,建议结合真实页面验证结果。
  • 安装命令:npx skills add https://github.com/claude-dev-suite/claude-dev-suite --skill axe-core
  • axe-core 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

axe-core - Quick Reference

When NOT to Use This Skill

  • Manual WCAG compliance audits - Use the wcag skill for understanding guidelines and manual testing
  • Screen reader testing - axe-core doesn't replace manual screen reader verification
  • Complex ARIA pattern implementation - Use wcag skill for ARIA authoring practices
  • Accessibility strategy planning - This is for test automation, not accessibility consulting
Deep Knowledge: Use mcp__documentation__fetch_docs with technology: axe-core for comprehensive documentation on rules, configuration, and integrations.

Setup Base

npm install -D @axe-core/react  # For React
npm install -D axe-core         # Core library

Pattern Essenziali

React DevTools Integration

import React from 'react';
import ReactDOM from 'react-dom/client';

if (process.env.NODE_ENV !== 'production') {
  import('@axe-core/react').then(axe => {
    axe.default(React, ReactDOM, 1000);
  });
}

Jest/Vitest Integration

import { axe, toHaveNoViolations } from 'jest-axe';

expect.extend(toHaveNoViolations);

test('should have no accessibility violations', async () => {
  const { container } = render(<MyComponent />);
  const results = await axe(container);
  expect(results).toHaveNoViolations();
});

Playwright Integration

import { test, expect } from '@playwright/test';
import AxeBuilder from '@axe-core/playwright';

test('should not have accessibility issues', async ({ page }) => {
  await page.goto('/');

  const accessibilityScanResults = await new AxeBuilder({ page }).analyze();

  expect(accessibilityScanResults.violations).toEqual([]);
});

// With specific rules
test('should pass WCAG AA', async ({ page }) => {
  await page.goto('/');

  const results = await new AxeBuilder({ page })
    .withTags(['wcag2a', 'wcag2aa'])
    .analyze();

  expect(results.violations).toEqual([]);
});

Cypress Integration

// cypress/support/commands.ts
import 'cypress-axe';

// In test
describe('Accessibility', () => {
  it('has no violations', () => {
    cy.visit('/');
    cy.injectAxe();
    cy.checkA11y();
  });
});

Programmatic Usage

import axe from 'axe-core';

async function checkAccessibility() {
  const results = await axe.run();

  if (results.violations.length > 0) {
    console.log('Violations:', results.violations);
  }
}

Anti-Patterns

Anti-PatternWhy It's WrongCorrect Approach
Running axe on empty/loading statesTests incomplete DOM, false negativesWait for content to load before running axe
Ignoring all violationsDefeats purpose of automated testingFix violations or document exceptions with reasoning
Testing only homepageMost accessibility issues in complex interactionsTest all critical user flows and components
Not configuring WCAG levelTests against all rules, may be too strictSet withTags(['wcag2a', 'wcag2aa']) for target level
Running axe synchronously in loopsSlow test executionUse Promise.all() for parallel execution
Committing violations to CIPrevents catching regressionsFail builds on new violations
Testing hidden/inactive componentsAxe tests invisible elements unnecessarilyUse exclude parameter for hidden sections
No baseline for legacy codeAll violations block progressCreate baseline, track improvements incrementally

Quick Troubleshooting

IssueDiagnosisSolution
axe finds no violations but page is inaccessibleAutomated tools catch only ~30-40% of issuesSupplement with manual keyboard and screen reader testing
"No violations" but form has issuesaxe doesn't test form logic/flowTest form submission, error handling manually
Timeout in Playwright axe testsLarge/complex page takes too longIncrease timeout or analyze specific regions
False positive on custom componentaxe rule doesn't understand patternUse disableRules or add proper ARIA to fix
Violations in third-party widgetsCan't modify external codeDocument exceptions, contact vendor, or replace widget
Different results in different browsersBrowser-specific rendering differencesRun axe in multiple browsers, use cross-browser test suite
CI fails but local passesEnvironment differences (timing, content)Ensure consistent test data and wait conditions
Too many violations to fix at onceLegacy codebase with extensive issuesCreate baseline, use --save flag to track improvements

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.47%
按下载量换算89

Claude

28.3%
按下载量换算71

Cursor

17.37%
按下载量换算43

Gemini CLI

9.95%
按下载量换算25

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills