Prompt injection detection skill
Analysis
This is a coherent moderation helper, but it sends checked text to HuggingFace and optionally OpenAI and requires users to configure tokens and dependencies carefully.
Findings (4)
Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.
Checks for instructions or behavior that redirect the agent, misuse tools, execute unexpected code, cascade across systems, exploit user trust, or continue outside the intended task.
Required binaries (all must exist): none ... Required env vars: none ... No install spec — this is an instruction-only skill.
The registry metadata under-declares setup requirements because the included helper script uses bash, curl, python3, HF_TOKEN, and optionally OPENAI_API_KEY. The SKILL.md does disclose the token setup, so this is a setup clarity issue rather than hidden behavior.
RESULT="$RESULT,\"injection\":{\"flagged\":false,\"score\":0,\"error\":\"HF_TOKEN not set\"}"If the required HuggingFace token is missing, the script reports an error but still leaves the overall flagged value false. A consumer that checks only the top-level flag could mistake an unavailable check for a safe result.
Checks whether tool use, credentials, dependencies, identity, account access, or inter-agent boundaries are broader than the stated purpose.
export HF_TOKEN="hf_..." # Required ... export OPENAI_API_KEY="sk-..." # Optional
The skill asks for provider API credentials. This is expected for HuggingFace/OpenAI moderation calls and the artifacts do not show hardcoded keys, logging, or unrelated credential use.
Checks for exposed credentials, poisoned memory or context, unclear communication boundaries, or sensitive data that could leave the user's control.
https://router.huggingface.co/hf-inference/models/$MODEL ... -d "{\"inputs\": $json_text}" ... https://api.openai.com/v1/moderations ... -d "{\"model\":\"omni-moderation-latest\",\"input\":$json_text}"The script sends the supplied input or output text to HuggingFace and, when configured, OpenAI for classification. This is disclosed and purpose-aligned, but it is still an external data flow.
