Beyond-UI Helper
Quick Start Workflow
- 1. Plan the environment
- Confirm Node ≥ 18 and npm ≥ 9 (or matching pnpm/yarn versions).
- Decide if the host app already uses Tailwind. If not, the packaged CSS still works—Tailwind becomes optional for theme overrides.
- When upgrading, check open Trello cards (#8–#12, #16, #17, etc.) and
docs/security-dx-notes.md for pending fixes before bumping versions.
- 2. Install the package
- Run the install script bundled with this skill:
scripts/install-beyond-ui.sh. It installs
@beyondcorp/beyond-ui plus missing peer deps.
- For manual install, see
references/setup.md for npm/pnpm/yarn equivalents and monorepo guidance.
- 3. Wire the generated stylesheet
- Use
scripts/add-css-import.js to inject
import '@beyondcorp/beyond-ui/dist/styles.css'; into the app entry (main.tsx / index.jsx / etc.).
- Confirm the import sits above app-specific CSS to keep token overrides predictable.
- 4. Verify setup
- Execute
scripts/verify-setup.sh to run lint, test, and build—mirrors CONTRIBUTING requirements.
- If Storybook is needed, run
npm run storybook (documented in
references/workflow.md).
- 5. Add components via templates
- Browse
assets/examples/components/**.tsx for ready-to-drop snippets grouped by category (forms, data-display, layout, auth, marketing, utilities).
- Load
references/components.md to locate snippets per component and guidance on combining them into full screens.
- Use
references/hooks.md for utilities like
useDarkMode,
useBreakpoint,
useIntersectionObserver.
- 6. Align theming
- Import defaults from
@beyondcorp/beyond-ui/dist/styles.css immediately for a working palette.
- To brand your app, follow
references/theming.md: extend Tailwind tokens (
primary,
secondary,
accent, etc.) and restart the build.
- Snippets assume semantic tokens; adjust Tailwind overrides according to your brand.
- 7. Troubleshoot
- Consult
references/known-issues.md to triage npm audit advisories, Storybook upgrade gaps, browserslist refresh tasks, clipboard API fallbacks, and other DX notes.
- For version bumps, track Storybook 10 migration, vite-plugin-dts upgrades, and tsup/rollup advisories before publishing.
Packaging & Release Guidelines
- - Keep this skill co-located with the Beyond-UI repo for shared PR review.
- Use
scripts/package_skill.py skills/public/beyond-ui-helper (from repo root) to validate and create a .skill artifact. - Publish via
clawhub sync --root skills/public/beyond-ui-helper --changelog "<notes>" --tags "latest,beyond-ui" once tests pass. Include install instructions, change summary, and reference the Trello ticket in PRs per CONTRIBUTING. - Consider wiring CI to run
npm run lint, npm test, npm run build, and npm run build-storybook before packaging to mirror library standards.
Resource Map
| Need | Resource |
|---|
| Install commands, CSS import steps, monorepo notes | references/setup.md |
| Theme token overrides, Sidebar/Dashboard layout tips |
references/theming.md |
| Component catalogue + snippet index |
references/components.md |
| Hooks & utilities quick reference |
references/hooks.md |
| Contributor workflow (scripts, Storybook, tests) |
references/workflow.md |
| Security/DX caveats and Trello task context |
references/known-issues.md |
| Ready-to-use code snippets |
assets/examples/components/*/*.tsx |
Scripts live under scripts/—open them to review parameters before running.
Reference Usage
When using this skill:
- - Load
references/setup.md first if the host project has never seen Beyond-UI. - Load
references/theming.md when customizing palettes or Dashboard layout styling. - Load
references/components.md to pick snippet(s) for forms, dashboards, marketing, auth, utilities, etc. - Pull actual code from
assets/examples/components/** and adapt tokens/props as needed. - Load
references/hooks.md when wiring stateful utilities; check references/known-issues.md before publishing or when audit warnings appear.
Keep response outputs concise—link to references/snippets rather than duplicating full docs. Update references and templates as Beyond-UI evolves so downstream agents stay aligned.
Beyond-UI 助手
快速入门工作流
- 1. 规划环境
- 确认 Node ≥ 18 且 npm ≥ 9(或匹配的 pnpm/yarn 版本)。
- 判断宿主应用是否已使用 Tailwind。若未使用,打包后的 CSS 仍可正常工作——Tailwind 成为主题覆盖的可选项。
- 升级时,在更新版本前检查开放的 Trello 卡片(#8–#12、#16、#17 等)和 docs/security-dx-notes.md 中待修复的问题。
- 2. 安装包
- 运行本技能附带的安装脚本:scripts/install-beyond-ui.sh。该脚本会安装 @beyondcorp/beyond-ui 及缺失的对等依赖。
- 如需手动安装,请参阅
references/setup.md 了解 npm/pnpm/yarn 等效命令和 monorepo 指南。
- 3. 接入生成的样式表
- 使用 scripts/add-css-import.js 将 import @beyondcorp/beyond-ui/dist/styles.css; 注入到应用入口文件(main.tsx / index.jsx 等)。
- 确认该导入语句位于应用特定 CSS 之上,以确保令牌覆盖的可预测性。
- 4. 验证设置
- 执行 scripts/verify-setup.sh 运行 lint、测试和构建——与 CONTRIBUTING 要求保持一致。
- 如需 Storybook,运行 npm run storybook(文档见
references/workflow.md)。
- 5. 通过模板添加组件
- 浏览 assets/examples/components/
.tsx 获取按类别(表单、数据展示、布局、认证、营销、工具)分组的即用代码片段。
- 加载
references/components.md 查找每个组件的代码片段以及组合成完整页面的指南。
- 使用
references/hooks.md 了解 useDarkMode、useBreakpoint、useIntersectionObserver 等工具。
- 6. 对齐主题
- 立即导入 @beyondcorp/beyond-ui/dist/styles.css 的默认值以获得可用的调色板。
- 如需品牌化应用,请遵循
references/theming.md:扩展 Tailwind 令牌(primary、secondary、accent 等)并重新启动构建。
- 代码片段假定使用语义令牌;根据品牌调整 Tailwind 覆盖。
- 7. 故障排除
- 查阅
references/known-issues.md 处理 npm audit 建议、Storybook 升级差距、browserslist 刷新任务、剪贴板 API 回退及其他开发者体验说明。
- 版本升级时,在发布前跟踪 Storybook 10 迁移、vite-plugin-dts 升级和 tsup/rollup 建议。
打包与发布指南
- - 保持此技能与 Beyond-UI 仓库位于同一位置,以便共享 PR 审查。
- 使用 scripts/package_skill.py skills/public/beyond-ui-helper(从仓库根目录)验证并创建 .skill 工件。
- 测试通过后,通过 clawhub sync --root skills/public/beyond-ui-helper --changelog <说明> --tags latest,beyond-ui 发布。包含安装说明、变更摘要,并在 PR 中引用 Trello 卡片(遵循 CONTRIBUTING)。
- 考虑配置 CI 在打包前运行 npm run lint、npm test、npm run build 和 npm run build-storybook,以镜像库标准。
资源映射
references/theming.md |
| 组件目录 + 代码片段索引 |
references/components.md |
| 钩子与工具快速参考 |
references/hooks.md |
| 贡献者工作流(脚本、Storybook、测试) |
references/workflow.md |
| 安全/开发者体验注意事项和 Trello 任务上下文 |
references/known-issues.md |
| 即用代码片段 | assets/examples/components/
/.tsx |
脚本位于 scripts/ 目录下——运行前请打开查看参数。
参考用法
使用此技能时:
- - 如果宿主项目从未使用过 Beyond-UI,首先加载 references/setup.md。
- 自定义调色板或仪表盘布局样式时,加载 references/theming.md。
- 选择表单、仪表盘、营销、认证、工具等代码片段时,加载 references/components.md。
- 从 assets/examples/components/ 获取实际代码,并根据需要调整令牌/属性。
- 接入有状态工具时,加载 references/hooks.md;发布前或出现审计警告时,检查 references/known-issues.md。
保持输出简洁——链接到参考资料/代码片段而非重复完整文档。随着 Beyond-UI 的演进更新参考资料和模板,使下游代理保持同步。