PHPackages                             inforob-sf/pagespeed-toolkit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. inforob-sf/pagespeed-toolkit

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

inforob-sf/pagespeed-toolkit
============================

Google PageSpeed Insights audit and AI-powered fix toolkit for Symfony projects

v0.1.0(2mo ago)11MITPHPPHP &gt;=8.2CI passing

Since May 19Pushed 2mo agoCompare

[ Source](https://github.com/inforob-sf/pagespeed-toolkit)[ Packagist](https://packagist.org/packages/inforob-sf/pagespeed-toolkit)[ Docs](https://github.com/inforob/claude-pagespeed-toolkit)[ RSS](/packages/inforob-sf-pagespeed-toolkit/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

inforob-sf/pagespeed-toolkit
============================

[](#inforob-sfpagespeed-toolkit)

[![Tests](https://github.com/inforob-sf/pagespeed-toolkit/actions/workflows/tests.yml/badge.svg)](https://github.com/inforob-sf/pagespeed-toolkit/actions/workflows/tests.yml)[![codecov](https://camo.githubusercontent.com/77c57040562251ff3b4f5dbb71aedc56ddd06f459efa2543a2993239a06e6acb/68747470733a2f2f636f6465636f762e696f2f67682f696e666f726f622d73662f7061676573706565642d746f6f6c6b69742f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/inforob-sf/pagespeed-toolkit)[![PHP](https://camo.githubusercontent.com/187240af044d09d5b14a1d9d9ebdf3f7a993e4c7bc09bdb46b4ba661a891bf5b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d626c7565)](https://www.php.net)[![Symfony](https://camo.githubusercontent.com/1ace2876923a63793ae73164ec310437fbd41960ac029dda43ac84ccc72ce428/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d362e34253230253743253230372e78253230253743253230382e782d626c61636b)](https://symfony.com)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](LICENSE)

A Composer-installable Symfony Bundle + Claude Code toolkit for achieving 90-100 PageSpeed scores.

It combines a **Symfony Bundle** with a console command that generates audit reports, an **AI agent** that analyzes your project and recommends optimizations, and a **slash command** that reads audit reports and applies fixes interactively.

Symfony Installation
--------------------

[](#symfony-installation)

```
composer require inforob-sf/pagespeed-toolkit
```

That's it. The package automatically:

- Registers `PageSpeedBundle` in `config/bundles.php`
- Creates `config/packages/pagespeed.yaml` with default configuration
- Adds `PAGESPEED_API_KEY` and `SITE_URL` placeholders to `.env`
- Copies `/pagespeed-fix` and the `pagespeed-optimizer` agent into `.claude/`

The only manual step: fill in your API key in `.env.local`:

```
PAGESPEED_API_KEY=your_google_api_key_here
SITE_URL=https://your-site.com
```

---

How it works
------------

[](#how-it-works)

```
┌─────────────────────────────────────────────────────────────────┐
│  1. AUDIT                                                       │
│  Run an audit command → generates pagespeed-report.json         │
│     • Symfony:  php bin/console pagespeed:audit                 │
│     • Any stack: ./integrations/shell/pagespeed-audit.sh  │
├─────────────────────────────────────────────────────────────────┤
│  2. FIX  (Claude Code)                                          │
│  /pagespeed-fix → Claude reads the report, shows failing        │
│  audits, and applies fixes one by one with your confirmation    │
├─────────────────────────────────────────────────────────────────┤
│  3. REVIEW  (Claude Code)                                       │
│  pagespeed-optimizer agent → deep analysis of NGINX config,     │
│  Core Web Vitals, and framework-specific optimizations          │
└─────────────────────────────────────────────────────────────────┘

```

---

Installation
------------

[](#installation)

### 1. Copy the Claude Code files into your project

[](#1-copy-the-claude-code-files-into-your-project)

```
# From the root of your project
cp -r /path/to/claude-pagespeed-toolkit/.claude .
```

Or copy manually:

- `.claude/agents/pagespeed-optimizer.md` → your project's `.claude/agents/`
- `.claude/commands/pagespeed-fix.md` → your project's `.claude/commands/`

### 2. Set up the audit integration for your framework

[](#2-set-up-the-audit-integration-for-your-framework)

FrameworkInstructions**Symfony**See [integrations/symfony/README.md](integrations/symfony/README.md)**Any stack**See [integrations/shell/README.md](#shell-script-universal)LaravelComing soonNext.jsComing soonWordPressComing soon### 3. Get a Google PageSpeed API key

[](#3-get-a-google-pagespeed-api-key)

1. Go to [Google Cloud Console](https://console.cloud.google.com/)
2. Enable the **PageSpeed Insights API**
3. Create an API key
4. Add it to your environment: `PAGESPEED_API_KEY=your_key_here`

The free tier allows ~25,000 requests/day — more than enough for local development.

---

Shell Script (Universal)
------------------------

[](#shell-script-universal)

Works with any framework. Requires `curl` and `jq`.

```
chmod +x integrations/shell/pagespeed-audit.sh

# Basic usage
PAGESPEED_API_KEY=your_key ./integrations/shell/pagespeed-audit.sh https://your-site.com

# Audit specific pages
PAGESPEED_API_KEY=your_key ./integrations/shell/pagespeed-audit.sh https://your-site.com \
  --urls /,/blog,/about \
  --strategy both \
  --output pagespeed-report.json
```

---

Usage
-----

[](#usage)

### `/pagespeed-fix` — Interactive fixer

[](#pagespeed-fix--interactive-fixer)

Open Claude Code in your project and run:

```
/pagespeed-fix

```

Claude will:

1. Detect your framework automatically
2. Locate or generate the audit report
3. Show failing audits grouped by category and impact
4. Ask which ones you want to fix
5. Apply each fix with minimum-necessary changes, reading the file first
6. Show a summary of changes and manual action items

### `pagespeed-optimizer` agent — Deep analysis

[](#pagespeed-optimizer-agent--deep-analysis)

Ask Claude to launch the optimizer agent for a comprehensive review:

> "Can you check if my project is optimized for PageSpeed?"

The agent will:

- Detect your stack and existing configurations
- Audit NGINX config, frontend assets, and Core Web Vitals
- Deliver copy-paste-ready fixes with before/after score estimates

---

Supported frameworks
--------------------

[](#supported-frameworks)

FrameworkAudit commandFix coverageSymfony + Twig`php bin/console pagespeed:audit`Full (Twig templates, NGINX, CSS)Any stack`pagespeed-audit.sh`Full (NGINX, HTML, CSS, JS)Laravel + BladeComing soon—Next.jsComing soon—WordPressComing soon—---

Contributing
------------

[](#contributing)

Contributions are welcome. The most valuable additions are:

1. **New framework integrations** — add a folder under `integrations/` with the audit command and a README
2. **Fix guide entries** — extend the fix table in `.claude/commands/pagespeed-fix.md` with framework-specific fixes
3. **Agent improvements** — refine the optimizer agent's detection or output format

See [docs/contributing.md](docs/contributing.md) for details.

---

License
-------

[](#license)

MIT

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance87

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

66d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/50e6581f5ede9332a8c41b3b696f0bf04bfcdc56056a8dd2955a6572003b7364?d=identicon)[robertomanchado](/maintainers/robertomanchado)

---

Top Contributors

[![inforob](https://avatars.githubusercontent.com/u/5032387?v=4)](https://github.com/inforob "inforob (7 commits)")

---

Tags

symfonyperformanceseolighthousePageSpeedcore-web-vitals

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/inforob-sf-pagespeed-toolkit/health.svg)

```
[![Health](https://phpackages.com/badges/inforob-sf-pagespeed-toolkit/health.svg)](https://phpackages.com/packages/inforob-sf-pagespeed-toolkit)
```

###  Alternatives

[oro/platform

Business Application Platform (BAP)

645143.5k116](/packages/oro-platform)[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
