michaelst/spendable / .claude/skills/record-demo-video
record-demo-video
VerifiedRecord a narrated video of a feature running in the local dev app, for a PR or a stakeholder. Drives a headless Chrome over the DevTools Protocol so clicks and keystrokes are real, captures frames, and encodes an mp4 with no extra tooling installed. Use when the user asks to "record a video", "make a demo", "show this working", or wants a screen recording of a change.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.5 KB |
| scripts/driver.mjs | script | 9.8 KB |
| scripts/encode.swift | script | 3.2 KB |
| scripts/example-scenario.mjs | script | 2.5 KB |
| scripts/record.shexecutable | script | 3.1 KB |
| scripts/session_cookie.exs | other | 1.9 KB |
| scripts/worktree_env.shexecutable | script | 1.0 KB |
scripts/session_cookie.exs
View on GitHub# Mints the signed session cookie the app would have set after a successful Google sign-in, so a
# headless browser can authenticate without an OAuth round trip and without anyone typing a
# password. Run with: mix run session_cookie.exs [user id or external_id]
#
# Prints:
# SESSION_COOKIE <cookie name> <cookie value>
# SESSION_USER <user id>
import Ecto.Query
alias Plug.Session.COOKIE
alias Spendable.Accounts.Schemas.User
# Read the cookie name and salt out of the endpoint rather than duplicating them here, so this
# script cannot quietly drift out of sync with the app it is signing in to.
endpoint_source = File.read!("lib/spendable_web/endpoint.ex")
extract = fn option ->
case Regex.run(~r/#{option}:\s*"([^"]+)"/, endpoint_source) do
[_match, value] -> value
nil -> raise "could not find #{option} in lib/spendable_web/endpoint.ex"
end
end
key = extract.("key")
signing_salt = extract.("signing_salt")
secret_key_base =
:spendable
|> Application.fetch_env!(SpendableWeb.Endpoint)
|> Keyword.fetch!(:secret_key_base)
# The dev database has no fixed admin, and users carry no email - they are whoever has signed in
# with Google on this machine. Take the one named, or the oldest one there is.
user =
case System.argv() do
[identifier | _rest] ->
Spendable.Repo.one(
from user in User, where: user.id == ^identifier or user.external_id == ^identifier
) || raise "no user with id or external_id #{identifier}"
[] ->
Spendable.Repo.one(from user in User, order_by: [asc: user.inserted_at], limit: 1) ||
raise "the dev database has no users - sign in through Google once at http://localhost:4000"
end
cookie =
COOKIE.put(
%Plug.Conn{secret_key_base: secret_key_base},
nil,
%{"current_user_id" => user.id},
COOKIE.init(signing_salt: signing_salt, log: false)
)
IO.puts("SESSION_COOKIE #{key} #{cookie}")
IO.puts("SESSION_USER #{user.id}")
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |