Dev Optimization logo

Dev Optimization

Organization
devcodex-labs
dev-optimization

性能优化子类型规范 — 基准测试前置 + autocannon 压测集成

Overview

Publisherdevcodex-labs
Repositorydevcodex
Skill namedev-optimization
Stars
433
Forks
44
Bundled files
1
LicenseAGPL-3.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by devcodex-labs on GitHub. Read the source before you install it.

Installation

Install the Dev Optimization AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/devcodex-labs/devcodex/tree/main/content/skills/dev-optimization
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/devcodex-labs/devcodex.git /tmp/devcodex
mkdir -p .claude/skills
cp -r /tmp/devcodex/content/skills/dev-optimization .claude/skills/dev-optimization
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Dev Optimization in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Dev Optimization on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Dev Optimization is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Dev Optimization Skill

触发条件

用户要求性能优化、吞吐量提升、响应时间降低、内存/CPU 优化。

前置条件(必须满足)

项要求
api-verification 已通过优化前接口测试基线已建立(.http + .cjs 产物存在)
基准数据优化前已有性能指标(QPS/P99/内存)作为对比基线
测试环境压测在隔离环境执行,不影响生产
ServiceLifecycleCleanup若 AI 启动压测 target、dev server、本地 API/mock、数据库代理或 SSH 隧道,必须记录 PID/job/端口并在验证完成后主动关闭
AdapterBenchmarkAttributionadapter、provider、connector、SDK 或性能 benchmark 必须记录基线、环境、版本、负载、归因边界和不可比较因素

工具规范

默认候选工具:autocannon。解析顺序固定为项目既有压测脚本 → 项目已安装的本地依赖 → 经用户确认的隔离临时工具;缺失时先报告替代方案。npm i -g autocannon 或任何全局安装会修改用户环境,必须单独说明目标、影响、恢复方式并取得当前明确授权,不能由 optimization 路由、Auto、Profile 或工具缺失隐式授权。

bash
# 基线测量
npx --no-install autocannon -c 100 -d 30 -j http://localhost:3000/api/target > baseline.json

# 优化后对比
npx --no-install autocannon -c 100 -d 30 -j http://localhost:3000/api/target > optimized.json
npx --no-install autocannon-compare baseline.json optimized.json

CP 流程

  • CP1:确认优化目标(指标 + 目标值)+ 当前基线数据
  • CP2:确认优化方案(无 Breaking Changes,或 BC 已评估) → dev-plan-review(PR-1 已自检,PR-2~PR-7 详细验证)→ CP3
  • CP3:确认任务拆分、执行顺序、依赖、验证方式、ServiceLifecycleCleanup 与回滚策略;05-实施进度.md 对小任务不是默认产物,但跨多轮/多阶段、阻塞、用户要求持续跟踪、多批次、预计修改 ≥10 文件、控制面或模板-校验链任务必须启用

产出物

  • 基准测试报告(优化前后对比)
  • reports/optimizations/ 开发报告(含性能指标对比表)

关键规则

  • 🔴 禁止无基线数据的"盲优化"
  • 优化不改变外部接口行为(否则走 dev-default 流程)
  • 启动性能优化或 dev 日志治理必须执行 StartupPhaseTrace:先把启动日志按阶段归类,并与 Profile / startup summary 使用同一套阶段命名,再决定减噪、lazy loading 或 background warmup;不得只隐藏扁平日志后宣告优化完成
  • adapter、provider、connector、SDK 或框架适配 benchmark 必须执行 AdapterBenchmarkAttribution;不得把网络、缓存预热、依赖树、框架版本、测试环境或压测工具差异误归因给业务代码

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Dev Optimization AI skill do?

性能优化子类型规范 — 基准测试前置 + autocannon 压测集成

Why use Dev Optimization on TypingMind?

Because you install it once and use it with any model. Dev Optimization is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Dev Optimization in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/devcodex-labs/devcodex/tree/main/content/skills/dev-optimization. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Dev Optimization?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Dev Optimization?

As many as you like. As long as a model supports skills, you can use Dev Optimization with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Dev Optimization AI skill free?

Yes. It is published on GitHub by devcodex-labs under the AGPL-3.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇