[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BZJWZ3VRBDBFTX40RYF44Y":3,"skill-same:01M7BZJWZ3VRBDBFTX40RYF44Y":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":42,"repositoryHtmlUrl":43,"repositoryHomepageUrl":44,"ownerHtmlUrl":45,"ownerBlogUrl":6,"ownerDescription":46,"updatedAt":47,"install":48,"resources":61},"01M7BZJWZ3VRBDBFTX40RYF44Y","comfyui-gateway",null,"REST API gateway for ComfyUI servers. Workflow management, job queuing, webhooks, caching, auth, rate limiting, and image delivery (URL + base64).","YYC-Cube\u002FYYC3-Knowledge-Base","YYC-Cube","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235006543?v=4","01M79J2PH4SWD2X0825X6PN748","yyc3","01M79J2PHVK3F6ZBYT8K2SCZCW",1,"MIT","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-antigravity-awesome-skills\u002Fplugins\u002Fantigravity-awesome-skills-claude\u002Fskills\u002Fcomfyui-gateway\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: comfyui-gateway\ndescription: REST API gateway for ComfyUI servers. Workflow management, job queuing, webhooks, caching, auth, rate limiting, and image delivery (URL + base64).\nrisk: safe\nsource: community\ndate_added: '2026-03-06'\nauthor: renat\ntags:\n- comfyui\n- api-gateway\n- image-generation\n- typescript\ntools:\n- claude-code\n- antigravity\n- cursor\n- gemini-cli\n- codex-cli\n---\n\n# ComfyUI Gateway\n\n## Overview\n\nREST API gateway for ComfyUI servers. Workflow management, job queuing, webhooks, caching, auth, rate limiting, and image delivery (URL + base64).\n\n## When to Use This Skill\n\n- When the user mentions \"comfyui\" or related topics\n- When the user mentions \"comfy ui\" or related topics\n- When the user mentions \"stable diffusion api gateway\" or related topics\n- When the user mentions \"gateway comfyui\" or related topics\n- When the user mentions \"api gateway imagens\" or related topics\n- When the user mentions \"queue imagens\" or related topics\n\n## Do Not Use This Skill When\n\n- The task is unrelated to comfyui gateway\n- A simpler, more specific tool can handle the request\n- The user needs general-purpose assistance without domain expertise\n\n## How It Works\n\nA production-grade REST API gateway that transforms any ComfyUI server into a universal,\nsecure, and scalable service. Supports workflow templates with placeholders, job queuing\nwith priorities, webhook callbacks, result caching, and multiple storage backends.\n\n## Architecture Overview\n\n```\n┌─────────────┐     ┌──────────────────────────────────┐     ┌──────────┐\n│   Clients    │────▶│        ComfyUI Gateway           │────▶│ ComfyUI  │\n│ (curl, n8n,  │     │                                  │     │ Server   │\n│  Claude,     │     │  ┌─────────┐  ┌──────────────┐  │     │ (local\u002F  │\n│  Lovable,    │     │  │ Fastify │  │ BullMQ Queue │  │     │  remote) │\n│  Supabase)   │     │  │ API     │──│ (or in-mem)  │  │     └──────────┘\n│              │◀────│  └─────────┘  └──────────────┘  │\n│              │     │  ┌─────────┐  ┌──────────────┐  │     ┌──────────┐\n│              │     │  │ Auth +  │  │ Storage      │  │────▶│ S3\u002FMinIO │\n│              │     │  │ RateL.  │  │ (local\u002FS3)   │  │     │(optional)│\n│              │     │  └─────────┘  └──────────────┘  │     └──────────┘\n└─────────────┘     └──────────────────────────────────┘\n```\n\n## Components\n\n| Component | Purpose | File(s) |\n|-----------|---------|---------|\n| **API Gateway** | REST endpoints, validation, CORS | `src\u002Fapi\u002F` |\n| **Worker** | Processes jobs, talks to ComfyUI | `src\u002Fworker\u002F` |\n| **ComfyUI Client** | HTTP + WebSocket to ComfyUI | `src\u002Fcomfyui\u002F` |\n| **Workflow Manager** | Template storage, placeholder rendering | `src\u002Fworkflows\u002F` |\n| **Storage Provider** | Local disk + S3-compatible | `src\u002Fstorage\u002F` |\n| **Cache** | Hash-based deduplication | `src\u002Fcache\u002F` |\n| **Notifier** | Webhook with HMAC signing | `src\u002Fnotifications\u002F` |\n| **Auth** | API key + JWT + rate limiting | `src\u002Fauth\u002F` |\n| **DB** | SQLite (better-sqlite3) or Postgres | `src\u002Fdb\u002F` |\n| **CLI** | Init, add-workflow, run, worker | `src\u002Fcli\u002F` |\n\n## Quick Start\n\n```bash\n\n## 1. Install\n\ncd comfyui-gateway\nnpm install\n\n## 2. Configure\n\ncp .env.example .env\n\n## 3. Initialize\n\nnpx tsx src\u002Fcli\u002Findex.ts init\n\n## 4. Add A Workflow\n\nnpx tsx src\u002Fcli\u002Findex.ts add-workflow .\u002Fworkflows\u002Fsdxl_realism_v1.json \\\n  --id sdxl_realism_v1 --schema .\u002Fworkflows\u002Fsdxl_realism_v1.schema.json\n\n## 5. Start (Api + Worker In One Process)\n\nnpm run dev\n\n## Or Separately:\n\nnpm run start:api   # API only\nnpm run start:worker # Worker only\n```\n\n## Environment Variables\n\nAll configuration is via `.env` — nothing is hardcoded:\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `PORT` | `3000` | API server port |\n| `HOST` | `0.0.0.0` | API bind address |\n| `COMFYUI_URL` | `http:\u002F\u002F127.0.0.1:8188` | ComfyUI server URL |\n| `COMFYUI_TIMEOUT_MS` | `300000` | Max wait for ComfyUI (5min) |\n| `API_KEYS` | `\"\"` | Comma-separated API keys (`key:role`) |\n| `JWT_SECRET` | `\"\"` | JWT signing secret (empty = JWT disabled) |\n| `REDIS_URL` | `\"\"` | Redis URL (empty = in-memory queue) |\n| `DATABASE_URL` | `.\u002Fdata\u002Fgateway.db` | SQLite path or Postgres URL |\n| `STORAGE_PROVIDER` | `local` | `local` or `s3` |\n| `STORAGE_LOCAL_PATH` | `.\u002Fdata\u002Foutputs` | Local output directory |\n| `S3_ENDPOINT` | `\"\"` | S3\u002FMinIO endpoint |\n| `S3_BUCKET` | `\"\"` | S3 bucket name |\n| `S3_ACCESS_KEY` | `\"\"` | S3 access key |\n| `S3_SECRET_KEY` | `\"\"` | S3 secret key |\n| `S3_REGION` | `us-east-1` | S3 region |\n| `WEBHOOK_SECRET` | `\"\"` | HMAC signing secret for webhooks |\n| `WEBHOOK_ALLOWED_DOMAINS` | `*` | Comma-separated allowed callback domains |\n| `MAX_CONCURRENCY` | `1` | Parallel jobs per GPU |\n| `MAX_IMAGE_SIZE` | `2048` | Maximum dimension (width or height) |\n| `MAX_BATCH_SIZE` | `4` | Maximum batch size |\n| `CACHE_ENABLED` | `true` | Enable result caching |\n| `CACHE_TTL_SECONDS` | `86400` | Cache TTL (24h) |\n| `RATE_LIMIT_MAX` | `100` | Requests per window |\n| `RATE_LIMIT_WINDOW_MS` | `60000` | Rate limit window (1min) |\n| `LOG_LEVEL` | `info` | Pino log level |\n| `PRIVACY_MODE` | `false` | Redact prompts from logs |\n| `CORS_ORIGINS` | `*` | Allowed CORS origins |\n| `NODE_ENV` | `development` | Environment |\n\n## Health & Capabilities\n\n```\nGET \u002Fhealth\n→ { ok: true, version, comfyui: { reachable, url, models? }, uptime }\n\nGET \u002Fcapabilities\n→ { workflows: [...], maxSize, maxBatch, formats, storageProvider }\n```\n\n## Workflows (Crud)\n\n```\nGET    \u002Fworkflows            → list all workflows\nPOST   \u002Fworkflows            → register new workflow\nGET    \u002Fworkflows\u002F:id        → workflow details + input schema\nPUT    \u002Fworkflows\u002F:id        → update workflow\nDELETE \u002Fworkflows\u002F:id        → remove workflow\n```\n\n## Jobs\n\n```\nPOST   \u002Fjobs                 → create job (returns jobId immediately)\nGET    \u002Fjobs\u002F:jobId          → status + progress + outputs\nGET    \u002Fjobs\u002F:jobId\u002Flogs     → sanitized execution logs\nPOST   \u002Fjobs\u002F:jobId\u002Fcancel   → request cancellation\nGET    \u002Fjobs                 → list jobs (filters: status, workflowId, after, before, limit)\n```\n\n## Outputs\n\n```\nGET    \u002Foutputs\u002F:jobId       → list output files + metadata\nGET    \u002Foutputs\u002F:jobId\u002F:file → download\u002Fstream file\n```\n\n## Job Lifecycle\n\n```\nqueued → running → succeeded\n                 → failed\n                 → canceled\n```\n\n1. Client POSTs to `\u002Fjobs` with workflowId + inputs\n2. Gateway validates, checks cache, checks idempotency\n3. If cache hit → returns existing outputs immediately (status: `cache_hit`)\n4. Otherwise → enqueues job, returns `jobId` + `pollUrl`\n5. Worker picks up job, renders workflow template, submits to ComfyUI\n6. Worker polls ComfyUI for progress (or listens via WebSocket)\n7. On completion → downloads outputs, stores them, updates DB\n8. If callbackUrl → sends signed webhook POST\n9. Client polls `\u002Fjobs\u002F:jobId` or receives webhook\n\n## Workflow Templates\n\nWorkflows are ComfyUI JSON with `{{placeholder}}` tokens. The gateway resolves\nthese at runtime using the job's `inputs` and `params`:\n\n```json\n{\n  \"3\": {\n    \"class_type\": \"KSampler\",\n    \"inputs\": {\n      \"seed\": \"{{seed}}\",\n      \"steps\": \"{{steps}}\",\n      \"cfg\": \"{{cfg}}\",\n      \"sampler_name\": \"{{sampler}}\",\n      \"scheduler\": \"normal\",\n      \"denoise\": 1,\n      \"model\": [\"4\", 0],\n      \"positive\": [\"6\", 0],\n      \"negative\": [\"7\", 0],\n      \"latent_image\": [\"5\", 0]\n    }\n  },\n  \"6\": {\n    \"class_type\": \"CLIPTextEncode\",\n    \"inputs\": {\n      \"text\": \"{{prompt}}\",\n      \"clip\": [\"4\", 1]\n    }\n  }\n}\n```\n\nEach workflow has an `inputSchema` (Zod) that validates what the client sends.\n\n## Security Model\n\n- **API Keys**: `X-API-Key` header; keys configured via `API_KEYS` env var as `key1:admin,key2:user`\n- **JWT**: Optional; when `JWT_SECRET` is set, accepts `Authorization: Bearer \u003Ctoken>`\n- **Roles**: `admin` (full CRUD on workflows + jobs), `user` (create jobs, read own jobs)\n- **Rate Limiting**: Per key + per IP, configurable window and max\n- **Webhook Security**: HMAC-SHA256 signature in `X-Signature` header\n- **Callback Allowlist**: Only approved domains receive webhooks\n- **Privacy Mode**: When enabled, prompts are redacted from logs and DB\n- **Idempotency**: `metadata.requestId` prevents duplicate processing\n- **CORS**: Configurable allowed origins\n- **Input Validation**: Zod schemas on every endpoint; max size\u002Fbatch enforced\n\n## Comfyui Integration\n\nThe gateway communicates with ComfyUI via its native HTTP API:\n\n| ComfyUI Endpoint | Gateway Usage |\n|------------------|---------------|\n| `POST \u002Fprompt` | Submit rendered workflow |\n| `GET \u002Fhistory\u002F{id}` | Poll job completion |\n| `GET \u002Fview?filename=...` | Download generated images |\n| `GET \u002Fobject_info` | Discover available nodes\u002Fmodels |\n| `WS \u002Fws?clientId=...` | Real-time progress (optional) |\n\nThe client auto-detects ComfyUI version and adapts:\n- Tries WebSocket first for progress, falls back to polling\n- Handles both `\u002Fhistory` response formats\n- Detects OOM errors and classifies them with recommendations\n\n## Cache Strategy\n\nCache key = SHA-256 of `workflowId + sorted(inputs) + sorted(params) + checkpoint`.\nOn cache hit, the gateway returns a \"virtual\" job with pre-existing outputs — no GPU\ncomputation needed. Cache is stored alongside job data in the DB with configurable TTL.\n\n## Error Classification\n\n| Error Code | Meaning | Retry? |\n|------------|---------|--------|\n| `COMFYUI_UNREACHABLE` | Cannot connect to ComfyUI | Yes (with backoff) |\n| `COMFYUI_OOM` | Out of memory on GPU | No (reduce dimensions) |\n| `COMFYUI_TIMEOUT` | Execution exceeded timeout | Maybe (increase timeout) |\n| `COMFYUI_NODE_ERROR` | Node execution failed | No (check workflow) |\n| `VALIDATION_ERROR` | Invalid inputs | No (fix request) |\n| `WORKFLOW_NOT_FOUND` | Unknown workflowId | No (register workflow) |\n| `RATE_LIMITED` | Too many requests | Yes (wait) |\n| `AUTH_FAILED` | Invalid\u002Fmissing credentials | No (fix auth) |\n| `CACHE_HIT` | (Not an error) Served from cache | N\u002FA |\n\n## Bundled Workflows\n\nThree production-ready workflow templates are included:\n\n## 1. `Sdxl_Realism_V1` — Photorealistic Generation\n\n- Checkpoint: SDXL base\n- Optimized for: Portraits, landscapes, product shots\n- Default: 1024x1024, 30 steps, cfg 7.0\n\n## 2. `Sprite_Transparent_Bg` — Game Sprites With Alpha\n\n- Checkpoint: SD 1.5 or SDXL\n- Optimized for: 2D game assets, transparent backgrounds\n- Default: 512x512, 25 steps, cfg 7.5\n\n## 3. `Icon_512` — App Icons With Optional Upscale\n\n- Checkpoint: SDXL base\n- Optimized for: Square icons, clean edges\n- Default: 512x512, 20 steps, cfg 6.0, optional 2x upscale\n\n## Observability\n\n- **Structured Logs**: Pino JSON logs with `correlationId` on every request\n- **Metrics**: Jobs queued\u002Frunning\u002Fsucceeded\u002Ffailed, avg processing time, cache hit rate\n- **Audit Log**: Admin actions (workflow CRUD, key management) logged with timestamp + actor\n\n## Cli Reference\n\n```bash\nnpx tsx src\u002Fcli\u002Findex.ts init                    # Create dirs, .env.example\nnpx tsx src\u002Fcli\u002Findex.ts add-workflow \u003Cfile>      # Register workflow template\n  --id \u003Cid> --name \u003Cname> --schema \u003Cschema.json>\nnpx tsx src\u002Fcli\u002Findex.ts list-workflows           # Show registered workflows\nnpx tsx src\u002Fcli\u002Findex.ts run                      # Start API server\nnpx tsx src\u002Fcli\u002Findex.ts worker                   # Start job worker\nnpx tsx src\u002Fcli\u002Findex.ts health                   # Check ComfyUI connectivity\n```\n\n## Troubleshooting\n\nRead `references\u002Ftroubleshooting.md` for detailed guidance on:\n- ComfyUI not reachable (firewall, wrong port, Docker networking)\n- OOM errors (reduce resolution, batch, or steps)\n- Slow generation (GPU utilization, queue depth, model loading)\n- Webhook failures (DNS, SSL, timeout, domain allowlist)\n- Redis connection issues (fallback to in-memory)\n- Storage permission errors (local path, S3 credentials)\n\n## Integration Examples\n\nRead `references\u002Fintegration.md` for ready-to-use examples with:\n- curl commands for every endpoint\n- n8n webhook workflow\n- Supabase Edge Function caller\n- Claude Code \u002F Claude.ai integration\n- Python requests client\n- JavaScript fetch client\n\n## File Structure\n\n```\ncomfyui-gateway\u002F\n├── SKILL.md\n├── package.json\n├── tsconfig.json\n├── .env.example\n├── src\u002F\n│   ├── api\u002F\n│   │   ├── server.ts          # Fastify setup + plugins\n│   │   ├── routes\u002F\n│   │   │   ├── health.ts      # GET \u002Fhealth, \u002Fcapabilities\n│   │   │   ├── workflows.ts   # CRUD \u002Fworkflows\n│   │   │   ├── jobs.ts        # CRUD \u002Fjobs\n│   │   │   └── outputs.ts     # GET \u002Foutputs\n│   │   ├── middleware\u002F\n│   │   │   └── error-handler.ts\n│   │   └── plugins\u002F\n│   │       ├── auth.ts        # API key + JWT\n│   │       ├── rate-limit.ts\n│   │       └── cors.ts\n│   ├── worker\u002F\n│   │   └── processor.ts       # Job processor\n│   ├── comfyui\u002F\n│   │   └── client.ts          # ComfyUI HTTP + WS client\n│   ├── storage\u002F\n│   │   ├── index.ts           # Provider factory\n│   │   ├── local.ts           # Local filesystem\n│   │   └── s3.ts              # S3-compatible\n│   ├── workflows\u002F\n│   │   └── manager.ts         # Template CRUD + rendering\n│   ├── cache\u002F\n│   │   └── index.ts           # Hash-based cache\n│   ├── notifications\u002F\n│   │   └── webhook.ts         # HMAC-signed callbacks\n│   ├── auth\u002F\n│   │   └── index.ts           # Key\u002FJWT validation + roles\n│   ├── db\u002F\n│   │   ├── index.ts           # DB factory (SQLite\u002FPostgres)\n│   │   └── migrations.ts      # Schema creation\n│   ├── cli\u002F\n│   │   └── index.ts           # CLI commands\n│   ├── utils\u002F\n│   │   ├── config.ts          # Env loading + validation\n│   │   ├── errors.ts          # Error classes\n│   │   ├── logger.ts          # Pino setup\n│   │   └── hash.ts            # SHA-256 hashing\n│   └── index.ts               # Main entrypoint\n├── config\u002F\n│   └── workflows\u002F             # Bundled workflow templates\n│       ├── sdxl_realism_v1.json\n│       ├── sdxl_realism_v1.schema.json\n│       ├── sprite_transparent_bg.json\n│       ├── sprite_transparent_bg.schema.json\n│       ├── icon_512.json\n│       └── icon_512.schema.json\n├── data\u002F\n│   ├── outputs\u002F               # Generated images\n│   ├── workflows\u002F             # User-added wor\n\n## Best Practices\n\n- Provide clear, specific context about your project and requirements\n- Review all suggestions before applying them to production code\n- Combine with other complementary skills for comprehensive analysis\n\n## Common Pitfalls\n\n- Using this skill for tasks outside its domain expertise\n- Applying recommendations without understanding your specific context\n- Not providing enough project context for accurate analysis\n\n## Related Skills\n\n- `ai-studio-image` - Complementary skill for enhanced analysis\n- `image-studio` - Complementary skill for enhanced analysis\n- `stability-ai` - Complementary skill for enhanced analysis\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","# ComfyUI Gateway\n\n## Overview\n\nREST API gateway for ComfyUI servers. Workflow management, job queuing, webhooks, caching, auth, rate limiting, and image delivery (URL + base64).\n\n## When to Use This Skill\n\n- When the user mentions \"comfyui\" or related topics\n- When the user mentions \"comfy ui\" or related topics\n- When the user mentions \"stable diffusion api gateway\" or related topics\n- When the user mentions \"gateway comfyui\" or related topics\n- When the user mentions \"api gateway imagens\" or related topics\n- When the user mentions \"queue imagens\" or related topics\n\n## Do Not Use This Skill When\n\n- The task is unrelated to comfyui gateway\n- A simpler, more specific tool can handle the request\n- The user needs general-purpose assistance without domain expertise\n\n## How It Works\n\nA production-grade REST API gateway that transforms any ComfyUI server into a universal,\nsecure, and scalable service. Supports workflow templates with placeholders, job queuing\nwith priorities, webhook callbacks, result caching, and multiple storage backends.\n\n## Architecture Overview\n\n```\n┌─────────────┐     ┌──────────────────────────────────┐     ┌──────────┐\n│   Clients    │────▶│        ComfyUI Gateway           │────▶│ ComfyUI  │\n│ (curl, n8n,  │     │                                  │     │ Server   │\n│  Claude,     │     │  ┌─────────┐  ┌──────────────┐  │     │ (local\u002F  │\n│  Lovable,    │     │  │ Fastify │  │ BullMQ Queue │  │     │  remote) │\n│  Supabase)   │     │  │ API     │──│ (or in-mem)  │  │     └──────────┘\n│              │◀────│  └─────────┘  └──────────────┘  │\n│              │     │  ┌─────────┐  ┌──────────────┐  │     ┌──────────┐\n│              │     │  │ Auth +  │  │ Storage      │  │────▶│ S3\u002FMinIO │\n│              │     │  │ RateL.  │  │ (local\u002FS3)   │  │     │(optional)│\n│              │     │  └─────────┘  └──────────────┘  │     └──────────┘\n└─────────────┘     └──────────────────────────────────┘\n```\n\n## Components\n\n| Component | Purpose | File(s) |\n|-----------|---------|---------|\n| **API Gateway** | REST endpoints, validation, CORS | `src\u002Fapi\u002F` |\n| **Worker** | Processes jobs, talks to ComfyUI | `src\u002Fworker\u002F` |\n| **ComfyUI Client** | HTTP + WebSocket to ComfyUI | `src\u002Fcomfyui\u002F` |\n| **Workflow Manager** | Template storage, placeholder rendering | `src\u002Fworkflows\u002F` |\n| **Storage Provider** | Local disk + S3-compatible | `src\u002Fstorage\u002F` |\n| **Cache** | Hash-based deduplication | `src\u002Fcache\u002F` |\n| **Notifier** | Webhook with HMAC signing | `src\u002Fnotifications\u002F` |\n| **Auth** | API key + JWT + rate limiting | `src\u002Fauth\u002F` |\n| **DB** | SQLite (better-sqlite3) or Postgres | `src\u002Fdb\u002F` |\n| **CLI** | Init, add-workflow, run, worker | `src\u002Fcli\u002F` |\n\n## Quick Start\n\n```bash\n\n## 1. Install\n\ncd comfyui-gateway\nnpm install\n\n## 2. Configure\n\ncp .env.example .env\n\n## 3. Initialize\n\nnpx tsx src\u002Fcli\u002Findex.ts init\n\n## 4. Add A Workflow\n\nnpx tsx src\u002Fcli\u002Findex.ts add-workflow .\u002Fworkflows\u002Fsdxl_realism_v1.json \\\n  --id sdxl_realism_v1 --schema .\u002Fworkflows\u002Fsdxl_realism_v1.schema.json\n\n## 5. Start (Api + Worker In One Process)\n\nnpm run dev\n\n## Or Separately:\n\nnpm run start:api   # API only\nnpm run start:worker # Worker only\n```\n\n## Environment Variables\n\nAll configuration is via `.env` — nothing is hardcoded:\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `PORT` | `3000` | API server port |\n| `HOST` | `0.0.0.0` | API bind address |\n| `COMFYUI_URL` | `http:\u002F\u002F127.0.0.1:8188` | ComfyUI server URL |\n| `COMFYUI_TIMEOUT_MS` | `300000` | Max wait for ComfyUI (5min) |\n| `API_KEYS` | `\"\"` | Comma-separated API keys (`key:role`) |\n| `JWT_SECRET` | `\"\"` | JWT signing secret (empty = JWT disabled) |\n| `REDIS_URL` | `\"\"` | Redis URL (empty = in-memory queue) |\n| `DATABASE_URL` | `.\u002Fdata\u002Fgateway.db` | SQLite path or Postgres URL |\n| `STORAGE_PROVIDER` | `local` | `local` or `s3` |\n| `STORAGE_LOCAL_PATH` | `.\u002Fdata\u002Foutputs` | Local output directory |\n| `S3_ENDPOINT` | `\"\"` | S3\u002FMinIO endpoint |\n| `S3_BUCKET` | `\"\"` | S3 bucket name |\n| `S3_ACCESS_KEY` | `\"\"` | S3 access key |\n| `S3_SECRET_KEY` | `\"\"` | S3 secret key |\n| `S3_REGION` | `us-east-1` | S3 region |\n| `WEBHOOK_SECRET` | `\"\"` | HMAC signing secret for webhooks |\n| `WEBHOOK_ALLOWED_DOMAINS` | `*` | Comma-separated allowed callback domains |\n| `MAX_CONCURRENCY` | `1` | Parallel jobs per GPU |\n| `MAX_IMAGE_SIZE` | `2048` | Maximum dimension (width or height) |\n| `MAX_BATCH_SIZE` | `4` | Maximum batch size |\n| `CACHE_ENABLED` | `true` | Enable result caching |\n| `CACHE_TTL_SECONDS` | `86400` | Cache TTL (24h) |\n| `RATE_LIMIT_MAX` | `100` | Requests per window |\n| `RATE_LIMIT_WINDOW_MS` | `60000` | Rate limit window (1min) |\n| `LOG_LEVEL` | `info` | Pino log level |\n| `PRIVACY_MODE` | `false` | Redact prompts from logs |\n| `CORS_ORIGINS` | `*` | Allowed CORS origins |\n| `NODE_ENV` | `development` | Environment |\n\n## Health & Capabilities\n\n```\nGET \u002Fhealth\n→ { ok: true, version, comfyui: { reachable, url, models? }, uptime }\n\nGET \u002Fcapabilities\n→ { workflows: [...], maxSize, maxBatch, formats, storageProvider }\n```\n\n## Workflows (Crud)\n\n```\nGET    \u002Fworkflows            → list all workflows\nPOST   \u002Fworkflows            → register new workflow\nGET    \u002Fworkflows\u002F:id        → workflow details + input schema\nPUT    \u002Fworkflows\u002F:id        → update workflow\nDELETE \u002Fworkflows\u002F:id        → remove workflow\n```\n\n## Jobs\n\n```\nPOST   \u002Fjobs                 → create job (returns jobId immediately)\nGET    \u002Fjobs\u002F:jobId          → status + progress + outputs\nGET    \u002Fjobs\u002F:jobId\u002Flogs     → sanitized execution logs\nPOST   \u002Fjobs\u002F:jobId\u002Fcancel   → request cancellation\nGET    \u002Fjobs                 → list jobs (filters: status, workflowId, after, before, limit)\n```\n\n## Outputs\n\n```\nGET    \u002Foutputs\u002F:jobId       → list output files + metadata\nGET    \u002Foutputs\u002F:jobId\u002F:file → download\u002Fstream file\n```\n\n## Job Lifecycle\n\n```\nqueued → running → succeeded\n                 → failed\n                 → canceled\n```\n\n1. Client POSTs to `\u002Fjobs` with workflowId + inputs\n2. Gateway validates, checks cache, checks idempotency\n3. If cache hit → returns existing outputs immediately (status: `cache_hit`)\n4. Otherwise → enqueues job, returns `jobId` + `pollUrl`\n5. Worker picks up job, renders workflow template, submits to ComfyUI\n6. Worker polls ComfyUI for progress (or listens via WebSocket)\n7. On completion → downloads outputs, stores them, updates DB\n8. If callbackUrl → sends signed webhook POST\n9. Client polls `\u002Fjobs\u002F:jobId` or receives webhook\n\n## Workflow Templates\n\nWorkflows are ComfyUI JSON with `{{placeholder}}` tokens. The gateway resolves\nthese at runtime using the job's `inputs` and `params`:\n\n```json\n{\n  \"3\": {\n    \"class_type\": \"KSampler\",\n    \"inputs\": {\n      \"seed\": \"{{seed}}\",\n      \"steps\": \"{{steps}}\",\n      \"cfg\": \"{{cfg}}\",\n      \"sampler_name\": \"{{sampler}}\",\n      \"scheduler\": \"normal\",\n      \"denoise\": 1,\n      \"model\": [\"4\", 0],\n      \"positive\": [\"6\", 0],\n      \"negative\": [\"7\", 0],\n      \"latent_image\": [\"5\", 0]\n    }\n  },\n  \"6\": {\n    \"class_type\": \"CLIPTextEncode\",\n    \"inputs\": {\n      \"text\": \"{{prompt}}\",\n      \"clip\": [\"4\", 1]\n    }\n  }\n}\n```\n\nEach workflow has an `inputSchema` (Zod) that validates what the client sends.\n\n## Security Model\n\n- **API Keys**: `X-API-Key` header; keys configured via `API_KEYS` env var as `key1:admin,key2:user`\n- **JWT**: Optional; when `JWT_SECRET` is set, accepts `Authorization: Bearer \u003Ctoken>`\n- **Roles**: `admin` (full CRUD on workflows + jobs), `user` (create jobs, read own jobs)\n- **Rate Limiting**: Per key + per IP, configurable window and max\n- **Webhook Security**: HMAC-SHA256 signature in `X-Signature` header\n- **Callback Allowlist**: Only approved domains receive webhooks\n- **Privacy Mode**: When enabled, prompts are redacted from logs and DB\n- **Idempotency**: `metadata.requestId` prevents duplicate processing\n- **CORS**: Configurable allowed origins\n- **Input Validation**: Zod schemas on every endpoint; max size\u002Fbatch enforced\n\n## Comfyui Integration\n\nThe gateway communicates with ComfyUI via its native HTTP API:\n\n| ComfyUI Endpoint | Gateway Usage |\n|------------------|---------------|\n| `POST \u002Fprompt` | Submit rendered workflow |\n| `GET \u002Fhistory\u002F{id}` | Poll job completion |\n| `GET \u002Fview?filename=...` | Download generated images |\n| `GET \u002Fobject_info` | Discover available nodes\u002Fmodels |\n| `WS \u002Fws?clientId=...` | Real-time progress (optional) |\n\nThe client auto-detects ComfyUI version and adapts:\n- Tries WebSocket first for progress, falls back to polling\n- Handles both `\u002Fhistory` response formats\n- Detects OOM errors and classifies them with recommendations\n\n## Cache Strategy\n\nCache key = SHA-256 of `workflowId + sorted(inputs) + sorted(params) + checkpoint`.\nOn cache hit, the gateway returns a \"virtual\" job with pre-existing outputs — no GPU\ncomputation needed. Cache is stored alongside job data in the DB with configurable TTL.\n\n## Error Classification\n\n| Error Code | Meaning | Retry? |\n|------------|---------|--------|\n| `COMFYUI_UNREACHABLE` | Cannot connect to ComfyUI | Yes (with backoff) |\n| `COMFYUI_OOM` | Out of memory on GPU | No (reduce dimensions) |\n| `COMFYUI_TIMEOUT` | Execution exceeded timeout | Maybe (increase timeout) |\n| `COMFYUI_NODE_ERROR` | Node execution failed | No (check workflow) |\n| `VALIDATION_ERROR` | Invalid inputs | No (fix request) |\n| `WORKFLOW_NOT_FOUND` | Unknown workflowId | No (register workflow) |\n| `RATE_LIMITED` | Too many requests | Yes (wait) |\n| `AUTH_FAILED` | Invalid\u002Fmissing credentials | No (fix auth) |\n| `CACHE_HIT` | (Not an error) Served from cache | N\u002FA |\n\n## Bundled Workflows\n\nThree production-ready workflow templates are included:\n\n## 1. `Sdxl_Realism_V1` — Photorealistic Generation\n\n- Checkpoint: SDXL base\n- Optimized for: Portraits, landscapes, product shots\n- Default: 1024x1024, 30 steps, cfg 7.0\n\n## 2. `Sprite_Transparent_Bg` — Game Sprites With Alpha\n\n- Checkpoint: SD 1.5 or SDXL\n- Optimized for: 2D game assets, transparent backgrounds\n- Default: 512x512, 25 steps, cfg 7.5\n\n## 3. `Icon_512` — App Icons With Optional Upscale\n\n- Checkpoint: SDXL base\n- Optimized for: Square icons, clean edges\n- Default: 512x512, 20 steps, cfg 6.0, optional 2x upscale\n\n## Observability\n\n- **Structured Logs**: Pino JSON logs with `correlationId` on every request\n- **Metrics**: Jobs queued\u002Frunning\u002Fsucceeded\u002Ffailed, avg processing time, cache hit rate\n- **Audit Log**: Admin actions (workflow CRUD, key management) logged with timestamp + actor\n\n## Cli Reference\n\n```bash\nnpx tsx src\u002Fcli\u002Findex.ts init                    # Create dirs, .env.example\nnpx tsx src\u002Fcli\u002Findex.ts add-workflow \u003Cfile>      # Register workflow template\n  --id \u003Cid> --name \u003Cname> --schema \u003Cschema.json>\nnpx tsx src\u002Fcli\u002Findex.ts list-workflows           # Show registered workflows\nnpx tsx src\u002Fcli\u002Findex.ts run                      # Start API server\nnpx tsx src\u002Fcli\u002Findex.ts worker                   # Start job worker\nnpx tsx src\u002Fcli\u002Findex.ts health                   # Check ComfyUI connectivity\n```\n\n## Troubleshooting\n\nRead `references\u002Ftroubleshooting.md` for detailed guidance on:\n- ComfyUI not reachable (firewall, wrong port, Docker networking)\n- OOM errors (reduce resolution, batch, or steps)\n- Slow generation (GPU utilization, queue depth, model loading)\n- Webhook failures (DNS, SSL, timeout, domain allowlist)\n- Redis connection issues (fallback to in-memory)\n- Storage permission errors (local path, S3 credentials)\n\n## Integration Examples\n\nRead `references\u002Fintegration.md` for ready-to-use examples with:\n- curl commands for every endpoint\n- n8n webhook workflow\n- Supabase Edge Function caller\n- Claude Code \u002F Claude.ai integration\n- Python requests client\n- JavaScript fetch client\n\n## File Structure\n\n```\ncomfyui-gateway\u002F\n├── SKILL.md\n├── package.json\n├── tsconfig.json\n├── .env.example\n├── src\u002F\n│   ├── api\u002F\n│   │   ├── server.ts          # Fastify setup + plugins\n│   │   ├── routes\u002F\n│   │   │   ├── health.ts      # GET \u002Fhealth, \u002Fcapabilities\n│   │   │   ├── workflows.ts   # CRUD \u002Fworkflows\n│   │   │   ├── jobs.ts        # CRUD \u002Fjobs\n│   │   │   └── outputs.ts     # GET \u002Foutputs\n│   │   ├── middleware\u002F\n│   │   │   └── error-handler.ts\n│   │   └── plugins\u002F\n│   │       ├── auth.ts        # API key + JWT\n│   │       ├── rate-limit.ts\n│   │       └── cors.ts\n│   ├── worker\u002F\n│   │   └── processor.ts       # Job processor\n│   ├── comfyui\u002F\n│   │   └── client.ts          # ComfyUI HTTP + WS client\n│   ├── storage\u002F\n│   │   ├── index.ts           # Provider factory\n│   │   ├── local.ts           # Local filesystem\n│   │   └── s3.ts              # S3-compatible\n│   ├── workflows\u002F\n│   │   └── manager.ts         # Template CRUD + rendering\n│   ├── cache\u002F\n│   │   └── index.ts           # Hash-based cache\n│   ├── notifications\u002F\n│   │   └── webhook.ts         # HMAC-signed callbacks\n│   ├── auth\u002F\n│   │   └── index.ts           # Key\u002FJWT validation + roles\n│   ├── db\u002F\n│   │   ├── index.ts           # DB factory (SQLite\u002FPostgres)\n│   │   └── migrations.ts      # Schema creation\n│   ├── cli\u002F\n│   │   └── index.ts           # CLI commands\n│   ├── utils\u002F\n│   │   ├── config.ts          # Env loading + validation\n│   │   ├── errors.ts          # Error classes\n│   │   ├── logger.ts          # Pino setup\n│   │   └── hash.ts            # SHA-256 hashing\n│   └── index.ts               # Main entrypoint\n├── config\u002F\n│   └── workflows\u002F             # Bundled workflow templates\n│       ├── sdxl_realism_v1.json\n│       ├── sdxl_realism_v1.schema.json\n│       ├── sprite_transparent_bg.json\n│       ├── sprite_transparent_bg.schema.json\n│       ├── icon_512.json\n│       └── icon_512.schema.json\n├── data\u002F\n│   ├── outputs\u002F               # Generated images\n│   ├── workflows\u002F             # User-added wor\n\n## Best Practices\n\n- Provide clear, specific context about your project and requirements\n- Review all suggestions before applying them to production code\n- Combine with other complementary skills for comprehensive analysis\n\n## Common Pitfalls\n\n- Using this skill for tasks outside its domain expertise\n- Applying recommendations without understanding your specific context\n- Not providing enough project context for accurate analysis\n\n## Related Skills\n\n- `ai-studio-image` - Complementary skill for enhanced analysis\n- `image-studio` - Complementary skill for enhanced analysis\n- `stability-ai` - Complementary skill for enhanced analysis\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n",{"name":5,"risk":24,"tags":25,"tools":30,"author":36,"source":37,"date_added":38,"description":7},"safe",[26,27,28,29],"comfyui","api-gateway","image-generation","typescript",[31,32,33,34,35],"claude-code","antigravity","cursor","gemini-cli","codex-cli","renat","community","2026-03-06","main","87afe6ce96220accf50a345dea46784c8c9f210e","YYC3-Skills-技能包\u002FYYC3-Skills-技能包-antigravity-awesome-skills\u002Fplugins\u002Fantigravity-awesome-skills-claude\u002Fskills\u002Fcomfyui-gateway",0,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base","https:\u002F\u002Fkb.yyc3.top\u002F","https:\u002F\u002Fgithub.com\u002FYYC-Cube","万象归元于云枢 | 深栈智启新纪元","2026-11-10 10:37:32",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill comfyui-gateway",{"tool":54,"command":55},"bunx","bunx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill comfyui-gateway",{"tool":57,"command":58},"pnpm","pnpm dlx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill comfyui-gateway","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-antigravity-awesome-skills\u002Fplugins\u002Fantigravity-awesome-skills-claude\u002Fskills\u002Fcomfyui-gateway\u002FSKILL.md",true,[62,68],{"path":63,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Fintegration.md","REFERENCE","参考文档",48284,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-antigravity-awesome-skills\u002Fplugins\u002Fantigravity-awesome-skills-claude\u002Fskills\u002Fcomfyui-gateway\u002Freferences\u002Fintegration.md",{"path":69,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Ftroubleshooting.md",29528,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-antigravity-awesome-skills\u002Fplugins\u002Fantigravity-awesome-skills-claude\u002Fskills\u002Fcomfyui-gateway\u002Freferences\u002Ftroubleshooting.md",[73,80,87,94,101,108],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7CTDWHERCXPQCP0K03A86AS","vercel-sandbox","Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fvercel-sandbox\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7CTD8D2BNJY54S65M47HEJA","slack","Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include \"check my Slack\", \"what channels have unreads\", \"send a message to\", \"search Slack for\", \"extract from Slack\", \"find who said\", or any task requiring programmatic Slack interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fslack\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7CTCSSB8ZP3Q58C3YZDZK1W","electron","Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include \"automate Slack app\", \"control VS Code\", \"interact with Discord app\", \"test this Electron app\", \"connect to desktop app\", or any task requiring automation of a native Electron application.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Felectron\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M7CTCBJY76688V4DCZGWFHGQ","dogfood","Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to \"dogfood\", \"QA\", \"exploratory test\", \"find issues\", \"bug hunt\", \"test this app\u002Fsite\u002Fplatform\", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fdogfood\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M7CTC4H0FFGVEAQR9PA4GA1A","agent-browser","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate browser actions\", or any task requiring programmatic web interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fagent-browser\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":19},"01M7CTBKVFYBG78FDSABSDJTTQ","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", \"switch to --preset\", and for building a design system or applying a DESIGN.md or brand spec to shadcn\u002Fui.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-UI-界面组件\u002FYYC3-UI-界面组件-ui\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[]]