loopback-training-server CLAUDE.md

Project instructions for the Loopback training server, a workout-tracking system with a web dashboard, APIs, and Apple Watch integration.

In plain words
What is it for?
Use them when changing the backend, frontend, database, training API, mobile-app data formats, or Docker setup.
Why use it?
They document the system structure and warn that the companion iOS app defines part of the shared API contract.

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/aderaaij/loopback-training-server/claude-md
Clone the repo
git clone --depth 1 https://github.com/aderaaij/loopback-training-server
Per session 8,389 This file is loaded in full into every session.
When invoked 8,389 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.08389 $0.08389
Opus 5 $0.04195 $0.04195
Sonnet 5 $0.01678 $0.01678
Haiku 4.5 $0.00839 $0.00839

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

Security

Grade A, and why

loopback-training-server 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 2d 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 · 299 lines

How it starts

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

Training API

Personal workout tracking API with Apple Watch integration queue, training plans, health metrics, and a web dashboard.

The companion iOS app lives at aderaaij/loopback-training-app; a working copy is usually checked out as a sibling directory (../loopback-training-app). Cross-reference it for the client side of the API contract (WorkoutAPIClient.swift, SessionStore.swift, WorkoutScheduleManager.swift) before changing wire formats — and git pull it first, since development happens elsewhere.

Tech Stack

  • Backend: FastAPI (Python 3.13) with Uvicorn
  • Database: PostgreSQL 16 with SQLAlchemy 2.0 ORM, Alembic migrations
  • Package manager: uv
  • Frontend: React 19 + TypeScript SPA ("Loopback", in frontend/) — Vite 8, React Compiler, TanStack Query, react-router, hand-rolled SVG charts, Leaflet route maps
  • MCP Server: FastMCP 2.0 (in mcp/)
  • Infrastructure: Docker Compose (docker-compose.yml)

Project Structure

backend/
  app/
    main.py              # FastAPI app entry point (+ serves the SPA build, see below)
    auth.py              # Bearer token auth
    config.py            # Pydantic-settings
    database.py          # SQLAlchemy setup
    models/              # ORM models
    routes/              # API route handlers
    schemas/             # Pydantic request/response schemas
  migrations/            # Alembic migrations
  Dockerfile             # Multi-stage build: Node (frontend) + uv (backend); context = repo root
frontend/
  src/
    lib/                 # api client, wire types, auth context, query hooks, formatters
    components/          # layout, shared UI, SVG chart primitives, route map
    screens/             # one file per screen (Overview, Calendar, Workouts, Plans, Notes, Health, Queue, Settings, Users)
    styles/              # global design tokens + per-screen CSS
mcp/
  app/
    main.py              # FastMCP server entry point
    config.py            # MCP settings
    coaching/            # Coaching playbook content (core.md + goals/*.md) + loader
    tools/               # MCP tool routers (workouts, queue, actions, feedback, health, plans, coaching)
    services/            # HTTP client for backend API

Read the full file on GitHub · 299 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. 2d ago First seen · 299 lines · 8,389 tokens per session scan A ff4af9e2c211

Subscribe to this mod's changes

loopback-training-server CLAUDE.md is an instructions file published in the GitHub repository aderaaij/loopback-training-server (3 stars, last pushed 1mo ago), licensed MIT. It adds 8,389 tokens to every session, about $0.0419 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-31.