agentleFS
notlate-cnnotlate-cn/code-reader-skills/CLAUDE.md

code-reader-skills

CLAUDE.md151 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 -…

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
  1. Very specific:

    Update version in SKILL.md frontmatter

    line 84
  2. Very specific:

    Update both code-reader-zh/SKILL.md and code-reader-en/SKILL.md for consistency

    line 86
  3. Distinctive:

    Commit with semantic version message

    line 87
  4. Distinctive:

    When adding features, update both versions

    line 95
  5. Distinctive:

    Only brief summary output to conversation

    line 102
  6. Distinctive:

    Always use descriptive, searchable names

    line 126

≈ “Common” is an estimate: at least 1 in 5 of the 29,248 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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 file

Key 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

ModeDurationUse CaseKey Features
Quick5-10 minCode review, quick browseOverview, dependencies, key segments
Standard15-20 minLearning, researchWHY analysis, design patterns, algorithm deep dive
Deep30+ minMastery, interview prepApplication transfer, quality verification, progressive generation

Core Analysis Framework

The skills implement a 9-step research-driven workflow:

  1. Quick Overview - Language, scale, dependencies, code type
  2. Elaborative Interrogation - 3 WHYs for background/motivation
  3. Concept Network Construction - Concept relationships with WHYs
  4. Algorithm & Theory Analysis - Complexity, rationale, references
  5. Design Pattern Recognition - WHY used, alternatives, implications
  6. Line-by-Line Analysis - Scenario-based comments with execution tracking
  7. Application Transfer Testing - At least 2 different scenarios
  8. Dependencies & Usage - WHY for each dependency
  9. 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 frontmatter

Publishing New Version

  1. Update version in SKILL.md frontmatter
  2. Update README.md changelog
  3. Update both code-reader-zh/SKILL.md and code-reader-en/SKILL.md for consistency
  4. Commit with semantic version message

Important Development Constraints

Synchronized Updates

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
  • 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]-深度分析.md or [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 ConceptSelf-ExplanationUnderstanding WHYApplication TransferStatus
[Concept]✅/❌✅/❌✅/❌[Status]

This table should appear at the beginning of Standard/Deep mode outputs.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.