スキル一覧に戻る
cartridge-gg

validate-before-merge

by cartridge-gg

validate-before-mergeは、other分野における実用的なスキルです。複雑な課題への対応力を強化し、業務効率と成果の質を改善します。

79🍴 44📅 2026年1月23日
GitHubで見るManusで実行

SKILL.md


name: validate-before-merge description: Run full validation to ensure code is ready for merge. Use before merging PRs, when asked to validate readiness, or as a final check before requesting review.

Validate Before Merge

Overview

This skill runs all checks that CI performs to validate code is ready for merge. Use this to catch issues locally before CI runs.

Full Validation Sequence

Run these checks in order. Each step must pass before proceeding.

Step 1: Lint and Format Check

pnpm lint:check

Expected: No errors or warnings If fails: Run pnpm format to auto-fix

Step 2: Build All Packages

pnpm build

Expected: Successful build with no TypeScript errors If fails: Fix type errors in the reported files

Step 3: Unit Tests

pnpm test:ci

Expected: All tests pass If fails:

  • Review failing test output
  • Fix code or update tests as appropriate
  • Never skip failing tests without justification

Step 4: Visual Regression Tests (if UI changed)

Only required if changes touch:

  • packages/keychain/src/components/
  • packages/keychain/src/hooks/ (UI-related)
  • Storybook configuration
pnpm test:storybook

Expected: All visual comparisons pass If fails with intentional changes:

pnpm test:storybook:update
git add packages/*/__image_snapshots__/
git commit -m "chore: update storybook snapshots"

Step 5: Verify No Uncommitted Changes

git status

Expected: Clean working directory (or only untracked files you intend to ignore)

Quick Validation Script

For a fast validation (similar to pre-commit):

pnpm lint:check && pnpm build && pnpm test

Full CI Mirror

To exactly mirror what GitHub Actions runs:

# Clean environment (optional but recommended)
pnpm clean && pnpm i

# Quality job
pnpm lint:check

# Test job
pnpm build
pnpm test:ci --coverage

# Storybook job (if UI changes)
pnpm test:storybook

Validation Checklist

Before requesting merge, verify:

  • pnpm lint:check passes
  • pnpm build succeeds with no errors
  • pnpm test:ci all tests pass
  • pnpm test:storybook passes (if UI changed)
  • No console.log or debug statements left in code
  • No hardcoded secrets or credentials
  • PR description accurately describes changes
  • Related issues are linked

Common Pre-Merge Issues

Forgotten console.log

grep -r "console.log" packages/*/src --include="*.ts" --include="*.tsx" | grep -v "test"

Outdated dependencies

git fetch origin main
git rebase origin/main

Merge conflicts

git fetch origin main
git merge origin/main
# Resolve conflicts
pnpm build  # Verify after resolving

Reporting Results

After validation, report:

## Validation Results

- [x] Lint: Passed
- [x] Build: Passed  
- [x] Tests: Passed (X tests, X% coverage)
- [x] Storybook: Passed (or N/A if no UI changes)

Ready for merge.

Or if issues found:

## Validation Results

- [x] Lint: Passed
- [ ] Build: Failed - Type error in packages/controller/src/account.ts:42
- [ ] Tests: Not run (blocked by build failure)

### Issues to Fix
1. Type error: Property 'foo' does not exist on type 'Bar'

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

+5
Issue管理

オープンIssueが50未満

0/5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です