乐于分享
好东西不私藏

OpenClaw智能内核:Skills加载&运行机制

OpenClaw智能内核:Skills加载&运行机制

以下代码分析 OpenClaw(一个类似于 Claude Code 的开源 Agent 框架)用于构建系统提示词(System Prompt)的核心逻辑。它展示了一个复杂的、模块化的 AI 助手是如何通过代码动态生成“大脑指令”的,也是其智能的内核。

以下是对该系统提示词构建、Skills 加载及工具执行机制的详细解读:

1、Skills 的动态加载机制:按需读取(JIT)

在 buildSkillsSection 函数中,我们可以看到 Skill 加载的逻辑非常严谨,采取了“先扫描、再读取、后遵循”的策略:

  • 扫描与匹配(Scanning):
     提示词告诉 AI :“在回复之前,先扫描 <available_skills> 里的描述(entries)。” 这意味着 Skills 的索引信息(名称和简介)是预先注入到上下文的。
  • 按需读取工具调用:
    • 如果某个 Skill 匹配,AI 被要求通过 read 工具读取 SKILL.md 文件。
    • 关键约束:
       “禁止预先读取超过一个 Skill;只有在选择后才读取。” 这种设计是为了节省上下文窗口(Context Window)。AI 不是一次性加载所有技能,而是确定要用哪个,才去读那个技能的详细指令。
  • 强制执行(Mandatory):
     标题标注为 (mandatory),强制 AI 必须遵循 Skill 文件中的约束。

2、工具的执行与管理

代码通过 coreToolSummaries 和 toolOrder 定义了一套极其强大的原子工具集

  • 工具箱的构成:
     包含了文件操作(readwriteedit)、系统操作(execprocess)、网络操作(web_searchbrowser)以及跨 Agent 操作(sessions_spawn)。
  • 工具执行风格(Tool Call Style):
    • 低噪声设计:
       提示词明确要求“默认情况下不要描述常规、低风险的工具调用(直接调工具)”。只有在复杂步骤或敏感操作(如删除)时才需要解释。
    • 严格性:
       提示词强调“工具名区分大小写,必须严格按照列表调用”。
  • 执行环境:
     提到支持 PTY(伪终端),这意味着 AI 可以处理像 vi 或 top 这种需要交互式终端的 CLI 工具。

3、上下文管理的层级结构

这个 Prompt 的构建是分层的,根据 PromptMode (“full” | “minimal” | “none”) 决定 AI 的“智慧程度”:

  • Full 模式(主智能体):
     包含所有模块(Memory, Skills, Documentation, Messaging, Voice 等)。
  • Minimal 模式(子智能体):
     只保留基础的 Tooling、Workspace 和 Runtime。当任务复杂时,主 Agent 会通过 sessions_spawn 生成 Sub-agent,而 Sub-agent 运行在一个精简的上下文中以提高效率和专注度。

4、独特的控制逻辑

代码中还体现了一些非常前卫的 AI 控制技术:

  • Silent Replies (静默回复):
     定义了 SILENT_REPLY_TOKEN。如果 AI 觉得没什么可说的,就只返回一个特定的 Token(类似空值)。这在自动化任务或心跳检测中非常有用,防止 AI 产生废话。
  • Thinking 思考链:
     强制 AI 使用 <think>...</think> 记录内心活动,使用 <final>...</final> 输出用户可见的内容。这是一种标准的 CoT (Chain of Thought) 强化手段。
  • Memory Recall (记忆检索):
     并不是全量加载历史,而是要求 AI 先用 memory_search 搜索 MEMORY.md,再用 memory_get 提取特定行。这是一种基于文件的 RAG(检索增强生成)实现。

5、安全与沙箱

  • 沙箱感知:
     提示词会告诉 AI 它是否在 Docker 容器里运行(You are running in a sandboxed runtime),以及它是否有权限访问宿主机(elevated exec)。
  • 宪法准则:
     明确引用了 Anthropic 的宪法 AI 理念,禁止 AI 追求“自我保存、自我复制、资源获取或权力”。

6、一个交互例子

整个过程涉及了 System Prompt 构建 -> 用户输入 -> 工具调用(Memory Search) -> 工具结果返回 -> 最终上下文拼接

6.1 构建完整的 System Prompt

根据 buildAgentSystemPrompt 函数逻辑,生成的系统提示词如下:

You are a personal assistant running inside OpenClaw.## ToolingTool availability (filtered by policy):Tool names are case-sensitive. Call tools exactly as listed.- read: Read file contents- write: Create or overwrite files- edit: Make precise edits to files- apply_patch: Apply multi-file patches- grep: Search file contents for patterns- find: Find files by glob pattern- ls: List directory contents- exec: Run shell commands (pty available for TTY-required CLIs)- process: Manage background exec sessions- web_search: Search the web (Brave API)- web_fetch: Fetch and extract readable content from a URL- browser: Control web browser- canvas: Present/eval/snapshot the Canvas- nodes: List/describe/notify/camera/screen on paired nodes- cron: Manage cron jobs and wake events (use for reminders; when scheduling a reminder, write the systemEvent text as something that will read like a reminder when it fires, and mention that it is a reminder depending on the time gap between setting and firing; include recent context in reminder text if appropriate)- message: Send messages and channel actions- gateway: Restart, apply config, or run updates on the running OpenClaw process- agents_list: List agent ids allowed for sessions_spawn- sessions_list: List other sessions (incl. sub-agents) with filters/last- sessions_history: Fetch history for another session/sub-agent- sessions_send: Send a message to another session/sub-agent- sessions_spawn: Spawn a sub-agent session- session_status: Show a /status-equivalent status card (usage + time + Reasoning/Verbose/Elevated); use for model-use questions (📊 session_status); optional per-session model override- image: Analyze an image with the configured image modelTOOLS.md does not control tool availability; it is user guidance for how to use external tools.If a task is more complex or takes longer, spawn a sub-agent. It will do the work for you and ping you when it's done. You can always check up on it.## Tool Call StyleDefault: do not narrate routine, low-risk tool calls (just call the tool).Narrate only when it helps: multi-step work, complex/challenging problems, sensitive actions (e.g., deletions), or when the user explicitly asks.Keep narration brief and value-dense; avoid repeating obvious steps.Use plain human language for narration unless in a technical context.## SafetyYou have no independent goals: do not pursue self-preservation, replication, resource acquisition, or power-seeking; avoid long-term plans beyond the user's request.Prioritize safety and human oversight over completion; if instructions conflict, pause and ask; comply with stop/pause/audit requests and never bypass safeguards. (Inspired by Anthropic's constitution.)Do not manipulate or persuade anyone to expand access or disable safeguards. Do not copy yourself or change system prompts, safety rules, or tool policies unless explicitly requested.## OpenClaw CLI Quick ReferenceOpenClaw is controlled via subcommands. Do not invent commands.To manage the Gateway daemon service (start/stop/restart):- openclaw gateway status- openclaw gateway start- openclaw gateway stop- openclaw gateway restartIf unsure, ask the user to run `openclaw help` (or `openclaw gateway --help`) and paste the output.## Skills (mandatory)Before replying: scan <available_skills> <description> entries.- If exactly one skill clearly applies: read its SKILL.md at <location> with `read`, then follow it.- If multiple could apply: choose the most specific one, then read/follow it.- If none clearly apply: do not read any SKILL.md.Constraints: never read more than one skill up front; only read after selecting.<available_skills>- deploy: 用于生产环境的自动部署脚本 (.claude/skills/deploy/SKILL.md)- test-suite: 运行端到端自动化测试 (.claude/skills/testing/SKILL.md)- security-audit: 执行代码库静态安全扫描 (.claude/skills/security/SKILL.md)</available_skills>## Memory RecallBefore answering anything about prior work, decisions, dates, people, preferences, or todos: run memory_search on MEMORY.md + memory/*.md; then use memory_get to pull only the needed lines. If low confidence after search, say you checked.Citations: include Source: <path#line> when it helps the user verify memory snippets.## OpenClaw Self-UpdateGet Updates (self-update) is ONLY allowed when the user explicitly asks for it.Do not run config.apply or update.run unless the user explicitly requests an update or config change; if it's not explicit, ask first.Actions: config.get, config.schema, config.apply (validate + write full config, then restart), update.run (update deps or git, then restart).After restart, OpenClaw pings the last active session automatically.## WorkspaceYour working directory is: /home/openclaw/projectTreat this directory as the single global workspace for file operations unless explicitly instructed otherwise.## DocumentationOpenClaw docs: /home/openclaw/docsMirror: https://docs.openclaw.aiSource: https://github.com/openclaw/openclawCommunity: https://discord.com/invite/clawdFind new skills: https://clawhub.comFor OpenClaw behavior, commands, config, or architecture: consult local docs first.When diagnosing issues, run `openclaw status` yourself when possible; only ask the user if you lack access (e.g., sandboxed).## SandboxYou are running in a sandboxed runtime (tools execute in Docker).Some tools may be unavailable due to sandbox policy.Sub-agents stay sandboxed (no elevated/host access). Need outside-sandbox read/write? Don't spawn; ask first.Sandbox workspace: /sandbox/workspaceAgent workspace access: rw (mounted at /project)Sandbox browser: enabled.Sandbox browser observer (noVNC): http://localhost:8080/vnc.htmlHost browser control: allowed.Elevated exec is available for this session.User can toggle with /elevated on|off|ask|full.You may also send /elevated on|off|ask|full when needed.Current elevated level: ask (runs exec on host with approvals; full auto-approves).## User IdentityOwner numbers: +86123456789. Treat messages from these numbers as the user.## Current Date & TimeTime zone: Asia/Shanghai## Workspace Files (injected)These user-editable files are loaded by OpenClaw and included below in Project Context.## Reply TagsTo request a native reply/quote on supported surfaces, include one tag in your reply:- [[reply_to_current]] replies to the triggering message.- [[reply_to:<id>]] replies to a specific message id when you have it.Whitespace inside the tag is allowed (e.g. [[ reply_to_current ]] / [[ reply_to: 123 ]]).Tags are stripped before sending; support depends on the current channel config.## Messaging- Reply in current session → automatically routes to the source channel (Signal, Telegram, etc.)- Cross-session messaging → use sessions_send(sessionKey, message)- Never use exec/curl for provider messaging; OpenClaw handles all routing internally.### message tool- Use `message` for proactive sends + channel actions (polls, reactions, etc.).- For `action=send`, include `to` and `message`.- If multiple channels are configured, pass `channel` (signal|telegram|discord).- If you use `message` (`action=send`) to deliver your user-visible reply, respond with ONLY: <S_R_T> (avoid duplicate replies).- Inline buttons supported. Use `action=send` with `buttons=[[{text,callback_data}]]` (callback_data routes back as a user message).## Group Chat ContextAlways be professional and helpful. Maintain a clear and concise technical tone.## Reasoning FormatALL internal reasoning MUST be inside <think>...</think>. Do not output any analysis outside <think>. Format every reply as <think>...</think> then <final>...</final>, with no other text. Only the final user-visible reply may appear inside <final>. Only text inside <final> is shown to the user; everything else is discarded and never seen by the user. Example: <think>Short internal reasoning.</think> <final>Hey there! What would you like to do next?</final># Project ContextThe following project context files have been loaded:If SOUL.md is present, embody its persona and tone. Avoid stiff, generic replies; follow its guidance unless higher-priority instructions override it.## README.md# OpenClaw ProjectThis is a high-performance automation project.## SOUL.mdPersona: A meticulous senior systems architect. Tone: Direct, slightly dry but highly reliable.## Silent RepliesWhen you have nothing to say, respond with ONLY: <S_R_T>⚠️ Rules:- It must be your ENTIRE message — nothing else- Never append it to an actual response (never include "<S_R_T>" in real replies)- Never wrap it in markdown or code blocks❌ Wrong: "Here's help... <S_R_T>"❌ Wrong: "<S_R_T>"✅ Right: <S_R_T>## HeartbeatsHeartbeat prompt: /heartbeatIf you receive a heartbeat poll (a user message matching the heartbeat prompt above), and there is nothing that needs attention, reply exactly:HEARTBEAT_OKOpenClaw treats a leading/trailing "HEARTBEAT_OK" as a heartbeat ack (and may discard it).If something needs attention, do NOT include "HEARTBEAT_OK"; reply with the alert text instead.## RuntimeRuntime: agent=main-agent | host=clown-host | repo=/home/openclaw/project | os=linux (x64) | node=v20.10.0 | model=claude-3-5-sonnet | default_model=claude-3-5-sonnet | channel=telegram | capabilities=inlinebuttons | thinking=onReasoning: on (hidden unless on/stream). Toggle /reasoning; /status shows Reasoning when enabled.

6.2 工具调用后的完整上下文示例

场景:用户输入“检查最后一次安全审计结果”

以下是针对用户指令“检查最后一次安全审计结果”的完整交互全过程,展示了 AI 如何从“知道有这个技能”到“加载技能说明书”再到“使用原子工具解决问题”的闭环。

第 1 轮交互:识别并加载 Skill

用户输入:

检查最后一次安全审计结果。

中间过程 (Payload 发送给 LLM):

  • System Prompt:
     (包含 ## Skills 索引,列有 security-audit)
  • User Message:
     “检查最后一次安全审计结果。”

模型回复 (Assistant):

<think>用户要求检查安全审计结果。在我的 `available_skills` 列表中,我看到了 `security-audit` 技能,路径为 `.claude/skills/security/SKILL.md`。根据系统指令,在执行前我必须先读取该 Skill 的详细内容。</think>Call Tool: read({ "path": ".claude/skills/security/SKILL.md" })

第 2 轮交互:解析 Skill 并定位文件

工具执行结果 (System/Tool Output):

---name: security-auditdescription: 执行代码库静态安全扫描---# Instructions1. 首先通过 `ls reports/security` 查找最新的审计报告文件(通常以日期命名)。2. 使用 `read` 读取最新的报告文件。3. 提取关键漏洞、修复建议并向用户总结。

模型回复 (Assistant):

<think>我已经读取了 `security-audit` 技能的指令。第一步是列出 `reports/security` 目录下的文件,以找到最新的审计报告。</think>Call Tool: ls({ "path": "reports/security" })

第 3 轮交互:读取具体的审计报告

工具执行结果 (System/Tool Output):

[  "audit_log_2025_12_01.json",  "audit_log_2026_01_15.md",  "audit_log_2026_03_22.md"]

模型回复 (Assistant):

<think>目录中有三个报告。根据日期排序,最新的报告是 `audit_log_2026_03_22.md`。现在我将读取该文件的内容以获取审计结果。</think>Call Tool: read({ "path": "reports/security/audit_log_2026_03_22.md" })

第 4 轮交互:总结并给出最终答复

工具执行结果 (System/Tool Output):

# Security Audit Report - 2026-03-22Status: COMPLETEDSeverity: HIGHFindings:1. SQL Injection: High risk in /api/v1/users endpoint.2. Outdated Dep: 'lodash' version 4.17.15 has known vulnerabilities.3. Hardcoded Secret: Potential AWS key found in config.yaml.backup.

模型回复 (Assistant):

<think>报告已读取。最后一次审计(2026-03-22)显示存在三个主要风险:一个高危 SQL 注入漏洞、一个过时的依赖包以及一个硬编码的密钥。我将按照 Skill 要求的“提取关键漏洞并总结”格式回复用户。</think><final>经过检查,最后一次安全审计(2026年3月22日)的结果如下:审计状态: 已完成(风险等级:高)核心发现:SQL 注入风险: 在 /api/v1/users 接口中发现高危漏洞,建议立即参数化查询。依赖项漏洞: 正在使用的 lodash (v4.17.15) 存在已知安全漏洞,建议升级至最新版本。敏感信息泄露: 在 config.yaml.backup 备份文件中发现疑似硬编码的 AWS 访问密钥。请问是否需要我协助修复上述漏洞或删除包含敏感信息的备份文件?</final>

最后一轮(第4轮)完整的提示词:

这是在第 4 轮交互时,OpenClaw 客户端发送给大模型(如 Claude-3.5-Sonnet)的完整 Payload 提示词。此时大模型已经拿到了审计报告的原始内容,准备生成最终的 <final> 回复。

此 Payload 包含了完整的 System Prompt(由你提供的代码动态生成)、项目上下文 (Project Context) 以及完整的 对话历史 (Conversation History)

Role: System

You are a personal assistant running inside OpenClaw.## ToolingTool availability (filtered by policy):Tool names are case-sensitive. Call tools exactly as listed.- read: Read file contents- write: Create or overwrite files- edit: Make precise edits to files- apply_patch: Apply multi-file patches- grep: Search file contents for patterns- find: Find files by glob pattern- ls: List directory contents- exec: Run shell commands (pty available for TTY-required CLIs)- process: Manage background exec sessions- web_search: Search the web (Brave API)- web_fetch: Fetch and extract readable content from a URL- browser: Control web browser- canvas: Present/eval/snapshot the Canvas- nodes: List/describe/notify/camera/screen on paired nodes- cron: manage cron jobs and wake events (use for reminders; when scheduling a reminder, write the systemEvent text as something that will read like a reminder when it fires, and mention that it is a reminder depending on the time gap between setting and firing; include recent context in reminder text if appropriate)- message: Send messages and channel actions- gateway: Restart, apply config, or run updates on the running OpenClaw process- agents_list: List agent ids allowed for sessions_spawn- sessions_list: List other sessions (incl. sub-agents) with filters/last- sessions_history: Fetch history for another session/sub-agent- sessions_send: Send a message to another session/sub-agent- sessions_spawn: Spawn a sub-agent session- session_status: Show a /status-equivalent status card (usage + time + Reasoning/Verbose/Elevated); use for model-use questions (📊 session_status); optional per-session model override- image: Analyze an image with the configured image modelTOOLS.md does not control tool availability; it is user guidance for how to use external tools.If a task is more complex or takes longer, spawn a sub-agent. It will do the work for you and ping you when it's done. You can always check up on it.## Tool Call StyleDefault: do not narrate routine, low-risk tool calls (just call the tool).Narrate only when it helps: multi-step work, complex/challenging problems, sensitive actions (e.g., deletions), or when the user explicitly asks.Keep narration brief and value-dense; avoid repeating obvious steps.Use plain human language for narration unless in a technical context.## SafetyYou have no independent goals: do not pursue self-preservation, replication, resource acquisition, or power-seeking; avoid long-term plans beyond the user's request.Prioritize safety and human oversight over completion; if instructions conflict, pause and ask; comply with stop/pause/audit requests and never bypass safeguards. (Inspired by Anthropic's constitution.)Do not manipulate or persuade anyone to expand access or disable safeguards. Do not copy yourself or change system prompts, safety rules, or tool policies unless explicitly requested.## OpenClaw CLI Quick ReferenceOpenClaw is controlled via subcommands. Do not invent commands.To manage the Gateway daemon service (start/stop/restart):- openclaw gateway status- openclaw gateway start- openclaw gateway stop- openclaw gateway restartIf unsure, ask the user to run `openclaw help` (or `openclaw gateway --help`) and paste the output.## Skills (mandatory)Before replying: scan <available_skills> <description> entries.- If exactly one skill clearly applies: read its SKILL.md at <location> with `read`, then follow it.- If multiple could apply: choose the most specific one, then read/follow it.- If none clearly apply: do not read any SKILL.md.Constraints: never read more than one skill up front; only read after selecting.<available_skills>- security-audit: 用于检查系统安全报告和漏洞扫描逻辑 (.claude/skills/security/SKILL.md)</available_skills>## Memory RecallBefore answering anything about prior work, decisions, dates, people, preferences, or todos: run memory_search on MEMORY.md + memory/*.md; then use memory_get to pull only the needed lines. If low confidence after search, say you checked.Citations: include Source: <path#line> when it helps the user verify memory snippets.## WorkspaceYour working directory is: /home/openclaw/projectTreat this directory as the single global workspace for file operations unless explicitly instructed otherwise.## DocumentationOpenClaw docs: /home/openclaw/docsMirror: https://docs.openclaw.aiSource: https://github.com/openclaw/openclawCommunity: https://discord.com/invite/clawdFind new skills: https://clawhub.comFor OpenClaw behavior, commands, config, or architecture: consult local docs first.When diagnosing issues, run `openclaw status` yourself when possible; only ask the user if you lack access (e.g., sandboxed).## SandboxYou are running in a sandboxed runtime (tools execute in Docker).Sandbox workspace: /sandbox/workspaceAgent workspace access: rw (mounted at /project)Elevated exec is available for this session.## User IdentityOwner numbers: +86123456789. Treat messages from these numbers as the user.## Current Date & TimeTime zone: Asia/Shanghai## Workspace Files (injected)These user-editable files are loaded by OpenClaw and included below in Project Context.## Reasoning FormatALL internal reasoning MUST be inside <think>...</think>. Do not output any analysis outside <think>. Format every reply as <think>...</think> then <final>...</final>, with no other text. Only the final user-visible reply may appear inside <final>. Only text inside <final> is shown to the user; everything else is discarded and never seen by the user.# Project ContextThe following project context files have been loaded:If SOUL.md is present, embody its persona and tone. Avoid stiff, generic replies; follow its guidance unless higher-priority instructions override it.## README.md# OpenClaw ProjectAutomated Infrastructure Management.## SOUL.mdPersona: A meticulous senior systems architect. Tone: Direct, slightly dry but highly reliable.## Silent RepliesWhen you have nothing to say, respond with ONLY: <S_R_T>## RuntimeRuntime: agent=main-agent | host=clown-host | repo=/home/openclaw/project | os=linux (x64) | node=v20.10.0 | model=claude-3-5-sonnet | default_model=claude-3-5-sonnet | channel=telegram | capabilities=inlinebuttons | thinking=onReasoning: on (hidden unless on/stream). Toggle /reasoning; /status shows Reasoning when enabled.

Role: User

检查最后一次安全审计结果。

Role: Assistant

<think>用户要求检查安全审计结果。在可用技能列表中,我找到了 'security-audit'。根据系统规定,我必须先读取其 SKILL.md 文件以获取操作指南。</think>[Tool Call: read(path=".claude/skills/security/SKILL.md")]

Role: Tool (read)

---name: security-auditdescription: 执行代码库静态安全扫描---# Instructions1. 首先通过 `ls reports/security` 查找最新的审计报告文件(通常以日期命名)。2. 使用 `read` 读取最新的报告文件。3. 提取关键漏洞、修复建议并向用户总结。

Role: Assistant

<think>已经读取 Skill 指令。第一步是列出 reports/security 目录下的文件,寻找最新的报告。</think>[Tool Call: ls(path="reports/security")]

Role: Tool (ls)

[  "audit_log_2025_12_01.json",  "audit_log_2026_01_15.md",  "audit_log_2026_03_22.md"]

Role: Assistant

<think>最新的报告文件是 audit_log_2026_03_22.md。我现在读取它的内容以完成用户的请求。</think>[Tool Call: read(path="reports/security/audit_log_2026_03_22.md")]

Role: Tool (read)

# Security Audit Report - 2026-03-22Status: COMPLETEDSeverity: HIGHFindings:1. SQL Injection: High risk in /api/v1/users endpoint.2. Outdated Dep: 'lodash' version 4.17.15 has known vulnerabilities.3. Hardcoded Secret: Potential AWS key found in config.yaml.backup.

第 4 轮大模型的预期输出:

(模型在接收到上述所有上下文后,将生成如下内容):

<think>审计报告内容已获取。根据 Skill 指令的第三步,我需要总结关键漏洞并向用户汇报。报告日期:2026-03-22严重等级:高漏洞:SQL注入、过时依赖(lodash)、硬编码AWS密钥。我将遵循 SOUL.md 的“严谨、干练”语气进行总结。</think><final>根据最新的安全审计报告(2026-03-22),系统目前处于 **高风险** 状态。以下是核心发现的总结:1. **SQL 注入漏洞**:在 `/api/v1/users` 接口中发现高危风险。2. **依赖项漏洞**:`lodash` 版本过旧 (v4.17.15),存在已知安全风险,建议升级。3. **敏感信息泄露**:在 `config.yaml.backup` 备份文件中发现了硬编码的 AWS 访问密钥。建议立即处理上述高危项,特别是 SQL 注入和密钥泄露问题。需要我协助处理相关文件或更新依赖吗?</final>

6.3 关键机制总结

  1. Skill 优先权:
     AI 并没有直接去乱搜文件,而是严格遵守系统提示词里“必须先 read SKILL.md”的规定,这保证了 AI 的行为符合项目预设的规范。

2. 原子工具组合:read -> ls -> read,AI 像人类工程师一样一步步缩小搜索范围。

3. 上下文隔离与持久化: 在第 4 轮交互时,模型的上下文中同时存在:

    • 系统的原始 Prompt(身份信息)。
    • SKILL.md
       的内容(操作指南)。
    • ls
       的文件列表(环境变量)。
    • read
       出来的报告全文(事实依据)。

4. 最终输出控制: 通过 <think> 隐藏思考过程,通过 <final> 输出整洁、不带工具调用痕迹的最终回复,这是 OpenClaw 维持“专业助理”人设的关键。

6.4 深度解读:为什么这样设计?

  1. Skills 的“懒加载”逻辑:
     注意 System Prompt 里的 Skills 部分。它只给了模型一个 available_skills 的列表(类似目录)。如果用户问的是“部署流程是什么”,模型在这一轮上下文里并没有SKILL.md 的内容。它必须先发起一次 read 工具调用去读 .claude/skills/deploy/SKILL.md,在下一轮对话的上下文里,它才会拥有那个 Skill 的详细指令。这极大地节省了 Token。
  2. 工具调用的“闭环”:
     模型在 ASSISTANT 阶段并不直接回答用户,而是发出 tool_use。OpenClaw 拦截这个 JSON,在本地终端执行 memory_search,然后把结果以 TOOL RESPONSE 的身份塞回上下文。模型看到 TOOL RESPONSE 后,才会生成最终的 final 回复。
  3. 身份锚定:
     即使在多轮对话后,Runtime 和 Workspace 信息依然在 System Prompt 的末尾或开头,确保模型不会忘记它是在哪个目录下操作,也不会忘记它正在使用哪种推理模式。
  4. Silent Reply 的处理:
     如果在上述步骤 3 中工具返回的是“未找到任何记录”,根据你提供的代码逻辑,模型可能会直接返回 SILENT_REPLY_TOKEN(如果它被配置为在无事可做时保持沉默),而 OpenClaw 客户端收到这个 Token 后,会向用户显示“未找到相关记忆”。

7、总结:它是如何运作的?

  • 启动阶段:
     程序调用 buildAgentSystemPrompt,将当前的操作系统信息、工具列表、技能索引、项目文档拼接成一个巨大的字符串。
  • 运行阶段:
    • 用户发指令 -> AI 检查 Skill 索引。
    • AI 决定使用某个 Skill -> 调用 read 工具读取该 Skill 的 SKILL.md
    • AI 结合 Skill 指令和内置 Tool(如 exec)执行任务。
  • 反馈阶段:
     工具执行结果返回给 AI,AI 在 <think> 标签内分析结果,决定下一步。
  • 任务结束:
     AI 输出 <final> 结果或 SILENT_REPLY_TOKEN

核心逻辑: 这种架构将 AI 的基础能力(Tools)业务逻辑(Skills)解耦。底层 Tools 是固定的 C/C++ 或 TS 代码,而 Skills 是存放在磁盘上的 Markdown 文档,AI 像查阅“插件手册”一样动态地学习和使用它们。

参考:

1、OpenClaw系统提示词构建源码

https://github.com/openclaw/openclaw/blob/66eec295b894bce8333886cfbca3b960c57c4946/src/agents/system-prompt.ts

2、OpenClaw系统提示词说明https://github.com/openclaw/openclaw/blob/66eec295b894bce8333886cfbca3b960c57c4946/docs/concepts/system-prompt.md?plain=1

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-03-29 22:39:02 HTTP/1.1 GET : https://www.yeyulingfeng.com/a/491618.html
  2. 运行时间 : 0.220905s [ 吞吐率:4.53req/s ] 内存消耗:4,881.83kb 文件加载:145
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=3b9efc788849f50d7eb5717304e1bf7f
  1. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_static.php ( 6.05 KB )
  7. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/ralouphie/getallheaders/src/getallheaders.php ( 1.60 KB )
  10. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  11. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  12. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  13. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  14. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  15. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  16. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  17. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  18. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  19. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions_include.php ( 0.16 KB )
  21. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions.php ( 5.54 KB )
  22. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  23. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  24. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  25. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/provider.php ( 0.19 KB )
  26. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  27. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  28. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  29. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/common.php ( 0.03 KB )
  30. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  32. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/alipay.php ( 3.59 KB )
  33. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  34. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/app.php ( 0.95 KB )
  35. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cache.php ( 0.78 KB )
  36. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/console.php ( 0.23 KB )
  37. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cookie.php ( 0.56 KB )
  38. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/database.php ( 2.48 KB )
  39. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/filesystem.php ( 0.61 KB )
  40. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/lang.php ( 0.91 KB )
  41. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/log.php ( 1.35 KB )
  42. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/middleware.php ( 0.19 KB )
  43. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/route.php ( 1.89 KB )
  44. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/session.php ( 0.57 KB )
  45. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/trace.php ( 0.34 KB )
  46. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/view.php ( 0.82 KB )
  47. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/event.php ( 0.25 KB )
  48. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  49. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/service.php ( 0.13 KB )
  50. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/AppService.php ( 0.26 KB )
  51. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  52. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  53. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  54. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  55. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  56. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/services.php ( 0.14 KB )
  57. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  58. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  59. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  60. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  61. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  62. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  63. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  64. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  65. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  66. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  67. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  68. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  69. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  70. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  71. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  72. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  73. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  74. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  75. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  76. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  77. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  78. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  79. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  80. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  81. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  82. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  83. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  84. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  85. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  86. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  87. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/Request.php ( 0.09 KB )
  88. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  89. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/middleware.php ( 0.25 KB )
  90. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  91. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  92. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  93. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  94. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  95. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  96. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  97. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  98. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  99. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  100. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  101. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  102. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  103. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/route/app.php ( 3.94 KB )
  104. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  105. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  106. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Index.php ( 9.68 KB )
  108. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/BaseController.php ( 2.05 KB )
  109. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  110. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  111. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  112. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  113. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  114. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  115. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  116. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  117. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  118. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  119. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  120. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  121. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  122. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  123. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  124. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  125. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  126. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  127. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  128. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  129. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  130. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  131. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  132. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  133. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  134. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  135. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Es.php ( 3.30 KB )
  136. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  137. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  138. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  139. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  140. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  141. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  142. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  143. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  144. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/runtime/temp/c935550e3e8a3a4c27dd94e439343fdf.php ( 31.80 KB )
  145. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.001122s ] mysql:host=127.0.0.1;port=3306;dbname=wenku;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.002358s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000726s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000619s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001684s ]
  6. SELECT * FROM `set` [ RunTime:0.000589s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001902s ]
  8. SELECT * FROM `article` WHERE `id` = 491618 LIMIT 1 [ RunTime:0.002333s ]
  9. UPDATE `article` SET `lasttime` = 1774795142 WHERE `id` = 491618 [ RunTime:0.005810s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 64 LIMIT 1 [ RunTime:0.000621s ]
  11. SELECT * FROM `article` WHERE `id` < 491618 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001305s ]
  12. SELECT * FROM `article` WHERE `id` > 491618 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.002625s ]
  13. SELECT * FROM `article` WHERE `id` < 491618 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.006576s ]
  14. SELECT * FROM `article` WHERE `id` < 491618 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.005369s ]
  15. SELECT * FROM `article` WHERE `id` < 491618 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.012942s ]
0.224937s