lewibs/dark-factory/agent-push-notification-on-script-success
Claude Code and agent skill by lewibs/dark-factory
- community
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-successSKILL.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
- 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 ``
- 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 ``
- 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.
- Document the skip branches in the plan — in the plan's flow table, add a
branchpath forscript-failureandno-outputso the skip behavior is explicit and reviewers know it is intentional.
Notes
- The planning-agent's
planningAgentPushesUrlflow inagents/featurework/planning/agents/planning-agent.mdis the canonical reference implementation of this pattern. - The PushNotification tool is a Claude Code built-in and requires no setup. Invoke it with a
messagestring. - 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. Seedeclare-tools-in-agent-frontmatterskill. - 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
- SKILL.md in the repositoryCheckingskills/agent-push-notification-on-script-success/SKILL.md
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
[](https://verified-skill.com/skills/lewibs/dark-factory/agent-push-notification-on-script-success)