ai-keywords-lightroom: Instructions file for Claude Code

CLAUDE.md

ai-keywords-lightroom CLAUDE.md is an instructions file for Claude Code from gibbonsr4/ai-keywords-lightroom. It costs 3,106 tokens per session, scanned A, original, MIT.

A macOS-only Lightroom Classic plugin that creates searchable photo keywords using local Ollama vision models or cloud services from Claude, OpenAI, or Gemini.

In plain words
What is it for?
Use it to generate and apply keywords, configure an AI provider, check Ollama, compare 2–5 models on one photo, and manage the plugin's Lightroom settings.
Why use it?
It reduces the manual work of describing and tagging photos and lets you compare several AI models on the same image without saving those comparison results.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: positional $N argument.

This is gibbonsr4/ai-keywords-lightroom's own configuration. It tells Claude Code how to work on ai-keywords-lightroom itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ai-keywords-lightroom configures →

Reuse

Borrowing it

Nothing to install: this file belongs to gibbonsr4/ai-keywords-lightroom. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/gibbonsr4/ai-keywords-lightroom/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/gibbonsr4/ai-keywords-lightroom

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ai-keywords-lightroom CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/gibbonsr4/ai-keywords-lightroom/claude-md/github.svg)](https://agentmods.dev/instructions/gibbonsr4/ai-keywords-lightroom/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/gibbonsr4/ai-keywords-lightroom/claude-md"><img src="https://agentmods.dev/badge/instructions/gibbonsr4/ai-keywords-lightroom/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ai-keywords-lightroom CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/gibbonsr4/ai-keywords-lightroom/claude-md"><img src="https://agentmods.dev/badge/instructions/gibbonsr4/ai-keywords-lightroom/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,106 This file is loaded in full into every session.
When invoked 3,106 The same file — it is already loaded in full.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.03106 $0.03106
Opus 5 $0.01553 $0.01553
Sonnet 5 $0.00621 $0.00621
Haiku 4.5 $0.00311 $0.00311

Measured 11d ago against content hash bd7507150ca0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

ai-keywords-lightroom CLAUDE.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

2. For each photo: render temp JPEG via LrExportSession → base64 encode → send to AI provider (Ollama/Claude/OpenAI/Gemini) via curl → parse comma-separated keywords → write to LR catalog
CLAUDE.md · 135 lines

How it starts

The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AI Keywords — Lightroom Classic Plugin

Project Overview

A macOS-only Lightroom Classic plugin that generates and applies searchable keywords to photos using local Ollama vision models or cloud APIs (Claude, OpenAI, Gemini). Built in Lua using the LR SDK.

File Structure

  • Info.lua — LR plugin manifest, menu items, version
  • Prefs.lua — Preference defaults and getPrefs() loader. Pure data, no UI, no side effects. Safe to dofile() from any module.
  • AIEngine.lua — Shared AI inference engine. Image rendering, API calls (Ollama + Claude + OpenAI + Gemini), keyword parsing, Ollama status checks, cloud model lists. Used by GenerateKeywords.lua, CompareModels.lua, and Config.lua.
  • Config.lua — Settings dialog UI using f:tab_view for provider selection. Invoked via Library > Plugin Extras > Settings…
  • GenerateKeywords.lua — Main keyword generation logic. Invoked via Library > Plugin Extras > Generate AI Keywords.
  • CompareModels.lua — Model comparison tool. Runs 2–5 models on one photo without saving keywords. Invoked via Library > Plugin Extras > Compare Models.
  • dkjson.lua — Bundled JSON library (LR SDK has no built-in JSON)
  • README.md — User documentation
  • ROADMAP.md — Feature roadmap referencing GitHub Issues

Architecture

  1. User selects photos in LR Library, runs "Generate AI Keywords"
  2. For each photo: render temp JPEG via LrExportSession → base64 encode → send to AI provider (Ollama/Claude/OpenAI/Gemini) via curl → parse comma-separated keywords → write to LR catalog
  3. Folder context (folder path hints, GPS coordinates) prepended to prompt for location awareness
  4. Folder aliases expand abbreviations (e.g. DR → Dominican Republic)
  5. Parent keyword option nests all AI keywords under a container keyword

Key Technical Decisions

  • LrExportSession replaces sips for image rendering — handles all formats LR can open (RAW, HEIC, etc.)
  • curl via LrTasks.execute() for HTTP — LrHttp was unreliable for localhost connections
  • LrTasks.pcall (not standard pcall) wraps catalog writes — Lua 5.1 can't yield across C boundaries
  • withWriteAccessDo { timeout = 10 } for catalog lock contention
  • CSV output format from models (not JSON) — battle-tested, simpler prompts, better for Haiku
  • f:tab_view for provider selection — each provider in its own tab, value bound to provider prop
  • GPS toggle (useGPS) — allows users to disable GPS coordinate context for privacy
  • Cloud model lists defined once in AIEngine.lua, shared by Config.lua (dropdowns) and CompareModels.lua (checkboxes)
  • Folder aliases accept semicolons, commas, and newlines as delimiters

Read the full file on GitHub · 135 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 135 lines · 3,106 tokens per session scan A bd7507150ca0

Subscribe to this mod's changes

ai-keywords-lightroom CLAUDE.md is an instructions file published in the GitHub repository gibbonsr4/ai-keywords-lightroom (5 stars, last pushed 3mo ago), licensed MIT. It adds 3,106 tokens to every session, about $0.0155 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens