Skip to content

Add examples generator SKILL#568

Merged
lukasmatta merged 9 commits into
masterfrom
docs/examples-generator-skill
May 13, 2026
Merged

Add examples generator SKILL#568
lukasmatta merged 9 commits into
masterfrom
docs/examples-generator-skill

Conversation

@lukasmatta
Copy link
Copy Markdown
Collaborator

@lukasmatta lukasmatta commented Apr 30, 2026

Adds an AI skill that handles the repetitive work of wiring up code examples in the composition app. Given a component page, it generates the .examples.ts file, adds CodeExampleComponent to the component imports, and wraps the existing HTML previews in <app-code-example>.

Verified the skill by running it on the checkbox page.

Usage:

Just ask the AI something like:

"Generate code examples for the cps-checkbox component"

The skill picks up on such a phrase automatically and handles all three steps.

Closes #567
Closes #608

@lukasmatta lukasmatta self-assigned this Apr 30, 2026
@lukasmatta lukasmatta added documentation Improvements or additions to documentation skip-release-notes No release notes required labels Apr 30, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

Coverage report for library

St.
Category Percentage Covered / Total
🔴 Statements 35.69% 2539/7115
🔴 Branches 30.39% 1003/3300
🔴 Functions 32.46% 484/1491
🔴 Lines 36.51% 2386/6535

Test suite run success

663 tests passing in 26 suites.

Report generated by 🧪jest coverage report action from 3e696e4

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

Playwright test results

passed  68 passed

Details

stats  68 tests across 4 suites
duration  2 minutes, 11 seconds
commit  3e696e4
info  For details, download the Playwright report

@lukasmatta lukasmatta changed the title Add examples generator for SKILL draft Add examples generator SKILL draft Apr 30, 2026
@lukasmatta lukasmatta marked this pull request as ready for review May 12, 2026 15:13
Copilot AI review requested due to automatic review settings May 12, 2026 15:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a draft GitHub skill for generating *-page.examples.ts files and wiring CodeExampleComponent into composition pages, and it applies that wiring to the checkbox composition page as a verification run.

Changes:

  • Added checkbox-page.examples.ts and exposed it via examples on CheckboxPageComponent.
  • Wrapped checkbox page previews in <app-code-example> and bound HTML/TS code strings for the tabs.
  • Added a new skill definition at .github/skills/code-examples-generator/SKILL.md describing the intended generation workflow.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
projects/composition/src/app/pages/checkbox-page/checkbox-page.examples.ts Introduces the checkbox examples map consumed by CodeExampleComponent (HTML + optional TS snippets).
projects/composition/src/app/pages/checkbox-page/checkbox-page.component.ts Imports CodeExampleComponent and the examples map, exposing readonly examples for the template bindings.
projects/composition/src/app/pages/checkbox-page/checkbox-page.component.html Wraps existing previews in <app-code-example> blocks and wires [htmlCode] / [tsCode].
.github/skills/code-examples-generator/SKILL.md Adds the “code-examples-generator” skill draft documentation and usage rules.

Comment thread .github/skills/code-examples-generator/SKILL.md
Comment thread .github/skills/code-examples-generator/SKILL.md Outdated
Comment thread .github/skills/code-examples-generator/SKILL.md Outdated
Comment thread .github/skills/code-examples-generator/SKILL.md Outdated
@lukasmatta lukasmatta changed the title Add examples generator SKILL draft Add examples generator SKILL May 13, 2026
Copy link
Copy Markdown
Collaborator

@fateeand fateeand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lukasmatta lukasmatta merged commit 24c094d into master May 13, 2026
12 checks passed
@lukasmatta lukasmatta deleted the docs/examples-generator-skill branch May 13, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation skip-release-notes No release notes required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add code examples for Checkbox Add AI skill for generating .examples.ts files

4 participants