Borrowing it
Nothing to install: this file belongs to yihong0618/yi_leetcode_show. 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/yihong0618/yi_leetcode_show/main/CLAUDE.mdgit clone --depth 1 https://github.com/yihong0618/yi_leetcode_showWrote 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/yihong0618/yi_leetcode_show/claude-md)<a href="https://agentmods.dev/instructions/yihong0618/yi_leetcode_show/claude-md"><img src="https://agentmods.dev/badge/instructions/yihong0618/yi_leetcode_show/claude-md.svg" alt="Measured on agentmods" 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.01817 | $0.01817 |
| Opus 5 | $0.00908 | $0.00908 |
| Sonnet 5 | $0.00363 | $0.00363 |
| Haiku 4.5 | $0.00182 | $0.00182 |
Grade A, and why
yi_leetcode_show 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 7d 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.
This is a copy
100% identical to yi_leetcode_show AGENTS.md — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LeetCode Show Agent Guide
项目目标
- 这是一个纯前端项目,用 React + Vite + TypeScript 构建,并部署到 GitHub Pages。
- 项目目标是把 LeetCode 的 Python 题解做成可播放的算法原理动画。
- 当前交互全部在浏览器里完成,不依赖后端。
- Python 运行依赖浏览器端的 Pyodide,因此这里的参考解法和可执行代码都统一按 Python 3 处理。
当前结构
- 题目入口列表在
src/content/problems.ts。 - 每道题实现为一个
ProblemDefinition,类型定义在src/types.ts。 - 当前示例题文件是
src/content/partitionLabels.ts,新增题目时优先参考它。 - 页面入口在
src/App.tsx。 - 动画面板和参考代码高亮在
src/components/AnimationPlayer.tsx。 - 右侧变量面板在
src/components/FrameVariablesPanel.tsx。 - 可运行 Python 编辑区在
src/components/CodeWorkbench.tsx。
核心约束
- 只收录 Python 3 解法。
- 每道题最多挂 5 个参考解法。
- 参考解法尽量附上明确来源链接。
- 只有在能确认公开原始来源时,才能标注为“灵神”或其他作者原解;无法确认时要写成“手工整理”或类似表述。
- 页面是静态站方案,新增功能时不要引入后端依赖。
- 动画高亮不是实时 Python 调试,它由动画帧里的
codeStep驱动。 - 右侧变量面板展示的是动画帧状态,不是用户自定义 Python 的真实局部变量。
新增题目的标准流程
- 复制
src/content/partitionLabels.ts的结构,新建一个题目文件,例如src/content/<slug>.ts。 - 补全
ProblemDefinition的基础信息:idtitleslugdifficultypromptsummaryalgorithmNotesinputLabeldefaultInputleetcodeUrldefaultSolutionIdpythonEntry
- 为这道题准备
solutions。 - 实现
buildVisualization(input),让它返回完整的ProblemVisualization。 - 在
src/content/problems.ts中导出并注册这道题。 - 本地运行并确认题目可切换、动画可播放、参考解法可切换。
新增题目时必须满足的数据约定
solutions的每一项都必须符合SolutionDefinition。defaultSolutionId必须命中solutions中真实存在的一个解法。pythonEntry需要和浏览器执行约定一致:- 优先兼容
class Solution+ 指定方法。 - 同时允许备用函数名,例如
solve(s)。
- 优先兼容
buildVisualization(input)必须返回:inputValueexpectedOutputlastOrderframes
动画帧设计约定
- 当前通用阶段只有 4 个:
preprocess、scan、close、done。 AnimationFrame.codeStep现在直接复用这 4 个阶段名。- 动画下方参考代码的高亮,完全依赖当前帧的
codeStep和当前解法的highlightLines。 - 如果新题需要更细的代码高亮阶段,不要先硬改页面文案,先评估是否要扩展
CodeStep类型和所有题目的highlightLines。 - 变量面板依赖
AnimationFrame里的字段,例如:currentIndexcurrentCharrangeStartrangeEndresultclosedSegmentsmappedCharslastMap
- 如果新题的讲解需要额外变量,优先扩展
AnimationFrame结构,再同步更新变量面板,而不是在组件里写特判字符串。
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.
- 7d ago First seen · 154 lines · 1,817 tokens per session scan A 0d3ffcfb344c
yi_leetcode_show CLAUDE.md is an instructions file published in the GitHub repository yihong0618/yi_leetcode_show (11 stars, last pushed 5mo ago), licensed MIT. It adds 1,817 tokens to every session, about $0.0091 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to yi_leetcode_show AGENTS.md, differing in 0 lines, and is treated as a copy.
Other instructions, from other repositories
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).
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.
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.
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).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.