Prompt as Code | GPT Image 2 / 2.5 提示词与案例库,530+ 个案例、20+ 套工业级模板与可复用 Skills,新增 2.5 同提示词对比专区,附完整提示词与生成记录,持续更新。
JavaScript agentsai-image-generationchatgptdsh-plugingpt-image-2image-promptsprompt-as-codeprompt-engineeringskillsworkflow-automation
Publish style skill package
freestylefly1910e48ac1a3
diff --git a/.github/workflows/publish-style-skill.yml b/.github/workflows/publish-style-skill.ymlnew file mode 100644index 0000000..c6ed3cd--- /dev/null+++ b/.github/workflows/publish-style-skill.yml@@ -0,0 +1,35 @@+name: Publish GPT-Image2 Style Skill++on:+ workflow_dispatch:+ push:+ tags:+ - 'gpt-image-2-style-library-v*'++permissions:+ contents: read+ packages: write++jobs:+ github-packages:+ name: GitHub Packages+ runs-on: ubuntu-latest+ steps:+ - name: Checkout+ uses: actions/checkout@v4++ - name: Setup Node.js+ uses: actions/setup-node@v4+ with:+ node-version: 22+ registry-url: https://npm.pkg.github.com+ scope: '@freestylefly'++ - name: Publish scoped package+ working-directory: agents/skills/gpt-image-2-style-library+ env:+ NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ run: |+ npm pkg set name=@freestylefly/gpt-image-2-style-library+ npm pkg set publishConfig.registry=https://npm.pkg.github.com+ npm publish --registry=https://npm.pkg.github.comdiff --git a/README.md b/README.mdindex 1a170b1..43eccb0 100644--- a/README.md+++ b/README.md@@ -40,7 +40,38 @@ The core goal is simple: compress prose-style prompts into structured protocols.## 🤖 Agent Skill-This repository now includes a source-level Codex skill for choosing GPT-Image2 styles, templates, categories, and scene tags from the same data used by the website.+This repository includes a Codex skill for choosing GPT-Image2 styles, templates, categories, and scene tags from the same data used by the website.++Package links: [npm](https://www.npmjs.com/package/gpt-image-2-style-library) / [GitHub Packages](https://github.com/freestylefly/awesome-gpt-image-2/pkgs/npm/gpt-image-2-style-library)++Install from npm:++```bash+npx gpt-image-2-style-library install+```++Or install globally:++```bash+npm install -g gpt-image-2-style-library+gpt-image-2-style-library install+```++Install from GitHub Packages:++```bash+npm login --scope=@freestylefly --registry=https://npm.pkg.github.com+npm install -g @freestylefly/gpt-image-2-style-library --registry=https://npm.pkg.github.com+gpt-image-2-style-library install+```++Use it in Codex with a request like:++```text+Use gpt-image-2-style-library to create an infographic prompt about Codex.+```++For local source development:```bashnpm run generate:style-skilldiff --git a/README.zh-CN.md b/README.zh-CN.mdindex 89b84a7..63ff6c8 100644--- a/README.zh-CN.md+++ b/README.zh-CN.md@@ -40,7 +40,38 @@ GPT-Image2 全量开放后,AI 画图从“能不能出图”变成了“能不## 🤖 Agent Skill-仓库内新增了 Codex skill,用同一份风格库数据为 Agent 选择 GPT-Image2 模板、分类、风格和场景标签。+仓库内提供了 Codex skill,用同一份风格库数据为 Agent 选择 GPT-Image2 模板、分类、风格和场景标签。++包地址:[npm](https://www.npmjs.com/package/gpt-image-2-style-library) / [GitHub Packages](https://github.com/freestylefly/awesome-gpt-image-2/pkgs/npm/gpt-image-2-style-library)++从 npm 安装:++```bash+npx gpt-image-2-style-library install+```++也可以全局安装:++```bash+npm install -g gpt-image-2-style-library+gpt-image-2-style-library install+```++从 GitHub Packages 安装:++```bash+npm login --scope=@freestylefly --registry=https://npm.pkg.github.com+npm install -g @freestylefly/gpt-image-2-style-library --registry=https://npm.pkg.github.com+gpt-image-2-style-library install+```++在 Codex 里这样调用:++```text+使用 gpt-image-2-style-library 技能,帮我生成介绍 Codex 的信息图+```++本地源码开发时使用:```bashnpm run generate:style-skilldiff --git a/agents/skills/gpt-image-2-style-library/bin/install.mjs b/agents/skills/gpt-image-2-style-library/bin/install.mjsnew file mode 100755index 0000000..72698c7--- /dev/null+++ b/agents/skills/gpt-image-2-style-library/bin/install.mjs@@ -0,0 +1,37 @@+#!/usr/bin/env node+import { cpSync, existsSync, mkdirSync, rmSync } from 'node:fs';+import { dirname, join } from 'node:path';+import { homedir } from 'node:os';+import { fileURLToPath } from 'node:url';++const skillName = 'gpt-image-2-style-library';+const command = process.argv[2] || 'install';+const allowedCommands = new Set(['install', 'sync']);++if (!allowedCommands.has(command)) {+ console.error(`Usage: gpt-image-2-style-library install`);+ process.exit(1);+}++const packageRoot = dirname(dirname(fileURLToPath(import.meta.url)));+const codexHome = process.env.CODEX_HOME || join(homedir(), '.codex');+const targetRoot = join(codexHome, 'skills');+const target = join(targetRoot, skillName);+const entries = ['SKILL.md', 'agents', 'references'];++for (const entry of entries) {+ const source = join(packageRoot, entry);+ if (!existsSync(source)) {+ throw new Error(`Missing package entry: ${entry}`);+ }+}++mkdirSync(targetRoot, { recursive: true });+rmSync(target, { recursive: true, force: true });+mkdirSync(target, { recursive: true });++for (const entry of entries) {+ cpSync(join(packageRoot, entry), join(target, entry), { recursive: true });+}++console.log(`Installed ${skillName} to ${target}`);diff --git a/agents/skills/gpt-image-2-style-library/package.json b/agents/skills/gpt-image-2-style-library/package.jsonnew file mode 100644index 0000000..3ed766d--- /dev/null+++ b/agents/skills/gpt-image-2-style-library/package.json@@ -0,0 +1,36 @@+{+ "name": "gpt-image-2-style-library",+ "version": "1.0.0",+ "description": "Codex skill for choosing GPT-Image2 visual styles, prompt templates, categories, and scene tags.",+ "type": "module",+ "license": "MIT",+ "repository": {+ "type": "git",+ "url": "git+https://github.com/freestylefly/awesome-gpt-image-2.git",+ "directory": "agents/skills/gpt-image-2-style-library"+ },+ "homepage": "https://github.com/freestylefly/awesome-gpt-image-2#agent-skill",+ "bugs": {+ "url": "https://github.com/freestylefly/awesome-gpt-image-2/issues"+ },+ "keywords": [+ "codex",+ "codex-skill",+ "gpt-image-2",+ "prompt",+ "image-generation",+ "style-library"+ ],+ "bin": {+ "gpt-image-2-style-library": "bin/install.mjs"+ },+ "files": [+ "SKILL.md",+ "agents",+ "bin",+ "references"+ ],+ "publishConfig": {+ "access": "public"+ }+}diff --git a/package.json b/package.jsonindex b14dada..57691ec 100644--- a/package.json+++ b/package.json@@ -7,6 +7,8 @@"generate:site-data": "node scripts/generate-site-data.mjs","generate:style-skill": "node scripts/generate-style-skill.mjs","install:skill": "node scripts/install-style-skill.mjs",+ "pack:skill": "npm pack ./agents/skills/gpt-image-2-style-library --dry-run",+ "publish:skill:npm": "npm publish ./agents/skills/gpt-image-2-style-library --access public","predev": "npm run generate:site-data && npm run generate:style-skill","dev": "vite","prebuild": "npm run generate:site-data && npm run generate:style-skill",