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.
curl -O https://raw.githubusercontent.com/gibbonsr4/ai-keywords-lightroom/main/CLAUDE.mdgit clone --depth 1 https://github.com/gibbonsr4/ai-keywords-lightroomWrote 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.
[](https://agentmods.dev/instructions/gibbonsr4/ai-keywords-lightroom/claude-md)<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.
<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>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.03106 | $0.03106 |
| Opus 5.5 | $0.01242 | $0.01242 |
| Sonnet 5.5 | $0.00621 | $0.00621 |
| Haiku 4.5 | $0.00311 | $0.00311 |
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 2mo 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 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, versionPrefs.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 usingf:tab_viewfor 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 documentationROADMAP.md— Feature roadmap referencing GitHub Issues
Architecture
- User selects photos in LR Library, runs "Generate AI Keywords"
- 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
- Folder context (folder path hints, GPS coordinates) prepended to prompt for location awareness
- Folder aliases expand abbreviations (e.g. DR → Dominican Republic)
- 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_viewfor provider selection — each provider in its own tab,valuebound 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
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.
- 2mo ago First seen · 135 lines · 3,106 tokens per session scan A bd7507150ca0
ai-keywords-lightroom CLAUDE.md is an instructions file published in the GitHub repository gibbonsr4/ai-keywords-lightroom (5 stars, last pushed 5mo ago), licensed MIT. It adds 3,106 tokens to every session, about $0.0124 per session on Opus 5.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.
ai-keywords-lightroom CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ai-keywords-lightroom CLAUDE.mdgibbonsr4/ai-keywords-lightroom | Instructions file | 5 | 5mo ago | MIT | A | 3,106 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,685 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,086 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 280k | 2d ago | MIT | A | 4,325 | Codex, OpenCode |