当前位置: 首页 > Skill >

Auto Midjourney

Auto Midjourney

Auto Midjourney

利用已认证的 https://alpha.midjourney.com 会话,自动从 Claude 生成 Midjourney Alpha 网页图片。当用户想要...

0.1.2 2026.11.23 955
获取Skill文件查看使用说明
作 者:苏安 许可证: 更新时间:2026.11.23
本文目录展开

Auto Midjourney

Use the user's own Midjourney Alpha web session to submit imagine jobs and optionally poll for results.

This skill is intended for conservative, user-triggered assistance rather than unattended bulk automation.

What this skill does

  • Submits prompts to https://alpha.midjourney.com/api/submit-jobs
  • Defaults to Midjourney v8 for new prompts unless the user explicitly requests another version
  • Keeps credentials in environment variables instead of hardcoding them into the skill
  • Supports a one-command flow through scripts/run_imagine.py
  • Can read https://alpha.midjourney.com/api/user-mutable-state to inspect current web settings
  • Can infer user_id and singleplayer_<midjourney_id> from the authenticated cookie
  • Applies local conservative throttling to reduce accidental request bursts
  • Includes scripts/mj_doctor.py for setup validation
  • Includes an experimental recent-jobs reader
  • Supports browser transport backed by Chrome DevTools Protocol, with Playwright-over-CDP preferred when installed
  • Supports optional polling once a job-status endpoint has been confirmed
  • Includes prompt-craft guidance and reusable scenario presets for better prompt writing
  • Includes a structured prompt builder and opt-in quality profiles
  • Includes dedicated guidance for character sheets, split-view turnarounds, and reusable design assets

Current scope

This version focuses on:

  1. imagine
  2. Midjourney v8 as the default version
  3. Alpha web flow, not Discord bot flow
  4. Safe local configuration via .env
  5. Easier operation through inferred IDs, presets, and doctor checks

Implemented:

  • imagine submit through the Alpha web flow
  • browser-backed verification using low-impact CDP network watching plus page asset fallback
  • local download of the 4 returned image assets
  • optional browser-side conversion from webp to png during download
  • sequential batch generation

Not implemented yet:

  • Upscale / variation / reroll button actions
  • Image upload / reference-image workflow
  • Automatic result download from a confirmed final image endpoint

Those should be added only after capturing stable request samples from the browser.

Safety posture

Do not optimize this skill for bypassing restrictions, hiding automation, rotating accounts, or mass unattended generation.

Use these guardrails instead:

  • trigger requests manually
  • keep request frequency low
  • leave local throttling enabled
  • validate config with mj_doctor.py
  • prefer one human action to one live submit

The goal is risk reduction through conservative usage, not evasion.

Trigger rules

Use this skill proactively when the user asks to:

  • “用 Midjourney / MJ 出图”
  • “用 Midjourney v8 生成”
  • “帮我提交 imagine”
  • “优化 Midjourney prompt”
  • “做角色设定稿 / 四视图 / 角色资产图”
  • “抓 Midjourney Alpha 网站请求”
  • “轮询 Midjourney job 状态”
  • “把网页版 Midjourney 做成自动化能力”

Required configuration

Read these values from .env or shell environment:

Variable Required Purpose
MJ_COOKIE Yes Full authenticated Cookie header copied from browser
MJ_CHANNEL_ID Yes Alpha web singleplayer channel ID
MJ_STATUS_URL_TEMPLATE No Job status endpoint template containing {job_id}
MJ_USER_STATE_PATH No Defaults to /api/user-mutable-state
MJ_RECENT_JOBS_URL No Experimental recent-jobs endpoint
MJ_MODE No fast by default
MJ_PRIVATE No true by default
MJ_MIN_SUBMIT_INTERVAL_SECONDS No Local minimum spacing between submits. Default is 3 seconds
MJ_MAX_SUBMITS_PER_HOUR No Local hourly cap. Set 0 to disable, which is now the default
MJ_MAX_SUBMITS_PER_DAY No Local daily cap. Set 0 to disable, which is now the default
MJ_USER_ID No Usually inferred from the auth cookie
MJ_METRICS_TOKEN No Optional token observed on telemetry requests
MJ_BROWSER_BACKEND No auto by default. Set playwright or cdp to force a backend

Never write real cookies or tokens into SKILL.md, reference files, git-tracked scripts, or user-facing summaries.

System requirements

For platform and device requirements, read system-requirements.md.

Workflow

Scenario 0: Check config first

Run:

python3 scripts/mj_doctor.py --fetch-user-state --transport browser

This shows:

  • whether the cookie exists
  • inferred midjourney_id
  • inferred channel_id
  • current server-side speed and visibility
  • current local safe-limit settings

Scenario 1: Submit one prompt

Run:

python3 scripts/run_imagine.py "1 girl --ar 16:9" --transport browser

Default behavior:

  • Appends --v 8 if the prompt does not already specify a version
  • Appends --raw by default unless the user disables it
  • Uses MJ_MODE and MJ_PRIVATE from the environment
  • Can sync server-side defaults before submitting
  • Records the submit locally and enforces conservative pacing
  • Prints structured JSON with the request payload, submission response, and extracted job_id

For simplest live use:

python3 scripts/run_imagine.py "cinematic portrait of a fox astronaut" --transport browser --sync-user-state --wait-page-assets --download --convert-to png

When --wait-page-assets is enabled, the browser transport now prefers watching Midjourney's existing in-page network traffic for the submitted job_id. It falls back to page asset probing only if the low-impact watcher does not yield 4 images.

Scenario 2: Submit and wait

If a working status endpoint has been captured and stored in MJ_STATUS_URL_TEMPLATE, run:

python3 scripts/run_imagine.py "cinematic portrait of a fox astronaut --ar 16:9" --wait

Scenario 3: Low-risk debugging

Use dry-run first when changing payload structure:

python3 scripts/run_imagine.py "robot barista in tokyo alley" --dry-run

This validates prompt normalization and payload generation without sending a live request.

Scenario 3b: Use a preset

Run:

python3 scripts/run_imagine.py "silver perfume bottle on black glass" --preset product --sync-user-state

Preset definitions live in config/presets.example.json.

When the user wants better prompt wording, templates, or parameter tradeoffs, read prompt-craft.md.

Scenario 3c: Build a prompt from a template

Run:

python3 scripts/mj_prompt_helper.py --template product --subject "premium silver perfume bottle" --camera "front three-quarter angle" --surface "black glass surface" --lighting "controlled softbox rim light" --background "dark charcoal background" --mood "minimal luxury beauty campaign" --preset product_clean_square --quality-profile final_v8_q4 --json

This produces a V8-friendly prompt string and a ready-to-run run_imagine.py command.

Scenario 4: Read current web settings

Run:

python3 scripts/get_user_state.py --transport browser

This reads the same user-mutable-state endpoint the web app uses and returns values such as:

  • settings.speed
  • settings.visibility
  • abilities
  • saved macros

Command reference

Submit only

python3 scripts/submit_job.py "minimalist glass monolith --ar 16:9 --v 8"

Poll one job

python3 scripts/poll_job.py "<job_id>"

Inspect current server-side settings

python3 scripts/get_user_state.py --transport browser

Validate config and inferred identity

python3 scripts/mj_doctor.py --fetch-user-state --transport browser

Experimental recent jobs lookup

python3 scripts/list_recent_jobs.py --amount 10

Submit, verify, and download locally

python3 scripts/run_imagine.py "fashion editorial, silver fabric, studio light --ar 3:4" --transport browser --sync-user-state --wait-page-assets --download --convert-to png

Batch generate and store PNGs

python3 scripts/batch_generate.py config/prompts.example.txt --transport browser --sync-user-state --convert-to png

Use conservative fixed spacing and batch cooldowns when needed:

python3 scripts/batch_generate.py config/prompts.example.txt --transport browser --sync-user-state --convert-to png --batch-size 5 --submit-interval-seconds 120 --batch-cooldown-seconds 600

Apply an opt-in quality profile to the whole batch:

python3 scripts/batch_generate.py config/prompts.example.txt --transport browser --sync-user-state --quality-profile final_v8_q4 --convert-to png

Convert existing WEBP downloads to PNG

python3 scripts/convert_downloads.py outputs

Or write converted files into a separate directory:

python3 scripts/convert_downloads.py outputs --output-dir outputs/png-converted

If you want to rebuild PNGs from a saved result manifest instead of local files:

python3 scripts/convert_downloads.py outputs/live-test/recent-job.json --output-dir outputs/png-rebuilt

This waits for the submitted job_id to appear in the browser page resource list, verifies that 4 Midjourney CDN image URLs exist, and downloads the returned image files into outputs/<job_id>/.

Batch generate sequentially

Create a text file with one prompt per line, then run:

python3 scripts/batch_generate.py prompts.txt --transport browser --sync-user-state --download-dir outputs/batch

This submits prompts one by one, waits for each job_id to produce page resource URLs, and downloads the returned image files before moving to the next prompt.

Full flow

python3 scripts/run_imagine.py "fashion editorial, silver fabric, studio light --ar 3:4" --sync-user-state --wait-recent-jobs --download

Prompt defaults

When the user does not specify MJ flags:

  • Default to --v 8
  • Default to --raw
  • Preserve any explicit aspect ratio or style flags already present
  • Do not auto-add --hd
  • Treat --q 4 as an opt-in final-pass override rather than a default for the current V8-focused flow

Do not silently override explicit user flags.

Output format

When you use this skill, report back in this structure:

Prompt: <final prompt sent>
Job ID: <job_id or "not returned">
Mode: <fast/relax/etc>
Visibility: <private/public>
Status: <submitted / polled / failed / dry-run>
Notes: <missing status endpoint, saved JSON path, or next step>

Simpler usage model

For day-to-day use, prefer this sequence:

  1. python3 scripts/mj_doctor.py --fetch-user-state --transport browser
  2. python3 scripts/run_imagine.py "<prompt>" --transport browser --sync-user-state
  3. python3 scripts/run_imagine.py "<prompt>" --transport browser --sync-user-state --wait-page-assets --download

This reduces manual mistakes and keeps you in a low-frequency workflow. On this machine, browser transport is the preferred live path because raw HTTP requests are blocked by Cloudflare.

Success criteria for a usable generation

Treat a generation as verified only when all of these are true:

  1. submit response contains a job_id
  2. page resource entries contain 4 CDN image URLs for the same job_id
  3. the image files are downloaded successfully to local disk

Normal Midjourney imagine behavior is a 4-image grid. Depending on the endpoint response, you may get one grid image file rather than four separately cropped files. This skill currently verifies and downloads the returned image assets as provided by Midjourney.

Extension path

After the user captures more browser requests, extend in this order:

  1. Confirm job-status endpoint and final-image fields
  2. Add result downloader
  3. Add button-action support for upscale / variation
  4. Add reference image upload flow
  5. Add prompt-template helpers for common MJ styles

Confirmed non-status endpoints

  • POST https://proxima.midjourney.com/ is currently treated as telemetry ingestion
  • POST /api/v1/traces is currently treated as tracing/observability data
  • GET /api/user-mutable-state is useful for reading current speed and visibility defaults

Do not mistake telemetry endpoints for job-status APIs.

GitHub-informed but experimental path

The skill includes an experimental recent-jobs reader based on public GitHub reverse-engineering notes. Treat it as best-effort support rather than a stable API contract.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,017
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,005
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,003
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,002
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,002
Linux内核提权风险待核实,先查版本与补丁

CVE-2026-78901在摘要中被称为Linux内核ext4本地提权漏洞,CVSS评分7.8,但上游正文暂未核实。本文提供通用只读排查命令,帮运维和开发者核对当前运行内核、发行版补丁及升级生效状态。

2026.12.02 1,001
Skill 文件
  • SKILL.md
    • Auto Midjourney
    • What this skill does
    • Current scope
    • Safety posture
    • Trigger rules
    • Required configuration
    • System requirements
    • Workflow
      • Scenario 0: Check config first
      • Scenario 1: Submit one prompt
      • Scenario 2: Submit and wait
      • Scenario 3: Low-risk debugging
      • Scenario 3b: Use a preset
      • Scenario 3c: Build a prompt from a template
      • Scenario 4: Read current web settings
    • Command reference
      • Submit only
      • Poll one job
      • Inspect current server-side settings
      • Validate config and inferred identity
      • Experimental recent jobs lookup
      • Submit, verify, and download locally
      • Batch generate and store PNGs
      • Convert existing WEBP downloads to PNG
      • Batch generate sequentially
      • Full flow
    • Prompt defaults
    • Output format
    • Simpler usage model
    • Success criteria for a usable generation
    • Extension path
    • Confirmed non-status endpoints
    • GitHub-informed but experimental path
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期