Zhihu Performance Regression Review
zly2006/zhihu-plus-plus
Review and fix Zhihu++ functional regressions caused by performance optimizations.
Cloudflare Workers performance optimization with CPU, memory, caching, bundle size.
$ npx skills add secondsky/claude-skills --skill cloudflare-workers-performance -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install secondsky/claude-skills cloudflare-workers-performance --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/cloudflare-workers/skills/cloudflare-workers-performance .claude/skills/cloudflare-workers-performance && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "cloudflare-workers-performance" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/cloudflare-workers/skills/cloudflare-workers-performance into .claude/skills/cloudflare-workers-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cloudflare-workers-performance", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/secondsky/claude-skills/tree/main/plugins/cloudflare-workers/skills/cloudflare-workers-performanceType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add secondsky/claude-skills --skill cloudflare-workers-performance -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install secondsky/claude-skills cloudflare-workers-performance --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/cloudflare-workers/skills/cloudflare-workers-performance .agents/skills/cloudflare-workers-performance && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "cloudflare-workers-performance" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/cloudflare-workers/skills/cloudflare-workers-performance into .agents/skills/cloudflare-workers-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cloudflare-workers-performance", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add secondsky/claude-skills --skill cloudflare-workers-performance -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install secondsky/claude-skills cloudflare-workers-performance --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/cloudflare-workers/skills/cloudflare-workers-performance .cursor/skills/cloudflare-workers-performance && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "cloudflare-workers-performance" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/cloudflare-workers/skills/cloudflare-workers-performance into .cursor/skills/cloudflare-workers-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cloudflare-workers-performance", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/secondsky/claude-skills.git --path plugins/cloudflare-workers/skills/cloudflare-workers-performance--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add secondsky/claude-skills --skill cloudflare-workers-performance -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install secondsky/claude-skills cloudflare-workers-performance --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/cloudflare-workers/skills/cloudflare-workers-performance .gemini/skills/cloudflare-workers-performance && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "cloudflare-workers-performance" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/cloudflare-workers/skills/cloudflare-workers-performance into .gemini/skills/cloudflare-workers-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cloudflare-workers-performance", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install secondsky/claude-skills cloudflare-workers-performanceInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add secondsky/claude-skills --skill cloudflare-workers-performance -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/cloudflare-workers/skills/cloudflare-workers-performance .github/skills/cloudflare-workers-performance && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "cloudflare-workers-performance" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/cloudflare-workers/skills/cloudflare-workers-performance into .github/skills/cloudflare-workers-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cloudflare-workers-performance", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add secondsky/claude-skills --skill cloudflare-workers-performance -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install secondsky/claude-skills cloudflare-workers-performance --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/cloudflare-workers/skills/cloudflare-workers-performance .opencode/skills/cloudflare-workers-performance && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "cloudflare-workers-performance" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/cloudflare-workers/skills/cloudflare-workers-performance into .opencode/skills/cloudflare-workers-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cloudflare-workers-performance", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
cloudflare-workers-performanceCloudflare Workers performance optimization with CPU, memory, caching, bundle size.
Cloudflare Workers Performance is an agent skill from secondsky/claude-skills. Cloudflare Workers performance optimization with CPU, memory, caching, bundle size. Use for slow workers, high latency, cold starts, or encountering CPU limits, memory issues, timeout errors.
Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including scripts and reference files (for example `references/bundle-optimization.md`, `references/caching-strategies.md` and `references/cold-starts.md`).
It sits in Backend & APIs, covering Caching, Web performance and Performance optimization. It works with Cloudflare Workers. The repository describes itself as: Production-ready skills for Claude Code CLI - Cloudflare, React, Tailwind v4, and AI integrations. The licence is MIT.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 8837836. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 2 files in scripts/ (TypeScript and Shell), which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
developers.cloudflare.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Cloudflare Workers Performance loads about 1.6k tokens when it runs, and up to ~14k if it reads all its reference files. Until then it costs about 56 tokens; SKILL.md has 249 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from secondsky/claude-skills at commit 8837836, republished under its MIT licence (© secondsky). 249 words, ~1,554 tokens.
.claude/skills/cloudflare-workers-performance/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.Techniques for maximizing Worker performance and minimizing latency.
// 1. Avoid unnecessary cloning
// ❌ Bad: Clones entire request
const body = await request.clone().json();
// ✅ Good: Parse directly when not re-using body
const body = await request.json();
// 2. Use streaming instead of buffering
// ❌ Bad: Buffers entire response
const text = await response.text();
return new Response(transform(text));
// ✅ Good: Stream transformation
return new Response(response.body.pipeThrough(new TransformStream({
transform(chunk, controller) {
controller.enqueue(process(chunk));
}
})));
// 3. Cache expensive operations
const cache = caches.default;
const cached = await cache.match(request);
if (cached) return cached;| Error | Symptom | Fix |
|---|---|---|
| CPU limit exceeded | Worker terminated | Optimize hot paths, use streaming |
| Cold start latency | First request slow | Reduce bundle size, avoid top-level await |
| Memory pressure | Slow GC, timeouts | Stream data, avoid large arrays |
| KV latency | Slow reads | Use Cache API, batch reads |
| D1 slow queries | High latency | Add indexes, optimize SQL |
| Large bundles | Slow cold starts | Tree-shake, code split |
| Blocking operations | Request timeouts | Use Promise.all, streaming |
| Unnecessary cloning | Memory spike | Only clone when needed |
| Missing cache | Repeated computation | Implement caching layer |
| Sync operations | CPU spikes | Use async alternatives |
async function profiledHandler(request: Request): Promise<Response> {
const timing: Record<string, number> = {};
const time = async <T>(name: string, fn: () => Promise<T>): Promise<T> => {
const start = Date.now();
const result = await fn();
timing[name] = Date.now() - start;
return result;
};
const data = await time('fetch', () => fetchData());
const processed = await time('process', () => processData(data));
const response = await time('serialize', () => serialize(processed));
console.log('Timing:', timing);
return new Response(response);
}// For large JSON, use streaming parser
import { JSONParser } from '@streamparser/json';
async function parseStreamingJSON(stream: ReadableStream): Promise<unknown[]> {
const parser = new JSONParser();
const results: unknown[] = [];
parser.onValue = (value) => results.push(value);
for await (const chunk of stream) {
parser.write(chunk);
}
return results;
}// ❌ Bad: Loads all into memory
const items = await db.prepare('SELECT * FROM items').all();
const processed = items.results.map(transform);
// ✅ Good: Process in batches
async function* batchProcess(db: D1Database, batchSize = 100) {
let offset = 0;
while (true) {
const { results } = await db
.prepare('SELECT * FROM items LIMIT ? OFFSET ?')
.bind(batchSize, offset)
.all();
if (results.length === 0) break;
for (const item of results) {
yield transform(item);
}
offset += batchSize;
}
}interface CacheLayer {
get(key: string): Promise<unknown | null>;
set(key: string, value: unknown, ttl?: number): Promise<void>;
}
// Layer 1: In-memory (request-scoped)
const memoryCache = new Map<string, unknown>();
// Layer 2: Cache API (edge-local)
const edgeCache: CacheLayer = {
async get(key) {
const response = await caches.default.match(new Request(`https://cache/${key}`));
return response ? response.json() : null;
},
async set(key, value, ttl = 60) {
await caches.default.put(
new Request(`https://cache/${key}`),
new Response(JSON.stringify(value), {
headers: { 'Cache-Control': `max-age=${ttl}` }
})
);
}
};
// Layer 3: KV (global)
// Use env.KV.get/put// 1. Tree-shake imports
// ❌ Bad
import * as lodash from 'lodash';
// ✅ Good
import { debounce } from 'lodash-es';
// 2. Lazy load heavy dependencies
let heavyLib: typeof import('heavy-lib') | undefined;
async function getHeavyLib() {
if (!heavyLib) {
heavyLib = await import('heavy-lib');
}
return heavyLib;
}Load specific references based on the task:
references/cpu-optimization.mdreferences/memory-optimization.mdreferences/caching-strategies.mdreferences/bundle-optimization.mdreferences/cold-starts.md| Template | Purpose | Use When |
|---|---|---|
templates/performance-middleware.ts | Performance monitoring | Adding timing/profiling |
templates/caching-layer.ts | Multi-layer caching | Implementing cache |
templates/optimized-worker.ts | Performance patterns | Starting optimized worker |
| Script | Purpose | Command |
|---|---|---|
scripts/benchmark.sh | Load testing | ./benchmark.sh <url> |
scripts/profile-worker.sh | CPU profiling | ./profile-worker.sh |
© secondsky, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 10 other files (scripts, references) in plugins/cloudflare-workers/skills/cloudflare-workers-performance of secondsky/claude-skills.
Open the folder on GitHubat commit 8837836
Cloudflare Workers Performance next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Cloudflare Workers Performance this skillsecondsky/claude-skills | 227 | — | ~1.6k | Automated safety check: Pass | MIT | |
| Zhihu Performance Regression Reviewzly2006/zhihu-plus-plus | 4.2k | — | ~868 | Automated safety check: Pass | AGPL-3.0 | |
| Electron DevTools Trace Analysiskeybase/client | 9.3k | — | ~809 | Automated safety check: Pass | BSD-3-Clause | |
| Keybase RPC Log Analysiskeybase/client | 9.3k | — | ~3k | Automated safety check: Pass | BSD-3-Clause | |
| Performance CheckZeroDeng01/sublinkPro | 1.7k | — | ~1.8k | Automated safety check: Pass | MIT | |
| React Best Practicesryokun6/ryos | 1.3k | — | ~2k | Automated safety check: Pass | MIT |
zly2006/zhihu-plus-plus
Review and fix Zhihu++ functional regressions caused by performance optimizations.
keybase/client
Analyzes Chrome or Electron DevTools Performance trace exports with Python scripts to find where render time actually goes, without opening DevTools.
keybase/client
Captures a clean Keybase service log and analyzes it for redundant, duplicated or looping RPCs, then checks whether a caching fix reduced the calls.
ZeroDeng01/sublinkPro
Checklist for reviewing code changes that touch queries, APIs, rendering, caching or algorithms for performance, scalability and resource-usage problems.
ryokun6/ryos
React performance optimization guidelines from Vercel Engineering (vercel-labs/agent-skills).
ben-manes/caffeine
Searches synthetic workloads for cases where Caffeine's adaptive eviction policy falls short of its achievable hit rate, then classifies each gap by cause.
secondsky/claude-skills
TanStack AI (alpha) provider-agnostic type-safe chat with streaming for OpenAI, Anthropic, Gemini, Ollama.
secondsky/claude-skills
AutoAnimate (@formkit/auto-animate) zero-config animations for React.
secondsky/claude-skills
MUI Base UI unstyled React components with Floating UI. An agent skill from secondsky/claude-skills.
secondsky/claude-skills
This skill should be used when the user asks to "upload images to Cloudflare", "implement direct creator upload", "configure image transformations", "optimize WebP/AVIF", "create image variants"…
secondsky/claude-skills
Deploy Next.js to Cloudflare Workers via the OpenNext adapter (@opennextjs/cloudflare).
secondsky/claude-skills
Cloudflare Sandboxes SDK for secure code execution in Linux containers at edge.
Works with
Cloudflare Workers performance optimization with CPU, memory, caching, bundle size. Cloudflare Workers Performance is an agent skill from secondsky/claude-skills. Cloudflare Workers performance optimization with CPU, memory, caching, bundle size.
Cloudflare Workers Performance fits situations like: encountering CPU limits; tasks that involve Caching; tasks that involve Web performance.
Run `npx skills add secondsky/claude-skills --skill cloudflare-workers-performance -a claude-code`. Or copy the skill folder (plugins/cloudflare-workers/skills/cloudflare-workers-performance in secondsky/claude-skills) into .claude/skills/cloudflare-workers-performance in your project. Claude Code loads it when a task matches its description.
Run `npx skills add secondsky/claude-skills --skill cloudflare-workers-performance -a codex`. Or copy the skill folder (plugins/cloudflare-workers/skills/cloudflare-workers-performance in secondsky/claude-skills) into .agents/skills/cloudflare-workers-performance in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add secondsky/claude-skills --skill cloudflare-workers-performance -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cloudflare-workers-performance, .gemini/skills/cloudflare-workers-performance, .github/skills/cloudflare-workers-performance and .opencode/skills/cloudflare-workers-performance in your project.
Going by SKILL.md and its folder, Cloudflare Workers Performance needs TypeScript and a shell for the scripts in its folder. Our summary lists: Node.js; A Bash shell.
SKILL.md names 1 domain. As links in the text: developers.cloudflare.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Cloudflare Workers Performance is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.6k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 12k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Cloudflare Workers Performance: Zhihu Performance Regression Review (zly2006/zhihu-plus-plus, 4.2k stars), Electron DevTools Trace Analysis (keybase/client, 9.3k stars), Keybase RPC Log Analysis (keybase/client, 9.3k stars) and Performance Check (ZeroDeng01/sublinkPro, 1.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
secondsky (a GitHub user) maintains it in secondsky/claude-skills, which has 227 GitHub stars. The repository holds 169 skills in this directory. The repository was last updated on September 28, 2026.
Source: secondsky/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.