|
| 1 | +# PatternFly Claude Code Resources |
| 2 | + |
| 3 | +This directory contains [Claude Code](https://code.claude.com) resources for PatternFly development. |
| 4 | + |
| 5 | +## Available resources |
| 6 | + |
| 7 | +### Plugins |
| 8 | +- **[pf-react](plugins/pf-react/)** - Coding standards and test generation agents for PatternFly React |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +## Installing plugins |
| 13 | + |
| 14 | +### pf-react plugin |
| 15 | + |
| 16 | +Once installed, these agents work across all your projects: |
| 17 | + |
| 18 | +```bash |
| 19 | +# 1. Add the PatternFly marketplace |
| 20 | +/plugin marketplace add patternfly/patternfly-ai-coding |
| 21 | + |
| 22 | +# 2. Install the plugin |
| 23 | +/plugin install pf-react@patternfly-ai-coding |
| 24 | +``` |
| 25 | + |
| 26 | +Done! The agents are now available globally. |
| 27 | + |
| 28 | +## Using the agents |
| 29 | + |
| 30 | +Use these agents from any project directory: |
| 31 | + |
| 32 | +```bash |
| 33 | +cd ~/my-patternfly-app # Any project directory |
| 34 | +claude |
| 35 | + |
| 36 | +# Use the agents |
| 37 | +/coding-standards # PatternFly React coding standards |
| 38 | +/test-generator # Generate tests for components |
| 39 | +``` |
| 40 | + |
| 41 | +## What's included |
| 42 | + |
| 43 | +The `pf-react` plugin provides two agents: |
| 44 | + |
| 45 | +### coding-standards |
| 46 | +PatternFly v6 React coding standards based on official PatternFly guidelines: |
| 47 | +- Component composition patterns |
| 48 | +- Design token usage |
| 49 | +- Accessibility requirements (WCAG 2.1 Level AA) |
| 50 | +- React and TypeScript best practices |
| 51 | +- Testing standards |
| 52 | + |
| 53 | +### test-generator |
| 54 | +Unit test generation following Testing Library best practices: |
| 55 | +- User behavior testing over implementation details |
| 56 | +- Accessibility testing patterns |
| 57 | +- Semantic queries and OUIA guidelines |
| 58 | +- Proper mocking patterns |
| 59 | + |
| 60 | +## Updating |
| 61 | + |
| 62 | +Get the latest version: |
| 63 | + |
| 64 | +```bash |
| 65 | +/plugin marketplace update patternfly-ai-coding |
| 66 | +/plugin install pf-react@patternfly-ai-coding |
| 67 | +``` |
| 68 | + |
| 69 | +## How it works |
| 70 | + |
| 71 | +- **One-time install** - Add marketplace and install plugin (done once) |
| 72 | +- **Global availability** - Agents work in any project directory after installation |
| 73 | +- **No project setup needed** - Just run `/coding-standards` or `/test-generator` from any project |
| 74 | +- **Direct from GitHub** - No need to clone the repository |
| 75 | + |
| 76 | +## Sources |
| 77 | + |
| 78 | +The agents are based on: |
| 79 | +- [PatternFly.org](https://www.patternfly.org/) official documentation |
| 80 | +- [PatternFly React CONTRIBUTING.md](https://github.com/patternfly/patternfly-react/blob/main/CONTRIBUTING.md) |
| 81 | +- [PatternFly React Testing Wiki](https://github.com/patternfly/patternfly-react/wiki/React-Testing-Library-Basics,-Best-Practices,-and-Guidelines) |
| 82 | +- [React Testing Library](https://testing-library.com/docs/react-testing-library/intro) official documentation |
| 83 | +- [React.dev](https://react.dev/learn) official documentation |
0 commit comments