code-reader-skills
CLAUDE.md171 starsChanged 10 months agoMITView on GitHub
This is a Claude Skills repository containing bilingual (Chinese/English) code analysis tools based on cognitive science research. The skills help developers achieve deep understanding of source code through elaborative interrogation, self-explanation testing, and retrieval practice. Core Philosophy: Understanding WHY > Knowing WHAT Skills use YAML frontmatter followed by Markdown content: The skills implement a 9-step research-driven workflow: Both language versions MUST be updated together: - code-reader-zh/SKILL.md and code-reader-en/SKILL.md should have identical structure - When adding features, update both versions -…
In this repository2 other files it gives its agents.
- code-reader-v2-enSkill
- code-reader-v2-cnSkill
The file
We split this CLAUDE.md into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 84
Update version in SKILL.md frontmatter
- Very specific: line 86
Update both code-reader-zh/SKILL.md and code-reader-en/SKILL.md for consistency
- Distinctive: line 87
Commit with semantic version message
- Distinctive: line 95
When adding features, update both versions
- Distinctive: line 102
Only brief summary output to conversation
- Distinctive: line 126
Always use descriptive, searchable names
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
This is a Claude Skills repository containing bilingual (Chinese/English) code analysis tools based on cognitive science research. The skills help developers achieve deep understanding of source code through elaborative interrogation, self-explanation testing, and retrieval practice.
Core Philosophy: Understanding WHY > Knowing WHAT
Repository Structure
deep-code-understanding-skill/
├── code-reader-zh/ # Chinese version skill
│ ├── SKILL.md # Source skill definition (primary)
│ └── code-reader-zh.skill # Packaged skill file
├── code-reader-en/ # English version skill
│ ├── SKILL.md # Source skill definition (primary)
│ └── code-reader-en.skill # Packaged skill file
├── README.md # Bilingual project documentation
├── LICENSE # MIT License
└── CLAUDE.md # This fileKey Architecture
Skill Definition Format
Skills use YAML frontmatter followed by Markdown content:
---
name: code-reader-v2-cn
description: [Trigger words and brief description]
---
# [Content follows...]Three Analysis Modes
| Mode | Duration | Use Case | Key Features |
| Quick | 5-10 min | Code review, quick browse | Overview, dependencies, key segments |
| Standard | 15-20 min | Learning, research | WHY analysis, design patterns, algorithm deep dive |
| Deep | 30+ min | Mastery, interview prep | Application transfer, quality verification, progressive generation |
Core Analysis Framework
The skills implement a 9-step research-driven workflow:
- Quick Overview - Language, scale, dependencies, code type
- Elaborative Interrogation - 3 WHYs for background/motivation
- Concept Network Construction - Concept relationships with WHYs
- Algorithm & Theory Analysis - Complexity, rationale, references
- Design Pattern Recognition - WHY used, alternatives, implications
- Line-by-Line Analysis - Scenario-based comments with execution tracking
- Application Transfer Testing - At least 2 different scenarios
- Dependencies & Usage - WHY for each dependency
- Quality Verification - Self-assessment checklist
Common Development Tasks
Testing Skill Changes
# Copy skill to local Claude directory for testing
cp -r code-reader-zh ~/.claude/skills/
# Or for English version
cp -r code-reader-en ~/.claude/skills/Creating Skill Package (.skill file)
# The .skill file is created by zipping the skill directory
# Format: directory with skill-name matching YAML frontmatterPublishing New Version
- Update version in
SKILL.mdfrontmatter - Update README.md changelog
- Update both
code-reader-zh/SKILL.mdandcode-reader-en/SKILL.mdfor consistency - Commit with semantic version message
Important Development Constraints
Synchronized Updates
Both language versions MUST be updated together:
code-reader-zh/SKILL.mdandcode-reader-en/SKILL.mdshould have identical structure- When adding features, update both versions
- Version numbers should match across languages
Token Optimization Strategy
The skills use a "write directly to file" strategy to save tokens:
- Full analysis written to file via Write tool
- Only brief summary output to conversation
- Deep Mode uses progressive generation for long documents
Comment Style Convention
Code analysis uses scenario-based/step-based comments:
# 场景 N: [description]/// Scenario N: [description]- for conditional branches# 步骤 N: [description]/// Step N: [description]- for sequential flow# 此时: xxx/// At this point: xxx- for variable state tracking
Research Foundation
The skills are based on cognitive science research:
- Dunlosky et al. (2013) - Elaborative interrogation outperforms passive reading
- Chi et al. (1994) - Self-explainers build correct mental models more reliably
- Karpicke & Roediger (2008) - Retrieval practice beats re-reading by 250%
References included in skill output should link to authoritative sources.
File Naming Conventions
- Generated analysis documents:
[code-name]-深度分析.mdor[code-name]-deep-analysis.md - Multi-file projects:
[project]-overview.md+[module]-analysis.md - Always use descriptive, searchable names
Understanding Verification
The skills include a verification gate at the start of analysis:
| Core Concept | Self-Explanation | Understanding WHY | Application Transfer | Status |
| [Concept] | ✅/❌ | ✅/❌ | ✅/❌ | [Status] |
This table should appear at the beginning of Standard/Deep mode outputs.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

