Skip to content

feat(skills): ship skills in @clickhouse/client package and add E2E packaging test#682

Merged
peter-leonov-ch merged 20 commits into
mainfrom
package_skills
Apr 29, 2026
Merged

feat(skills): ship skills in @clickhouse/client package and add E2E packaging test#682
peter-leonov-ch merged 20 commits into
mainfrom
package_skills

Conversation

@peter-leonov-ch

@peter-leonov-ch peter-leonov-ch commented Apr 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

https://github.com/antfu/skills-npm/blob/main/PROPOSAL.md#for-package-authors

  • Copies skills/ into @clickhouse/client at pack time via prepack, so skills
    are available under node_modules/@clickhouse/client/skills/ after npm install
  • Declares the skill in the agents.skills field of the package manifest for
    discovery tools that scan node_modules
  • Adds a skills-e2e workflow that packs all three packages from source, installs
    them in a fresh app, and asserts the skill files and manifest entries are present

What's in the tarball

skills/clickhouse-js-node-troubleshooting/
SKILL.md
reference/*.md
evals/evals.json

Skills live at the repo root so they stay visible across all packages; prepack
copies them into the package directory before packing (same pattern as README/LICENSE).

Copilot AI review requested due to automatic review settings April 29, 2026 15:13
Comment thread .github/workflows/e2e-skills.yml Fixed
@codecov

codecov Bot commented Apr 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds packaging support so the root skills/ directory is shipped inside the published @clickhouse/client tarball and introduces a GitHub Actions E2E workflow to verify the packaged artifacts expose the skill files + manifest metadata.

Changes:

  • Update @clickhouse/client packaging to include a skills/ directory and declare it under package.json -> agents.skills.
  • Add a new E2E “skills” fixture app plus a Node script that validates installed package contents.
  • Add a skills-e2e GitHub Actions workflow that builds, packs, installs the tarballs, and runs the content checks.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/client-node/package.json Ships skills/ in the Node package tarball and exposes skill metadata via agents.skills; updates prepack to copy root skills/.
.github/workflows/skills-e2e.yml New CI workflow that packs the workspaces and validates skill availability after install.
tests/e2e/skills/check.js E2E verification script asserting skill files + manifest entries exist in installed @clickhouse/client.
tests/e2e/skills/package.json Minimal fixture app manifest for the E2E packaging test.
tests/e2e/skills/.gitignore Ignores install artifacts for the fixture app.
.gitignore Ignores generated packages/*/skills/ directories created during prepack.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/client-node/package.json Outdated
Comment thread tests/e2e/skills/check.js Outdated
Comment thread .github/workflows/e2e-skills.yml
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 29, 2026 15:19
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
peter-leonov-ch and others added 2 commits April 29, 2026 17:20
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…k steps

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 makes “skills” distributable as part of the published @clickhouse/client (Node) package and adds a GitHub Actions E2E workflow to verify packaging/install behavior from packed tarballs.

Changes:

  • Package skills/ into @clickhouse/client during prepack and include it in published files.
  • Add an agents.skills manifest entry in @clickhouse/client for discovery tools.
  • Add a skills-e2e workflow + minimal E2E test app that installs packed tarballs and verifies skills presence.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/client-node/package.json Includes skills in files, adds agents.skills, and copies repo-root skills/ at pack time.
.gitignore Ignores generated/copied packages/*/skills/ artifacts.
.github/workflows/skills-e2e.yml New CI workflow that packs from source and verifies skills packaging in a fresh install.
tests/e2e/skills/package.json Minimal E2E “app” used for installation checks.
tests/e2e/skills/check.js Asserts installed package has skills directory and agents.skills entry.
tests/e2e/skills/.gitignore Ignores E2E install artifacts (node_modules, lockfile).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/client-node/package.json
Comment thread tests/e2e/skills/check.js
Comment thread .github/workflows/e2e-skills.yml Fixed
Comment thread tests/e2e/skills/check.js Fixed
Copilot AI review requested due to automatic review settings April 29, 2026 16:20
Comment thread .github/workflows/e2e-skills.yml Fixed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 makes repository “skills” available to consumers of @clickhouse/client by packaging skills/ into the published tarball and advertising the shipped skill via package.json, and adds a GitHub Actions E2E workflow to validate the packaging outcome in a fresh install.

Changes:

  • Copy repo-root skills/ into packages/client-node during prepack, include it in published files, and declare the shipped skill in agents.skills.
  • Add a skills-e2e GitHub Actions workflow that builds + packs workspace tarballs, installs them in an isolated test app, and asserts skill files/metadata exist.
  • Add a small E2E test fixture under tests/e2e/skills/ to validate installation, skill visibility, and skills-npm discovery/symlinking.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/e2e/skills/package.json Defines an isolated E2E project and installs skills-npm to validate skill discovery.
tests/e2e/skills/check.js Node script asserting packaged skill files and manifest metadata exist post-install.
tests/e2e/skills/.gitignore Ignores generated install artifacts for the E2E fixture.
packages/client-web/package.json Adds a pack script for workspace-driven packing in CI.
packages/client-node/package.json Ships skills/, declares agents.skills, and copies skills into the package at prepack.
packages/client-common/package.json Adds a pack script for workspace-driven packing in CI.
.gitignore Ignores generated packages/*/skills/ copies created during packing.
.github/workflows/skills-e2e.yml New CI workflow to validate skills are present/declared in packed tarballs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/e2e/skills/check.js Outdated
Comment thread tests/e2e/skills/package.json
Comment thread .github/workflows/e2e-skills.yml
peter-leonov-ch and others added 2 commits April 29, 2026 18:25
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 29, 2026 16:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds “agent skills” packaging support to the Node client so skill metadata/files are shipped inside the published @clickhouse/client tarball, and introduces an E2E workflow that validates the packed artifacts in a fresh install.

Changes:

  • Copy repo-root skills/ into packages/client-node during prepack, include it in files, and expose it via package.json agents.skills.
  • Add pack scripts to all workspaces so CI can npm pack each package uniformly.
  • Add a skills-e2e GitHub Actions workflow + minimal E2E fixture app/assertions to verify packaged skills + manifest metadata.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/e2e/skills/package.json Adds an E2E fixture app and runs skills-npm via lifecycle script.
tests/e2e/skills/check.js Adds assertions that packaged skills + agents.skills metadata are present and that skills-npm creates symlinks.
tests/e2e/skills/.gitignore Ignores E2E fixture install artifacts (node_modules, lockfile, generated symlinks).
packages/client-web/package.json Adds a pack script for workspace packing in CI.
packages/client-node/package.json Ships skills/ in @clickhouse/client tarball and declares agents.skills; updates prepack; adds pack.
packages/client-common/package.json Adds a pack script for workspace packing in CI.
.gitignore Ignores generated packages/*/skills/ directories created during packing.
.github/workflows/skills-e2e.yml Adds workflow that builds, packs, installs packed tarballs into fixture app, and runs checks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/e2e/skills/package.json
Comment thread tests/e2e/skills/.gitignore
Comment thread .github/workflows/e2e-skills.yml
Comment thread .github/workflows/e2e-skills.yml
Comment thread tests/e2e/skills/package.json
Comment thread .github/workflows/e2e-skills.yml Dismissed
Comment thread .github/workflows/e2e-skills.yml Dismissed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds “agent skills” packaging to the @clickhouse/client Node package (copying repo-root skills/ into the published tarball and advertising them via package.json) and introduces GitHub Actions E2E checks to validate skill availability after install/pack.

Changes:

  • Package skills/ into @clickhouse/client during prepack and declare it under agents.skills.
  • Add a new e2e-skills workflow that packs workspaces, installs the tarballs in a fresh project, and asserts skills/metadata presence.
  • Add/adjust an e2e-install tiny-project scaffold and update its workflow working directory.

Reviewed changes

Copilot reviewed 8 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/e2e/skills/package.json Adds an E2E project that runs skills-npm during install.
tests/e2e/skills/check.js Verifies @clickhouse/client ships skills/ and declares agents.skills; checks skills-npm output.
tests/e2e/skills/.gitignore Ignores local E2E artifacts and generated npm skill links.
tests/e2e/install/tsconfig.json Adds TS config for the tiny-project E2E install/typecheck job.
tests/e2e/install/src/index.ts Adds runtime checks against npm dist-tags and basic client instantiation.
tests/e2e/install/package.json Defines the tiny-project E2E harness dependencies (TypeScript + Node types).
tests/e2e/install/package-lock.json Locks tiny-project dev dependencies.
tests/e2e/install/.gitignore Ignores tiny-project node_modules.
packages/client-web/package.json Adds a pack script to support workspace packing in CI.
packages/client-node/package.json Includes skills/ in published files, declares agents.skills, and copies repo-root skills/ on prepack.
packages/client-common/package.json Adds a pack script to support workspace packing in CI.
.gitignore Ignores generated packages/*/skills/ copies created during packing.
.github/workflows/e2e-skills.yml New workflow to validate packed tarballs include skills and metadata.
.github/workflows/e2e-install.yml Updates workflow default working directory for the tiny-project E2E job.
Comments suppressed due to low confidence (1)

.github/workflows/e2e-install.yml:20

  • The workflow’s push path filter references .github/workflows/e2e.yml, but that file doesn’t exist in the repo (this workflow is e2e-install.yml). As a result, pushes that modify this workflow won’t trigger it. Update on.push.paths to include .github/workflows/e2e-install.yml (or the correct workflow filename).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@peter-leonov-ch peter-leonov-ch merged commit 2d7ef25 into main Apr 29, 2026
60 checks passed
@peter-leonov-ch peter-leonov-ch deleted the package_skills branch April 29, 2026 16:43
peter-leonov-ch added a commit that referenced this pull request May 9, 2026
`AGENTS.md` had drifted from reality after PRs #662#712: it claimed
`examples/web` has no `performance/` folder, pointed at a placeholder
docs path, and said nothing about the `skills/` directory or the
`.claude/skills/setup/` skill that replaced `copilot-setup-steps.yml`.

## Summary

- **Examples › `performance/`** — drop the "no `performance/` folder
under `examples/web`" claim; #701 added one for browser-safe streaming.
- **Log-message docs guidance** — point at the real `docs/` layout from
#677 (`docs/socket_hang_up_econnreset.md`, `docs/howto/`) instead of a
fictional `docs/example-log-message.md`. The example URL in the snippet
now also resolves to a real page (`docs/socket_hang_up_econnreset.md`).
- **New `Skills` section** — documents the repo-root `skills/` directory
(#681, #682, #702): `client-node`'s `prepack` ships it via
`@clickhouse/client`, the `agents.skills` field of
`packages/client-node/package.json` declares which skills are
discoverable, and the `Skills E2E` workflow
(`.github/workflows/e2e-skills.yml`, backed by
`tests/e2e/skills/check.js`) asserts the packaged tarball contains the
declared skills. Routes contributors to `.claude/skills/setup/SKILL.md`
(#705) instead of re-introducing `copilot-setup-steps.yml`.
- **`agents.skills` manifest** — adds `clickhouse-js-node-coding`
alongside `clickhouse-js-node-troubleshooting` so both shipped skills
are discoverable to downstream tooling. `tests/e2e/skills/check.js` is
extended to verify both skills land in the packaged `@clickhouse/client`
tarball.
- **New `Embedded docs` section** — surfaces `docs/` as the preferred
home for pages linked from log messages.
- **CHANGELOG guidance** — aligns with the PR template: entry goes in
the PR description and is folded into `CHANGELOG.md` at release time.

Documentation refresh plus a small manifest/test change to make the
second shipped skill discoverable.

## Checklist

- [x] A human-readable description of the changes was provided to
include in CHANGELOG

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: peter-leonov-ch <209667683+peter-leonov-ch@users.noreply.github.com>
Co-authored-by: Peter Leonov <peter.leonov@clickhouse.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants