oh-my-ppt: Instructions file for Claude Code

CLAUDE.md

oh-my-ppt CLAUDE.md is an instructions file for Claude Code from arcsin1/oh-my-ppt. It costs 995 tokens per session, scanned A, a copy of oh-my-ppt AGENTS.md, Apache-2.0.

Project guidance for Oh My PPT, a local desktop application for creating and editing presentations. It covers the code style, allowed checks, tests, and rules for changing different parts of the app.

In plain words
What is it for?
Use it when modifying presentation generation, editing, importing, exporting, runtime assets, React components, or related tests.
Why use it?
It helps coding agents understand which parts of the presentation workflow a change may affect and which commands are safe to run.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md.

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

About the project

Oh My PPT is a local-first desktop application that uses AI to create, edit, present, and export editable HTML-based slide presentations. It is for people making presentations, lessons, stories, reports, or pitches who want to describe their content and then adjust the resulting pages, visuals, animations, and layouts.

arcsin1/oh-my-ppt · 1,927 stars · on GitHub · ohmyppt.cc

Reuse

Borrowing it

Nothing to install: this file belongs to arcsin1/oh-my-ppt. 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/arcsin1/oh-my-ppt/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/arcsin1/oh-my-ppt

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 oh-my-ppt CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/arcsin1/oh-my-ppt/claude-md.svg)](https://agentmods.dev/instructions/arcsin1/oh-my-ppt/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/arcsin1/oh-my-ppt/claude-md"><img src="https://agentmods.dev/badge/instructions/arcsin1/oh-my-ppt/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 995 This file is loaded in full into every session.
When invoked 995 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 88% 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.00995 $0.00995
Opus 5 $0.00498 $0.00498
Sonnet 5 $0.00199 $0.00199
Haiku 4.5 $0.00100 $0.00100

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

Security

Grade A, and why

oh-my-ppt 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 8d 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

88% identical to oh-my-ppt AGENTS.md — 36 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 · 113 lines

How it starts

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

CLAUDE.md

Project

Oh My PPT — 本地优先的 AI 幻灯片生成与编辑工具。Electron + React + TypeScript。

Commands

pnpm dev          # 开发
pnpm build        # 不要跑构建
pnpm run typecheck:node # 跑 node 类型检查
pnpm run typecheck:web # 跑 renderer 类型检查
pnpm typecheck    # 跑类型检查  
pnpm lint         # 不要跑ESLint
pnpm format       # 不要跑Prettier

不要跑 npm run lint / npm run build

Code Style

  • Prettier: singleQuote, no semi, printWidth: 100, trailingComma: none
  • 路径别名: @shared/*src/shared/*, @renderer/*src/renderer/src/*

Execution Rules

  • 先判断问题落在哪条链路:生成、编辑、导入、导出或运行时;不要只修当前可见入口
  • 公共规则变更要确认生成和编辑都覆盖,包括整页编辑、deck 编辑、selector 编辑
  • 改 runtime asset 时,同步检查 session asset 兼容/刷新机制
  • 修 bug 优先补最小定向回归测试,必要时覆盖相邻入口
  • 验证时跑最相关的最小测试集;不要跑 npm run lintnpm run build

Testing

  • 框架:Vitest + happy-dom,测试文件放 tests/unit/ 下,按功能域分子目录,文件名 *.test.ts
  • 跑测试:pnpm test,跑单个文件:pnpm test -- tests/unit/xxx/foo.test.ts
  • 修 bug 或加功能时,必须补对应测试到 tests/unit/;测试不通过就继续修代码直到通过
  • 注意:样式ui改动不需要写测试

React 组件编写规范

核心原则

1. 逻辑内聚,少传 props
  • 能写在组件内的逻辑就写在组件内,不要通过 props 从父组件传进来
  • 事件处理、数据获取、状态管理,都优先写在组件自己里面
// ✅ 好
function ProductCard({ id }) {
  const [count, setCount] = useState(0)
  const handleBuy = () => { /* 逻辑写这里 */ }
  return <button onClick={handleBuy}>购买</button>
}

// ❌ 坏
function ProductCard({ count, onBuy }) { /* 逻辑都从外面传 */ }
2. 跨组件状态用 Zustand
  • 多个组件需要共享的数据 → 放 zustand store
  • 不要通过 props 一层层传
const useStore = create((set) => ({
  user: null,
  setUser: (user) => set({ user })
}))

// 任何组件直接拿来用,不用传 props
const user = useStore(state => state.user)
3. 复用逻辑抽成自定义 Hook
  • 多个组件都需要相同的有状态逻辑时,抽成自定义 Hook
  • Hook 放在 hooks/ 目录下,以 use 开头
// hooks/useProductData.js
function useProductData(productId) {
  const [product, setProduct] = useState(null)
  const [loading, setLoading] = useState(false)
  
  useEffect(() => {
    fetchProduct(productId).then(setProduct)
  }, [productId])
  
  return { product, loading }
}

// 组件中使用
function ProductCard({ id }) {
  const { product, loading } = useProductData(id)
  // 不用从 props 传 product 和 loading
}

Read the full file on GitHub · 113 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. 8d ago First seen · 113 lines · 995 tokens per session scan A a839f84e56ff

Subscribe to this mod's changes

oh-my-ppt CLAUDE.md is an instructions file published in the GitHub repository arcsin1/oh-my-ppt (1,927 stars, last pushed 2d ago), licensed Apache-2.0. It adds 995 tokens to every session, about $0.0050 per session on Opus 5. A static security scan graded it A with 0 findings. It is 88% identical to oh-my-ppt AGENTS.md, differing in 36 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