loseit-mcp-local: Instructions file for Codex

AGENTS.md

loseit-mcp-local AGENTS.md is an instructions file for Codex, OpenCode from the-mace/loseit-mcp-local. It costs 1,253 tokens per session, scanned A, original, MIT.

Project instructions requiring the code repository to be synchronised with its main branch before work begins and dependencies to be reinstalled after relevant changes.

In plain words
What is it for?
Use them when starting work on the project, especially before editing code or installing requirements.
Why use it?
They help prevent edits and tests from being based on an outdated checkout or missing dependencies.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Claude Code; mentions AGENTS.md.

This is the-mace/loseit-mcp-local's own configuration. It tells Codex and OpenCode how to work on loseit-mcp-local 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 loseit-mcp-local configures →

Reuse

Borrowing it

Nothing to install: this file belongs to the-mace/loseit-mcp-local. 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/the-mace/loseit-mcp-local/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/the-mace/loseit-mcp-local

Made for: Codex, OpenCode.

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 loseit-mcp-local AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/the-mace/loseit-mcp-local/agents-md/github.svg)](https://agentmods.dev/instructions/the-mace/loseit-mcp-local/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/the-mace/loseit-mcp-local/agents-md"><img src="https://agentmods.dev/badge/instructions/the-mace/loseit-mcp-local/agents-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 loseit-mcp-local AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/the-mace/loseit-mcp-local/agents-md"><img src="https://agentmods.dev/badge/instructions/the-mace/loseit-mcp-local/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,253 This file is loaded in full into every session.
When invoked 1,253 The same file — it is already loaded in full.
Security scan A 0 findings. 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.01253 $0.01253
Opus 5.5 $0.00501 $0.00501
Sonnet 5.5 $0.00251 $0.00251
Haiku 4.5 $0.00125 $0.00125

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

Security

Grade A, and why

loseit-mcp-local AGENTS.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.

AGENTS.md · 99 lines

How it starts

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

LoseIt Local MCP: agent instructions

Shared rules (pull before work, tests and lint, secrets, commit attribution) live in the global ~/.config/agents/AGENTS.md. If that file is not loaded (cloud or CI sessions), the short version is: git pull --ff-only first, run the tests below before committing, never commit secrets, and end agent commits with a Co-Authored-By: <Tool> (<model>) <email> trailer.

Which coding agent

Use Claude Code with Sonnet for small, contained fixes driven by an alert email (scrape timeouts, expired sessions, catch-up runs). Use Opus 5.5 for multi-file, schema, or session-security changes. Grok Build is the second opinion.

Repo specifics

  • After a pull that touches requirements.txt: source .venv/bin/activate && pip install -r requirements.txt, and if Playwright changed, python -m playwright install chromium.
  • Tests: .venv/bin/python -m pytest (CI runs the same suite).

Context

I use LoseIt (loseit.com) for diet/calorie tracking. There's no official API and no working data export on the web app. This project scrapes my own account via a headless browser, stores it locally, and exposes it to Claude Desktop via MCP — mirroring an existing Garmin MCP setup I already have running (same architecture: local Playwright/Python scraper → SQLite → stdio MCP server → claude_desktop_config.json).

Known constraint: this scrapes a personal account via the web UI and will be fragile against LoseIt UI changes. Flag clearly if something during the build makes unattended daily runs non-viable (e.g. LoseIt requires solving a CAPTCHA on every login).

Layout

  • src/db.py — SQLite schema + helpers (daily_summary, food_log, weight_log, water_log).
  • src/loseit_mcp.py — MCP server (mcp v2) exposing 4 read-only tools: get_daily_summary, get_food_log, get_weight_history, get_water_log.
  • src/auth.py — login and token refresh through the iOS app's OAuth endpoint (sync.loseit.com/account/login, found by capturing the app's traffic). Tokens in ~/.loseit-data/tokens.json; the access token doubles as the web fn_auth/liauth cookies.
  • src/scraper.py — Playwright scraper. login prompts for email/password and logs in via auth.py (--browser for the old headed-browser login); run refreshes the token, then fetches yesterday (or --since YYYY-MM-DD), --headed for a visible browser. fetch_day, fetch_weight, and fetch_water read the live site. Individual exercise entries are deliberately not scraped; only the day's exercise-calorie total is kept, so remaining calories match LoseIt's own figure.
  • src/daily_email.py — renders one stored day as the bot-parsable loseit-daily/1 email body; run-scraper.sh sends it to LOSEIT_DAILY_SUMMARY_EMAIL after a successful run. Changing the format breaks downstream parsers: bump the format: version.
  • scripts/install-launchd.sh — writes launchd agents into ~/Library/LaunchAgents with absolute paths derived at install time (labels: com.loseit-mcp.scraper, com.loseit-mcp.scraper-health). --email / --summary-email put the addresses in the plist env only; never commit a real address.
  • requirements.txt — playwright, mcp, httpx (token API).

Read the full file on GitHub · 99 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 Changed · +6 lines · +102 tokens per session b06edf1619a2
  2. 20d ago Changed · +6 lines · +113 tokens per session 01a67b4fdea5
  3. 1mo ago Changed · +63 lines · +898 tokens per session 6aeb78fb8019
  4. 2mo ago First seen · 24 lines · 140 tokens per session scan A db1b45d510f6

Subscribe to this mod's changes

loseit-mcp-local AGENTS.md is an instructions file published in the GitHub repository the-mace/loseit-mcp-local (0 stars, last pushed 2d ago), licensed MIT. It adds 1,253 tokens to every session, about $0.0050 per session on Opus 5.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-09-01.

Related

loseit-mcp-local AGENTS.md compared with instructions from other repositories

loseit-mcp-local AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
loseit-mcp-local AGENTS.mdthe-mace/loseit-mcp-localInstructions file02d agoMITA1,253Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot