Skip to content
dependency-observation logo

Dependency Observation(依存取り違え観測)

dependency-observation

依存関係の取り違えを検出する観測。lockfile固定、クリーンビルド、統合スモークで再現性を担保。Use when: 依存追加/更新、CI設定、ローカルでは動く問題、新環境セットアップ、バージョン差異の疑い。

SKILL.md

Full skill instructions

Dependency Observation(依存取り違え観測)

目的

生成コードは「見たことあるAPIっぽいもの」を書きがちで、依存取り違えは頻出。 このスキルは"works on my machine"を潰し、依存の再現性を確保する。

観測の恩恵

  • "works on my machine"を潰す(再現性の確保)
  • 依存の更新がどこに影響するかが見える
  • セキュリティ(供給網)にも直結する

Procedure

Step 1: 依存固定の確認

lockfile が存在し、かつCIで固定が破られたら即failするか確認。

言語別lockfile:

言語lockfile
Node.jspackage-lock.json / yarn.lock / pnpm-lock.yaml
Pythonpoetry.lock / Pipfile.lock / requirements.txt (pip-compile)
Gogo.sum
RustCargo.lock
RubyGemfile.lock

Step 2: クリーンビルドの実施

キャッシュに頼らないビルドを実行:

# Node.js
rm -rf node_modules && npm ci

# Python (poetry)
rm -rf .venv && poetry install

# Go
go clean -cache && go build ./​...

# Rust
cargo clean && cargo build

Step 3: 依存グラフの観測

どのバージョンが入っているかを出力:

# Node.js
npm ls --all

# Python
pip list --format=freeze

# Go
go list -m all

# Rust
cargo tree

Step 4: 統合スモークテスト

"本物の依存"で最小経路だけ叩く:

# 例: DB接続→1クエリのスモークテスト
def test_database_smoke():
    conn = get_db_connection()
    result = conn.execute("SELECT 1").fetchone()
    assert result[0] == 1

Step 5: 起動時の依存情報ログ

起動時に依存バージョンと設定をログ出力(トラブルシュートの生命線):

{
  "event": "app_started",
  "runtime": "python 3.11.5",
  "dependencies": {
    "sqlalchemy": "2.0.23",
    "pydantic": "2.5.2"
  }
}

最小セット

  • (C1) lockfile固定 + CIで"固定破り即fail"
  • (C2) クリーンビルド + 最小の統合スモーク(1本で良い。ゼロは危険)

CI設定例

詳細は references/​ci-templates.md を参照。

Outputs

  • 依存チェックリスト
  • CI設定ファイル(.github/​workflows/ 等)
  • 統合スモークテストコード

Examples

GitHub Actions での依存固定チェック

name: Dependency Check
on: [push, pull_request]

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/​checkout@v4

      - name: Check lockfile exists
        run: |
          if [ ! -f package-lock.json ]; then
            echo "❌ package-lock.json not found"
            exit 1
          fi

      - name: Clean install (fail on lockfile mismatch)
        run: npm ci

      - name: Smoke test
        run: npm run test:smoke

統合スモークテスト例

// tests/​smoke.test.ts
describe('Integration Smoke', () => {
  it('connects to database', async () => {
    const db = await createConnection();
    const result = await db.query('SELECT 1 as value');
    expect(result[0].value).toBe(1);
    await db.close();
  });

  it('external API is reachable', async () => {
    const response = await fetch(process.env.API_ENDPOINT + '/​health');
    expect(response.ok).toBe(true);
  });
});

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View