lewibs/dark-factory/agent-push-notification-on-script-success

Claude Code and agent skill by lewibs/dark-factory

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

How to have an agent run a helper Python script, capture its stdout URL or value, and send a PushNotification only when the script succeeds — skipping silently on failure.

Install

npx vskill@latest install lewibs/dark-factory/agent-push-notification-on-script-success

SKILL.md

The same SKILL.md was published earlier as lewibs/dark-factory/agent-push-notification-on-script-success.

When to use

When an agent instruction body needs to call an external helper script (Python or bash), capture its output, and conditionally push a notification to the developer's phone — without blocking the main flow if the script fails or produces no output.

Steps

  1. Run the helper script via Bash — use a Bash tool call or inline pseudocode:

`` run: python3 scripts/<helper>.py <arg1> [--flag N] capture stdout as <value> capture exit code ``

  1. Gate on both exit code AND non-empty output — check both conditions before sending the notification:

`` if exit code == 0 and <value> is non-empty: call PushNotification with message: "<label>: <value>" else: log warning to stderr — skip push, continue ``

  1. Never block the main flow — the push step is best-effort. If the script exits non-zero (e.g., no matching block found, file missing) or returns empty output, log a warning and continue to the next step of the agent's flow without raising an error.
  1. Document the skip branches in the plan — in the plan's flow table, add a branch path for script-failure and no-output so the skip behavior is explicit and reviewers know it is intentional.

Notes

  • The planning-agent's planningAgentPushesUrl flow in agents/featurework/planning/agents/planning-agent.md is the canonical reference implementation of this pattern.
  • The PushNotification tool is a Claude Code built-in and requires no setup. Invoke it with a message string.
  • For the message format, prefer a short human-readable label followed by the URL or value so the notification is useful at a glance on the phone lock screen (e.g., "Plan diagram: https://mermaid.ink/img/...").
  • Do not add the PushNotification tool to an agent's tools: frontmatter unless the agent instruction body explicitly calls it — omitting it means it won't be available at runtime. See declare-tools-in-agent-frontmatter skill.
  • Do not treat stderr as a failure signal. Many helper scripts (including scripts/mermaid_to_image.py) write progress or warning messages to stderr even on a successful run. The only reliable failure signals are: (a) non-zero exit code, and (b) empty stdout. Explicitly tell worker agents "check exit code only — do not treat stderr output as a failure on its own." Without this instruction, agents will often misinterpret diagnostic stderr lines as errors and incorrectly set url/value to null.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository forks
1
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/lewibs/dark-factory/agent-push-notification-on-script-success/badge)](https://verified-skill.com/skills/lewibs/dark-factory/agent-push-notification-on-script-success)

Something wrong with this skill or its page? Tell us.