Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

run-blog

/run-blog

Uruchamia lokalnego bloga i steruje nim w headless Chromium jako tymczasowy administrator, żeby sprawdzić edytor wpisów i publikację.

Licencja
GPL-3.0
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
2
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

GPL-3.0, otwarta.

Co robi i kiedy

Uruchamia lokalnego bloga i steruje nim w headless Chromium jako tymczasowy administrator, żeby sprawdzić edytor wpisów i publikację.

Oryginalny opis (EN)

Launch the local blog and drive it in headless Chromium, signed in as a throwaway Admin. Use when checking a change in the real app (the admin post editor, publishing, a public post page) or taking screenshots of it.

Jak działa

  1. 1. Dev server
  2. 2. Throwaway Admin
  3. 3. Drive the browser
  4. 4. Cleanup
Sekcje z nagłówków SKILL.md, w oryginale · 45 linii, 326 słów
Podgląd SKILL.md
---
name: run-blog
description: Launch the local blog and drive it in headless Chromium, signed in as a throwaway Admin. Use when checking a change in the real app (the admin post editor, publishing, a public post page) or taking screenshots of it.
---

# Run the blog locally

The local D1 database is often a copy of production data. Sign in only as the throwaway Admin below, and always finish with **cleanup**.

## 1. Dev server

```bash
bun run dev > <scratch>/dev.log 2>&1 &        # run in the background
timeout 120 bash -c 'until curl -sf -o /dev/null http://localhost:3000; do sleep 2; done'
```

Stop it with `lsof -ti:3000 -sTCP:LISTEN | xargs -r kill`.

If pages answer 500 or the log shows `Cannot read properties of null (reading 'useContext')` after dependencies changed, the Vite prebundle is stale: stop the server, `rm -rf node_modules/.vite`, start again.

## 2. Throwaway Admin

```bash
bun scripts/dev-admin-session.ts seed   # prints the cookie value
```

Set it as cookie `better-auth.session_token` on domain `localhost`, path `/`. `curl -b "better-auth.session_token=<value>" http://localhost:3000/api/auth/get-session` confirms it.

## 3. Drive the browser

Use `playwright-core` from a scratch directory (`bun add playwright-core` there) with the headless shell under `~/.cache/ms-playwright/chromium_headless_shell-*/chrome-headless-shell-linux64/chrome-headless-shell`; if none exists, `bunx playwright install chromium-headless-shell` in that directory. Launch with `--no-sandbox`, `locale: "zh-CN"`, add the cookie to the context, then:

- **Editor:** `/admin/posts` → button "新建文章" → wait for `/admin/posts/edit/<id>` → type into `.ProseMirror`. Type through `page.keyboard` so input rules and the slash menu fire.
- **Publish:** button "发布" on the edit page; the Post's slug is in the `posts` table.
- **Public page:** `/post/<slug>` needs no cookie.
- **Dark mode:** `page.emulateMedia({ colorScheme: "dark" })` while the theme is "system".

Look at every screenshot, and record `pageerror` events.

## 4. Cleanup

```bash
lsof -ti:3000 -sTCP:LISTEN | xargs -r kill
bun scripts/dev-admin-session.ts cleanup         # lists the Posts created since seed
bun scripts/dev-admin-session.ts cleanup --yes   # deletes them, the Admin and its session
```

Nothing records who created a Post, so the list can include Posts someone else made locally while you worked. Compare it with the Posts your own run created (note each `/admin/posts/edit/<id>` you open). If anything else is listed, spare it with `cleanup --yes --keep <id,id>` and tell the user.

Wersje

W bazie nie ma innych skilli o nazwie run-blog.

Migawka bazy z 28.10.2026 · wersja paczki 4f1250c884bf (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100run-app
    Uruchamia aplikację webową tonk bez Nix, a potem steruje nią w headless Chromium przez Playwright, żeby sprawdzić zmiany w interfejsie.
  • 100qa-screenshot
    Robi zrzut ekranu strony z podglądu wdrożenia lub lokalnego serwera w headless Chromium i wstawia go do komentarza zadania.
  • 100agent-browser
    Steruje prawdziwą przeglądarką Chromium przez CDP z CLI: weryfikuje zmiany interfejsu, robi zrzuty ekranu, odtwarza błędy frontendu i dołącza dowody do pull requestów oraz zgłoszeń.
  • 100app-browser
    Steruje aplikacją webową ConvoForm w prawdziwej przeglądarce, żeby robić zrzuty ekranu i przechodzić przepływy produktu, w tym edytor formularzy i odpowiedzi.
  • 100verify
    Weryfikuje zmiany w repozytorium w prawdziwej headless Chromium: sprawdza renderowanie strony i działanie w przeglądarce.
  • 100playwright-verify
    Weryfikuje działanie aplikacji webowej w headless Chromium z Playwright i dodaje do projektu to sprawdzenie jako make e2e, po zmianie UI lub gdy projekt nie ma jeszcze testu przeglądarkowego.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.