-
Notifications
You must be signed in to change notification settings - Fork 8
feat(build): add script to update skills for Angular, React, and WebC… #1625
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
base: master
Are you sure you want to change the base?
Changes from all commits
0515b5b
66358db
a1334cc
f718052
3d78b44
ef30e60
a5cb495
ba69114
7dc0248
c13ddc0
24bea8d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| # LLM Agent Skills for Ignite UI for React | ||
|
|
||
| This directory contains skills for GitHub Copilot and other LLM agents to help developers use **Ignite UI for React** effectively in their applications. | ||
|
|
||
| ## What are Skills? | ||
|
|
||
| Skills are structured instructions that help AI agents understand and execute common tasks consistently. Each skill is a self-contained guide that provides step-by-step instructions, code examples, and best practices — all specific to React and the `igniteui-react` family of packages. | ||
|
|
||
| ## Available Skills | ||
|
|
||
| | Skill | Description | Use When | | ||
| | --- | --- | --- | | ||
| | [igniteui-react-components](./igniteui-react-components/SKILL.md) | Identify the right React components (`Igr*`) for a UI pattern, then install, import, and use them — JSX patterns, events, refs, forms | Choosing components or setting up and using them in React | | ||
| | [igniteui-react-customize-theme](./igniteui-react-customize-theme/SKILL.md) | Customize styling using CSS custom properties, Sass, and the theming system in a React context | Applying custom brand colors/styles | | ||
| | [igniteui-react-optimize-bundle-size](./igniteui-react-optimize-bundle-size/SKILL.md) | Reduce bundle size with granular imports, tree-shaking, and lazy loading | Optimizing production performance | | ||
|
|
||
| ## How to Use | ||
|
|
||
| When working with an AI agent like GitHub Copilot, reference skills by name or ask questions naturally: | ||
|
|
||
| ### Natural Questions | ||
|
|
||
| - "How do I add a data grid to my React app?" | ||
| - "What Ignite UI component should I use for a date picker?" | ||
| - "Help me customize the button colors to match my brand" | ||
| - "My bundle size is too large, how can I reduce it?" | ||
| - "How do I handle events on IgrCombo?" | ||
|
|
||
| ### Direct Skill Reference | ||
|
|
||
| - "Follow the igniteui-react-components skill for setting up my project" | ||
| - "Use the igniteui-react-customize-theme skill to help me style components" | ||
| - "Apply the igniteui-react-optimize-bundle-size skill to reduce my bundle" | ||
|
|
||
| ## Skill Structure | ||
|
|
||
| Each skill contains: | ||
|
|
||
| - **Example Usage**: Common questions or scenarios | ||
| - **When to Use**: Situations where the skill applies | ||
| - **Related Skills**: Other relevant skills to explore | ||
| - **Step-by-Step Instructions**: Detailed guidance with code examples | ||
| - **Common Issues & Solutions**: Troubleshooting guidance | ||
| - **Best Practices**: Recommended approaches | ||
| - **Additional Resources**: Further reading and documentation | ||
|
|
||
| ## Editor / Agent Setup | ||
|
|
||
| Most modern AI assistants (GitHub Copilot, Cursor, Windsurf, Claude Code, etc.) should auto-discover these skills from a specified location in the workspace or global profile. | ||
|
|
||
| For example, you can copy them into the agent-specific skills folder for your editor: | ||
|
|
||
| ### GitHub Copilot | ||
|
|
||
| Copy the skill files into your project's `.agents/skills/` directory: | ||
|
|
||
| ``` | ||
| .agents/ | ||
| skills/ | ||
| igniteui-react-components/ | ||
| SKILL.md | ||
| reference/ | ||
| igniteui-react-customize-theme/ | ||
| SKILL.md | ||
| reference/ | ||
| igniteui-react-optimize-bundle-size/ | ||
| SKILL.md | ||
| ``` | ||
|
|
||
| ### Claude Code | ||
|
|
||
| Copy the skill files into your project's `.claude/skills/` directory: | ||
|
|
||
| ``` | ||
| .claude/ | ||
| skills/ | ||
| igniteui-react-components/ | ||
| SKILL.md | ||
| reference/ | ||
| igniteui-react-customize-theme/ | ||
| SKILL.md | ||
| reference/ | ||
| igniteui-react-optimize-bundle-size/ | ||
| SKILL.md | ||
| ``` | ||
|
|
||
| ### Other Agents (Cursor, Windsurf, etc.) | ||
|
|
||
| Consult your agent's documentation for the correct skills directory path and copy the skill files there. The skill structure is agent-agnostic — any assistant that supports skill files can use them directly. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| # LLM Agent Skills for End Users | ||
|
|
||
| This directory contains skills for GitHub Copilot and other LLM agents to help developers use Ignite UI Web Components effectively in their applications. | ||
|
|
||
| ## What are Skills? | ||
|
|
||
| Skills are structured instructions that help AI agents understand and execute common tasks consistently. Each skill is a self-contained guide that provides step-by-step instructions, code examples, and best practices. | ||
|
|
||
| ## Available Skills | ||
|
|
||
| | Skill | Description | Use When | | ||
| | ----------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------- | | ||
| | [igniteui-wc-choose-components](./igniteui-wc-choose-components/SKILL.md) | Identify the right components for a UI pattern and navigate to official docs/demos | Deciding which components to use | | ||
| | [igniteui-wc-integrate-with-framework](./igniteui-wc-integrate-with-framework/SKILL.md) | Integrate components into React, Angular, Vue, or vanilla JS applications | Setting up components in your project | | ||
| | [igniteui-wc-customize-component-theme](./igniteui-wc-customize-component-theme/SKILL.md) | Customize styling using CSS custom properties, parts, and theming system | Applying custom brand colors/styles | | ||
| | [igniteui-wc-optimize-bundle-size](./igniteui-wc-optimize-bundle-size/SKILL.md) | Reduce bundle size by importing only needed components and lazy loading | Optimizing production performance | | ||
|
|
||
| ## How to Use | ||
|
|
||
| When working with an AI agent like GitHub Copilot, reference skills by name or ask questions naturally: | ||
|
|
||
| ### Natural Questions | ||
| - "How do I integrate igniteui-webcomponents with React?" | ||
| - "Help me customize the button colors to match my brand" | ||
| - "My bundle size is too large, how can I reduce it?" | ||
| - "Show me how to use these components in Vue" | ||
|
|
||
| ### Direct Skill Reference | ||
| - "Follow the integrate-with-framework skill for my Angular app" | ||
| - "Use the customize-component-theme skill to help me style components" | ||
| - "Apply the optimize-bundle-size skill to reduce my bundle" | ||
|
|
||
| ## Skill Structure | ||
|
|
||
| Each skill contains: | ||
|
|
||
| - **Example Usage**: Common questions or scenarios | ||
| - **When to Use**: Situations where the skill applies | ||
| - **Related Skills**: Other relevant skills to explore | ||
| - **Step-by-Step Instructions**: Detailed guidance with code examples | ||
| - **Framework-Specific Examples**: React, Angular, Vue, and vanilla JS patterns | ||
| - **Common Issues & Solutions**: Troubleshooting guidance | ||
| - **Best Practices**: Recommended approaches | ||
| - **Additional Resources**: Further reading and documentation | ||
|
|
||
| ## Contributing | ||
|
|
||
| If you identify gaps in the skills or have suggestions for improvements: | ||
|
|
||
| 1. [Open an issue](https://github.com/IgniteUI/igniteui-webcomponents/issues) describing the improvement | ||
| 2. Submit a pull request with the proposed changes | ||
| 3. Follow the skill format and structure of existing skills | ||
|
|
||
| For skills related to **contributing to the library itself** (creating components, reviewing PRs, etc.), see [`.github/skills/`](../.github/skills/). | ||
|
Marina-L-Stoyanova marked this conversation as resolved.
|
||
|
|
||
| ## Additional Resources | ||
|
|
||
| - [Component Documentation](https://igniteui.github.io/igniteui-webcomponents) | ||
| - [Project README](../README.md) | ||
| - [Code Examples & Storybook](https://igniteui.github.io/igniteui-webcomponents) | ||
| - [GitHub Repository](https://github.com/IgniteUI/igniteui-webcomponents) | ||
|
|
||
| ## License | ||
|
|
||
| These skills are provided under the same license as the Ignite UI Web Components library. See [LICENSE](../LICENSE) for details. | ||
|
Marina-L-Stoyanova marked this conversation as resolved.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| import { execFileSync } from "child_process"; | ||
| import { cpSync, existsSync, rmSync } from "fs"; | ||
| import { join, relative, resolve } from "path"; | ||
|
|
||
| const root = resolve(__dirname, ".."); | ||
| const branch = process.argv[2] || "master"; | ||
|
|
||
|
Comment on lines
+6
to
+7
|
||
| if (!/^[\w.\-/]+$/.test(branch) || branch.startsWith("-")) { | ||
| // eslint-disable-next-line no-console | ||
| console.error(`[update-skills] Invalid branch name: '${branch}'`); | ||
| process.exit(1); | ||
|
Comment on lines
+6
to
+11
|
||
| } | ||
|
|
||
| const mappings = [ | ||
| { | ||
| name: "angular", | ||
| repo: join(root, "packages/igniteui-mcp/igniteui-doc-mcp/angular/igniteui-angular"), | ||
| src: join(root, "packages/igniteui-mcp/igniteui-doc-mcp/angular/igniteui-angular/skills"), | ||
| dest: join(root, "packages/igx-templates/igx-ts/projects/_base/files/__dot__claude/skills") | ||
| }, | ||
| { | ||
| name: "react", | ||
| repo: join(root, "packages/igniteui-mcp/igniteui-doc-mcp/react/igniteui-react"), | ||
| src: join(root, "packages/igniteui-mcp/igniteui-doc-mcp/react/igniteui-react/skills"), | ||
| dest: join(root, "packages/cli/templates/react/igr-ts/projects/_base/files/__dot__claude/skills") | ||
| }, | ||
| { | ||
| name: "webcomponents", | ||
| repo: join(root, "packages/igniteui-mcp/igniteui-doc-mcp/webcomponents/igniteui-webcomponents"), | ||
| src: join(root, "packages/igniteui-mcp/igniteui-doc-mcp/webcomponents/igniteui-webcomponents/skills"), | ||
| dest: join(root, "packages/cli/templates/webcomponents/igc-ts/projects/_base/files/__dot__claude/skills") | ||
| } | ||
| ]; | ||
|
|
||
| for (const { name, repo, src, dest } of mappings) { | ||
| if (!existsSync(repo)) { | ||
| // eslint-disable-next-line no-console | ||
| console.warn(`[update-skills] Skipping ${name}: repo not found at ${repo}`); | ||
| continue; | ||
| } | ||
|
Comment on lines
+36
to
+40
|
||
| if (!existsSync(join(repo, ".git"))) { | ||
| // Submodule directory exists but hasn't been initialized yet — initialize it now | ||
| // eslint-disable-next-line no-console | ||
| console.log(`[update-skills] Initializing submodule for ${name}...`); | ||
| const submodulePath = relative(root, repo).replace(/\\/g, "/"); | ||
| execFileSync("git", ["submodule", "update", "--init", submodulePath], { cwd: root, stdio: "inherit" }); | ||
| } | ||
| // eslint-disable-next-line no-console | ||
| console.log(`[update-skills] Updating ${name} to branch '${branch}'...`); | ||
| execFileSync("git", ["fetch", "origin", branch], { cwd: repo, stdio: "inherit" }); | ||
| execFileSync("git", ["checkout", "-B", branch, `origin/${branch}`], { cwd: repo, stdio: "inherit" }); | ||
|
|
||
| if (!existsSync(src)) { | ||
| // eslint-disable-next-line no-console | ||
| console.warn(`[update-skills] Skipping ${name}: skills not found at ${src}`); | ||
| continue; | ||
| } | ||
| if (existsSync(dest)) { | ||
| rmSync(dest, { recursive: true, force: true }); | ||
| } | ||
| cpSync(src, dest, { recursive: true }); | ||
| // eslint-disable-next-line no-console | ||
| console.log(`[update-skills] Updated ${name} skills`); | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.