run-pre-push-checks
БесплатноБез исполняемых скриптовНе проверенRun the pre-push checks: the nightly toolchain checks and the full stable test suite. Use when about to push, or when the pre-push hook fails.
от torrust★ 539 звёзд на GitHubОб этом скилле
Run Pre-push Checks
Git Hook (Recommended Setup)
The repository ships a pre-push Git hook that runs ./contrib/dev-tools/git/hooks/pre-push.sh
automatically on every git push. Install it once after cloning:
./contrib/dev-tools/git/install-git-hooks.sh
After installation the hook fires automatically; you do not need to invoke the script manually before each push.
For AI agents: before invoking the script manually, check whether the hook is installed:
./contrib/dev-tools/git/check-git-hooks.shIf installed, skip the manual run —
git pushwill trigger it automatically. Running both would execute every check twice.
Automated Checks
⏱️ Expected runtime: ~5 minutes on a modern developer machine with warm caches. AI agents should set a command timeout of at least 15 minutes before invoking
./contrib/dev-tools/git/hooks/pre-push.sh.For AI agents —
git pushis a long-running command: When the pre-push hook is installed,git pushruns the full check suite (~5 minutes) before sending objects to the remote. Do not poll, retry, or issue a secondgit pushwhile the first is still running. Wait for the IDE terminal-completion notification (exit code + output) before taking any follow-up action.Use a generous timeout for
git pushitself (at least 20 minutes), because cold-cache runs can be significantly slower than warm-cache runs. Quiet output during tests is normal; do not cancel early unless there is concrete failure output.To avoid parsing shared terminal history (which other commands or the user may have populated), redirect the output to a dedicated file and read that file for results:
git push <remote> <branch> > .tmp/push-output.txt 2>&1; echo "Exit: $?" >> .tmp/push-output.txtThe
.tmp/directory is git-ignored. Clean stale files periodically.
Run the pre-push script. It must exit with code 0 before every push.
For AI agents: set TORRUST_GIT_HOOKS_LOG_DIR=.tmp so per-step log files are
written inside the workspace (git-ignored) instead of /tmp (outside workspace,
requiring permission prompts):
TORRUST_GIT_HOOKS_LOG_DIR=.tmp ./contrib/dev-tools/git/hooks/pre-push.sh
Restricted Agent Sandboxes
If the restricted sandbox also removes Cargo from the hook PATH, use:
PATH="$HOME/.cargo/bin:$PATH" \
TORRUST_GIT_HOOKS_LOG_DIR=.tmp \
./contrib/dev-tools/git/hooks/pre-push.sh
This is an agent-environment workaround. It keeps logs in the git-ignored
workspace .tmp/ directory and restores Cargo for hook subprocesses; it does
not alter the checks that the hook runs.
The script runs these steps in order:
cargo +nightly fmt --check- nightly format checkcargo +nightly check ...- nightly workspace checkcargo +nightly doc --no-deps --bins --examples ...- nightly documentation build for binaries and examplescargo +nightly doc --no-deps --lib ...- nightly documentation build for libraries (a separate run avoids output filename collisions between a crate's lib and bin targets)cargo +stable package --workspace --no-verify --allow-dirty- checks that every workspace crate can be packaged for crates.io (needs the crates.io index;--allow-dirtychecks the working tree, as the other steps do, while CI checks the commits)cargo +stable test --tests --benches --examples --workspace --all-targets --all-features- all tests
Steps already covered by pre-commit (machete, linters, doc tests) are intentionally omitted — they always run before each commit. E2E tests are excluded because they are slow and run in CI, which is the merge authority.
Output Modes
The pre-push script supports concise human output, verbose human output, and JSON output for automation.
# Default: text + concise
./contrib/dev-tools/git/hooks/pre-push.sh
# Explicit text + concise
./contrib/dev-tools/git/hooks/pre-push.sh --format=text --verbosity=concise
# Text + verbose streaming command output
./contrib/dev-tools/git/hooks/pre-push.sh --format=text --verbosity=verbose
# Compatibility alias
./contrib/dev-tools/git/hooks/pre-push.sh --format=text --verbose
# Structured output (single JSON document to stdout)
./contrib/dev-tools/git/hooks/pre-push.sh --format=json
Flag behavior:
--format=<text|json>defaults totext--verbosity=<concise|verbose>defaults toconcise--verboseis an alias for--verbosity=verbose- Duplicate
--format/--verbosityflags: last value wins - Invalid values or unknown flags exit with code
2and print usage guidance to stderr - In
--format=json, structured output remains JSON regardless of verbosity value - Per-step logs are written to
TORRUST_GIT_HOOKS_LOG_DIR(default:/tmp)
For restricted agent environments that cannot write outside the workspace, run with:
TORRUST_GIT_HOOKS_LOG_DIR=.tmp ./contrib/dev-tools/git/hooks/pre-push.sh
T
Установить run-pre-push-checks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл run-pre-push-checks?
Run the pre-push checks: the nightly toolchain checks and the full stable test suite. Use when about to push, or when the pre-push hook fails.
Как установить скилл run-pre-push-checks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл run-pre-push-checks запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic