Skip to content

Latest commit

 

History

History
129 lines (98 loc) · 3.64 KB

File metadata and controls

129 lines (98 loc) · 3.64 KB

Contributing to Playwright Skill

Thank you for considering contributing to the Playwright Skill plugin for Claude Code!

How to Contribute

Reporting Bugs

If you find a bug, please create an issue on GitHub with:

  • Clear description of the problem
  • Steps to reproduce
  • Expected vs actual behavior
  • Your environment (OS, Node version, Playwright version)
  • Example code that demonstrates the issue

Suggesting Enhancements

Enhancement suggestions are welcome! Please:

  • Check existing issues first to avoid duplicates
  • Clearly describe the enhancement and its benefits
  • Provide examples of how it would be used

Pull Requests

  1. Fork the repository

    git clone https://github.com/zizzfizzix/playwright-skill.git
    cd playwright-skill
  2. Create a feature branch

    git checkout -b feature/your-feature-name
  3. Make your changes

    • Follow the existing code style
    • Add tests if applicable
    • Update documentation as needed
  4. Test your changes

    # Load the skill locally and test in Claude Code
    claude --plugin-dir ./
    # Then: "Write E2E tests for <some project>"
  5. Commit your changes

    git add .
    git commit -m "feat: add your feature description"
  6. Push to your fork

    git push origin feature/your-feature-name
  7. Create a Pull Request

    • Go to the original repository
    • Click "New Pull Request"
    • Select your fork and branch
    • Provide a clear description of your changes

Development Guidelines

Content Guidelines

The skill is two markdown files — contributions are primarily documentation changes.

  • Match the tone and conciseness of the existing content
  • Prefer short, direct sentences over long explanations
  • New code examples must use the locator API (getByRole, getByLabel, getByTestId); avoid CSS class/ID selectors
  • Keep all TypeScript examples valid — check types compile before submitting

SKILL.md Guidelines

  • Keep SKILL.md under 500 lines — move reference material to API_REFERENCE.md
  • Keep examples concise (8-15 lines)
  • headless: true is always the default — tests must run in CI without a display
  • Do not add console.log to test examples — it clutters CI output and is a code smell
  • Reference API_REFERENCE.md for advanced patterns (API mocking, POM, form submission)

Commit Messages

Use conventional commits format:

  • feat: New features
  • fix: Bug fixes
  • docs: Documentation changes
  • refactor: Code refactoring
  • test: Adding tests
  • chore: Maintenance tasks

Examples:

feat: add mobile device emulation helper
fix: correct webServer command for Vite projects in CI
docs: update installation instructions

File Structure

playwright-skill/
├── .claude-plugin/
│   ├── plugin.json          # Plugin metadata (name, version, author)
│   └── marketplace.json     # Marketplace distribution config
├── skills/playwright-test/
│   ├── SKILL.md             # Skill instructions — keep under 500 lines
│   └── API_REFERENCE.md     # Full @playwright/test API reference
├── README.md
├── CONTRIBUTING.md
└── LICENSE

Testing

Before submitting:

  1. Load locally with claude --plugin-dir ./ and test against a real project
  2. Verify SKILL.md examples produce working tests
  3. Check the skill triggers correctly in Claude Code — auto via description, and manually via /playwright-test

Questions?

Feel free to open an issue for discussion before starting work on major changes.

License

By contributing, you agree that your contributions will be licensed under the MIT License.