AGENT SKILL

test-runner

Run pytest or Playwright through the repository's test command. Checks Django and Playwright readiness before launching the selected child process. Use when running tests in a repository with local Django or frontend services.

License 许可
MIT
最近更新
2026-11-15
Stars
★ 7
Forks
1

01 前言 Front Matter

name
test-runner
description
Run pytest or Playwright through the repository's test command. Checks Django and Playwright readiness before launching the selected child process. Use when running tests in a repository with local Django or frontend services.

02 资源文件 8

03 SKILL.md 正文

test-runner

Run Django and Playwright readiness checks, then launch the selected test command. Pass one supported runner after --. The command forwards those arguments without a shell.

Command

Run from the repository that owns the tests:

python "${CLAUDE_SKILL_DIR}/scripts/run_tests.py" -- python -m pytest <pytest-arguments>
python "${CLAUDE_SKILL_DIR}/scripts/run_tests.py" -- npx playwright test <playwright-arguments>

Use --project <path> when the test repository is not the current directory:

python "${CLAUDE_SKILL_DIR}/scripts/run_tests.py" --project "<repository>" -- python -m pytest <pytest-arguments>

The supported runner forms are pytest, python -m pytest, playwright test, and npx playwright test. The child receives the exact arguments after --, inherits the current environment, writes to the current output streams, runs with the selected project as its working directory, and returns its exit status.

Preflight

The command returns nonzero and launches no child when a required check fails.

  • A pytest run in a project without manage.py runs without preflight.
  • A pytest run in a Django project requires db.sqlite3 and a healthy Django server. The URL defaults to http://localhost:8000. A URL in the child arguments overrides that default.
  • A Playwright run checks its target server, validates a detected Django runserver process uses --test-db, rejects conflicting Django servers from different worktrees, and uses the URL default http://localhost:3000.
  • When the project contains frontend/, the command runs npm run build in that directory, then python manage.py collectstatic --noinput in the project directory before Playwright starts.

The command does not parse shell syntax. Keep pipes, redirects, cd, and background operators outside this command. Run this command directly so its exit status reaches the caller.

Unsupported commands

Use the normal runner for anything else. This command accepts only the four runner forms listed above. It does not install dependencies, start a server, run migrations, or repair a failed preflight.

Files

  • SKILL.md covers invocation, checks, and the command boundary.
  • scripts/run_tests.py parses the command, runs preflight, and launches the child.
  • scripts/preflight_checks.py runs Django and Playwright readiness checks.
  • scripts/subprocess_window_access.py re-exports the hidden-window helpers from the deployed hooks directory.
  • scripts/test_run_tests.py covers the command and preflight.
  • scripts/test_preflight_checks.py covers the readiness checks.
  • scripts/test_runner_constants/ holds command names, messages, and limits.

04 同仓库更多 Skills

jl-cmd-projects
jl-cmd-projects/claude-dev-env

update

Fast-forwards a local repository's main branch to a remote's main after confirming the repo path and source remote through AskUserQuestion. Use when the user says '/update', 'update main', 'fast-forward main', 'sync main from origin', 'pull latest main into <path>', or 'bring main up to date'.

★ 7
jl-cmd-projects
jl-cmd-projects/claude-dev-env

source-command-sr-loop

Converging cleanup loop: repeat /simplify until clean, then repeat /code-review --fix until clean

★ 7
jl-cmd-projects
jl-cmd-projects/claude-dev-env

skill-builder

Skill lifecycle: classify, scaffold, write via the skill-writer-agent, self-audit, compose sub-skills, polish description triggers, enforce deterministic scripts. Triggers: build a skill, new skill workflow, improve this skill, optimize skill description, skill development lifecycle, skill modularity, skill composition, description trigger catalog, deterministic skill scripts.

★ 7
jl-cmd-projects
jl-cmd-projects/claude-dev-env

session-tidy

Audit, clean, and consolidate session logs in the Obsidian vault. Fixes format drift, resolves orphaned next-steps, updates stale statuses, and generates project rollup summaries. Use when session logs feel cluttered or before starting a new project milestone. Triggers on '/session-tidy', 'tidy sessions', 'clean up session logs', 'session audit'.

★ 7
jl-cmd-projects
jl-cmd-projects/claude-dev-env

session-log

Logs a session report as an HTML page, tracks vault context, extracts decisions, and outputs a /rename command. Use for /session-log, 'journal this session', 'log this work', 'session report', 'summarize/log/record this session', 'save session', 'capture session', or 'document what we did'.

★ 7
jl-cmd-projects
jl-cmd-projects/claude-dev-env

run-claude-dev-env

Build, install, run, and test the claude-dev-env installer. Use when asked to run claude-dev-env, install the Claude Code config into ~/.claude, drive the installer, smoke-test it against a sandbox, or run its test suite.

★ 7