跳到正文
cccskills
免费在 GitHub 公开

canary

Find a trial Storybook package for a specific branch, or trigger its publication when needed. Check release progress and obtain the package reference or commands for creating or upgrading a project with that build.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Finds or publishes a pkg.pr.new canary release for a Storybook branch. Use when the user wants the canary package specifier for a branch or needs to trigger the canary workflow manually.

集成工具GitHub
查看安装方法

适用场景

  • Find a trial package for a Storybook branch
  • Publish a trial build for a fork pull request
  • Check publication progress and installation commands

包含的文件(1)

  • SKILL.md4.8 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Find Or Publish Canary Release

Use this skill to get a branch-specific canary build from pkg.pr.new.

Canary publishes are driven by the publish-canary.yml workflow.

Automatic canary publishes:

  • Every push to next
  • In-repo PRs labeled ci:canary (a human must apply that label). While it remains, every push to the PR republishes. The label does nothing on fork PRs.

Version string

The canary version string is constructed like this:

storybook@https://pkg.pr.new/storybook@<SHA>

Replace <SHA> with the short commit SHA (first 7 characters). Compact URLs (https://pkg.pr.new/storybook@<SHA>) resolve to the same tarball as the owner/repo form. The pkg.pr.new dashboard is always https://pkg.pr.new/~/storybookjs/storybook.

Check whether a canary already exists

SHA=$(git rev-parse --short=7 HEAD)
curl -I "https://pkg.pr.new/storybook@$SHA"

An HTTP 200 status code means the canary already exists for that commit.

Decision flow

Use this skill with the following if-then behavior.

A. If the branch already has a PR with the ci:canary label

Do not trigger anything manually. Read the canary heading and install commands from the PR body. That section is the current run status and the most recent release.

BRANCH=$(git branch --show-current)

gh pr list \
	--repo storybookjs/storybook \
	--head "$BRANCH" \
	--state open \
	--json number,title,labels,url \
	--jq '.[] | select(any(.labels[]?; .name == "ci:canary"))'
gh pr view <NUMBER> --repo storybookjs/storybook --json body --jq .body

Use the heading and the CANARY_RELEASE_SECTION commands as-is. A follow-up workflow (publish-canary-pr-body.yml) writes those sections after publish finishes, including after a maintainer manual run.

Fork PRs never use path A. Use path C.

  • Released — use the install commands from the body
  • Failed — the heading links to pkg.pr.new; the failure comment links to the workflow run
  • Not run — publish is still in progress, unlabeled, or the follow-up has not run yet

B. If the in-repo branch does not have a PR with the ci:canary label

Trigger the canary workflow manually on the branch and watch it finish. It usually takes 5-10 minutes. You can also use the GitHub Actions UI: open publish-canary.yml, click "Run workflow", and select the branch. Optional inputs pr, branch, and sha must agree when more than one is set.

BRANCH=$(git branch --show-current)

gh workflow run --repo storybookjs/storybook publish-canary.yml --ref "$BRANCH"

Find the new workflow run and watch it:

BRANCH=$(git branch --show-current)

RUN_ID=$(gh run list \
	--repo storybookjs/storybook \
	--workflow publish-canary.yml \
	--branch "$BRANCH" \
	--event workflow_dispatch \
	--json databaseId \
	--jq '.[0].databaseId')

gh run watch "$RUN_ID" --repo storybookjs/storybook

When it finishes successfully, read the canary heading from the PR body if a PR was updated. Otherwise construct the version string from the published SHA (the run's headSha is the workflow-source branch, which may differ when you passed pr or sha):

RUN_SHA=$(gh run view "$RUN_ID" --repo storybookjs/storybook --json jobs --jq '[.jobs[].steps[]?.name | select(startswith("canary-ref "))][0]' | sed -n 's/.*sha=\([0-9a-fA-F]\{7,40\}\).*/\1/p')
SHORT_SHA="${RUN_SHA:0:7}"
echo "storybook@https://pkg.pr.new/storybook@$SHORT_SHA"

C. If the change is a fork PR

Do not add ci:canary. Dispatch the workflow from this repository with the PR number. The fork author does not need to do anything.

gh workflow run --repo storybookjs/storybook publish-canary.yml --ref next -f pr=<PR_NUMBER>

If you also pass branch or sha, they must be that PR's current head. A later push on the fork does not republish until you run the workflow again.

Optionally confirm the package is live:

curl -I "https://pkg.pr.new/storybook@$SHORT_SHA"

Use the canary

For a new project:

npx --yes --allow-remote=all https://pkg.pr.new/create-storybook@<SHA>

For an existing project:

npx --yes --allow-remote=all https://pkg.pr.new/storybook@<SHA> upgrade

Requirements

  • You need gh CLI authenticated for storybookjs/storybook
  • You need permission to run workflows in the repository for manual dispatch
  • The canary workflow is publish-canary.yml

Monitor progress

Workflow page:

CLI:

gh run list --repo storybookjs/storybook --workflow publish-canary.yml

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Look up a project's existing UI components in Storybook, including their props, or configuration inputs, and usage examples. Use the findings to answer questions and identify components to reuse before building duplicates.

中文简介正在准备中。当前显示英语简介。

  • Find existing UI components
  • Check component props and usage examples
  • Answer questions about component usage
storybookjs/storybook9.1万2026年10月18日 更新

Review, improve, rewrite, or draft Storybook documentation in /docs. Assess each page’s purpose, audience, structure, and examples, then make suitable edits or provide a content plan, with formatting checks after changes.

中文简介正在准备中。当前显示英语简介。

  • Improve the structure and examples of a documentation page
  • Draft documentation for a new feature
  • Plan page types and outlines
storybookjs/storybook9.1万2026年10月18日 更新

Check out a GitHub pull request, fix linting and TypeScript errors, and commit and push the changes. The workflow supports forked pull requests and repeats type checks to verify fixes while keeping changes focused on these errors.

中文简介正在准备中。当前显示英语简介。

  • Fix linting errors in a pull request
  • Resolve TypeScript errors in a pull request
  • Apply fixes to a pull request from a fork
storybookjs/storybook9.1万2026年10月18日 更新

Organize GitHub issues and pull requests found during quality assurance testing. Apply release tracking labels, classify bugs by four severity levels, and label multiple findings while keeping documentation issues and feature requests outside the severity scheme.

中文简介正在准备中。当前显示英语简介。

  • Group QA findings by release
  • Classify bugs by severity
  • Apply labels to multiple issues and pull requests
storybookjs/storybook9.1万2026年10月18日 更新

Work through unresolved GitHub pull request reviews one at a time. The skill explains each comment, proposes a fix, asks how to proceed, and handles chosen edits, replies, commits, and thread resolution.

中文简介正在准备中。当前显示英语简介。

  • Addressing unresolved pull request review comments
  • Choosing between a code fix, a reply, or skipping a comment
  • Handling duplicate review comments together
storybookjs/storybook9.1万2026年10月18日 更新

init

免费

Add Storybook to a project that does not have it configured, choosing the installation tag based on the latest stable version. Then use the separate setup skill to configure Storybook for the project.

中文简介正在准备中。当前显示英语简介。

  • Adding Storybook to a project for the first time
  • Choosing an installation tag based on the stable release
  • Continuing from installation to project-specific setup
storybookjs/storybook9.1万2026年10月18日 更新

查看 storybookjs 的全部技能

报告此技能的问题