ychampion/cskill-agents/empty-payload-sentinel-guard

Claude Code and agent skill by ychampion/cskill-agents

Trust tier 3
  • community
Source check pending

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

Guard requests from closing instantly when a tool returns nothing by injecting the sentinel message and logging the event.

Install

npx vskill@latest install ychampion/cskill-agents/empty-payload-sentinel-guard

SKILL.md

SKILL: Empty Payload Sentinel Guard

Domain: tool-orchestration Trigger: Apply this when a tool_result block might legitimately be empty (shell commands with no stdout, MCP commands returning content: [], statements that finish silently) so the assistant still sees something to react to. Source Pattern: Distilled from reviewed tool-loop and result-shaping patterns.

Core Method

Run the same emptiness check used inside isToolResultContentEmpty: undefined/null, whitespace strings, empty arrays, or arrays whose text blocks are themselves empty count as empty. When the check fires, log tengu_tool_empty_result with the sanitized tool name and short-circuit the persistence path by returning the original block with content: "({toolName} completed with no output)", guaranteeing the model always sees at least one token even when the tool produced nothing.

Key Rules

  • Copy the normalized emptiness logic from isToolResultContentEmpty so structured arrays and whitespace-only strings are treated identically.
  • Call sanitizeToolNameForAnalytics before logging so GrowthBook metrics stay consistent.
  • Only swap the content; leave tool_use_id, tool_version, and other metadata untouched.
  • Keep the sentinel text stable—downstream budgeting, logging, and tests rely on the literal ({toolName} completed with no output) message.

Example Application

Invoke this guard inside maybePersistLargeToolResult before any size checks; if the guard fires, it returns the sentinel immediately and prevents the empty </function_results> tail from tricking Claude into ending the turn.

Anti-Patterns (What NOT to do)

  • Don’t reinject a sentinel into non-empty results or structured content; the guard is exclusively for truly empty outputs.
  • Don’t skip the analytics event—without it you lose signals that a tool ran but returned nothing.
  • Don’t persist an empty file just to explain emptiness; the guard rewrites the content in memory without writing disk files.

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 stars
36
Repository forks
7
7-day trend score
18

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/ychampion/cskill-agents/empty-payload-sentinel-guard/badge)](https://verified-skill.com/skills/ychampion/cskill-agents/empty-payload-sentinel-guard)

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