Skip to content

Add /teach command: incrementally teach Claude Code about your project#58744

Open
LvienOeria wants to merge 1 commit into
anthropics:mainfrom
LvienOeria:add-teach-command
Open

Add /teach command: incrementally teach Claude Code about your project#58744
LvienOeria wants to merge 1 commit into
anthropics:mainfrom
LvienOeria:add-teach-command

Conversation

@LvienOeria
Copy link
Copy Markdown

Summary

Add a new /teach <topic> slash command that lets users incrementally teach Claude Code about specific aspects of their project — conventions, patterns, architecture, or workflows.

Claude actively explores the codebase, synthesizes findings, and saves what it learns to CLAUDE.md with user approval.

Why /teach?

Claude Code currently has two ways to learn about a project:

  • /init: A broad, one-shot scan that creates a general CLAUDE.md. Good for initial setup, but can't capture nuance incrementally.
  • /memory / manual editing: Users can edit CLAUDE.md and memory files. Powerful, but the user does all the work.

/teach fills the gap: it's incremental, interactive, and topic-focused. Instead of scanning everything at once or manually writing conventions, the user says /teach error handling and Claude does the exploration and synthesis work.

How it works

  1. User picks a topic: /teach error handling
  2. Claude searches the codebase, reads files, identifies patterns
  3. Claude presents what it learned in a clear summary
  4. User reviews and approves (or rejects) the proposed CLAUDE.md update
  5. Claude saves the knowledge — and uses it in every future session

What users can teach

Type Example
Conventions /teach logging patterns
Architecture /teach authentication flow
Patterns /teach state management
Workflows /teach deployment process

Test plan

  • Install the plugin and run claude
  • Run /teach error handling in a project with existing error patterns
  • Verify Claude searches, reads, and synthesizes findings
  • Verify Claude asks for approval before editing CLAUDE.md
  • Run /teach with no arguments and verify it prompts for a topic
  • Verify findings are saved correctly to CLAUDE.md

🤖 Generated with Claude Code

The /teach command lets users incrementally teach Claude about specific
aspects of their project (conventions, patterns, architecture, workflows)
one topic at a time. Claude actively explores the codebase, synthesizes
findings, and saves them to CLAUDE.md with user approval.

Unlike /init (one-shot broad scan) or /memory (manual editing), /teach
provides an incremental, interactive approach to building Claude's
project knowledge — each use makes future sessions more effective.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant