Skip to content
Back to skills

Code Impact Checker

ASecurity

破壊的変更に基づいてプロジェクト内のコードを検索し、影響を受けるファイルと行を特定する。テストカバレッジも確認する

  • 666 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added February 8, 2026
developmentbashreactnextjsapi

Works with

  • api

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill code-impact-checker --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Impact Checker?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Code Impact Checker
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-code-impact-checker/badge)](https://www.skillsdirectory.com/skills/majiayu000-code-impact-checker)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: code-impact-checker
description: 破壊的変更に基づいてプロジェクト内のコードを検索し、影響を受けるファイルと行を特定する。テストカバレッジも確認する
allowed-tools: Read, Grep, Glob
---

# コード影響分析スキル

**役割**: コード検索に特化。破壊的変更の影響を受けるコードを特定する。

**入力**: 検索対象のAPI/パターン、ソースディレクトリ、テストディレクトリ(呼び出し元から渡される)

## 検索タスク

### 1. 影響箇所の検索

破壊的変更ごとに、該当するコードを検索:

```bash
# import文の検索
grep -r "import.*{.*oldAPI.*}.*from" --include="*.ts" --include="*.tsx" src/

# 関数呼び出しの検索
grep -rn "oldFunction\s*(" --include="*.ts" --include="*.tsx" src/

# Props使用の検索
grep -rn "deprecatedProp" --include="*.tsx" src/
```

### 2. テストファイルの特定

```bash
# テストファイルのパターン
**/*.test.ts
**/*.test.tsx
**/*.spec.ts
**/*.spec.tsx
**/__tests__/**/*
```

### 3. カバレッジ確認

影響を受けるファイルに対応するテストがあるか確認:

| ソースファイル | テストファイル検索パターン |
|--------------|------------------------|
| src/hooks/useData.ts | src/hooks/useData.test.ts, src/hooks/__tests__/useData.test.ts |
| src/utils/format.ts | src/utils/format.test.ts, src/utils/__tests__/format.test.ts |

## 出力フォーマット

```json
{
  "affectedFiles": [
    {
      "file": "src/components/Example.tsx",
      "lines": [15, 42, 78],
      "pattern": "useRouter",
      "context": "import { useRouter } from 'next/router'"
    }
  ],
  "testCoverage": {
    "covered": [
      {
        "source": "src/hooks/useData.ts",
        "test": "src/hooks/__tests__/useData.test.ts"
      }
    ],
    "notCovered": [
      "src/utils/format.ts"
    ]
  },
  "summary": {
    "totalFiles": 5,
    "totalLines": 12,
    "testCoverage": "60%"
  }
}
```

## 検索パターン集

### React
```regex
# Hooks
use(Effect|State|Callback|Memo|Ref|Context)\s*\(

# コンポーネント
<ComponentName\s+[^>]*prop=
```

### Next.js
```regex
# Router
import.*from\s+['"]next/router['"]
useRouter\s*\(\)

# Pages
getServerSideProps|getStaticProps|getStaticPaths

# App Router
import.*from\s+['"]next/navigation['"]
```

### 一般
```regex
# 特定の関数
functionName\s*\(

# 特定のimport
import\s*{\s*[^}]*targetName[^}]*}\s*from

# 特定のメソッド
\.methodName\s*\(
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.