Command Palette

Search for a command to run...

Назад к скиллам
скилл № 85228

validate-changes

Choose and run the prek checks that cover a change, from formatters and focused tests during iteration to the final validation rung before handoff, and…

БесплатноБез исполняемых скриптов
agentty-xyzот agentty-xyz★ 46 звёзд на GitHub

Установить validate-changes в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Validate Changes

Use this skill for every change: while iterating, before handoff, and when a CI hook fails. Root AGENTS.md decides which gates are required; this skill says how to run them. Invoke each check's definition through prek; do not copy hook implementations into ad hoc commands.

Iterate

  1. Run the relevant formatter or fixer on touched paths and inspect its diff. Run mutating fixers one at a time. A fixer that rewrites files reports Failed; that is its result, not an error, so review the diff instead of rerunning it. rustfmt-fix needs no --files list: it formats Rust files changed since the fork from origin/main, or the whole workspace when formatter configuration or the toolchain changes.

  2. Catch compile errors with prek run cargo-check --hook-stage manual --files <changed paths>. It compile-checks the packages clippy would select for those paths, without linting.

  3. Run focused tests for the changed behavior with test-focused and an explicit AGENTTY_TEST_FILTER:

    AGENTTY_TEST_PACKAGES='ag-git' \
      AGENTTY_TEST_FILTER='package(=ag-git) and test(worktree)' \
      prek run test-focused --all-files --hook-stage manual
    

    For a focused PTY scenario, use the command in skills/write-feature-tests/SKILL.md, not the full E2E hook.

Choose the Final Rung

Before handoff (the task's final state, not each reply in a multi-turn session), choose one validation rung covering every touched file and all affected dependents:

Impact Required final checks
Markdown mdformat and default hooks for touched paths
Docs site Markdown checks plus zola-check; format touched templates with djlint-reformat
Rust rustfmt-fix, clippy, ast-grep, and unrestricted test-focused for changed packages and dependents
Rustdoc or crate README examples Add test-doc, since nextest runs no doctests
Manifests, migrations, hook catalog Add their dedicated checks from .pre-commit-config.yaml
ag-harness or ag-router API Add public-api
ast-grep rules (lint/) ast-grep, ast-grep-test, and check-standards

Final Rust selection must retain public-contract integration tests; source-only hooks do not replace them. Remove test-name restrictions for affected packages, or use test-workspace. For cross-cutting changes, run prek run --all-files plus affected package tests after touched paths pass formatting and focused tests.

The validate coordinator selects changed packages and their dependents and runs clippy and unrestricted test-focused for them:

prek run validate --all-files --hook-stage manual

Read skills/validate-changes/references/coordinated-validation.md before overriding its selection, comparing against another base, or reusing earlier results.

Select Affected-Package Tests by Hand

For final affected-package validation without the coordinator, drop the test-name restriction and select the changed package with its dependents: rdeps(=ag-git) selects ag-git and every package that depends on it. Dependencies are compiled but not retested, because their sources did not change. Combine selections with or when several packages change:

AGENTTY_TEST_FILTER='rdeps(=ag-git)' \
  prek run test-focused --all-files --hook-stage manual

AGENTTY_TEST_PACKAGES optionally limits compilation to a whitespace-separated list of Cargo package names; without it, the hook builds the workspace. Cargo still builds dependencies the selected packages require. An execution filter does not select compilation packages, so for final validation either list every changed package and dependent, or omit the build limit and use the rdeps filter.

test-focused requires a nonempty filter and fails when no tests match. It and test-workspace retain public integration tests. Only the Agentty PTY suites are left out: their test = false manifest entries reserve them for the separate test-agentty-e2e gate, so other runs do not compile them.

test-focused uses the local nextest profile, which inherits CI's resource groups, timeouts, and retry policy but stops scheduling tests after the first failure and waits for running tests to finish. CI hooks keep the exhaustive ci profile, so one fail

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/coordinated-validation.md
  • references/coverage.md
  • references/hook-maintenance.md
  • references/test-timings.md

FAQ

Что делает скилл validate-changes?

Choose and run the prek checks that cover a change, from formatters and focused tests during iteration to the final validation rung before handoff, and diagnose failing or long-running checks.

Как установить скилл validate-changes?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл validate-changes запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить validate-changes с