yi_leetcode_show: Instructions file for Claude Code

CLAUDE.md

yi_leetcode_show CLAUDE.md is an instructions file for Claude Code from yihong0618/yi_leetcode_show. It costs 1,817 tokens per session, scanned A, a copy of yi_leetcode_show AGENTS.md, MIT.

Project-specific guidance for an AI coding agent working on a React, Vite and TypeScript website that turns LeetCode solutions into browser animations. It documents the project structure, constraints and process for adding problems.

In plain words
What is it for?
Adding animated LeetCode problems, preparing Python 3 solutions, updating problem definitions and building visualization frames without introducing a backend.
Why use it?
It keeps changes consistent with the existing static-site design and makes clear how animated code steps, Python execution and displayed variables work. It also reduces guesswork when adding a new LeetCode problem.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is yihong0618/yi_leetcode_show's own configuration. It tells Claude Code how to work on yi_leetcode_show 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 yi_leetcode_show configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/yihong0618/yi_leetcode_show/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/yihong0618/yi_leetcode_show

Made for: Claude Code.

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 yi_leetcode_show CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/yihong0618/yi_leetcode_show/claude-md.svg)](https://agentmods.dev/instructions/yihong0618/yi_leetcode_show/claude-md)
Your own site
<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>
Per session 1,817 This file is loaded in full into every session.
When invoked 1,817 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 100% copy Near-identical to another mod 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.01817 $0.01817
Opus 5 $0.00908 $0.00908
Sonnet 5 $0.00363 $0.00363
Haiku 4.5 $0.00182 $0.00182

Measured 7d ago against content hash 0d3ffcfb344c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

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.

Origin

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.

CLAUDE.md · 154 lines

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 的真实局部变量。

新增题目的标准流程

  1. 复制 src/content/partitionLabels.ts 的结构,新建一个题目文件,例如 src/content/<slug>.ts
  2. 补全 ProblemDefinition 的基础信息:
    • id
    • title
    • slug
    • difficulty
    • prompt
    • summary
    • algorithmNotes
    • inputLabel
    • defaultInput
    • leetcodeUrl
    • defaultSolutionId
    • pythonEntry
  3. 为这道题准备 solutions
  4. 实现 buildVisualization(input),让它返回完整的 ProblemVisualization
  5. src/content/problems.ts 中导出并注册这道题。
  6. 本地运行并确认题目可切换、动画可播放、参考解法可切换。

新增题目时必须满足的数据约定

  • solutions 的每一项都必须符合 SolutionDefinition
  • defaultSolutionId 必须命中 solutions 中真实存在的一个解法。
  • pythonEntry 需要和浏览器执行约定一致:
    • 优先兼容 class Solution + 指定方法。
    • 同时允许备用函数名,例如 solve(s)
  • buildVisualization(input) 必须返回:
    • inputValue
    • expectedOutput
    • lastOrder
    • frames

动画帧设计约定

  • 当前通用阶段只有 4 个:preprocessscanclosedone
  • AnimationFrame.codeStep 现在直接复用这 4 个阶段名。
  • 动画下方参考代码的高亮,完全依赖当前帧的 codeStep 和当前解法的 highlightLines
  • 如果新题需要更细的代码高亮阶段,不要先硬改页面文案,先评估是否要扩展 CodeStep 类型和所有题目的 highlightLines
  • 变量面板依赖 AnimationFrame 里的字段,例如:
    • currentIndex
    • currentChar
    • rangeStart
    • rangeEnd
    • result
    • closedSegments
    • mappedChars
    • lastMap
  • 如果新题的讲解需要额外变量,优先扩展 AnimationFrame 结构,再同步更新变量面板,而不是在组件里写特判字符串。

Read the full file on GitHub · 154 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. 7d ago First seen · 154 lines · 1,817 tokens per session scan A 0d3ffcfb344c

Subscribe to this mod's changes

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.

Related

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.

openai/codex · 5,182 tokens

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).

microsoft/vscode · 6,785 tokens

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.

vercel/next.js · 7,296 tokens

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.

langchain-ai/langchain · 4,469 tokens

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).

microsoft/vscode · 5,001 tokens

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.

github/spec-kit · 7,104 tokens