[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F0CZTMBV0KEEW9JK88ZCGZ":3,"skill-same:01M7F0CZTMBV0KEEW9JK88ZCGZ":62},{"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":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":47},"01M7F0CZTMBV0KEEW9JK88ZCGZ","cli-and-api",null,"Use gpt-image-cli from the command line or OpenAI Python SDK for GPT Image 2 generation, reference-image editing, inpainting, output control, and safe no-API preflight.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fgpt-image-cli\u002Fsub-skills\u002Fcli-and-api\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: cli-and-api\ndescription: \"Use gpt-image-cli from the command line or OpenAI Python SDK for\n  GPT Image 2 generation, reference-image editing, inpainting, output control,\n  and safe no-API preflight.\"\ndisable-model-invocation: true\nmetadata:\n  disco-role: operating\nlicense: MIT\n---\n\n# cli-and-api\n\nUse this sub-skill when a task requires the `gpt-image` CLI or equivalent OpenAI Python SDK calls for GPT Image 2:\n\n- text-to-image generation;\n- single-reference or multi-reference image edits;\n- mask-based inpainting;\n- output file naming, image count, format, compression, size, quality, moderation, or background parameters;\n- safe command preflight before a real OpenAI Images API call.\n\nDo **not** use this sub-skill for prompt-style or gallery selection; route that to [`..\u002Fprompt-gallery\u002FSKILL.md`](..\u002Fprompt-gallery\u002FSKILL.md). Do **not** use it for repository contribution, gallery metadata, plugin packaging, or release edits; route that to [`..\u002Frepo-maintenance\u002FSKILL.md`](..\u002Frepo-maintenance\u002FSKILL.md).\n\n## Safety boundary\n\nThe CLI and SDK paths call the OpenAI Images API when executed. Real calls require `OPENAI_API_KEY`, network access, and may incur cost. Never run a real generation\u002Fedit request unless the user has explicitly asked to execute it in the current session and accepts the credential\u002Fcost boundary. For planning, diagnostics, and command assembly, use the bundled helper in no-execute mode.\n\nThe CLI loads credentials in this order without overriding an existing process environment variable: process environment, then `.\u002F.env`, then `~\u002F.env`. Never print, write, or transform API-key values.\n\n## Operating loop\n\n1. **Classify endpoint**:\n   - no `-i\u002F--image` inputs -> text-to-image via `client.images.generate`;\n   - one or more `-i\u002F--image` inputs -> edit via `client.images.edit`;\n   - `-m\u002F--mask` requires at least one `-i\u002F--image` and uses the edit endpoint.\n2. **Preflight before execution**:\n   - verify `gpt-image` or `python -m gpt_image_cli.cli` is available;\n   - verify reference image and mask paths exist;\n   - check whether an API key is available without exposing it;\n   - select output path, size, quality, count, and format.\n3. **Build command** with explicit flags, keeping `--quality` as the cost\u002Ffidelity knob.\n4. **Execute only on explicit user approval**. Surface stderr and exit code on failure; do not retry expensive calls blindly.\n5. **Report output paths** printed by the CLI, plus the key flags used.\n\n## Fast examples\n\n```bash\n# Safe diagnostics only; does not call OpenAI.\npython scripts\u002Fgpt_image_cli_helper.py preflight\n\n# Build a generation command without executing it.\npython scripts\u002Fgpt_image_cli_helper.py build-command \\\n  -p \"a photorealistic convenience store at 10pm\" \\\n  --size 1k --quality low -f drafts\u002Fstore.png\n\n# Real text-to-image call; run only after user approval and key\u002Fcost confirmation.\ngpt-image -p \"a photorealistic convenience store at 10pm\" \\\n  --size 1k --quality high -f store.png\n\n# Real single-reference edit.\ngpt-image -p \"Make it a winter evening with heavy snowfall; keep the chessboard layout.\" \\\n  -i chess.png --quality high -f chess-winter.png\n\n# Real multi-reference edit.\ngpt-image -p \"Use Image 1 as the person and Image 2 as the product; match lighting and keep identity.\" \\\n  -i person.png -i product.png --size portrait --quality medium -f campaign.png\n\n# Real mask inpaint; opaque mask areas are preserved and transparent areas regenerate.\ngpt-image -p \"replace the sky with aurora\" \\\n  -i photo.png -m sky_mask.png -f aurora.png\n```\n\n## References\n\n- [`references\u002Fcli-reference.md`](references\u002Fcli-reference.md): complete CLI flags, defaults, endpoint routing, output naming, examples, exit codes.\n- [`references\u002Fapi-reference.md`](references\u002Fapi-reference.md): OpenAI SDK mapping, verified constants\u002Ffunctions, size shortcuts, output behavior.\n- [`references\u002Ftroubleshooting.md`](references\u002Ftroubleshooting.md): missing keys, missing CLI\u002Fimport backend, file validation, `input_fidelity`, output-format mistakes, API errors\u002Frefusals.\n\n## Bundled helper\n\nUse [`scripts\u002Fgpt_image_cli_helper.py`](scripts\u002Fgpt_image_cli_helper.py) for deterministic no-network preflight and command construction. It does not call the API by default. The helper only delegates to `gpt-image` when `build-command --execute` is passed explicitly.\n","# cli-and-api\n\nUse this sub-skill when a task requires the `gpt-image` CLI or equivalent OpenAI Python SDK calls for GPT Image 2:\n\n- text-to-image generation;\n- single-reference or multi-reference image edits;\n- mask-based inpainting;\n- output file naming, image count, format, compression, size, quality, moderation, or background parameters;\n- safe command preflight before a real OpenAI Images API call.\n\nDo **not** use this sub-skill for prompt-style or gallery selection; route that to [`..\u002Fprompt-gallery\u002FSKILL.md`](..\u002Fprompt-gallery\u002FSKILL.md). Do **not** use it for repository contribution, gallery metadata, plugin packaging, or release edits; route that to [`..\u002Frepo-maintenance\u002FSKILL.md`](..\u002Frepo-maintenance\u002FSKILL.md).\n\n## Safety boundary\n\nThe CLI and SDK paths call the OpenAI Images API when executed. Real calls require `OPENAI_API_KEY`, network access, and may incur cost. Never run a real generation\u002Fedit request unless the user has explicitly asked to execute it in the current session and accepts the credential\u002Fcost boundary. For planning, diagnostics, and command assembly, use the bundled helper in no-execute mode.\n\nThe CLI loads credentials in this order without overriding an existing process environment variable: process environment, then `.\u002F.env`, then `~\u002F.env`. Never print, write, or transform API-key values.\n\n## Operating loop\n\n1. **Classify endpoint**:\n   - no `-i\u002F--image` inputs -> text-to-image via `client.images.generate`;\n   - one or more `-i\u002F--image` inputs -> edit via `client.images.edit`;\n   - `-m\u002F--mask` requires at least one `-i\u002F--image` and uses the edit endpoint.\n2. **Preflight before execution**:\n   - verify `gpt-image` or `python -m gpt_image_cli.cli` is available;\n   - verify reference image and mask paths exist;\n   - check whether an API key is available without exposing it;\n   - select output path, size, quality, count, and format.\n3. **Build command** with explicit flags, keeping `--quality` as the cost\u002Ffidelity knob.\n4. **Execute only on explicit user approval**. Surface stderr and exit code on failure; do not retry expensive calls blindly.\n5. **Report output paths** printed by the CLI, plus the key flags used.\n\n## Fast examples\n\n```bash\n# Safe diagnostics only; does not call OpenAI.\npython scripts\u002Fgpt_image_cli_helper.py preflight\n\n# Build a generation command without executing it.\npython scripts\u002Fgpt_image_cli_helper.py build-command \\\n  -p \"a photorealistic convenience store at 10pm\" \\\n  --size 1k --quality low -f drafts\u002Fstore.png\n\n# Real text-to-image call; run only after user approval and key\u002Fcost confirmation.\ngpt-image -p \"a photorealistic convenience store at 10pm\" \\\n  --size 1k --quality high -f store.png\n\n# Real single-reference edit.\ngpt-image -p \"Make it a winter evening with heavy snowfall; keep the chessboard layout.\" \\\n  -i chess.png --quality high -f chess-winter.png\n\n# Real multi-reference edit.\ngpt-image -p \"Use Image 1 as the person and Image 2 as the product; match lighting and keep identity.\" \\\n  -i person.png -i product.png --size portrait --quality medium -f campaign.png\n\n# Real mask inpaint; opaque mask areas are preserved and transparent areas regenerate.\ngpt-image -p \"replace the sky with aurora\" \\\n  -i photo.png -m sky_mask.png -f aurora.png\n```\n\n## References\n\n- [`references\u002Fcli-reference.md`](references\u002Fcli-reference.md): complete CLI flags, defaults, endpoint routing, output naming, examples, exit codes.\n- [`references\u002Fapi-reference.md`](references\u002Fapi-reference.md): OpenAI SDK mapping, verified constants\u002Ffunctions, size shortcuts, output behavior.\n- [`references\u002Ftroubleshooting.md`](references\u002Ftroubleshooting.md): missing keys, missing CLI\u002Fimport backend, file validation, `input_fidelity`, output-format mistakes, API errors\u002Frefusals.\n\n## Bundled helper\n\nUse [`scripts\u002Fgpt_image_cli_helper.py`](scripts\u002Fgpt_image_cli_helper.py) for deterministic no-network preflight and command construction. It does not call the API by default. The helper only delegates to `gpt-image` when `build-command --execute` is passed explicitly.\n",{"name":5,"license":15,"metadata":24,"description":7,"disable-model-invocation":26},{"disco-role":25},"operating",true,"main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","05-技能与代理开发\u002Fgpt-image-cli\u002Fsub-skills\u002Fcli-and-api",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":26},[37,40,43],{"tool":38,"command":39},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill cli-and-api",{"tool":41,"command":42},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill cli-and-api",{"tool":44,"command":45},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill cli-and-api","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fgpt-image-cli\u002Fsub-skills\u002Fcli-and-api\u002FSKILL.md",[48,54,58],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fapi-reference.md","REFERENCE","参考文档",5879,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fgpt-image-cli\u002Fsub-skills\u002Fcli-and-api\u002Freferences\u002Fapi-reference.md",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fcli-reference.md",6920,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fgpt-image-cli\u002Fsub-skills\u002Fcli-and-api\u002Freferences\u002Fcli-reference.md",{"path":59,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Ftroubleshooting.md",5341,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fgpt-image-cli\u002Fsub-skills\u002Fcli-and-api\u002Freferences\u002Ftroubleshooting.md",[63,70,75,82,89,96],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":71,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]