ai-analysis

Analyze images and text from the command line using the Gemini API.

48|11|Updated Jun 12, 2010
One-click install
npx skills add https://github.com/ithinkihaveacat/dotfiles --skill ai-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-analysis
Source: https://github.com/ithinkihaveacat/dotfiles/tree/main/etc/skills/ai-analysis
Command: npx skills add https://github.com/ithinkihaveacat/dotfiles --skill ai-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill automates AI-driven analysis of images and text from the command line, enabling rapid insights without manual interpretation.

Core Features & Use Cases

  • AI-generated image descriptions and alt-text for accessibility and documentation.
  • UI screenshot comparison and visual diff to detect changes.
  • Smart crop around detected faces to produce focused thumbnails.
  • Token counting and text analysis for content budgeting and quality checks.
  • Essay-style analysis generation from input text for reports and briefs.
  • Boolean condition evaluation to validate text against criteria.

Quick Start

Use the scripts in the skill's folder to perform common tasks, for example:

  • Describe an image: scripts/screenshot-describe IMAGE [PROMPT]
  • Compare two images: scripts/screenshot-compare IMAGE1 IMAGE2 [PROMPT]
  • Smart-crop faces: scripts/photo-smart-crop [--ratio W:H] INPUT OUTPUT
  • Generate an essay: scripts/emerson "PROMPT" < INPUT_FILE
  • Evaluate a condition: echo "text" | scripts/satisfies "CONDITION"
  • Count tokens: cat file.txt | scripts/token-count

Frequently Asked Questions about ai-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate image descriptions and alt-text from the command line?

You can generate AI-powered image descriptions from the command line by running the screenshot-describe script, which passes a base64-encoded image to the Gemini API. It returns a text description suitable for accessibility or documentation.

What's the best way to compare UI screenshots for visual diffs?

To compare UI screenshots visually, use the screenshot-compare script to pass two images to the Gemini API. The tool analyzes both images and generates a text-based diff highlighting the visual changes between them.

Do I need a Gemini API key to analyze images and text?

Yes, you need a GEMINI_API_KEY to access the Gemini API for AI-assisted image and text analysis. The command line scripts also require curl and jq, while image tools require base64 and ImageMagick.

Can I evaluate boolean conditions against input text automatically?

You can evaluate boolean conditions by piping text into the satisfies script with a specified condition. The tool uses the Gemini API to validate the input text against your criteria and returns a boolean evaluation result.

How does token counting work for text files in content budgeting?

Token counting works by piping a text file into the token-count script, which processes the input to calculate the token count. This helps with content budgeting and quality checks before submitting text to AI models.

How do I smart-crop an image around detected faces for thumbnails?

To smart-crop an image around faces, run the photo-smart-crop script with an optional aspect ratio like W:H. It uses ImageMagick to detect faces and produces a focused, cropped output image.