comfyui_mcp: Command for Claude Code

.opencode/commands/preflight.md

preflight is a command for Claude Code, OpenCode from hybridindie/comfyui_mcp. It costs 31 tokens per session (386 once invoked), scanned A, original, MIT.

A project-specific check that runs the same sequence of quality gates used before a pull request, including skipped-test checks, linting, formatting, type checking, tests, and coverage. Linting finds likely code problems, while type checking catches incompatible uses of values.

In plain words
What is it for?
Running the repository's pre-PR checks in order, verifying test coverage, and identifying the first issue that must be fixed before opening a pull request.
Why use it?
It shows whether the project meets its required checks and stops at the first failure, so later results are not mistaken for a complete pass. It also reports the failing output for diagnosis.

Command for Claude CodeOpenCode

Written for OpenCode and Claude Code: installed under .opencode/, but also a Claude Code command (commands/*.md). Also seen: agent in frontmatter; mentions OpenCode.

This is hybridindie/comfyui_mcp's own configuration. It tells Claude Code and OpenCode how to work on comfyui_mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything comfyui_mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to hybridindie/comfyui_mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/hybridindie/comfyui_mcp/main/.opencode/commands/preflight.md
Clone the repo
git clone --depth 1 https://github.com/hybridindie/comfyui_mcp

Made for: Claude Code, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for preflight

README.md
[![agentmods](https://agentmods.dev/badge/commands/hybridindie/comfyui_mcp/preflight.svg)](https://agentmods.dev/commands/hybridindie/comfyui_mcp/preflight)
Your own site
<a href="https://agentmods.dev/commands/hybridindie/comfyui_mcp/preflight"><img src="https://agentmods.dev/badge/commands/hybridindie/comfyui_mcp/preflight.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 386 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00031 $0.00386
Opus 5 $0.00015 $0.00193
Sonnet 5 $0.00006 $0.00077
Haiku 4.5 $0.00003 $0.00039

Measured 7d ago against content hash 2436e6a0c5c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

preflight scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.opencode/commands/preflight.md · 30 lines

What it actually says

Run the project's preflight gate — the exact sequence CI runs (.github/workflows/ci.yml) and workflow step 4 requires before a PR. Run each check in order and stop at the first failure.

Execute, in order, and report each result:

  1. Zero-skip gate./.opencode/hooks/check-no-skipped-tests.sh
  2. Lintuv run ruff check src/ tests/
  3. Format checkuv run ruff format --check src/ tests/
  4. Type checkuv run mypy src/comfyui_mcp/
  5. Testsuv run pytest -v
  6. Coverageuv run pytest -v --cov=src/comfyui_mcp --cov-report=term-missing --cov-fail-under=90 (CI's threshold)

Rules:

  • Run the checks yourself with bash; do not ask the user to run them.
  • Stop at the first failing check and surface its output verbatim — do not continue to later gates (each step gates the next, per @.opencode/rules/enforcement.md).
  • If all checks pass, report "Preflight clean — ready for PR (workflow step 4)" and stop. Do not open a PR unless explicitly asked.
  • If a check fails, diagnose the failure against the relevant rule (testing.md, enforcement.md, security.md), propose the minimal fix, and stop. Wait for the user before applying.
  • Never skip a check or lower a threshold to make preflight pass.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 30 lines · 31 tokens per session scan A 2436e6a0c5c1

Subscribe to this mod's changes

preflight is a command published in the GitHub repository hybridindie/comfyui_mcp (2 stars, last pushed 5d ago), licensed MIT. It adds 31 tokens to every session and 386 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.