Skip to content

Commit ac74bd2

Browse files
committed
UXDENG-394: Create react claude code plugin with agents/commands for standards and test gen
1 parent 8c557a5 commit ac74bd2

File tree

7 files changed

+1094
-1
lines changed

7 files changed

+1094
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The primary aim is to offer a comprehensive, AI-friendly knowledge base and star
1414
## Core Components
1515
The core components of this repository are the README and markdown files found throughout the project. These files provide indexed documentation, guidelines, and best practices to support AI-assisted PatternFly development, regardless of which AI coding tool you use.
1616

17-
- **Table of Contents:** See [`.pf-ai-documentation/README.md`](documentation/README.md) for a full table of contents and navigation to all rules, guides, and best practices.
17+
- **Table of Contents:** See [`.pf-ai-documentation/README.md`](.pf-ai-documentation/README.md) for a full table of contents and navigation to all rules, guides, and best practices.
1818

1919
## Using This Documentation with Cursor and AI Tools
2020

@@ -52,6 +52,14 @@ To get the full benefit of these docs and rules:
5252
> 3. Save and restart your client/editor.
5353
> 4. For more details and setup instructions for other editors, see the official guide: https://github.com/upstash/context7#installation
5454
55+
## Claude Code plugins
56+
57+
For [Claude Code](https://code.claude.com) users, this repository includes plugins with agents for PatternFly development.
58+
59+
See [`claude-code/`](claude-code/) for available plugins and installation instructions.
60+
61+
---
62+
5563
## Reference Documentation
5664
- [PatternFly.org](https://www.patternfly.org/)
5765
- [PatternFly React GitHub Repository](https://github.com/patternfly/patternfly-react)

claude-code/README.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
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. Clone this repo (can be anywhere on your machine)
20+
git clone https://github.com/patternfly/patternfly-ai-coding.git
21+
cd patternfly-ai-coding
22+
23+
# 2. Register the plugin with Claude Code
24+
/plugin marketplace add patternfly/patternfly-ai-coding --local claude-code/plugins/pf-react
25+
26+
# 3. Install the plugin
27+
/plugin install pf-react
28+
```
29+
30+
Done! The agents are now available globally.
31+
32+
## Using the agents
33+
34+
Use these agents from any project directory:
35+
36+
```bash
37+
cd ~/my-patternfly-app # Any project directory
38+
claude
39+
40+
# Use the agents
41+
/coding-standards # PatternFly React coding standards
42+
/test-generator # Generate tests for components
43+
```
44+
45+
## What's included
46+
47+
The `pf-react` plugin provides two agents:
48+
49+
### coding-standards
50+
PatternFly v6 React coding standards based on official PatternFly guidelines:
51+
- Component composition patterns
52+
- Design token usage
53+
- Accessibility requirements (WCAG 2.1 Level AA)
54+
- React and TypeScript best practices
55+
- Testing standards
56+
57+
### test-generator
58+
Unit test generation following Testing Library best practices:
59+
- User behavior testing over implementation details
60+
- Accessibility testing patterns
61+
- Semantic queries and OUIA guidelines
62+
- Proper mocking patterns
63+
64+
## Updating
65+
66+
Get the latest version:
67+
68+
```bash
69+
cd ~/path/to/patternfly-ai-coding
70+
git pull
71+
/plugin install pf-react
72+
```
73+
74+
## How it works
75+
76+
- **One-time install** - Clone repo, register plugin, install (done once)
77+
- **Global availability** - Agents work in any project directory after installation
78+
- **No project setup needed** - Just run `/coding-standards` or `/test-generator` from any project
79+
80+
## Sources
81+
82+
The agents are based on:
83+
- [PatternFly.org](https://www.patternfly.org/) official documentation
84+
- [PatternFly React CONTRIBUTING.md](https://github.com/patternfly/patternfly-react/blob/main/CONTRIBUTING.md)
85+
- [PatternFly React Testing Wiki](https://github.com/patternfly/patternfly-react/wiki/React-Testing-Library-Basics,-Best-Practices,-and-Guidelines)
86+
- [React Testing Library](https://testing-library.com/docs/react-testing-library/intro) official documentation
87+
- [React.dev](https://react.dev/learn) official documentation
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "pf-react",
3+
"description": "PatternFly React coding standards and test generation agents",
4+
"version": "1.0.0",
5+
"author": {
6+
"name": "PatternFly Team",
7+
"url": "https://www.patternfly.org"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/patternfly/patternfly-ai-coding"
12+
},
13+
"license": "MIT"
14+
}

0 commit comments

Comments
 (0)