-
Notifications
You must be signed in to change notification settings - Fork 20
feat(skills): add PatternFly 6 development skill for Claude Code #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
guimou
wants to merge
1
commit into
main
Choose a base branch
from
claude-skill
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,4 +5,7 @@ | |
| .git/ | ||
|
|
||
| # macOS | ||
| .DS_Store | ||
| .DS_Store | ||
|
|
||
| # Claude | ||
| .claude | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| # AGENTS.md | ||
|
|
||
| This file provides guidance to AI agents when working with code in this repository. | ||
|
|
||
| ## Repository Purpose | ||
|
|
||
| This is a **documentation and AI knowledge base repository** for PatternFly development. It provides indexed documentation, guidelines, and best practices that AI coding tools (Cursor, Copilot, ChatGPT, Claude) can use to generate accurate PatternFly code. | ||
|
|
||
| **This repository contains no runnable code** - it consists of markdown documentation files that should be copied into target projects. | ||
|
|
||
| ## Documentation Structure | ||
|
|
||
| - `.pf-ai-documentation/` - Main documentation directory | ||
| - `README.md` - Table of contents and navigation hub | ||
| - `setup/` - Project initialization and environment setup | ||
| - `guidelines/` - Core development principles and standards | ||
| - `components/` - Component-specific rules (layout, data display) | ||
| - `charts/` - PatternFly Charts (Victory.js/ECharts) rules | ||
| - `chatbot/` - PatternFly Chatbot implementation rules | ||
| - `component-groups/` - React Component Groups rules | ||
| - `troubleshooting/` - Common issues and solutions | ||
|
|
||
| - `.cursor/rules/` - Cursor IDE rules that auto-apply to PatternFly code | ||
|
|
||
| ## Key PatternFly Development Rules | ||
|
|
||
| When generating or reviewing PatternFly code, always follow these rules: | ||
|
|
||
| ### Version Requirements | ||
|
|
||
| - **Always use PatternFly v6** - Use `pf-v6-` prefixed classes only | ||
| - Use `pf-t-` prefixed tokens over `pf-v6-` tokens (e.g., `var(--pf-t--global--spacer--sm)`) | ||
| - Use `<Content component="h1">` instead of deprecated `<Text component="h1">` | ||
|
|
||
| ### Import Patterns | ||
|
|
||
| **Charts (CRITICAL):** | ||
|
|
||
| ```jsx | ||
| // ✅ Correct - MUST include /victory | ||
| import { ChartDonut } from '@patternfly/react-charts/victory'; | ||
|
|
||
| // ❌ Wrong - causes "Module not found" errors | ||
| import { ChartDonut } from '@patternfly/react-charts'; | ||
| ``` | ||
|
|
||
| **Chatbot:** | ||
|
|
||
| ```jsx | ||
| // ✅ Correct - use dynamic imports | ||
| import { Chatbot } from '@patternfly/chatbot/dist/dynamic/Chatbot'; | ||
|
|
||
| // ❌ Wrong | ||
| import { Chatbot } from '@patternfly/chatbot'; | ||
| ``` | ||
|
|
||
| **Component Groups:** | ||
|
|
||
| ```jsx | ||
| // ✅ Correct - use dynamic imports | ||
| import { BulkSelect } from '@patternfly/react-component-groups/dist/dynamic/BulkSelect'; | ||
| ``` | ||
|
|
||
| ### Required CSS Imports | ||
|
|
||
| ```jsx | ||
| import '@patternfly/patternfly/patternfly-charts.css'; // For charts | ||
| import '@patternfly/chatbot/dist/css/main.css'; // For chatbot | ||
| import '@patternfly/react-component-groups/dist/css/main.css'; // For component groups | ||
| ``` | ||
|
|
||
| ### Common AI Mistakes to Avoid | ||
|
|
||
| - ❌ `className={styles.x}` - CSS modules syntax doesn't work | ||
| - ❌ Using non-existent components without verification | ||
| - ❌ Inline styles for layout (use PatternFly utilities) | ||
| - ❌ Hardcoded colors (use design tokens) | ||
| - ❌ Missing accessibility attributes (ARIA labels, keyboard navigation) | ||
|
|
||
| ## Reference Resources | ||
|
|
||
| - [PatternFly.org](https://www.patternfly.org/) - Primary documentation | ||
| - [PatternFly React GitHub](https://github.com/patternfly/patternfly-react) - Source code and examples | ||
| - [PatternFly React Seed](https://github.com/patternfly/patternfly-react-seed) - Recommended starter for new projects |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| @AGENTS.md | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Root files like CLAUDE.md, README.md, and .gitignore have changed significantly since this PR was opened — these modifications will conflict with main. A skill contribution should only add files under
plugins/, not modify root config.