Levon's Blog

微信: L6241425

1. Agent 与 Subagent 核心概念

1.1 概念对比

维度Agent(主代理)Subagent(子代理)
定义自主感知、决策、执行的 AI 实体被主代理调用的专业化功能模块
职责处理复杂任务,负责全局规划与最终交付聚焦特定领域,降低主代理复杂度
执行模式感知 → 规划 → 执行 → 反思(完整循环)接收指令 → 执行 → 返回结果
阅读全文 »

1. Context7:文档 RAG 引擎

Context7 是基于 MCP 的开发者文档检索引擎,解决 LLM 的 知识截断 问题。

sequenceDiagram
    participant User
    participant IDE as Cursor
    participant C7 as Context7
    participant Docs as 官方文档

    User->>IDE: "Upstash Redis 怎么用?"
    IDE->>C7: search_docs("Upstash Redis")
    C7->>Docs: 获取最新文档
    Docs-->>C7: 返回 Markdown
    C7-->>IDE: 注入上下文
    IDE-->>User: 生成准确代码

核心特性:

  • 实时上下文:摒弃过时的模型权重知识,实时获取官方文档
  • 版本锚定:支持指定版本(如 Next.js v14),避免 API 错误
  • IDE 集成:自然语言触发(use context7
阅读全文 »

MCP 是 Anthropic 推出的开放协议,为 LLM 提供了一套标准化的 “ 感知与行动 “ 接口。其核心价值在于:将 AI 从 “ 对话孤岛 “ 升级为可操作真实世界的智能体。

flowchart LR
    subgraph Host["Host (Cursor/Claude)"]
        LLM[LLM]
        Client[MCP Client]
    end
    subgraph Servers["MCP Servers"]
        S1[GitHub Server]
        S2[Search Server]
        S3[Browser Server]
    end
    LLM <--> Client
    Client <-->|JSON-RPC 2.0| S1
    Client <-->|JSON-RPC 2.0| S2
    Client <-->|JSON-RPC 2.0| S3
阅读全文 »

深入解析 AI Prompt 的工作原理,阐述提示词工程的核心要素,并在 Fine-tuning 与 Prompting 之间建立清晰的认知边界。

阅读全文 »

Claude Agent Skills 将 Claude 从纯对话模型升级为可调用外部工具的智能代理。通过预定义的工具描述,Claude 根据任务需求自主决定何时查询天气、操作电脑、检索数据库或执行其他具体操作。

%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#4F46E5', 'primaryTextColor': '#000', 'primaryBorderColor': '#3730A3', 'lineColor': '#6366F1', 'secondaryColor': '#10B981', 'tertiaryColor': '#F59E0B'}}}%%
flowchart TD
    A(["用户请求"]) --> B["Claude 核心决策层"]

    subgraph "Claude 决策闭环"
        B --> C{"需要工具?"}
        C -->|"是"| D["选择技能/构造参数"]
        C -->|"否"| E["直接回答"]
    end

    subgraph "执行与反馈层"
        D --> F["工具箱"]
        F --> G["API 调用"]
        F --> H["Computer Use"]
        F --> I["代码解释器"]

        G --> J["执行结果"]
        H --> J
        I --> J
    end

    J --> B
    E --> K(["最终输出"])

    classDef primary fill:#4F46E5,stroke:#3730A3,color:#fff
    classDef success fill:#10B981,stroke:#059669,color:#fff
    classDef decision fill:#F59E0B,stroke:#D97706,color:#000
    classDef info fill:#06B6D4,stroke:#0891B2,color:#fff

    class A,K primary
    class B,D info
    class C decision
    class E,G,H,I,J success
阅读全文 »

服务端渲染 (SSR) 将页面渲染从浏览器前置到服务端,服务器执行组件逻辑并生成完整 HTML 返回给浏览器。本文从 SPA 的痛点出发,梳理主流渲染策略的原理与适用场景,并覆盖缓存、部署、降级等工程实践。

阅读全文 »

本文详细介绍 Google 账号地区修改方法、Google Play 商店访问、家庭组管理配置、Gemini 学生认证流程以及常见问题的解决方案。

1. 修改地区

1.1 查看当前地区设置

修改地区前,首先确认账号当前关联的地区信息。

阅读全文 »

graph TD
    Root["Ghostty 终端(全景)"] --> Core["核心引擎(性能基石)"]
    Root["Ghostty 终端(全景)"] --> Config["个性化配置(定制)"]
    Root["Ghostty 终端(全景)"] --> UX["交互体验(原生感)"]
    Root["Ghostty 终端(全景)"] --> Ecosystem["生态扩展(高级)"]

    Core --> TechStack["Zig 语言(内存安全且快)"]
    Core --> Rendering["GPU 加速(渲染如丝般顺滑)"]
    Core --> CrossPlatform["跨平台(macOS/Linux)"]

    Config --> FileStructure["纯文本配置(~/.config/ghostty)"]
    Config --> Theming["主题配色(支持无数配色方案)"]
    Config --> Fonts["字体特性(连字/NerdFonts)"]

    UX --> NativeUI["原生 UI(无违和感)"]
    UX --> Keybinding["快捷键系统(完全自定义)"]
    UX --> TabsSplits["标签与分屏(基础窗口管理)"]

    Ecosystem --> Multiplexers["终端复用器协作(Tmux/Zellij)"]
    Ecosystem --> ShellInteg["Shell 集成(Bash/Zsh/Fish)"]
    Ecosystem --> Shaders["着色器特效(复古CRT效果等)"]

Ghostty 是一个基于 Zig 编写的跨平台终端模拟器,使用 GPU 加速提升渲染性能。相比 iTerm2 更轻快,比 Alacritty 功能更丰富,GPU 渲染即使输出大量日志也能保持流畅响应。

阅读全文 »

整理 AI 编程核心资源:Code Review 工具、AI IDE 配置方案及账号认证方法。

flowchart LR
    subgraph CR["Code Review"]
        A1["CodeRabbit"]
        A2["Greptile"]
        A3["AmpCode"]
    end

    subgraph IDE["AI IDE"]
        B1["Kiro"]
        B2["Antigravity"]
        B3["AmpCode"]
        B4["OpenCode"]
        B5["Cursor"]
        B6["Clude Code"]
    end

    subgraph AUTH["账号认证"]
        C1["ChatGPT 教师认证"]
        C2["谷歌相关认证"]
    end

    AI["AI 编程资源"] --> CR
    AI --> IDE
    AI --> AUTH

    classDef primary fill:#4F46E5,stroke:#3730A3,color:#fff
    classDef success fill:#10B981,stroke:#059669,color:#fff
    classDef warning fill:#F59E0B,stroke:#D97706,color:#000
    classDef info fill:#06B6D4,stroke:#0891B2,color:#fff

    class AI primary
    class A1,A2,A3,A4 success
    class B1,B2,B3,B4 info
    class C1,C2 warning
阅读全文 »
0%