here-macos CLAUDE.md

here-macos CLAUDE.md is an instructions file for coding agents from koalaauto/here-macos. It costs 3,901 tokens per session, scanned A, original, MIT.

Repository instructions for Here, a macOS menu-bar app that shows the country or region where a user’s internet connection exits. They describe its SwiftUI and AppKit structure, IP lookup providers, and development commands.

In plain words
What is it for?
Use them when building, testing, or modifying the Here macOS app, especially its status-bar interface, popover, IP lookup service, provider failover, and quiet command-line runs.
Why use it?
They give a coding agent the project’s architecture and networking assumptions before it changes code. They also document the fallback provider used when the primary lookup service fails.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/koalaauto/here-macos/claude-md
Clone the repo
git clone --depth 1 https://github.com/koalaauto/here-macos

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 here-macos CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/koalaauto/here-macos/claude-md.svg)](https://agentmods.dev/instructions/koalaauto/here-macos/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/koalaauto/here-macos/claude-md"><img src="https://agentmods.dev/badge/instructions/koalaauto/here-macos/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,901 This file is loaded in full into every session.
When invoked 3,901 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.03901 $0.03901
Opus 5 $0.01951 $0.01951
Sonnet 5 $0.00780 $0.00780
Haiku 4.5 $0.00390 $0.00390

Measured 4d ago against content hash 95a4998a4e1a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

here-macos CLAUDE.md scanned grade A with 0 findings 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 4d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 151 lines

How it starts

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

Here — AI Assistant Notes

Long-term menu bar macOS app showing your current egress country/region. Two-provider failover chain since v0.33.0: primary is ipwho.is, fallback is ip.guide (see Here/Networking/FallbackChainProvider.swift). Sequential, not racing — fallback only runs when the primary throws. The chain exists because a single hardcoded provider was a single point of failure when a user's VPN / proxy rules broke that one CDN (the v0.32.x → v0.33.0 motivation).

(Originally shipped as "IP Guide" through v0.23.x; renamed to Here at v0.24.0. Default provider switched to ipwho.is at v0.26.0 because ip.guide silently misreported VPN egresses. Failover chain added at v0.33.0; ip.guide came back as the fallback after field testing showed its accuracy on VPN egresses had improved.)

Architecture at a glance

  • Entry: Here/App/HereApp.swift (SwiftUI App, settings-only scene)
  • AppDelegate builds AppEnvironment + StatusBarController
  • StatusBarController owns NSStatusItem + NSPopover (AppKit-managed)
  • Popover content rendered with SwiftUI via NSHostingController
  • All IP-lookup networking flows through IPService (actor) → an IPProvider. In production the provider is a FallbackChainProvider([IPWhoIsProvider(), IPGuideProvider()]) wired up in AppEnvironment. Emits IPState via AsyncStream. Each provider owns its own raw-response shape and a map(_:) adapter into the shared IPDataModel — swapping providers is mechanical, not a UI / cache rewrite. The chain wrapper itself conforms to IPProvider, so IPService knows nothing about failover — it just sees "one provider".
  • RefreshScheduler runs the IP refresh loop on a hardcoded 5 s cadence (30 s while the display is asleep). NetworkMonitor (NWPathMonitor) fires extra immediate refreshes on becameReachable / pathChanged; lid-wake does the same. The polling loop is the safety net for everything else — at 5 s, you don't need a custom SCDynamicStore observer to catch WiFi hops or proxy toggles.
  • UpdateChecker (actor) + UpdateInstaller (actor) + UpdateCoordinator (@MainActor) handle the auto-update pipeline.
    • Checker: fetches the GitHub releases atom feed (releases.atom on github.com, deliberately not the rate-limited api.github.com), parses it with XMLParser, and returns UpdateInfo (version + release page URL + a DMG URL synthesized from the Here-X.Y.Z.dmg naming convention — the atom feed doesn't enumerate release assets). See UpdateChecker.swift's header for why the atom feed replaced the JSON API at v0.33.0.
    • Coordinator: owns the daily wake-up timer, persists lastUpdateCheckAt / skippedUpdateVersion in SettingsStore, presents the "Update available" alert and the install progress NSPanel.
    • Installer: URLSession-downloads the DMG (intentionally avoids com.apple.quarantine xattr that browser downloads carry — that's how we skip the Gatekeeper "open anyway" prompt on every upgrade), hdiutil attachs it, ditto-copies Here.app to a staging dir, then writes a tiny bash relauncher that polls our PID, swaps /Applications/Here.app, and opens the new bundle. We NSApp.terminate(nil) ourselves; the script outlives us by being detached from our stdio.
  • Picker (Never / Once a day / Once a week) + Check now button live in General settings.
  • The popover footer's settings gear opens Settings via SwiftUI's \.openSettings env action; the right-click menu's Settings… item calls the same captured action through AppEnvironment.openSettingsAction. Don't try to open Settings via NSApp.sendAction(showSettingsWindow:) from AppKit code — for LSUIElement apps with no visible main menu it silently no-ops.
  • Settings use an @Observable SettingsStore with UserDefaults-backed properties (manual didSet persistence)
  • Cache at ~/Library/Application Support/Here/last_ip.json (we ship without App Sandbox — see Here/Here.entitlements for why; the in-app installer needs to spawn hdiutil and write outside the container).

Read the full file on GitHub · 151 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. 4d ago First seen · 151 lines · 3,901 tokens per session scan A 95a4998a4e1a

Subscribe to this mod's changes

here-macos CLAUDE.md is an instructions file published in the GitHub repository koalaauto/here-macos (45 stars, last pushed 18d ago), licensed MIT. It adds 3,901 tokens to every session, about $0.0195 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories