Agent skill
pre-push-checks
Run all required checks before pushing code. Use before committing or when validating that changes are correct.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/pre-push-checks
Metadata
Additional technical details for this skill
- author
- traceway
- version
- 1.0.0
SKILL.md
Pre-Push Checks
Use this skill to run all validation checks before pushing code. Different checks apply depending on what was changed.
Quick reference
| What changed | Command | Where |
|---|---|---|
| UI (Svelte/TS) | npm run check |
ui/ |
| Backend (Encore) | npm run typecheck |
backend/app/ |
| Rust crates | cargo check -p trace -p storage -p daemon |
repo root |
| Rust formatting | cargo fmt --check |
repo root |
| Rust linting | cargo clippy -p trace -p storage -p daemon |
repo root |
| Everything | make check |
repo root |
Full check sequence
1. UI checks (SvelteKit + Svelte 5)
cd ui && npm run check
This runs svelte-kit sync && svelte-check --tsconfig ./tsconfig.json. Catches:
- Type errors in Svelte components and TypeScript files
- Invalid Svelte 5 rune usage
- Missing imports, wrong prop types
- a11y warnings (label/select pairs, button elements)
2. Backend checks (Encore.ts)
cd backend/app && npm run typecheck
Catches:
- Type errors in API handlers, services, and types
- Invalid Drizzle queries
- Missing Encore config
3. Rust checks
# Type checking (fast)
cargo check -p trace -p storage -p daemon
# Linting (catches common mistakes)
cargo clippy -p trace -p storage -p daemon
# Formatting
cargo fmt --check
Important: Always skip memfs — it requires macFUSE which may not be installed.
To check all Rust crates except memfs:
make check-all-crates
4. Run everything
make check
This runs both cargo check and npm run check for the UI.
Common issues and fixes
Svelte: page.params.id can be undefined
// Wrong
const id = page.params.id;
// Right
const id = page.params.id ?? '';
Svelte: a11y warning on label/select
<!-- Wrong -->
<label>Pick one</label>
<select>...</select>
<!-- Right -->
<label for="picker">Pick one</label>
<select id="picker">...</select>
Svelte: filter casting for query strings
// Wrong — type error
qs(filter)
// Right
qs((filter ?? {}) as Record<string, string | undefined>)
Rust: unwrap() in production code
// Wrong
let value = map.get("key").unwrap();
// Right
let value = map.get("key").ok_or(MyError::NotFound("key"))?;
Before committing
- Run the relevant checks for your changes
- Verify no secrets are staged (
.env, credentials, API keys) - Use short imperative commit messages (no emoji, no conventional-commit prefixes)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?