乐于分享
好东西不私藏

OpenClaw 技能开发完全指南:从入门到精通,打造你的专属 AI 工具箱

OpenClaw 技能开发完全指南:从入门到精通,打造你的专属 AI 工具箱

OpenClaw 技能开发完全指南:从入门到精通,打造你的专属 AI 工具箱

【AI前线导读】 想让你的 OpenClaw 更强大?本文手把手教你开发自定义技能,从零开始构建专属 AI 工具。涵盖技能架构设计、开发实战、调试技巧、发布流程,附完整代码示例和最佳实践。5000字深度长文,助你成为 OpenClaw 技能开发专家。


引言:为什么你需要自定义技能?

OpenClaw 作为新一代 AI Agent 框架,内置了丰富的工具能力。但真正的威力在于可扩展性——通过自定义技能,你可以:

• 连接私有系统 - 对接企业内部 API、数据库、消息队列• 封装专业工具 - 将领域知识固化成可复用的技能模块• 提升工作效率 - 自动化重复任务,一键完成复杂操作• 打造个人品牌 - 发布到 ClawHub,与社区共享成果

本文将带你完整走一遍技能开发全流程,从概念到落地,从代码到发布。


第一章:OpenClaw 技能架构解析

1.1 什么是技能(Skill)?

在 OpenClaw 中,技能是可插拔的功能模块,遵循统一的接口规范。一个技能通常包含:

my-skill/ ├── SKILL.md          # 技能说明书(必需) ├── package.json      # Node.js 项目配置 ├── src/ │   ├── index.ts      # 主入口文件 │   └── types.ts      # 类型定义 ├── dist/             # 编译输出 └── README.md         # 详细文档

1.2 技能的生命周期

发现 Discovery → 加载 Load → 初始化 Initialize → 执行 Execute → 卸载 Unload

关键阶段说明:

阶段
触发时机
典型操作
发现
OpenClaw 启动时
扫描 skills/ 目录,读取 SKILL.md
加载
首次调用技能时
加载代码,解析配置
初始化
加载后立即执行
建立连接,预热资源
执行
用户调用工具时
执行业务逻辑
卸载
服务关闭时
清理资源,保存状态

1.3 技能与工具的关系

技能(Skill) 是容器,工具(Tool) 是具体功能。一个技能可以暴露多个工具:

// 技能暴露的工具示例 export const tools = {   // 工具1:查询天气   'weather.get': async (params) => { /* ... */ },    // 工具2:获取预报   'weather.forecast': async (params) => { /* ... */ },    // 工具3:设置提醒   'weather.alert': async (params) => { /* ... */ } };

第二章:开发环境搭建

2.1 前置要求

# 检查 OpenClaw 版本 openclaw --version # 要求 >= 2026.3.0  # 检查 Node.js node --version # 要求 >= 18.0.0  # 检查 TypeScript(推荐) npm install -g typescript

2.2 创建技能目录

# 进入 OpenClaw 技能目录 cd ~/.openclaw/skills  # 创建新技能 mkdir my-first-skill cd my-first-skill  # 初始化项目 npm init -y

2.3 安装依赖

# 核心依赖 npm install uuid  # 开发依赖 npm install --save-dev typescript @types/node @types/uuid

2.4 配置 TypeScript

创建 tsconfig.json

{   "compilerOptions": {     "target": "ES2022",     "module": "Node16",     "moduleResolution": "Node16",     "lib": ["ES2022"],     "outDir": "./dist",     "rootDir": "./src",     "strict": true,     "esModuleInterop": true,     "skipLibCheck": true,     "declaration": true,     "declarationMap": true,     "sourceMap": true,     "resolveJsonModule": true   },   "include": ["src/**/*"],   "exclude": ["node_modules", "dist"] }

第三章:Hello World 技能实战

3.1 创建 SKILL.md

这是技能的"身份证",必须放在根目录:

--- name: hello-world slug: hello-world version: 1.0.0 description: 我的第一个 OpenClaw 技能 - 向世界问好 author: Your Name license: MIT ---  # Hello World Skill  一个简单的示例技能,演示 OpenClaw 技能开发基础。  ## 功能  - 👋 打招呼 - 向指定对象问好 - ⏰ 获取时间 - 返回当前时间 - 📊 统计 - 记录调用次数  ## 使用方法  ```javascript // 打招呼 await tools['hello-world.greet']({ name: 'OpenClaw' });  // 获取时间 await tools['hello-world.time']();  // 查看统计 await tools['hello-world.stats']();

License

MIT

 ### 3.2 编写核心代码  创建 `src/index.ts`:  ```typescript /**   * Hello World 技能 - OpenClaw 开发入门示例   */  import { v4 as uuidv4 } from 'uuid';  // 技能状态(内存中) interface SkillState {   callCount: number;   startTime: number;   greetings: string[]; }  // 初始化状态 const state: SkillState = {   callCount: 0,   startTime: Date.now(),   greetings: [] };  // 工具1:打招呼 export async function greet(params: { name: string; language?: string }): Promise {   state.callCount++;    const { name, language = 'zh' } = params;    const greetings: Record = {     zh: `你好,${name}!欢迎使用 OpenClaw 👋`,     en: `Hello, ${name}! Welcome to OpenClaw 👋`,     jp: `こんにちは、${name}さん!OpenClaw へようこそ 👋`,     fr: `Bonjour, ${name}! Bienvenue sur OpenClaw 👋`   };    const message = greetings[language] || greetings.zh;   state.greetings.push({ name, language, time: new Date().toISOString() });    return message; }  // 工具2:获取当前时间 export async function getTime(params?: { timezone?: string }): Promise<{   timestamp: number;   iso: string;   formatted: string;   timezone: string; }> {   state.callCount++;    const now = new Date();   const timezone = params?.timezone || 'Asia/Shanghai';    return {     timestamp: now.getTime(),     iso: now.toISOString(),     formatted: now.toLocaleString('zh-CN', { timeZone: timezone }),     timezone   }; }  // 工具3:获取统计信息 export async function getStats(): Promise<{   callCount: number;   uptime: number;   uptimeFormatted: string;   greetings: string[]; }> {   state.callCount++;    const uptime = Date.now() - state.startTime;   const hours = Math.floor(uptime / 3600000);   const minutes = Math.floor((uptime % 3600000) / 60000);   const seconds = Math.floor((uptime % 60000) / 1000);    return {     callCount: state.callCount,     uptime,     uptimeFormatted: `${hours}h ${minutes}m ${seconds}s`,     greetings: state.greetings.slice(-10) // 最近10条   }; }  // 导出工具映射(OpenClaw 会读取这个) export const tools = {   'hello-world.greet': greet,   'hello-world.time': getTime,   'hello-world.stats': getStats };  // 默认导出 export default { tools };

3.3 编译代码

# 编译 TypeScript npm run build  # 或手动编译 npx tsc

3.4 测试技能

# 进入 OpenClaw 工作目录 cd ~/.openclaw/workspace  # 创建测试脚本 cat > test-skill.js << 'EOF' const skill = require('../skills/my-first-skill/dist/index.js');  async function test() {   console.log('=== 测试 Hello World 技能 ===\n');    // 测试打招呼   console.log('1. 打招呼(中文):');   const greeting = await skill.tools['hello-world.greet']({ name: 'OpenClaw' });   console.log(greeting);    console.log('\n2. 打招呼(英文):');   const greetingEn = await skill.tools['hello-world.greet']({ name: 'World', language: 'en' });   console.log(greetingEn);    // 测试获取时间   console.log('\n3. 获取时间:');   const time = await skill.tools['hello-world.time']();   console.log(time);    // 测试统计   console.log('\n4. 查看统计:');   const stats = await skill.tools['hello-world.stats']();   console.log(stats); }  test().catch(console.error); EOF  # 运行测试 node test-skill.js

第四章:进阶技能开发 - 实战案例

4.1 案例:Web 搜索技能

实现一个聚合多个搜索引擎的技能:

/**   * Web Search 技能 - 多引擎搜索聚合   */  import * as https from 'https';  interface SearchResult {   title: string;   url: string;   snippet: string;   source: string; }  // Bing 搜索 async function searchBing(query: string, count: number = 5): Promise {   const apiKey = process.env.BING_API_KEY;   if (!apiKey) {     throw new Error('BING_API_KEY not set');   }    const url = `https://api.bing.microsoft.com/v7.0/search?q=${encodeURIComponent(query)}&count=${count}`;    return new Promise((resolve, reject) => {     const req = https.get(url, {       headers: { 'Ocp-Apim-Subscription-Key': apiKey }     }, (res) => {       let data = '';       res.on('data', chunk => data += chunk);       res.on('end', () => {         try {           const result = JSON.parse(data);           const items = result.webPages?.value || [];           resolve(items.map((item: any) => ({             title: item.name,             url: item.url,             snippet: item.snippet,             source: 'Bing'           })));         } catch (e) {           reject(e);         }       });     });     req.on('error', reject);   }); }  // Tavily 搜索(AI 搜索) async function searchTavily(query: string, count: number = 5): Promise {   const apiKey = process.env.TAVILY_API_KEY;   if (!apiKey) {     throw new Error('TAVILY_API_KEY not set');   }    // 实现略...   return []; }  // 聚合搜索工具 export async function search(params: {   query: string;   engine?: 'bing' | 'tavily' | 'all';   count?: number; }): Promise<{   query: string;   results  results: SearchResult[];   total: number;   sources: string[]; }> {   const { query, engine = 'bing', count = 5 } = params;    let results: SearchResult[] = [];   const sources: string[] = [];    if (engine === 'bing' || engine === 'all') {     const bingResults = await searchBing(query, count);     results = results.concat(bingResults);     sources.push('Bing');   }    if (engine === 'tavily' || engine === 'all') {     const tavilyResults = await searchTavily(query, count);     results = results.concat(tavilyResults);     sources.push('Tavily');   }    // 去重并排序   const seen = new Set();   results = results.filter(r => {     if (seen.has(r.url)) return false;     seen.add(r.url);     return true;   });    return {     query,     results: results.slice(0, count),     total: results.length,     sources   }; }  export const tools = {   'web-search.search': search };

4.2 案例:文件处理技能

实现文件读写、格式转换等工具:

/**   * File Utils 技能 - 文件处理工具集   */  import * as fs from 'fs/promises'; import * as path from 'path';  // 读取文件 export async function readFile(params: {   path: string;   encoding?: 'utf8' | 'base64'; }): Promise<{   content: string;   size: number;   encoding: string; }> {   const { path: filePath, encoding = 'utf8' } = params;    // 安全检查:限制在工作目录   const resolvedPath = path.resolve(filePath);   const workspaceRoot = process.env.OPENCLAW_WORKSPACE || process.cwd();    if (!resolvedPath.startsWith(workspaceRoot)) {     throw new Error('Access denied: file outside workspace');   }    const content = await fs.readFile(resolvedPath, encoding);   const stats = await fs.stat(resolvedPath);    return {     content,     size: stats.size,     encoding   }; }  // 写入文件 export async function writeFile(params: {   path: string;   content: string;   encoding?: 'utf8' | 'base64'; }): Promise<{   path: string;   size: number;   success: boolean; }> {   const { path: filePath, content, encoding = 'utf8' } = params;    const resolvedPath = path.resolve(filePath);   const workspaceRoot = process.env.OPENCLAW_WORKSPACE || process.cwd();    if (!resolvedPath.startsWith(workspaceRoot)) {     throw new Error('Access denied: file outside workspace');   }    await fs.mkdir(path.dirname(resolvedPath), { recursive: true });   await fs.writeFile(resolvedPath, content, encoding);    const stats = await fs.stat(resolvedPath);    return {     path: resolvedPath,     size: stats.size,     success: true   }; }  // 列出目录 export async function listDir(params: {   path: string;   recursive?: boolean; }): Promise<{   path: string;   items: Array<{     name: string;     type: 'file' | 'directory';     size: number;     modified: string;   }>; }> {   const { path: dirPath, recursive = false } = params;    const entries = await fs.readdir(dirPath, { withFileTypes: true, recursive });    const items = await Promise.all(     entries.map(async (entry) => {       const fullPath = path.join(dirPath, entry.name);       const stats = await fs.stat(fullPath);       return {         name: entry.name,         type: entry.isDirectory() ? 'directory' : 'file',         size: stats.size,         modified: stats.mtime.toISOString()       };     })   );    return { path: dirPath, items }; }  export const tools = {   'file.read': readFile,   'file.write': writeFile,   'file.list': listDir };

第五章:调试与测试技巧

5.1 本地调试

# 1. 使用 tsx 直接运行(无需编译) npx tsx src/index.ts  # 2. 启用详细日志 DEBUG=openclaw:* npx tsx src/index.ts  # 3. 使用 Node.js 调试器 node --inspect-brk dist/index.js

5.2 单元测试

创建 test/skill.test.ts

import { describe, it, expect } from 'vitest'; import { greet, getTime, getStats } from '../src/index';  describe('Hello World Skill', () => {   it('should greet in Chinese by default', async () => {     const result = await greet({ name: 'Test' });     expect(result).toContain('你好');     expect(result).toContain('Test');   });    it('should greet in English', async () => {     const result = await greet({ name: 'Test', language: 'en' });     expect(result).toContain('Hello');   });    it('should return valid time', async () => {     const result = await getTime();     expect(result.timestamp).toBeGreaterThan(0);     expect(result.iso).toMatch(/^\d{4}-\d{2}-\d{2}/);   }); });

5.3 集成测试

# 在 OpenClaw 环境中测试 openclaw tool call hello-world.greet '{"name": "Integration Test"}'

第六章:发布与分享

6.1 准备发布

# 1. 确保代码已编译 npm run build  # 2. 更新版本号 npm version patch  # 或 minor/major  # 3. 更新 CHANGELOG.md # 4. 提交到 Git git add . git commit -m "Release v1.0.0" git tag v1.0.0 git push origin main --tags

6.2 发布到 ClawHub

# 使用 ClawHub CLI(如果已安装) clawhub publish  # 或手动打包 tar -czvf my-skill-v1.0.0.tar.gz \   SKILL.md package.json README.md \   dist/ src/

6.3 文档规范

好的技能文档应包含:

章节
内容
简介
一句话描述技能用途
功能特性
列出主要功能
安装
安装步骤和依赖
配置
环境变量和配置项
使用示例
代码示例和截图
API 文档
每个工具的参数和返回值
常见问题
FAQ 和故障排除
更新日志
版本历史和变更

第七章:最佳实践

7.1 代码规范

// ✅ 好的做法:清晰的参数命名 export async function sendEmail(params: {   to: string;   subject: string;   body: string;   attachments?: string[]; }) { }  // ❌ 避免:模糊的参数名 export async function sendEmail(p: any) { }  // ✅ 好的做法:详细的错误信息 throw new Error('Email sending failed: SMTP server unreachable');  // ❌ 避免:模糊的错误 throw new Error('Error');

7.2 性能优化

// 使用缓存 const cache = new Map();  export async function fetchWithCache(params: { url: string }) {   if (cache.has(params.url)) {     return cache.get(params.url);   }    const result = await fetch(params.url);   cache.set(params.url, result);    // 限制缓存大小   if (cache.size > 100) {     const firstKey = cache.keys().next().value;     cache.delete(firstKey);   }    return result; }  // 使用连接池 import { Pool } from 'pg'; const pool = new Pool({ /* config */ });

7.3 安全注意事项

// ✅ 验证输入 function sanitizePath(inputPath: string): string {   const resolved = path.resolve(inputPath);   const allowedRoot = process.env.OPENCLAW_WORKSPACE || '/workspace';    if (!resolved.startsWith(allowedRoot)) {     throw new Error('Path traversal detected');   }    return resolved; }  // ✅ 敏感信息使用环境变量 const apiKey = process.env.API_KEY; if (!apiKey) {   throw new Error('API_KEY not configured'); }  // ❌ 避免硬编码密钥 const apiKey = 'sk-1234567890abcdef'; // 危险!

第八章:常见问题 FAQ

Q1:技能加载失败怎么办?

检查清单:

  1. SKILL.md 是否在根目录?
  2. package.json 是否存在?
  3. 代码是否已编译(dist/ 目录是否存在)?
  4. 依赖是否已安装?

Q2:如何调试技能?

# 启用 OpenClaw 调试日志 openclaw logs --follow --level debug  # 在技能代码中添加日志 console.log('[MySkill]', 'Debug info:', data);

Q3:技能之间可以互相调用吗?

// 可以!通过 OpenClaw 运行时 export async function myTool(params: any) {   // 调用其他技能的工具   const result = await runtime.tools['other-skill.tool'](params);   return result; }

Q4:如何处理异步任务?

// 使用 Promise export async function longRunningTask(params: any) {   return new Promise((resolve, reject) => {     // 异步操作     setTimeout(() => {       resolve({ success: true });     }, 5000);   }); }

结语:开启你的技能开发之旅

OpenClaw 技能开发并不复杂,关键在于:理解架构 → 动手实践 → 持续迭代

本文从基础概念到实战案例,从调试技巧到发布流程,为你提供了完整的技能开发指南。现在,是时候动手创建你的第一个技能了!

下一步行动

  1. 从 Hello World 开始
     - 按照第三章完成你的第一个技能
  2. 参考现有技能
     - 学习 ~/.openclaw/skills/ 目录下的开源技能
  3. 加入社区
     - 在 Discord/GitHub 与其他开发者交流
  4. 分享成果
     - 将你的技能发布到 ClawHub,帮助更多人

资源链接

  • 官方文档: https://docs.openclaw.ai

  • 技能仓库: https://clawhub.com

  • GitHub: https://github.com/openclaw/openclaw

  • Discord: https://  results: SearchResult[];

    total: number;sources: string[];

}> {  const { query, engine = 'bing', count = 5 } = params;

  let results: SearchResult[] = [];  const sources: string[] = [];

  if (engine === 'bing' || engine === 'all') {    const bingResults = await searchBing(query, count);    results = results.concat(bingResults);    sources.push('Bing');  }

  if (engine === 'tavily' || engine === 'all') {    const tavilyResults = await searchTavily(query, count);    results = results.concat(tavilyResults);    sources.push('Tavily');  }

  // 去重并排序  const seen = new Set();  results = results.filter(r => {    if (seen.has(r.url)) return false;    seen.add(r.url);    return true;  });

  return {    query,    results: results.slice(0, count),    total: results.length,    sources  };}

export const tools = {  'web-search.search': search};

 ### 4.2 案例:文件处理技能  实现文件读写、格式转换等工具:  ```typescript /**   * File Utils 技能 - 文件处理工具集   */  import * as fs from 'fs/promises'; import * as path from 'path';  // 读取文件 export async function readFile(params: {   path: string;   encoding?: 'utf8' | 'base64'; }): Promise<{   content: string;   size: number;   encoding: string; }> {   const { path: filePath, encoding = 'utf8' } = params;    // 安全检查:限制在工作目录   const resolvedPath = path.resolve(filePath);   const workspaceRoot = process.env.OPENCLAW_WORKSPACE || process.cwd();    if (!resolvedPath.startsWith(workspaceRoot)) {     throw new Error('Access denied: file outside workspace');   }    const content = await fs.readFile(resolvedPath, encoding);   const stats = await fs.stat(resolvedPath);    return {     content,     size: stats.size,     encoding   }; }  // 写入文件 export async function writeFile(params: {   path: string;   content: string;   encoding?: 'utf8' | 'base64'; }): Promise<{   path: string;   size: number;   success: boolean; }> {   const { path: filePath, content, encoding = 'utf8' } = params;    const resolvedPath = path.resolve(filePath);   const workspaceRoot = process.env.OPENCLAW_WORKSPACE || process.cwd();    if (!resolvedPath.startsWith(workspaceRoot)) {     throw new Error('Access denied: file outside workspace');   }    await fs.mkdir(path.dirname(resolvedPath), { recursive: true });   await fs.writeFile(resolvedPath, content, encoding);    const stats = await fs.stat(resolvedPath);    return {     path: resolvedPath,     size: stats.size,     success: true   }; }  // 列出目录 export async function listDir(params: {   path: string;   recursive?: boolean; }): Promise<{   path: string;   items: Array<{     name: string;     type: 'file' | 'directory';     size: number;     modified: string;   }>; }> {   const { path: dirPath, recursive = false } = params;    const entries = await fs.readdir(dirPath, { withFileTypes: true, recursive });    const items = await Promise.all(     entries.map(async (entry) => {       const fullPath = path.join(dirPath, entry.name);       const stats = await fs.stat(fullPath);       return {         name: entry.name,         type: entry.isDirectory() ? 'directory' : 'file',         size: stats.size,         modified: stats.mtime.toISOString()       };     })   );    return { path: dirPath, items }; }  export const tools = {   'file.read': readFile,   'file.write': writeFile,   'file.list': listDir };

第五章:调试与测试技巧

5.1 本地调试

# 1. 使用 tsx 直接运行(无需编译) npx tsx src/index.ts  # 2. 启用详细日志 DEBUG=openclaw:* npx tsx src/index.ts  # 3. 使用 Node.js 调试器 node --inspect-brk dist/index.js

5.2 单元测试

创建 test/skill.test.ts

import { describe, it, expect } from 'vitest'; import { greet, getTime, getStats } from '../src/index';  describe('Hello World Skill', () => {   it('should greet in Chinese by default', async () => {     const result = await greet({ name: 'Test' });     expect(result).toContain('你好');     expect(result).toContain('Test');   });    it('should greet in English', async () => {     const result = await greet({ name: 'Test', language: 'en' });     expect(result).toContain('Hello');   });    it('should return valid time', async () => {     const result = await getTime();     expect(result.timestamp).toBeGreaterThan(0);     expect(result.iso).toMatch(/^\d{4}-\d{2}-\d{2}/);   }); });

5.3 集成测试

# 在 OpenClaw 环境中测试 openclaw tool call hello-world.greet '{"name": "Integration Test"}'

第六章:发布与分享

6.1 准备发布

# 1. 确保代码已编译 npm run build  # 2. 更新版本号 npm version patch  # 或 minor/major  # 3. 更新 CHANGELOG.md # 4. 提交到 Git git add . git commit -m "Release v1.0.0" git tag v1.0.0 git push origin main --tags

6.2 发布到 ClawHub

# 使用 ClawHub CLI(如果已安装) clawhub publish  # 或手动打包 tar -czvf my-skill-v1.0.0.tar.gz \   SKILL.md package.json README.md \   dist/ src/

6.3 文档规范

好的技能文档应包含:

章节
内容
简介
一句话描述技能用途
功能特性
列出主要功能
安装
安装步骤和依赖
配置
环境变量和配置项
使用示例
代码示例和截图
API 文档
每个工具的参数和返回值
常见问题
FAQ 和故障排除
更新日志
版本历史和变更

第七章:最佳实践

7.1 代码规范

// ✅ 好的做法:清晰的参数命名 export async function sendEmail(params: {   to: string;   subject: string;   body: string;   attachments?: string[]; }) { }  // ❌ 避免:模糊的参数名 export async function sendEmail(p: any) { }  // ✅ 好的做法:详细的错误信息 throw new Error('Email sending failed: SMTP server unreachable');  // ❌ 避免:模糊的错误 throw new Error('Error');

7.2 性能优化

// 使用缓存 const cache = new Map();  export async function fetchWithCache(params: { url: string }) {   if (cache.has(params.url)) {     return cache.get(params.url);   }    const result = await fetch(params.url);   cache.set(params.url, result);    // 限制缓存大小   if (cache.size > 100) {     const firstKey = cache.keys().next().value;     cache.delete(firstKey);   }    return result; }  // 使用连接池 import { Pool } from 'pg'; const pool = new Pool({ /* config */ });

7.3 安全注意事项

// ✅ 验证输入 function sanitizePath(inputPath: string): string {   const resolved = path.resolve(inputPath);   const allowedRoot = process.env.OPENCLAW_WORKSPACE || '/workspace';    if (!resolved.startsWith(allowedRoot)) {     throw new Error('Path traversal detected');   }    return resolved; }  // ✅ 敏感信息使用环境变量 const apiKey = process.env.API_KEY; if (!apiKey) {   throw new Error('API_KEY not configured'); }  // ❌ 避免硬编码密钥 const apiKey = 'sk-1234567890abcdef'; // 危险!

第八章:常见问题 FAQ

Q1:技能加载失败怎么办?

检查清单:

  1. SKILL.md 是否在根目录?
  2. package.json 是否存在?
  3. 代码是否已编译(dist/ 目录是否存在)?
  4. 依赖是否已安装?

Q2:如何调试技能?

# 启用 OpenClaw 调试日志 openclaw logs --follow --level debug  # 在技能代码中添加日志 console.log('[MySkill]', 'Debug info:', data);

Q3:技能之间可以互相调用吗?

// 可以!通过 OpenClaw 运行时 export async function myTool(params: any) {   // 调用其他技能的工具   const result = await runtime.tools['other-skill.tool'](params);   return result; }

Q4:如何处理异步任务?

// 使用 Promise export async function longRunningTask(params: any) {   return new Promise((resolve, reject) => {     // 异步操作     setTimeout(() => {       resolve({ success: true });     }, 5000);   }); }

结语:开启你的技能开发之旅

OpenClaw 技能开发并不复杂,关键在于:理解架构 → 动手实践 → 持续迭代

本文从基础概念到实战案例,从调试技巧到发布流程,为你提供了完整的技能开发指南。现在,是时候动手创建你的第一个技能了!

下一步行动

  1. 从 Hello World 开始
     - 按照第三章完成你的第一个技能
  2. 参考现有技能
     - 学习 ~/.openclaw/skills/ 目录下的开源技能
  3. 加入社区
     - 在 Discord/GitHub 与其他开发者交流
  4. 分享成果
     - 将你的技能发布到 ClawHub,帮助更多人

资源链接

  • 官方文档
    : https://docs.openclaw.ai
  • 技能仓库
    : https://clawhub.com
  • GitHub
    : https://github.com/openclaw/openclaw
  • Discord
    : https://discord.com/invite/clawd

本文首发于微信公众号「Alman」,转载请注明出处。

作者:Alman | 编辑:AI前线 | 发布时间:2025年3月

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-06-01 19:52:34 HTTP/1.1 GET : https://www.yeyulingfeng.com/a/475723.html
  2. 运行时间 : 0.188269s [ 吞吐率:5.31req/s ] 内存消耗:5,002.51kb 文件加载:145
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=a96258710b86fccae7d7f7f3e50535de
  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.87 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.50 KB )
  145. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000801s ] mysql:host=127.0.0.1;port=3306;dbname=wenku;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000787s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000308s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000291s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000492s ]
  6. SELECT * FROM `set` [ RunTime:0.000198s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000523s ]
  8. SELECT * FROM `article` WHERE `id` = 475723 LIMIT 1 [ RunTime:0.000524s ]
  9. UPDATE `article` SET `lasttime` = 1780314755 WHERE `id` = 475723 [ RunTime:0.000711s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 64 LIMIT 1 [ RunTime:0.000229s ]
  11. SELECT * FROM `article` WHERE `id` < 475723 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.003936s ]
  12. SELECT * FROM `article` WHERE `id` > 475723 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000717s ]
  13. SELECT * FROM `article` WHERE `id` < 475723 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.002710s ]
  14. SELECT * FROM `article` WHERE `id` < 475723 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.001654s ]
  15. SELECT * FROM `article` WHERE `id` < 475723 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.003125s ]
0.190081s