workflows.fit
Back to exploration
EasyContributed by Community

LCP & Image Performance Optimizer

Automated Core Web Vitals audit. Analyzes LCP components, optimizes image formats, adds fetchpriority, and validates layouts.

PerformanceLCPImages
89 stars450 pulls

Workflow fit

适用场景

  • 边界清晰、可拆分成并行子任务的工程自动化工作。
  • 迁移、重构、性能优化或测试补齐这类能用构建/测试收敛的任务。
  • 希望沉淀为团队可复用 slash command,而不是一次性长提示词。

不适用场景

  • 单文件小改动、没有明确验收标准的开放式需求,或 token 成本不值得并行化的任务。
  • 需要生产凭据、客户数据、付款操作或不可回滚外部副作用的自动执行。
  • 无法用测试、引用、人工复核或对抗审查确认结果质量的任务。

Orchestration Logic

Workflow Graph Visualizer
Generating visual workflow graph...

How to Use Today

1.Run Claude Code in the app directory and ask for a workflow that audits LCP only on the pages you specify.
2.Review the planned phases and make sure browser checks, image changes, and verification steps are explicit.
3.Save the finished run from /workflows; saved workflows become slash commands such as /lcp-optimizer.

Validation method

Tests or lint

Reviewer pass

Before/after diff

Workflow Script Code

.claude/workflows/lcp-optimizer.js
// .claude/workflows/lcp-optimizer.js
import { orchestrator, agent } from 'claude';

export async function run(context) {
  // Step 1: Run lighthouse audit to find LCP elements
  const auditor = await agent.create({
    instructions: 'Analyze HTML to locate the Largest Contentful Paint element and measure current responsive sizing.'
  });
  const audit = await auditor.run();
  
  // Step 2: Implement optimizations
  const optimizer = await agent.create({
    instructions: `Optimize LCP: Set fetchpriority="high", convert target images to WebP, and add dimensions. Audit details: ${audit}`
  });
  await optimizer.run();
}

Save as Claude Code command

Claude Code currently runs workflows from the interactive session. After a run is saved from /workflows, invoke it as a slash command.

$/lcp-optimizer
There is no current `claude workflow run` CLI command.

Specifications

Cost / RiskLow cost / quick review
Concurrency MaxRuntime bounded
Verification LoopsAdversarial Checks
Platform SupportClaude Code surfaces

Tools / MCP / skills

Claude Code/workflowsJavaScript workflow runtimePerformanceLCPImages

Commercial fit

Free workflow pattern today; suitable for a paid pro bundle once examples, tests, and maintainer support are attached.

Risk level follows workflow complexity and external side effects.

Related recommendations

MCP connectorsAgent skillsPerformanceLCPImages

Review Before Running

Treat community workflows as patterns. Review the raw script, planned phases, and allowed tools before approving a run in your own project.