Ci Smoke Needs Real Depsのロゴ

Ci Smoke Needs Real Deps

コミュニティ
Innei
ci-smoke-needs-real-deps

CIのリリース/ビルドパイプラインで、プロジェクトに同梱されたバイナリを外部依存サービス群(PostgreSQL、MySQL、Redis、MongoDB、S3など)に接続して起動するスモークテストが実行され、connection refused、missing-required-env、またはマイグレーションエラーで失敗する場合に使います。CIサービスコンテナとして依存サービスを宣言し、スモークテストのステップに対応する環境変数を設定して解決します。スタックの移行後、新しいci.ymlやコードの実態にリリースワークフローが追従できていない場合によく発生します。

Add to TypingMind

概要

公開者Innei
リポジトリSKILL
スキル名ci-smoke-needs-real-deps
スター
81
フォーク
2
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    InneiがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Ci Smoke Needs Real Deps」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/Innei/SKILL/tree/main/skills/infrastructure/ci-smoke-needs-real-deps
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Innei/SKILL.git /tmp/SKILL
mkdir -p .claude/skills
cp -r /tmp/SKILL/skills/infrastructure/ci-smoke-needs-real-deps .claude/skills/ci-smoke-needs-real-deps
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでCi Smoke Needs Real Depsを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にCi Smoke Needs Real Depsを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Ci Smoke Needs Real Depsは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

CI Smoke Tests Need Real Dependencies

A smoke test that just runs node out/main.mjs && curl localhost:PORT/health is not a smoke test if the binary can't reach a real database. When stacks change (Mongo → Postgres, sqlite → mysql, in-memory → Redis, …), the release pipeline often gets forgotten while ci.yml is updated. Symptom: tag push triggers release workflow, build job fails with connection refused or missing-env throws.

When to use

  • Release workflow fails at "smoke test" / "test bundle" / "boot test" step
  • Error says Connection refused, MONGO_URL is required, SNOWFLAKE_WORKER_ID is required, cannot connect to ..., or similar after a recent stack migration
  • The same project's ci.yml (PR checks) passes but release.yml fails — they've diverged
  • Adding a new external dependency that the smoke test needs

When NOT to use

  • Smoke test is genuinely failing (real bug in the code) — fix the code, don't paper over it
  • The dep would slow CI to the point of being useless — consider whether the smoke is the wrong level of test (use unit tests instead)

Diagnostic checklist

When release.yml smoke fails post-migration, check what ci.yml does for its smoke and align:

  1. What services: does ci.yml declare? (postgres? mysql? redis?)
  2. What env: does ci.yml inject on the smoke step?
  3. Is there a migration runner or MIGRATIONS_DIR env that ci.yml passes but release.yml doesn't?
  4. Does the bundled binary auto-run migrations on boot, or does it need an explicit migrate step first?

If (1) or (2) differ from release.yml, that's the bug.

The Pattern

GitHub Actions example (mirror your ci.yml smoke job):

yaml
build:
  runs-on: ubuntu-latest
  services:
    postgres:                       # match the stack the binary actually expects
      image: postgres:16-alpine     # pin major; -alpine is fine for tests
      env:
        POSTGRES_USER: app
        POSTGRES_PASSWORD: app
        POSTGRES_DB: app
      ports:
        - 5432:5432
      options: >-
        --health-cmd "pg_isready -U app -d app"
        --health-interval 10s
        --health-timeout 5s
        --health-retries 5
    redis:
      image: redis:7-alpine
      ports:
        - 6379:6379
  steps:
    - uses: actions/checkout@v6
    - uses: ./.github/actions/setup-node
      with: { node-version: '22.x' }
    - run: pnpm bundle
    - name: Smoke test bundle
      env:
        # Every env var the binary requires at boot.
        # Match exactly what ci.yml uses — do not invent new values.
        SNOWFLAKE_WORKER_ID: 1
        PG_HOST: 127.0.0.1
        PG_PORT: 5432
        PG_USER: app
        PG_PASSWORD: app
        PG_DATABASE: app
        REDIS_HOST: 127.0.0.1
        REDIS_PORT: 6379
        JWT_SECRET: smoke-test-only-not-a-real-secret
        # If the binary expects migrations on disk, point at the source tree
        MIGRATIONS_DIR: ${{ github.workspace }}/path/to/migrations
      run: bash scripts/workflow/test-server.sh

Why this matters more than it sounds

A release workflow that builds + ships without a real-deps smoke test will publish a Docker image that crashes on first boot in production. The "successful" tag push gives false confidence. The fix is cheap (one health-checked service container + a handful of env vars). The cost of skipping is shipping a broken image.

Aligning two workflows

Use a quick diff to keep ci.yml and release.yml in sync on the smoke section:

bash
diff <(yq '.jobs.test.services' ci.yml) \
     <(yq '.jobs.build.services' release.yml)
diff <(yq '.jobs.test.steps[] | select(.name == "Test Bundle Server")' ci.yml) \
     <(yq '.jobs.build.steps[] | select(.name == "Test Bundle Server")' release.yml)

When they drift, fix release.yml — ci.yml runs more often and is usually the more current of the two.

Common Mistakes

MistakeFix
Adding env vars but forgetting the service containerService container too. The env points at something.
Using localhost from inside the runner with non-default network127.0.0.1 is safer; both work on ubuntu-latest.
Skipping --health-cmd on the serviceSmoke step starts before DB is ready → flaky CRINGE. Always health-check.
Pointing MIGRATIONS_DIR at a relative pathUse ${{ github.workspace }}/... for an absolute path; cwd in CI isn't always repo root.
Inventing values that don't match ci.ymlPick one set of test creds and use them everywhere. Divergence creates more confusion than it solves.
Setting NODE_ENV=production to "match prod"Your prod likely has isDev=false checks that demand real secrets. Either set the secrets or omit NODE_ENV so dev fallbacks engage.

よくある質問

AIスキル「Ci Smoke Needs Real Deps」では何ができますか?

CIのリリース/ビルドパイプラインで、プロジェクトに同梱されたバイナリを外部依存サービス群(PostgreSQL、MySQL、Redis、MongoDB、S3など)に接続して起動するスモークテストが実行され、connection refused、missing-required-env、またはマイグレーションエラーで失敗する場合に使います。CIサービスコンテナとして依存サービスを宣言し、スモークテストのステップに対応する環境変数を設定して解決します。スタックの移行後、新しいci.ymlやコードの実態にリリースワークフローが追従できていない場合によく発生します。

TypingMindでCi Smoke Needs Real Depsを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Ci Smoke Needs Real Depsはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにCi Smoke Needs Real Depsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/Innei/SKILL/tree/main/skills/infrastructure/ci-smoke-needs-real-depsを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Ci Smoke Needs Real Depsを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Ci Smoke Needs Real Depsで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもCi Smoke Needs Real Depsを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Ci Smoke Needs Real Deps」は無料ですか?

InneiがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇