Nodes/civitai-comfy-nodes/Shieldstral Prompt
ComfyUI Node

Shieldstral Prompt

Gate your prompts with Shieldstral before they hit the cloud

By civitai·Created 3 months ago·Updated 2 days ago· 44
Shieldstral Prompt
  • api_config
  • results
  • blocked
  • triggered_policies
  • workflow_id
  • raw_json
positive_prompt
policies_json
policy_overrides_json
negative_prompt
context

If you're building a ComfyUI pipeline that runs unattended - an API wrapper that generates all night, a service you hand to other people - you eventually want a filter between the user's text and the generation. This node is that filter: a hosted moderation check on your prompt, from the same moderation stack Civitai runs on its own platform. It doesn't generate anything; it reads your prompt against natural-language policies and tells you whether it's blocked.

What it is

Shieldstral Prompt from civitai/civitai-comfy-nodes, under Civitai/Analysis/Shieldstral Prompt. It's the shieldstralModeration recipe in prompt mode - the variant that looks at a positive/negative prompt pair. The mechanism is the pack standard: your text goes up to Civitai's orchestration API, a hosted moderation model evaluates it, and structured results come back. No local model, no weights, billed in Buzz per call.

The inputs

  • positive_prompt - required. The prompt you want checked.
  • negative_prompt - optional. Checked the same way; useful for spotting prompt-injection-style junk riding the negative side.
  • context - optional product-specific context folded into the document being moderated. This is the "I'm building an 18+ game, here's the context" field - it lets the policy evaluation understand your framing instead of judging the prompt cold.
  • policies_json - optional. A filter for which policies to evaluate. The tooltip is clear: when omitted, every configured policy for the selected mode runs. Supply a list to check only the ones you care about (and save a few Buzz).
  • policy_overrides_json - optional, and the power user's knob. Existing policies are merged by name, and new names create custom policies. The tooltip spells out the two rules that matter: policy is free-form natural language, and a Query, when supplied, must be a single yes/no question.

The outputs

  • results - the full evaluation, as JSON.
  • blocked - the verdict you actually wire into your logic.
  • triggered_policies - which policies fired. This is the part that tells you why something got blocked, which is what you want for logging and for telling the user.
  • workflow_id / raw_json - the pack standard.

The natural pattern: wire the output into a switch or an IF node, and gate a generator node behind it - blocked prompt goes to a "try again" path, clean prompt flows to the sampler.

Installing it

ComfyUI Manager → Civitai Comfy Nodes → Install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/civitai/civitai-comfy-nodes.git
pip install -r civitai-comfy-nodes/requirements.txt

Gotchas

  • It's a hosted, metered call. Every moderation check spends Buzz. For high-volume pipelines that adds up - batch or cache where you can.
  • Policies are evaluated in their configured set by default. If a result surprises you, check triggered_policies - it's usually a policy you didn't know was configured, and policies_json is how you scope it.
  • Your prompt leaves the machine. This is an API node; the text you send is processed on Civitai's servers. That's inherent to the design, not a bug.
  • Credentials - Civitai Auth node, CIVITAI_API_TOKEN, or sidebar OAuth.
  • The Prompt and Text Shieldstral variants are two nodes, not one - the Text version checks free text, this one checks a prompt pair with negative and context support.
CategoryCivitai/Analysis/Shieldstral Prompt

Inputs (6)

NameTypeDefaultDescription
positive_promptSTRING
policies_jsonoptSTRINGOptional policy filter. When omitted, every configured policy for the selected mode is evaluated.
policy_overrides_jsonoptSTRINGPer-request policy overrides. Existing policies are merged by name and new names create custom policies. Policy is free-form natural language; Query, when supplied, must be a single yes/no question.
negative_promptoptSTRING
contextoptSTRINGOptional product-specific context included in the document being moderated.
api_configoptCIVITAI_CONFIGOptional Civitai Auth connection; defaults to CIVITAI_API_TOKEN or stored OAuth login.

Outputs (5)

NameTypeDescription
resultsSTRING
blockedSTRING
triggered_policiesSTRING
workflow_idSTRING
raw_jsonSTRING