Skip to content
cccskills
FreePublished on GitHub

function-config-warning-once

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

The English summary is being prepared. Showing the original description.

Works withLinkedIn
See how to install

Files included (1)

  • SKILL.md1.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

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

The English summary is being prepared. Showing the original description.

jguadagno/jjgnet-broadcast18Updated Aug 4, 2026

Shared hard rules enforced across all squad agents

The English summary is being prepared. Showing the original description.

jguadagno/jjgnet-broadcast18Updated Aug 4, 2026

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.

The English summary is being prepared. Showing the original description.

jguadagno/jjgnet-broadcast18Updated Aug 4, 2026

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

The English summary is being prepared. Showing the original description.

jguadagno/jjgnet-broadcast18Updated Aug 4, 2026

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

The English summary is being prepared. Showing the original description.

jguadagno/jjgnet-broadcast18Updated Aug 4, 2026

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

The English summary is being prepared. Showing the original description.

jguadagno/jjgnet-broadcast18Updated Aug 4, 2026

See all skills by jguadagno

Report a problem with this skill