Borrowing it
Nothing to install: this file belongs to dengxuhui/igpsport-mcp. 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/dengxuhui/igpsport-mcp/main/CLAUDE.mdgit clone --depth 1 https://github.com/dengxuhui/igpsport-mcpWrote 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/dengxuhui/igpsport-mcp/claude-md)<a href="https://agentmods.dev/instructions/dengxuhui/igpsport-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/dengxuhui/igpsport-mcp/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/dengxuhui/igpsport-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/dengxuhui/igpsport-mcp/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.02436 | $0.02436 |
| Opus 5 | $0.01218 | $0.01218 |
| Sonnet 5 | $0.00487 | $0.00487 |
| Haiku 4.5 | $0.00244 | $0.00244 |
Grade A, and why
igpsport-mcp 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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
详细工程蓝图、开发计划与协议逆向笔记保存在本地工作文档(未随仓库提交)。本文件是面向贡献者的稳定速查 + 设计红线。
项目定位
一个本地运行的 MCP server,把 iGPSport 骑行数据接入 LLM 客户端(Claude Desktop / Claude Code 等),让用户用自然语言分析训练数据。差异化:派生训练指标(NP/IF/TSS/CTL/ATL/TSB)在 MCP 层算好返回,LLM 拿到的是可直接讲故事的数字,而非原始 stream。
主线是只读分析;唯一的写入路径是训练课程(workout)——用自然语言生成结构化训练课并推回 iGPSport App,闭合「分析 → 处方 → 执行」的工具链。
本地 stdio 部署,不做 remote;数据不外流。
不要做的事(已决策,勿回头)
任何"好心"的反向建议都应被拒绝:
- ❌ 不加 Web UI / dashboard——走纯 MCP stdio,复用 LLM 客户端的对话界面。
- ❌ 不用 TypeScript——选 Python 是因为
fitparse/pandas/ 官方mcpSDK。 - ❌ 不做 remote MCP、多账号、导出 .fit/.zwo、webhook 实时同步、其它码表 provider。
- ⚠️ 双区域以 profile 切换,不分叉第二套 client。CN/INTL 差异收敛在
client/region.py的RegionProfiledataclass 里(host / origin / signing / 路径 override)。实现方案见docs/intl-support-plan.md。 - ⚠️ 派生指标公式严格按权威定义实现,不要自己发挥。NP/IF/TSS/CTL/ATL/TSB 都有公认公式,且必须有单元测试验证(与 Strava/iGPSport 显示误差 < 2%)。
- ⚠️ Compact format 是必需项不是优化项:stream 输出永远是
{channel: {unit, values: [...]}}的裸数组形式,绝不返回[{time, power}, ...]这种逐点对象。从第一行 stream 代码就遵守。 - ⚠️ 训练课程(workout)是唯一的写入特例(原 v1 不做训练计划生成的红线已撤销,它是工具链闭合的必要环节)。但写入路径要克制:① LLM 面向的是
workout/ir.py的人类单位 IR,编译到 iGPSport 原生格式;② 破坏性操作(delete_workout)必须有confirm门槛,默认只返回预览;③ workout 这 3 个 mobile endpoint 实测用默认 web access-key 即可上传(_WO_HDR={}),iOS 签名(AKIDiOSApp2,_IOS_HDR)只是保留的备用通道,不要默认切过去(会导致上传失败),也不要把它扩散成「逆向更多 App 接口」的借口。
核心架构
LLM Client ──stdio(MCP)── igpsport-mcp ──HTTPS── iGPSport 私有 API
server 内部分层(自上而下):
- MCP Tool Layer(
tools/)——见下 17 个 tool。 - Analysis Layer(
analysis/)——派生指标服务端算好再返回。 - Workout IR(
workout/ir.py)——人类单位 IR ↔ iGPSport 原生课程格式的编译/校验。 - FIT Parser(
fit/parser.py)——fitparse封装。 - Client(
client/)——登录 + token 缓存、活动列表、FIT 下载、workout 读写。 - Local Cache(
storage/,SQLite)——~/.cache/igpsport-mcp/。
关键洞察:拿到 FIT 文件后,所有 stream / 派生指标 / 圈数据全部本地解析,跟 iGPSport 服务器零交互。因此读取链路只需维护极少数核心 endpoint(登录、活动列表、FIT 下载)。这是抗 API 漂移的设计核心,不要为了"省事"去逆向更多详情/统计接口。workout 是有意为之的写入特例(3 个 mobile endpoint,实测复用 web 签名),除此之外不扩张 API 面。
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.
- 9d ago First seen · 105 lines · 2,436 tokens per session scan A c27c945107ad
igpsport-mcp CLAUDE.md is an instructions file published in the GitHub repository dengxuhui/igpsport-mcp (3 stars, last pushed 2mo ago), licensed MIT. It adds 2,436 tokens to every session, about $0.0122 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.
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.
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.
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).
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).
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.
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.