# envi-automation-skill

> Automate ENVI/IDL remote-sensing workflows with tested, step-by-step guidance, IDL pipeline templates, and Windows GUI screenshot automation.

envi-automation-skill is a free AI agent skill on Agensi by Shihao Yu, in Workflow Automation. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Shihao Yu](https://www.agensi.io/creators/shihao-yu)
- Category: [Workflow Automation](https://www.agensi.io/skills/workflow-automation)
- Version: 1.0
- Last updated: 2026-11-20
- Security: scan passed (2026-11-20); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/envi-automation-skill
- Tags: envi, idl, remote-sensing, gis, automation, fxsegmentation, image-classification

## About this skill

Managing remote sensing imagery in ENVI and IDL often leads to frustration with broken command-line arguments, blurry programmatic screenshots, and deprecated API calls. This skill provides a verified automation framework for remote sensing engineers to execute reliable batch processing and GUI-driven workflows.

### What it does
- **Headless Execution** executes IDL scripts via stable stdin piping, bypassing broken CLI flags like `-e` or `-rt`.
- **Object Segmentation** automates `FXSegmentation` for high-resolution imagery using optimized Edge and Quadtree algorithms.
- **Reliable Screenshots** captures native-resolution GUI outputs using the Windows compositor (Win+Shift+S) to avoid DPI scaling blur.
- **API Version Bridging** resolves common `ENVITask` initialization errors between ENVI 5.6 and 6.2 versions.
- **Vector Export** automates the conversion of classification results into ready-to-use shapefiles.
- **Environment Management** auto-detects ENVI installations and ensures correct license paths and file encoding (CRLF) for IDL.

### How it works
1. **Environment Probe** detects the local ENVI/IDL installation path and verifies the license server configuration.
2. **Script Preparation** converts processing scripts to CRLF line endings and ensures all file paths use ASCII characters.
3. **Pipeline Execution** initiates a subprocess to pipe `.compile` and execution commands directly into the IDL kernel.
4. **GUI Capture** triggers the Windows screen snip overlay, automates a drag-and-drop selection, and exports the clipboard to PNG.

### Frameworks & tools
This tool targets ENVI (5.6 and 6.2) and IDL (8.5 to 9.2). It utilizes Python for orchestration, leveraging `subprocess` for kernel communication, `ctypes` for Windows API interaction, and `numpy` for direct raster manipulation.

### Why this beats prompting it yourself
Generic AI prompts often suggest outdated IDL flags or fail to account for the mandatory `e = ENVI()` initialization required in newer versions. This skill includes pre-tested logic for handling Windows-specific UI quirks and DPI scaling issues that typically break basic automation scripts.

### Use cases
- Running large-scale satellite imagery classification in headless batch mode.
- Automated extraction of urban land-use objects using FXSegmentation and rule-based filtering.
- Generating high-quality, high-resolution visual reports from ENVI GUI dialogs.
- Debugging IDL syntax errors caused by encoding mismatches or licensing issues.

### Known limitations
Does not support non-ASCII characters in file paths due to IDL kernel restrictions. Headless execution of specific tasks like `BinaryLTThresholdRaster` may hang and requires Python-side calculation instead.

## Requires

- Python
- Git

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the envi-automation-skill skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What specific remote sensing frustrations does this skill address?

This skill solves common automation hurdles like broken CLI flags, DPI-related screenshot blur, and the 'headless hang' issues often found in ENVI's native Task engine by using a stabilized stdin piping framework.

### Which versions of ENVI and IDL are supported by this automation skill?

It is fully compatible with ENVI versions 5.6 through 6.2 and IDL versions 8.5 through 9.2, including logic to bridge API changes between these specific releases.

### Can I use this skill for automated feature extraction and object segmentation?

Yes, the skill includes specialized modules for automated FXSegmentation using Edge and Quadtree algorithms, specifically optimized for high-resolution satellite and aerial imagery.

### What is included in the purchase of the envi automation skill?

The skill includes the core automation framework, a library of pre-tested IDL/Python bridge scripts, and an environment-probing tool to ensure your license and paths are correctly configured.

### Are there any limitations regarding file paths or operating systems?

No, the skill currently requires file paths to use ASCII characters due to underlying IDL kernel restrictions, and it is optimized for Windows-based environments for GUI-driven features.

### How difficult is the initial setup and configuration process?

Setup is streamlined through an automated environment probe that auto-detects your ENVI installation, verifies your license server, and configures file encoding to prevent execution errors.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
