Skip to content

Claude Blog 采集 (2026-06-03)

共采集 5 篇文章

📋 文章索引

  1. Using CLAUDE.md files: Customizing Claude Code for your codebase - Nov 25, 2025 (评分: 9.5)
  2. Running an AI-native engineering org - Jun 03, 2026 (评分: 9.0)
  3. Get to production faster with the upgraded Anthropic Console - Mar 06, 2025 (评分: 9.0)
  4. Using Claude Code: session management and 1M context - Apr 15, 2026 (评分: 9.0)
  5. Using Claude Code: The unreasonable effectiveness of HTML - May 20, 2026 (评分: 9.0)

Using CLAUDE.md files: Customizing Claude Code for your codebase

来源: Claude Blog 发布日期: Nov 25, 2025 采集时间: 2026-06-03 价值评分: 9.5/10 正文字数: ~16067 字符

摘要

Learn how to use CLAUDE.md files to give Claude Code persistent context about your project structure, coding standards, and workflows.

正文内容

A practical guide for using CLAUDE.md files to optimize your use of Claude Code.

If you use AI coding agents, you face the same challenge: how do you give them enough context to understand your architecture, conventions, and workflows without repeating yourself? The problem compounds as your codebase grows. Complex module relationships, domain-specific patterns, and team conventions don't surface easily. You end up explaining the same architectural decisions, testing requirements, and code style preferences at the start of every conversation. CLAUDE.md files solve this by giving Claude persistent context about your project. Think of it as a configuration file that Claude automatically incorporates into every conversation, ensuring it always knows your project structure, coding standards, and preferred workflows. In this article, we walk through how to structure your CLAUDE.md , share best practices, and tips for using them to get the most out of Claude Code. What is a CLAUDE.md file? CLAUDE.md is a special configuration file that lives in your repository and provides Claude with project-specific context. You can place it in your repository root to share with your team, in parent directories for monorepo setups, or in your home folder for universal application across all projects. Here’s an example CLAUDE.md that you might have in your repository: # Project Context When working with this codebase, prioritize readability over cleverness. Ask clarifying questions before making architectural changes. ## About This Project FastAPI REST API for user authentication and profiles. Uses SQLAlchemy for database operations and Pydantic for validation. ## Key Directories - app/models/ - database models - app/api/ - route handlers - app/core/ - configuration and utilities ## Standards - Type hints required on all functions - pytest for testing (fixtures in tests/conftest.py ) - PEP 8 with 100 character lines ## Common Commands bash uvicorn app.main:app --reload # dev server pytest tests/ -v # run tests ## Notes All routes use /api/v1 prefix. JWT tokens expire after 24 hours. A well-configured CLAUDE.md transforms how Claude works with your specific project. The file serves multiple purposes: providing architectural context, establishing workflows, and connecting Claude to your development tools. Each addition should solve a real problem you have encountered, not theoretical concerns about what Claude might need. This file can document common bash commands, core utilities, code style guidelines, testing instructions, repository conventions, developer environment setup, and project-specific warnings. There is no required format. The recommendation is to keep this file concise and human-readable, treating it like documentation that both humans and Claude need to understand quickly. Your CLAUDE.md file becomes part of Claude's system prompt. Every conversation starts with this context already loaded, eliminating the need to explain basic project information repeatedly. Getting started with /init Creating a CLAUDE.md from scratch can feel daunting, especially in an unfamiliar codebase. The /init command automates this process by analyzing your project and generating a starter configuration. Run /init in any Claude Code session: cd your-project claude /init Claude examines your codebase—reading package files, existing documentation, configuration files, and code structure—then generates a CLAUDE.md tailored to your project. The generated file typically includes build commands, test instructions, key directories, and coding conventions it detected. Think of /init as a starting point, not a finished product. The generated CLAUDE.md captures obvious patterns but may miss nuances specific to your workflow. Review what Claude produces and refine it based on your team's actual practices. You can also use /init on existing projects that already have a CLAUDE.md. Claude will review the current file and suggest improvements based on what it learns from exploring your codebase. After running /init , consider these next steps: Review the generated content for accuracy Add workflow instructions Claude couldn't infer (branch naming conventions, deployment processes, code review requirements) Remove generic guidance that doesn't apply to your project Commit the file to version control so your team benefits The /init command works well for getting oriented quickly, but the real value comes from iterating on the generated file over time. As you work with Claude Code, use the # key to add instructions you find yourself repeating—these additions accumulate into a CLAUDE.md that genuinely reflects how your team works. How to structure your CLAUDE.md The following sections show you how to structure content for maximum impact: navigating complex architectures, tracking progress on multi-step tasks, integrating custom tools, and preventing rework through consistent workflows. Give Claude a map Explaining your project architecture, key libraries, and coding styles becomes tedious when you do it for every new task. You need Claude to maintain consistent context about your codebase structure without manual reinforcement. Add a project summary and high-level directory structure to your CLAUDE.md. This gives Claude immediate orientation when navigating your codebase. A simple tree output showing key directories helps Claude understand where different components live: main.py ├── logs │ ├── application.log ├── modules │ ├── cli.py │ ├── logging utils.py │ ├── media handler.py │ ├── player.py Include information about your main dependencies, architectural patterns, and any non-standard organizational choices. If you use domain-driven design, microservices, or specific frameworks, document that. Claude uses this map to make better decisions about where to find code and where to make changes. Connect Claude to your tools Claude inherits your complete environment but needs guidance on which custom tools and scripts to use. Your team likely has specialized utilities for deployment, testing, or code generation that Claude should know about. Document your custom tools in CLAUDE.md with usage examples. Include tool names, basic usage patterns, and when to invoke them. If your tool provides help documentation through a --help flag, mention that so Claude knows to check it. For complex tools, add examples of common invocations your team uses regularly. Claude functions as an MCP (Model Context Protocol) client, connecting to MCP servers that extend its capabilities. Configure these through project settings, global configuration, or checked-in .mcp.json files. The --mcp-debug flag helps troubleshoot connection issues when tools don't appear as expected. For example, if you have a Slack MCP server configured for your organization and you need Claude to understand how to use it, include something like this in CLAUDE.md: ### Slack MCP - Posts to #dev-notifications channel only - Use for deployment notifications and build failures - Do not use for individual PR updates (those go through GitHub webhooks) - Rate limited to 10 messages per hour Learn more about MCP fundamentals and best practices . For more information on setting permissions for Claude Code, see settings.json documentation at code.claude.com . Define standard workflows Having Claude jump straight into code changes without planning creates rework. Claude might implement a solution that misses requirements, choose the wrong architectural approach, or make changes that break existing functionality. You need Claude to think before acting. Define standard workflows in your CLAUDE.md that Claude should follow for different types of tasks. A solid default workflow addresses four questions before making changes: Is this a question about current state that requires investigation first? Does this need a detailed plan before implementation? What additional information is missing? How will effectiveness be tested? Specific workflows might include explore-plan-code-commit for features, test-driven development for algorithmic work, or visual iteration for UI changes. Document your testing requirements, commit message format, and any approval steps. When Claude knows your workflow upfront, it structures work to match your team's actual process rather than guessing. An example workflow instruction might be: 1) Before modifying code in the following locations: X, Y, Z - Consider how it might affect A, B, C - Construct an implementation plan - Develop a test plan that will validate the following functions... ‍ Additional tips for working with Claude Code Beyond configuring your CLAUDE.md file, three additional techniques improve how you work with Claude Code. Keep context fresh Working with Claude Code over time accumulates irrelevant context. File contents from earlier tasks, command outputs that no longer matter, and tangential conversations fill Claude's context window. As the signal-to-noise ratio drops, Claude struggles to maintain focus on the current task. Use /clear between distinct tasks to reset the context window. This removes accumulated history while preserving your CLAUDE.md configuration and Claude's ability to address new problems with fresh context. Think of it as closing one work session and opening another. When you finish debugging authentication and switch to implementing a new API endpoint, clear the context. The authentication details no longer matter and distract from the new work. Use subagents for distinct phases Long conversations accumulate context that interferes with new tasks. You've debugged a complex authentication flow, and now you need a security review of that same code. The debugging details color Claude's security analysis, potentially causing it to overlook issues or focus on already-resolved concerns. Tell Claude to use a subagent for distinct phases of work. Subagents maintain isolated context, preventing information from earlier tasks from interfering with new analysis. After implementing a payment processor, instruct Claude to "use a sub-agent to perform a security review of that code" rather than continuing in the same conversation. Subagents work best for multistep workflows where each phase requires different perspectives. Implementation needs architectural context and feature requirements; security review needs fresh eyes focused solely on vulnerabilities. Context separation keeps both analyses sharp. Create custom commands Repetitive prompts waste time. You find yourself typing "review this code for security issues" or "analyze this for performance problems" over and over. Each time you need to remember the exact phrasing that gets good results. Custom slash commands store these as markdown files in your .claude/commands/ directory. Create a file named performance-optimization.mm with your preferred performance optimization prompt, and it becomes available as /performance-optimization in any conversation. Commands support arguments through $ARGUMENTS or numbered placeholders like $1 and $2 , letting you pass specific files or parameters. For example, performance-optimization.md might look like this: # Performance Optimization Analyze the provided code for performance bottlenecks and optimization opportunities. Conduct a thorough review covering: ## Areas to Analyze ### Database & Data Access - N+1 query problems and missing eager loading - Lack of database indexes on frequently queried columns - Inefficient joins or subqueries - Missing pagination on large result sets - Absence of query result caching - Connection pooling issues ### Algorithm Efficiency - Time complexity issues (O(n²) or worse when better exists) - Nested loops that could be optimized - Redundant calculations or repeated work - Inefficient data structure choices - Missing memoization or dynamic programming opportunities ### Memory Management - Memory leaks or retained references - Loading entire datasets when streaming is possible - Excessive object instantiation in loops - Large data structures kept in memory unnecessarily - Missing garbage collection opportunities ### Async & Concurrency - Blocking I/O operations that should be async - Sequential operations that could run in parallel - Missing Promise.all() or concurrent execution patterns - Synchronous file operations - Unoptimized worker thread usage ### Network & I/O - Excessive API calls (missing request batching) - No response caching strategy - Large payloads without compression - Missing CDN usage for static assets - Lack of connection reuse ### Frontend Performance - Render-blocking JavaScript or CSS - Missing code splitting or lazy loading - Unoptimized images or assets - Excessive DOM manipulations or reflows - Missing virtualization for long lists - No debouncing/throttling on expensive operations ### Caching - Missing HTTP caching headers - No application-level caching layer - Absence of memoization for pure functions - Static assets without cache busting ## Output Format For each issue identified: 1. Issue : Describe the performance problem 2. Location : Specify file/function/line numbers 3. Impact : Rate severity (Critical/High/Medium/Low) and explain expected performance degradation 4. Current Complexity : Include time/space complexity where applicable 5. Recommendation : Provide specific optimization strategy 6. Code Example : Show optimized version when possible 7. Expected Improvement : Quantify performance gains if measurable If code is well-optimized: - Confirm optimization status - List performance best practices properly implemented - Note any minor improvements possible Code to review: $ARGUMENTS You don't need to write custom command files manually. Ask Claude to create them for you: Create a custom slash command called /performance-optimization that analyzes code for database query issues, algorithm efficiency, memory management, and caching opportunities. Claude will write the markdown file to .claude/commands/performance-optimization.md , and the command will be available immediately. Start simple, expand deliberately It's tempting to create a comprehensive CLAUDE.md right away. Resist that urge. CLAUDE.md is added to Claude Code's context every time, so from a context engineering and prompt engineering standpoint, keep it concise. One option: break up information into separate markdown files and reference them inside the CLAUDE.md file. Don't include sensitive information, API keys, credentials, database connection strings, or detailed security vulnerability information—especially if you commit to version control. Since CLAUDE.md becomes part of Claude's system prompt, treat it as documentation that could be shared publicly. Make CLAUDE.md work for you CLAUDE.md files turn Claude Code from a general-purpose assistant into a tool configured specifically for your codebase. Start simple with basic project structure and build documentation, then expand based on actual friction p


采集自 Claude Blog,由 collect_claude_blog.py 自动采集


Running an AI-native engineering org

来源: Claude Blog 发布日期: Jun 03, 2026 采集时间: 2026-06-03 价值评分: 9.0/10 正文字数: ~563 字符

摘要

How the Claude Code engineering team’s processes and structure changed once agentic coding became the default way of working.

正文内容

At Code w/ Claude SF 2026, Director of Engineering for Claude Code and Claude Cowork Fiona Fung walked through how the team’s processes and structure changed once agentic coding became the default way of working.

Explore more product news and best practices for teams building with Claude.

Transform how your organization operates with Claude

Product updates, how-tos, community spotlights, and more. Delivered monthly to your inbox.

Please provide your email address if you'd like to receive our monthly developer newsletter. You can unsubscribe at any time.


采集自 Claude Blog,由 collect_claude_blog.py 自动采集


Get to production faster with the upgraded Anthropic Console

来源: Claude Blog 发布日期: Mar 06, 2025 采集时间: 2026-06-03 价值评分: 9.0/10 正文字数: ~1150 字符

摘要

We've redesigned the Anthropic Console to serve as one place to build, test, and iterate on your AI deployment with Claude and your teammates. Developers can now share prompts to collaborate with teammates directly in the Anthropic Console . We've also added support for our latest model, Claude 3.

正文内容

We've redesigned the Anthropic Console to serve as one place to build, test, and iterate on your AI deployment with Claude and your teammates. Developers can now share prompts to collaborate with teammates directly in the Anthropic Console . We've also added support for our latest model, Claude 3.7 Sonnet, and the ability to control the extended thinking budget. Build reliable AI applications Prompt quality plays a significant role in how successful a model's responses are for a given task. The Anthropic Console already streamlines AI development with tools to write, evaluate, and optimize prompts more efficiently. Write prompts: Use the Workbench to structure your prompts effectively, incorporate examples, and integrate external tools, in an interactive environment for testing API calls.

Explore more product news and best practices for teams building with Claude.

Transform how your organization operates with Claude

Product updates, how-tos, community spotlights, and more. Delivered monthly to your inbox.

Please provide your email address if you'd like to receive our monthly developer newsletter. You can unsubscribe at any time.


采集自 Claude Blog,由 collect_claude_blog.py 自动采集


Using Claude Code: session management and 1M context

来源: Claude Blog 发布日期: Apr 15, 2026 采集时间: 2026-06-03 价值评分: 9.0/10 正文字数: ~1304 字符

摘要

Learn how to manage context in Claude Code—when to continue, rewind, compact, or clear a session, and how subagents keep parent context clean.

正文内容

How you manage sessions, context, and compaction in Claude Code shapes your results more than you might expect. Here's a practical guide to making the right call at every turn.

We released /usage , a new slash command to help you understand your usage with Claude Code. This feature was informed by a number of conversations with customers. What came up again and again in these calls is that there is a lot of variance in how users manage their sessions, especially with our new update to 1 million context in Claude Code. Do you only use one session or two sessions that you keep open in a terminal? Do you start a new session with every prompt? When do you use compact , rewind or subagents ? What causes a bad compact or bad session? There’s a surprising amount of detail here that can really shape your experience with Claude Code and almost all of it comes from managing your context window . A quick primer on context, compaction and context rot

Explore more product news and best practices for teams building with Claude.

Transform how your organization operates with Claude

Product updates, how-tos, community spotlights, and more. Delivered monthly to your inbox.

Please provide your email address if you'd like to receive our monthly developer newsletter. You can unsubscribe at any time.


采集自 Claude Blog,由 collect_claude_blog.py 自动采集


Using Claude Code: The unreasonable effectiveness of HTML

来源: Claude Blog 发布日期: May 20, 2026 采集时间: 2026-06-03 价值评分: 9.0/10 正文字数: ~1860 字符

摘要

How and why members of the Claude Code team use HTML instead of Markdown to produce richer, more readable, and easily shareable outputs.

正文内容

How and why members of the Claude Code team use HTML instead of Markdown to produce richer, more readable, and easily shareable outputs. ‍

Markdown has become the dominant file format used by agents to communicate with humans. It’s simple, portable, has some rich text capability and is easy to edit. Claude has even gotten surprisingly good at using ASCII to make diagrams inside of Markdown files. But as agents have become more and more powerful, I’ve found that Markdown has become an increasingly restrictive format. Specifically, I find it difficult to read a Markdown file of more than a hundred lines; I want to use Claude to generate richer visualizations, color and diagrams; and I want to be able to share these outputs more easily. I also am increasingly not editing these files myself, but using them as specs and reference files. When I do make edits, I’m usually prompting Claude to edit them, which removes one of Markdown’s largest benefits. Instead, I’ve started preferring HTML as an output format instead of Markdown and increasingly see this pattern being applied by others on the Claude Code team. In this post, I share why and how our team uses HTML to produce richer, more readable Claude Code outputs. If you'd like to follow along, you can start using these HTML file templates for common use cases, too.

Why use HTML? A few things make HTML a better fit than Markdown for the kind of work I'm now doing with Claude Code, including tasks that require or entail: Information density

Explore more product news and best practices for teams building with Claude.

Transform how your organization operates with Claude

Product updates, how-tos, community spotlights, and more. Delivered monthly to your inbox.

Please provide your email address if you'd like to receive our monthly developer newsletter. You can unsubscribe at any time.


采集自 Claude Blog,由 collect_claude_blog.py 自动采集