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
- 脚本scripts/preflight_checks.py11.7 KB
- 脚本scripts/run_tests.py11.1 KB
- 脚本scripts/subprocess_window_access.py1.6 KB
- 脚本scripts/test_preflight_checks.py6.1 KB
- 脚本scripts/test_run_tests.py8.4 KB
- 脚本scripts/test_runner_constants/__init__.py53 B
- 脚本scripts/test_runner_constants/config/__init__.py57 B
- 脚本scripts/test_runner_constants/config/constants.py3.8 KB
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.pyruns without preflight. - A pytest run in a Django project requires
db.sqlite3and a healthy Django server. The URL defaults tohttp://localhost:8000. A URL in the child arguments overrides that default. - A Playwright run checks its target server, validates a detected Django
runserverprocess uses--test-db, rejects conflicting Django servers from different worktrees, and uses the URL defaulthttp://localhost:3000. - When the project contains
frontend/, the command runsnpm run buildin that directory, thenpython manage.py collectstatic --noinputin 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.mdcovers invocation, checks, and the command boundary.scripts/run_tests.pyparses the command, runs preflight, and launches the child.scripts/preflight_checks.pyruns Django and Playwright readiness checks.scripts/subprocess_window_access.pyre-exports the hidden-window helpers from the deployed hooks directory.scripts/test_run_tests.pycovers the command and preflight.scripts/test_preflight_checks.pycovers the readiness checks.scripts/test_runner_constants/holds command names, messages, and limits.
04 同仓库更多 Skills
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'.
source-command-sr-loop
Converging cleanup loop: repeat /simplify until clean, then repeat /code-review --fix until clean
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.
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'.
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'.
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.