/pf-react:pf-deployfrom pf-react
Deploys a PatternFly React project to GitHub Pages via pfcli deploy. Manages build, asset paths, and git push. Triggers on mention of pfcli deploy or when publishing a demo/prototype.
Ships in pf-react. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Build the project and publish it to GitHub Pages with a single command. pfcli deploy runs the build, configures asset paths for project pages, enables GitHub Pages when possible, and pushes to the gh-pages branch.
Verify before deploying:
pfcli --version or patternfly-cli --version. If missing, install from patternfly/patternfly-cli.gh auth status must show a logged-in account with repo access.origin remote pointing at GitHub (git remote get-url origin). If missing, run pfcli init first.package.json must define a build script unless deploying prebuilt output with --no-build.Run from the project root (or pass the path as the final argument).
Task progress:
- [ ] Confirm prerequisites
- [ ] Commit or stash uncommitted work if the user wants a clean deploy
- [ ] Run pfcli deploy
- [ ] Share the live URL with the user
From the project root:
test -f package.json && git remote get-url origin
gh auth status
If there is no GitHub remote, run pfcli init in the project directory and follow its prompts to create or connect a repo.
If the user has uncommitted changes they want on GitHub before deploying, run pfcli save first.
Default deploy (build + publish dist/ to gh-pages):
pfcli deploy
Common options:
| Flag | Purpose |
|---|---|
-d, --dist-dir <dir> | Output directory (default: dist) |
--no-build | Deploy existing build output only |
-b, --branch <branch> | Deploy branch (default: gh-pages) |
--base <path> | Override public asset path (default: derived from repo name) |
Examples:
# Deploy a project in another directory
pfcli deploy ./my-app
# CRA or webpack output in build/
pfcli deploy -d build
# Skip build when dist/ is already built
pfcli deploy --no-build
# User/org site served from root (e.g. owner.github.io)
pfcli deploy --base /
For project repos (github.com/owner/my-app), pfcli deploy automatically sets Vite --base, webpack ASSET_PATH, or CRA PUBLIC_URL to /<repo>/.
If the app uses React Router, remind the user to set basename to match the public path (e.g. <BrowserRouter basename="/my-app">).
On success, the CLI prints the live URL:
https://<owner>.github.io/<repo>/https://<owner>.github.io/Tell the user the URL may take a minute to update on first deploy. If Pages is not enabled, they can set Settings → Pages → Source to the gh-pages branch.
| Error | Likely cause | Fix |
|---|---|---|
Please save your changes first... | No origin remote | Run pfcli init or add git remote add origin ... |
No package.json found | Wrong directory | cd to project root or pass the path |
No "build" script found | Missing build script | Add "build" to package.json or use --no-build -d <dir> |
Build output directory "dist" does not exist | Wrong output dir or failed build | Fix the build or pass -d with the correct directory |
| Blank page or missing assets | Wrong base path | Re-deploy; for custom hosting use --base /<repo>/ |
gh auth failures | GitHub CLI not authenticated | Run gh auth login |
Do not manually configure GitHub Actions or gh-pages npm scripts when pfcli deploy is available — the CLI handles build env vars, SPA 404.html, and Pages setup.
eval/cases/missing-prerequisites/annotations.yaml (opens in a new tab)eval/cases/missing-prerequisites/input.yaml (opens in a new tab)eval/cases/prebuilt-output/annotations.yaml (opens in a new tab)eval/cases/prebuilt-output/input.yaml (opens in a new tab)eval/cases/standard-deploy/annotations.yaml (opens in a new tab)eval/cases/standard-deploy/input.yaml (opens in a new tab)eval/eval.yaml (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
patternfly, pfcli, github-pages, react-deployment, deployment-automation
npx claudepluginhub rh-uxd/ai-helpers --plugin pf-react16 skills in this plugin
/pf-chart-genGenerate PatternFly chart components with theming, responsive sizing, and accessibility. Use when building charts, data visualizations, or dashboards with PatternFly./pf-chatbot-bundle-auditAudit PatternFly ChatBot imports for tree-shaking opportunities. Use when optimizing ChatBot bundle size or after upgrading @patternfly/chatbot.
/pf-component-checkAudit PatternFly React component nesting, wrapper hierarchies, and layout structure. Use when scanning for hierarchy violations or debugging spacing caused by missing wrapper components./pf-component-reuse-checkDetects custom React components in newly created or modified (uncommitted) code that overlap with PatternFly React components, suggests the PatternFly equivalent, and can replace the custom component then build to verify. Use when creating UI components, reviewing uncommitted React changes, or when the user asks to prefer PatternFly instead of a custom component./pf-context-genGenerate AI-friendly context files for PatternFly components. Use when preparing context for AI-assisted PF development, onboarding AI tools to a PF codebase, or assembling component references for prompt engineering./pf-design-comments-setupIntegrate @patternfly/design-comments into React apps for on-page design feedback, pinned comment threads, GitHub Issues sync, and Jira linking. Use when adding design comments, review overlays, or removing the commenting system from a PatternFly React project.Other plugins' skills for the same job