本文へ移動
cccskills
無料GitHub で公開

fix-linting-types-on-pr

Checks out a PR (including fork PRs), fixes all linting and TypeScript errors, then pushes the changes back. Use when asked to fix lint, types, or TS errors on a PR.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md2.2 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Fix Linting and TypeScript Issues on a PR

Checks out a PR, auto-fixes linting and TypeScript issues, and pushes the fixes.

Step 1 — Get the PR number

If the user provided a PR number, use it directly. Otherwise ask for it.

Step 2 — Check out the PR

Use gh pr checkout so it works for both fork and non-fork PRs:

gh pr checkout <PR_NUMBER>

This automatically sets up the correct remote tracking and switches to the PR branch, even when the PR comes from a fork.

Step 3 — Install dependencies

yarn

Step 4 — Compile the repo

Compiling first ensures TS declarations referenced by the linter are present:

yarn nx run-many -t compile

Step 5 — Fix linting errors

yarn lint

Step 6 — Fix TypeScript errors

Run the TypeScript checker to surface remaining type errors:

yarn nx run-many -t check

Read the output carefully. Fix each type error manually by editing the relevant file(s). Common fixes:

  • Add or correct type annotations
  • Fix incorrect generics
  • Resolve any assignments that violate strict mode
  • Add missing imports or re-exports

Re-run yarn nx run-many -t check after each batch of edits to confirm errors are resolved.

Step 7 — Commit the fixes

Stage only the files you changed:

git add <files-you-modified>
git commit -m "Maintenance: Fix linting and TypeScript errors"

Do not use git add -A — avoid accidentally staging unrelated files.

Step 8 — Push the fixes

For fork PRs gh pr checkout sets up the correct upstream tracking. Push directly:

git push

Notes

  • Only fix errors that are clearly linting or TypeScript issues. Do not refactor logic.
  • If a TypeScript error requires a non-trivial code change, surface it to the user and ask before proceeding.
  • If gh pr checkout fails due to permissions on a fork, inform the user — they may need to grant write access to the fork or the maintainer must push directly.
  • After pushing, confirm with the user that the CI is green.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

canary

無料

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.

日本語の概要は準備中です。原文の説明を表示しています。

storybookjs/storybook9.1万2026年10月10日 更新

Review, improve, rewrite, author, or plan Storybook documentation in /docs. Use this when asked to review docs, improve a page, rewrite documentation, draft new docs, or advise on docs strategy.

日本語の概要は準備中です。原文の説明を表示しています。

storybookjs/storybook9.1万2026年10月10日 更新

Label GitHub issues and PRs found during QA testing. Use when organizing QA findings with proper labels.

日本語の概要は準備中です。原文の説明を表示しています。

storybookjs/storybook9.1万2026年10月10日 更新

Triage and resolve GitHub PR review comments one by one, interactively. Use when the user asks to handle, address, respond to, or resolve PR review comments, or mentions reviewer feedback on a pull request.

日本語の概要は準備中です。原文の説明を表示しています。

storybookjs/storybook9.1万2026年10月10日 更新

init

無料

Use when adding Storybook to a project that does not have Storybook configured yet.

日本語の概要は準備中です。原文の説明を表示しています。

storybookjs/storybook9.1万2026年10月10日 更新

Write the changelog entry for a new minor or major Storybook release. Use when preparing a CHANGELOG.md entry for a X.Y.0 version.

日本語の概要は準備中です。原文の説明を表示しています。

storybookjs/storybook9.1万2026年10月10日 更新

storybookjs のスキルをすべて見る

このスキルの問題を報告する