Skip to content

michtio/craftcms-claude-skills / skills/craft-plugins

craft-plugins

Verified

Index and router for plugin-specific Craft CMS 5 guidance — configuration, Twig API, PHP API, migrations, deployment, and pitfalls for the plugins this pack documents. Load whenever a task names a plugin this pack documents, and for passwordless or magic-link auth with no plugin named; read references/<plugin>.md first.

references/knock-knock.md

View on GitHub
# Knock Knock

Site-wide password protection by Verbb. Locks the entire front-end behind a password prompt — ideal for staging, client preview, and pre-launch sites. Simple config-file driven, no database tables.

`verbb/knock-knock` — Free

## Documentation

- Docs: https://verbb.io/craft-plugins/knock-knock/docs
- GitHub: https://github.com/verbb/knock-knock

## Common Pitfalls

- Leaving Knock Knock enabled in production — the most common mistake. Use environment-aware config to ensure it's only active on staging/preview.
- Not excluding health check or webhook URLs — external services (uptime monitors, CI/CD webhooks, n8n) get blocked by the password wall. Exclude their paths.
- Forgetting that Knock Knock uses a cookie — once authenticated, the cookie persists. If you change the password, existing authenticated sessions remain valid until the cookie expires.
- Running anything below 3.0.13 — 3.0.11 and 3.0.12 (2026-09-30 and 2026-10-04) closed eleven advisories in one go: access control on protected-URL matching, regex URL rules, access cookies, denied IPs behind an access cookie and zero-prefix CIDR rules, CSRF on password-gate lockouts, an open redirect, and settings now route through the plugin's authorized settings controller. Treat 3.0.13 as the floor on any staging site that is reachable from the internet.

## Config File

```php
// config/knock-knock.php
use craft\helpers\App;

return [
    '*' => [
        'enabled' => false,
        'password' => App::env('KNOCK_KNOCK_PASSWORD'),
        'loginPath' => 'knock-knock/who-is-there',
        'template' => '',                    // Custom template path (optional)
        'forcedRedirect' => '',              // Redirect after login (optional)

        // URLs that bypass the password wall
        'unprotectedUrls' => [
            'api/.*',                        // API endpoints
            'actions/.*',                    // Craft action URLs
            'webhooks/.*',                   // Webhook endpoints
        ],
    ],
    'staging' => [
        'enabled' => true,
    ],
    'production' => [
        'enabled' => false,
    ],
];
```

## Environment Setup

Add to `.env` on staging only:

```bash
KNOCK_KNOCK_PASSWORD=clientPreview2025
```

## Custom Login Template

Override the default login page with your own template:

```php
'template' => '_knock-knock/login',
```

Then create `templates/_knock-knock/login.twig` with your branded login form.

## Pair With

- **Blitz** — Knock Knock checks run before Blitz serves cached pages, so protected sites work correctly with static caching.
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall