## Choosing a Model: Should You Use Sonnet or Opus?
After installing and logging into Claude Code, you don't need to agonize over model selection right away — it defaults to Claude Sonnet, which is sufficient for most tasks.
### Models Available in Claude Code
Currently, there are three models yo…
## Authentication Flow: Browser Login and Manual API Key Configuration
After installing Claude Code, you need to complete authentication before using it. You need to bind the tool to your Anthropic account. There are two ways to do this: **browser login** and **manual API key configuration**. Both …
## How to Install Claude Code
Installing Claude Code has no graphical interface with "Next" buttons; everything is done in the command line. If you usually use npm, the whole process takes no more than two minutes.
### Prerequisites
Before you start, make sure you have the following:
- **Node.js…
## Typical Use Cases
I categorize use cases into four types, listed in descending order of frequency.
---
### Category 1: Understanding Code
This is probably the most common type. When taking over someone else's project, looking at an old module, or opening a repository without documentation, ju…
## 1.3 Why Write Code in the Terminal?
Here's an analogy: you're working on a new feature and suddenly need to modify a low-level utility function scattered across three files, with some calls crossing module boundaries. You open your editor, do a global search, flip through files one by one, make …
## 1.2 Its "Family Relationship" with Claude Chat and API
Many developers, when first hearing about Claude Code, naturally think of two other product forms: **Claude Chat** (web chat interface) and **Claude API** (programming interface). They all come from Anthropic and all use the Claude model fam…
## 1.1 What is Claude Code?
### One Sentence Definition
**Claude Code is an AI programming agent (Agent) running in the terminal (Terminal) launched by Anthropic.** Developers describe tasks in natural language, and it can actively read the codebase, propose modifications, execute commands, run test…
A good **Spec Coding** (specification-driven programming) is about turning "vague ideas" into "precise, verifiable, and executable contracts." It's not just writing a document, but establishing a set of **unambiguous communication languages** between humans and AI (or between humans). Below, I will …
Although the "feel/atmosphere-driven" mode of Vibe Coding is great for rapid prototyping and creative exploration, if not controlled, it is easy to fall into several typical pitfalls. The following summarizes from five dimensions: **code quality, maintainability, security, requirement evolution, and…
This is a question most programmers face. **Vibe Coding** and **Spec Coding** are two distinct paradigms when programming with large language models (LLMs). The core difference is: **Is your input to the AI a vague feeling or a precise specification?**
---
## 1. A simple analogy: Cooking
- **Vibe C…
Malicious query injection (malicious prompt injection / retrieval poisoning) is a very realistic security threat in the actual deployment of RAG systems. Attackers may use carefully crafted inputs to try to make the model leak sensitive information, bypass restrictions, execute unintended instructio…
Prompt tuning (Prompt Engineering / Optimization) is a key skill for making large language models "obedient." Especially in RAG systems, it directly determines whether the model faithfully adheres to retrieved content, avoids hallucinations, and follows output format specifications.
---
## 1. Core…
Optimizing RAG is not a single-step adjustment but a **full-chain optimization** process. Below I provide systematic optimization strategies from four dimensions: **data indexing side, retrieval side, generation side, and evaluation side**, along with practical experience that can be mentioned in in…
## What Exactly Does Embedding Do? — From Technical Essence to Interview Answers
### 1. Technical Essence: One Sentence to Capture the Core
**The core task of embedding is to map discrete, unstructured data (text, images, etc.) into a continuous, low-dimensional vector space, so that semantically …
Accuracy is the core lifeline of a knowledge question answering system, especially when you try to apply it to serious scenarios (such as medical, legal, internal enterprise support). My view can be summarized as: **Accuracy is a multi-dimensional concept; you cannot just look at a single number, bu…
### What is RAG?
**RAG** stands for **Retrieval-Augmented Generation**.
Simply put, it is a technology that **"gives a large language model a reference book that can be consulted at any time"**.
Imagine a large language model as a "super scholar" with an extraordinary memory and vast knowledge. B…
## 1. Core Concepts of Skill
A Skill is a set of executable capability units encapsulated in an **Agent** or **AI system**. It typically includes:
- **Trigger condition**: When it is called (e.g., user command, system event).
- **Input parameters**: Data or context to be received.
- **Execution lo…
## Three Core Methodologies of AI Agent: ReAct, Plan-and-Solve, and Reflection
An AI Agent is an intelligent entity capable of autonomously perceiving its environment, making decisions, and executing actions. Its core methodologies mainly include three types: ReAct, Plan-and-Solve, and Reflection. …
## What is Mixture-of-Agents (MOA)?
**MOA** is a **multi-agent collaboration architecture** whose core idea is to combine multiple independent AI models (called "experts" or "agents") through a **routing/scheduling mechanism**, allowing each expert to handle the subtasks it is best at, and finally …
# Agent Memory System Design: Implementation Solutions for Short-Term and Long-Term Memory
This article explores the design of Agent memory systems, dividing them into two levels: short-term memory and long-term memory, and details their respective implementation solutions and considerations.
## F…