The Problem Finding a high‑quality prompt for a specific image‑generation model requires manual browsing of large, unstructured lists. Users waste time copying, tweaking, and testing prompts that may not fit their style or language.

What This Does The repository ships an OpenClaw skill that lets Claude, Cursor, Gemini CLI, etc., query a curated library of >10 k prompts. The data lives in references/*.json (e.g., references/social-media-post.json, references/product-marketing.json). The skill’s runtime code is minimal; most of the work is performed by the generation scripts that keep those JSON files up‑to‑date.

Key files:

  • scripts/setup.js – prepares the environment, installs dependencies, and pushes generated artefacts.
  • scripts/generate-references.ts – reads raw prompt sources, transforms them (transformToOutputPrompt, processPromptImages), and writes the final JSON files.
  • .github/workflows/generate-references.yml – CI job that runs the two scripts on a schedule.

How It Is Wired

  1. GitHub Actions checks out the repo, runs pnpm install, then executes node scripts/setup.js.
  2. setup.js (24 branch points over 85 lines) decides which steps to run based on CI context, then spawns pnpm ts-node scripts/generate-references.ts.
  3. generate-references.ts is the hub: it calls fetchPromptCategories → reads category metadata, fetchAllPrompts → pulls raw prompt entries, slugToFileName → maps slugs to output filenames, transformToOutputPrompt (which itself calls processPromptImages) → builds the final OutputPrompt objects, * updateSkillMd → refreshes the skill’s markdown documentation. The internal call graph shows 7 resolved edges, all confined to this script, so the execution path is short and predictable.
  4. The generated JSON files are committed back to the repository by setup.js (via git push).
  5. At runtime, the OpenClaw skill reads the static JSON files from the references folder and serves search results to the user.

The only module with a notable blast radius is scripts/setup.js because its high branching density makes future modifications error‑prone. No circular dependencies exist, and the import graph contains only the two script files.

How To Use It

# Clone the repo
git clone https://github.com/moses-y/ai-image-prompts-skill
cd ai-image-prompts-skill

# Install with pnpm (lockfile present)
pnpm install

# Run the generation locally (optional)
node scripts/setup.js
pnpm ts-node scripts/generate-references.ts

For end‑users, installation follows the README:

clawhub install ai-image-prompts          # OpenClaw (recommended)
npx skills i YouMind-OpenLab/ai-image-prompts-skill   # Claude Code, Cursor, etc.

No additional configuration files or environment variables are required; the skill reads the static references/*.json at runtime.

Real‑World Use A marketing platform could call the skill from a backend service: when a user creates a new campaign, the service sends a short description to the OpenClaw skill, receives three prompt suggestions with sample images, and stores the selected prompt in the campaign record. The only external interaction is reading the pre‑generated JSON files, so latency is negligible.

Code Health & Issues

  • HIGH – Pin GitHub Actions to commit SHAs (.github/workflows).
  • HIGH – Push to default branch; should open PRs instead (generate-references.yml).
  • MEDIUM – No Dependabot/Renovate configured.
  • MEDIUM – No dependency‑vulnerability scan in CI.
  • MEDIUM – Large JSON blobs (references/social-media-post.json, product-marketing.json) should be in Git LFS or external storage.
  • MEDIUM – Checkout step keeps credentials; set persist-credentials: false.
  • MEDIUMpostinstall script in package.json runs unreviewed code; move work to explicit build step or disable scripts in CI.
  • MEDIUM – High branching density in scripts/setup.js (24 branches/85 lines); split into smaller, table‑driven functions.
  • LOW – Add timeout-minutes to workflow jobs.

Additional observations: the repo lacks any test files, but CI is present; the MIT license is included; no secrets are committed.

The Bottom Line The skill provides a ready‑to‑use prompt catalogue with a straightforward data‑driven design, but the build scripts are dense and the repo omits automated tests and robust dependency management. It suits teams that need quick prompt lookup and are comfortable handling the maintenance overhead of large JSON assets.