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

function-config-warning-once

Warn once per function run when optional URL configuration is missing, while keeping a safe fallback path.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md1.8 KB

SKILL.md(原文)

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

Function Config Warning Once

Context

Use this pattern when a Function depends on optional configuration to build links or other operator-visible output, but can still proceed in a degraded mode.

Patterns

  • Read and normalize the configuration value once at function entry, not inside each item-processing loop.
  • Treat null, empty, and whitespace-only values as missing configuration.
  • Emit a single warning for the run so operators can spot misconfiguration without noisy repeated log entries.
  • Return a stable fallback value (for example, an empty base URL that yields a relative path) and pass it into downstream methods.

Examples

  • src\JosephGuadagno.Broadcasting.Functions\LinkedIn\NotifyExpiringTokens.cs
    • GetWebBaseUrl() trims the configured URL, warns once when missing, and returns string.Empty
    • RunAsync() resolves the value once and passes it into both notification windows
  • PR #910 applies the pattern without changing the existing relative-link fallback behavior
  • src\JosephGuadagno.Broadcasting.Functions.Tests\LinkedIn\NotifyExpiringTokensTests.cs
    • RunAsync_WhenWebBaseUrlIsMissingOrEmpty_LogsWarningAndUsesRelativeLink(...) proves the warning is emitted for null/empty/whitespace settings while preserving the relative-link fallback

Anti-Patterns

  • Looking up the same config setting inside every per-user send path
  • Logging one warning per token or email when the root cause is a single missing app setting
  • Silently falling back to relative links with no operator-visible warning

レビュー

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

同じリポジトリのスキル

概要と使いどころ

Standard collaboration patterns for all squad agents — worktree awareness, decisions, cross-agent communication

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

jguadagno/jjgnet-broadcast182026年8月4日 更新

Shared hard rules enforced across all squad agents

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

jguadagno/jjgnet-broadcast182026年8月4日 更新

Comprehensive AI prompt engineering safety review and improvement prompt. Analyzes prompts for safety, bias, security vulnerabilities, and effectiveness while providing detailed improvement recommendations with extensive frameworks, testing methodologies, and educational content.

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

jguadagno/jjgnet-broadcast182026年8月4日 更新

Migrate API controller scope checks to framework-enforced authorization policies while preserving ownership checks.

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

jguadagno/jjgnet-broadcast182026年8月4日 更新

Review API DTO implementations for contract/domain separation, mapping patterns, and REST compliance

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

jguadagno/jjgnet-broadcast182026年8月4日 更新

Register shared claims transformation and hierarchical role policies in the API without breaking existing scope enforcement.

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

jguadagno/jjgnet-broadcast182026年8月4日 更新

jguadagno のスキルをすべて見る

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