# Image Rotator

> This skill should be used when users need to rotate images by 90 degrees. It handles image rotation tasks for common formats (PNG, JPG, JPEG, GIF, BMP, TIFF) using a reliable Python script that preserves image quality and supports both clockwise and counter-clockwise rotation.

- **Type:** Skill
- **Install:** `agentstack add skill-amkessler-nicar2026-skills-in-codex-claude-image-rotator`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [amkessler](https://agentstack.voostack.com/s/amkessler)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [amkessler](https://github.com/amkessler)
- **Source:** https://github.com/amkessler/nicar2026_skills_in_codex_claude/tree/main/skills/image-rotator

## Install

```sh
agentstack add skill-amkessler-nicar2026-skills-in-codex-claude-image-rotator
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Image Rotator

## Overview

Rotate images by 90-degree increments while preserving quality. This skill provides a deterministic Python script for image rotation tasks, eliminating the need to rewrite image manipulation code.

## When to Use

Use this skill when users request:
- Rotating images by 90, 180, or 270 degrees
- Fixing image orientation
- Adjusting image alignment for documents or presentations
- Batch rotation operations

## Quick Start

The skill includes `scripts/rotate_image.py`, a command-line utility for rotating images. The script uses PIL/Pillow for reliable image processing.

### Basic Usage

Rotate an image clockwise by 90 degrees:

```bash
uv run python skills/image-rotator/scripts/rotate_image.py input.jpg
```

This creates `input_rotated.jpg` in the same directory.

### Common Options

**Specify output path:**
```bash
uv run python skills/image-rotator/scripts/rotate_image.py input.jpg --output rotated.jpg
```

**Rotate counter-clockwise:**
```bash
uv run python skills/image-rotator/scripts/rotate_image.py input.jpg --direction counter-clockwise
```

**Rotate 180 degrees (2x 90-degree rotations):**
```bash
uv run python skills/image-rotator/scripts/rotate_image.py input.jpg --times 2
```

**Rotate 270 degrees clockwise (or 90 counter-clockwise):**
```bash
uv run python skills/image-rotator/scripts/rotate_image.py input.jpg --times 3
```

### Supported Formats

- PNG
- JPG/JPEG
- GIF
- BMP
- TIFF

## Implementation Notes

### Prerequisites

The script requires Pillow (PIL fork):

```bash
uv add Pillow
```

### Script Details

The rotation script (`scripts/rotate_image.py`):
- Uses PIL's `rotate()` method with `expand=True` to prevent cropping
- Preserves image metadata when possible
- Returns clear success/error messages
- Handles edge cases (missing files, unsupported formats)

### Workflow

When users request image rotation:

1. Verify the input image path exists
2. Determine rotation direction and amount (default: 90 degrees clockwise)
3. Execute `scripts/rotate_image.py` with appropriate parameters
4. Report the output file location to the user

For batch operations, iterate through multiple images using the same script in a loop or shell command.

## Resources

### scripts/

- `rotate_image.py` - Main image rotation utility with CLI interface

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [amkessler](https://github.com/amkessler)
- **Source:** [amkessler/nicar2026_skills_in_codex_claude](https://github.com/amkessler/nicar2026_skills_in_codex_claude)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-amkessler-nicar2026-skills-in-codex-claude-image-rotator
- Seller: https://agentstack.voostack.com/s/amkessler
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
