npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@krasnoperov/gemini-images

v1.3.3

Published

Consistent image generation with Gemini - Create 2D game sprites, characters, and environments with visual consistency using reference sheets methodology

Readme

Gemini Images

AI image generation skill for Claude Code - Generate consistent game sprites, character sheets, and visual assets using Gemini's spatial understanding and reference sheet methodology.

Gemini can preserve visual features across different views, poses, and compositions when given specific image references. This skill leverages that capability through precise instructions for managing your assets:

  • Character sheets - Generate multiple views (front/back/side) that establish a consistent visual identity
  • Reference composition - Combine existing images with new elements while preserving original features
  • Structured prompts - Use explicit labels and visual anchors to maintain consistency across iterations
  • Small deltas - Change one thing at a time (pose, accessory, lighting) to preserve everything else

See skills/gemini-images/SKILL.md for complete methodology and techniques.

Use in Claude Code

This is a Claude Code skill. Install it from the marketplace:

/plugin marketplace add krasnoperov/claude-plugins
/plugin install gemini-images@krasnoperov-plugins

Once installed, use the /gemini-images skill in your conversations:

/gemini-images generate a pixel art character sheet with front, back, and side views
/gemini-images edit character.png "add armor and sword"
/gemini-images compose character.png background.png "place character in forest scene"

Command Line Usage

You can also use this package directly via npx:

export GEMINI_API_KEY="your-key-here"

# Generate from text
npx -y @krasnoperov/gemini-images@latest generate "pixel art tree" --output tree.png

# Transform image
npx -y @krasnoperov/gemini-images@latest edit tree.png "add glowing runes" --output tree-magic.png

# Combine references
npx -y @krasnoperov/gemini-images@latest compose hero.png sword.png "character holding sword" --output hero-armed.png

Get your API key: Google AI Studio

Core Operations

generate "<prompt>"                          Text → Image
edit <image> "<prompt>"                      Image + Instructions → Image
compose <img1> <img2> ... "<prompt>"         Images + Instructions → Image

These three operations compose into any workflow you need.

Examples

See skills/gemini-images/examples/ directory:

  1. 01-primitives.sh - Basic usage of all three operations
  2. 02-consistency-pipeline.sh - Reference sheet methodology step-by-step

Reference Sheet Methodology

Gemini has spatial understanding - it preserves visual features when given specific references.

Character Sheets

npx -y @krasnoperov/gemini-images@latest generate \
  "Character sheet: front view, back view, side view. Character: ranger, auburn hair, green jerkin." \
  --output character_sheet.png

Structured Prompts

npx -y @krasnoperov/gemini-images@latest compose character_sheet.png accessories.png \
  "Image 1: Character sheet
Image 2: Accessories
Character: From image 1, front-facing
Items: Backpack from image 2
Lighting: Soft natural light, top-left
Camera: Eye level, medium shot" \
  --output scene.png

Options

--model <model>           gemini-3-pro-image-preview (default) or gemini-2.5-flash-image
--aspect-ratio <ratio>    1:1 (default), 16:9, 9:16, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 21:9
--image-size <size>       1K (default), 2K, 4K (Pro model required for 2K/4K)
--output <path>           Output file or directory (default: ./output/)
--api-key <key>           Gemini API key (or set GEMINI_API_KEY env var)

Model Selection

| Feature | Flash | Pro | |---------|-------|-----| | Max Resolution | 1K | 4K | | Reference Images | 1 | 14 | | Speed | Fast | Moderate | | Best For | Quick iterations | Production assets |

Development

npm run build      # Build TypeScript
npm run typecheck  # Type checking
npm run dev        # Dev mode with type stripping

Acknowledgments

Reference sheet methodology based on Towards Data Science.

License

MIT License - Copyright (c) 2025 Aleksei Krasnoperov

See LICENSE file for details.