Agent skill

Alego Pre Push Checks

by singula-ai in singula-ai/alego

Use before pushing, force-pushing, marking ready for review, or claiming checks pass on an alego branch, and immediately after gh stack sync publishes rewritten branches, to select the smallest…

MITAuto-check passed

Install Alego Pre Push Checks

skills CLI
$ npx skills add singula-ai/alego --skill alego-pre-push-checks -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install singula-ai/alego alego-pre-push-checks --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/singula-ai/alego.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/alego-pre-push-checks .claude/skills/alego-pre-push-checks && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
alego-pre-push-checks
GitHub stars
109
Token cost
~2.7k tokens
SKILL.md length
1,401 words
Files
1
Skills in repo
20
Repo updated
First seen
Licence
MIT

At a glance

Use before pushing, force-pushing, marking ready for review, or claiming checks pass on an alego branch, and immediately after gh stack sync publishes rewritten branches, to select the smallest…

  • Works in 2 steps: Confirm the checkout and branch. → Verify the live PR base or stack parent,…
  • SKILL.md covers Inspect the outgoing change, Select relevant evidence, Full local rehearsal and Protect history-rewriting pushes, plus 2 more sections
  • Calls pnpm, gh and git

What it does

Alego Pre Push Checks is an agent skill from singula-ai/alego. Use before pushing, force-pushing, marking ready for review, or claiming checks pass on an alego branch, and immediately after gh stack sync publishes rewritten branches, to select the smallest tests and checks that cover the outgoing or just-published diff without reflexively running the full repository suite.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Build AI Agents like playing LEGOs. Everything is a Plugin. The licence is MIT.

Example prompts

  • “/alego-pre-push-checks”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Confirm the checkout and branch.
  2. Verify the live PR base or stack parent, fetch that ref, and inspect the complete scope against it.

What it can do on your machine

Read from SKILL.md and the folder at commit a79fe9a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm
    • gh
    • git
    • vitest

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, gh and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Alego Pre Push Checks loads about 2.7k tokens when it runs. Until then it costs about 84 tokens; SKILL.md has 1,401 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~84
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from singula-ai/alego at commit a79fe9a, republished under its MIT licence (© singula-ai). 1,401 words, ~2,740 tokens.

Download SKILL.mdSave it as .claude/skills/alego-pre-push-checks/SKILL.md (or your agent's skills folder).
name
alego-pre-push-checks
description
Use before pushing, force-pushing, marking ready for review, or claiming checks pass on an alego branch, and immediately after gh stack sync publishes rewritten branches, to select the smallest tests and checks that cover the outgoing or just-published diff without reflexively running the full repository suite.

ALEGO Pre-Push Checks

Use this skill to run relevant local evidence once before an alego push. The sole ordering exception is gh stack sync, which may publish a cascading rebase before the rewritten layers can be validated; validate them immediately afterward and do not merge until the evidence passes. Git hooks are intentionally narrow: pre-commit fixes staged lint, checks staged whitespace, and guards vendored-source metadata; pre-push runs only the incremental repository typecheck. CI owns exhaustive coverage and the platform matrix.

Inspect the outgoing change

  1. Confirm the checkout and branch.
sh
git status --short --branch
git rev-parse --show-toplevel
  1. Verify the live PR base or stack parent, fetch that ref, and inspect the complete scope against it.
sh
pnpm --silent run change-scope --base <verified-base-ref>

The command never guesses or fetches a base. Supply the ref verified from current remote or stack state; use --head <ref> when inspecting a commit other than HEAD. Its versioned JSON records committed paths relative to the resolved merge base, while staged, unstaged, and untracked paths describe the current worktree. After merging a changed base, rerun the report, reassess which behavior the combined scope can affect, and rerun only checks invalidated by the merge.

Select relevant evidence

There is no universal local baseline beyond the hooks. Every behavior change needs the narrowest available test or purpose-built check that would fail for its regression; add broader checks only for surfaces the diff actually reaches.

When the outgoing change adds or changes a resource-owning or asynchronous test, fixture, helper, or CI execution path, use alego-ci-test-reliability first to decide whether restoration, negative-control, quiescent-teardown, or concurrent-process evidence applies. This skill still selects the commands and avoids repeating evidence that already passed.

  • Package or script behavior: run the owning Vitest file or focused test name. Add adjacent package tests when a shared contract changes; leave repository-wide coverage to CI unless the change is genuinely cross-cutting or the user requests it.
  • Remote mock typing: unbuilt any is an explicit local fallback, not strict evidence. Run pnpm run typecheck before handing off Remote/mock changes; rebuild missing, stale, or partial generated declarations before diagnosing remaining errors. Keep the exception in the test proxy, never in production Remote types, ambient flags, or copied signatures.
  • Documentation, Agent Notes, catalogs, or doc-linked comments: run pnpm run doc-sync; run full lint when the documentation workflow requires it.
  • Model-, editor-, CLI-, or terminal-visible output: run the focused keyless snapshot or real runnable-example scenario that owns the output.
  • Expected-output placement: a test whose selected recorded Session generation is replay input and expected persisted output belongs under top-level snapshots/, with snapshot.yml naming its shipped alego profile and composition/header pin. Canonical parent files are session[.vN].jsonl, children are session.<ordinal>[.vN].jsonl, and the harness selects the highest generation per role. ARIA, geometry, generator, CLI, and unit expectations without that Session round trip stay beside their owning test under tests/expected/; do not place them in snapshots/ or give them a *.snapshot.ts owner. Use the owning test:expected, test:web, or test lane.
  • Profile and configuration placement: cross-package behavior of a shipped alego profile belongs under apps/cli/tests/profiles/; a package-specific Loader composition belongs under that package's tests/fixtures/. User-facing optional overlays live under apps/cli/config/examples/ and pair with a guide under docs/user/.
  • Package manifests, public exports, build configuration, worker/bin entries, or built runtime paths: run pnpm run build, the relevant hygiene checks, and the owning built-artifact smoke.
  • Real provider or agent behavior: run the relevant pnpm run test:e2e target when credentials are available; never print secrets.

Do not manually repeat a passing check merely because commit or push follows. In particular, do not run typecheck immediately before pushing solely to duplicate the pre-push hook.

Pass Vitest file and name filters directly after the script name with pnpm run; do not insert a standalone --, which reaches Vitest and can disable -t filtering. For example, this command runs one headless snapshot scenario:

sh
pnpm run test:snapshot snapshots/session/headless.snapshot.ts -t 'cordis-inspect-jsdoc'

This applies to these pnpm scripts; npm and other launchers retain their own argument-forwarding syntax. Check the reported selected test count before treating a filtered run as focused evidence.

Focus unit coverage on the affected source

Test selection and coverage selection are separate. A Vitest file filter chooses which tests run, while the repository configuration otherwise measures every packages/*/*/src/**/*.ts file. When unit coverage is relevant, name both the owning tests and the source files or package whose coverage those tests must prove:

sh
pnpm exec vitest run packages/<group>/<package>/tests/<behavior>.spec.ts \
  --coverage \
  --coverage.include='packages/<group>/<package>/src/**/*.ts'

Use an exact source file when the behavior is truly confined to one module. Repeat --coverage.include for multiple affected files or packages, and pass every owning test file needed to exercise that scope. The configured per-file 100% thresholds still apply inside the selected source scope.

When the owning tests are unclear, use Vitest's dependency graph to discover a candidate set, then inspect the selected tests before treating the run as evidence:

sh
pnpm exec vitest related packages/<group>/<package>/src/<changed>.ts \
  --run \
  --coverage \
  --coverage.include='packages/<group>/<package>/src/<changed>.ts'

vitest related cannot discover behavior reached only through configuration, dynamic loading, subprocesses, workers, built artifacts, or external providers; select those owning tests explicitly. Do not use --passWithNoTests, lower coverage thresholds, or narrow --coverage.include merely to hide an uncovered affected file. If a selected package scope fails because one focused test does not cover it, add its other relevant owning tests or narrow the source scope only when the excluded modules cannot be affected by the change.

Show full SKILL.md (549 more words)Show less

Full local rehearsal

Run the complete local approximation only when the user explicitly requests it, while diagnosing a CI failure, or when the change spans the repository so broadly that no narrower set is credible. Use the current workflow and package scripts as the inventory; do not recreate the removed check:pre-push aggregate.

Protect history-rewriting pushes

Rebase is allowed for standalone and stacked PR branches, including after review. Before a standalone history rewrite, fetch the current remote branch and record its exact OID; publish with --force-with-lease=<branch>:<observed-oid> so a concurrent update aborts the push. gh stack push and gh stack sync supply lease protection for their managed branches. Raw --force is never allowed.

After any rewritten push, fetch the live heads again and re-audit unresolved review threads, approvals, mergeability, and checks. Commit hashes and inline-comment anchors from before the rewrite are not current evidence.

Post-sync validation

gh stack sync fetches, cascade-rebases, and pushes as one operation, so it cannot place local validation between rewrite and publication. Before running it, require a clean worktree and record the official stack order and exact remote heads. After it returns:

  1. Re-query every branch head and the official GitHub stack order.
  2. Inspect the changed scope of every rewritten layer against its live PR base.
  3. Run the relevant evidence selected by this skill for each affected layer.
  4. Keep every PR unmerged and report validation as pending until all selected checks pass.

If post-sync evidence fails, leave the lease-protected published heads in place, repair the failure, validate the repair, and publish the correction. Do not claim the sync made the stack ready merely because the command succeeded.

Handle failures

If a relevant check fails before an ordinary push, stop and fix or explain the blocker. Do not push and hope CI differs. For the post-sync exception, block the merge and follow the repair procedure above.

If a failure looks environment-specific, prove it:

  • Record the exact command, failing test, and platform-specific mismatch.
  • Confirm the relevant non-platform evidence.
  • Prefer fixing cross-platform nondeterminism when the check is required.
  • Bypass a local hook only when the user explicitly asks or agrees, and report exactly what failed and why CI is expected to differ.

Push procedure

For ordinary and standalone rebase pushes:

  1. Run the selected relevant checks once.
  2. Commit normally and inspect any files changed by the pre-commit fixer before continuing.
  3. Push normally, or use the exact lease for an authorized rewritten branch, so the incremental typecheck hook runs.
  4. Verify the remote ref matches local HEAD.
sh
git rev-parse HEAD origin/$(git branch --show-current)

For GitHub PRs, inspect remote CI after the push:

sh
gh pr checks

Report pending checks as pending. Inspect failures before attributing them to the branch or the environment.

When gh pr checks reports "no checks reported" and /actions/runs?head_sha=<sha> returns total_count: 0, read mergeability before suspecting the push or a dropped GitHub event:

sh
gh pr view <number> --json mergeable,mergeStateStatus

GitHub creates no pull_request workflow runs while a PR is CONFLICTING/DIRTY, so the absent signal is the conflict, not infrastructure. Resolving the conflict is the only fix; empty commits, --allow-empty pushes, draft/ready toggles, and revert-and-restore bounces all leave total_count at zero and add junk history. Confirm the conflicting paths with git merge-tree --write-tree HEAD origin/<base> when the branch cannot be merged locally yet.

For gh stack sync, use the post-sync validation sequence instead of pretending the ordinary order was possible.

© singula-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/alego-pre-push-checks of singula-ai/alego.

Open the folder on GitHubat commit a79fe9a

Compare with similar skills

Alego Pre Push Checks next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Alego Pre Push Checks compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Alego Pre Push Checks this skillsingula-ai/alego109—~2.7kAutomated safety check: PassMIT
Claimsruvnet/ruflo74k2 repos~1.1kAutomated safety check: PassMIT
Safe PushJetBrains/intellij-community21k—~1.1kAutomated safety check: PassCustom licence
Pushkaranhudia/borg-ui1.7k—~1.2kAutomated safety check: PassAGPL-3.0
Git Pushingsickn33/agentic-awesome-skills47k1 repos~927Automated safety check: PassMIT
Pushballred/obsidian-claude-pkm1.9k1 repos~745Automated safety check: NotesMIT

Similar skills

  • Claims

    ruvnet/ruflo

    Claims-based authorization for agents and operations. An agent skill from ruvnet/ruflo.

    74k GitHub starsUsed in 2 repos~1.1k tokens
    Backend & APIsAuto-check passed
  • Safe Push

    JetBrains/intellij-community

    Official

    Push IntelliJ repository changes through the Safe Push workflow.

    21k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Push

    karanhudia/borg-ui

    Push current branch changes to origin and create or update the corresponding pull request; use when asked to push, publish updates, or create pull request.

    1.7k GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Git Pushing

    sickn33/agentic-awesome-skills

    Safely stage, commit, and push intended git changes with conventional commit messages.

    47k GitHub starsUsed in 1 repo~927 tokens
    DevelopmentAuto-check passed
  • Push

    ballred/obsidian-claude-pkm

    Commit and push vault changes to Git with smart commit messages.

    1.9k GitHub starsUsed in 1 repo~745 tokens
    DevelopmentAuto-check: notes
  • Git Pushing

    davila7/claude-code-templates

    Stage, commit, and push git changes with conventional commit messages.

    33k GitHub starsUsed in 6 repos~272 tokens
    DevelopmentAuto-check passed

More from singula-ai/alego

All 20 skills in this repo
  • Record Browser Gif

    singula-ai/alego

    Record browser or Web UI interaction demos as optimized GIFs using the available browser-control workflow, optional Playwright Videos for higher capture frame rates, and deterministic encoding, then…

    109 GitHub starsUsed in 1 repo~4.1k tokens
    Auto-check: notes
  • A skill your agent uses when adding, auditing, pruning, archiving, restoring, or reviewing Agent Notes in alego; checks every new note for superseded active records, deletes small UI and purely…

    109 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • A skill your agent uses when landing a stack of dependent GitHub PRs (A ← B ← C, where each bases on the one below) onto master, merging a PR whose base is another open PR's branch, or whenever a…

    109 GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • A skill your agent uses when creating, changing, or validating an agent preset or other Cordis composition for this harness, including deciding host versus preset placement and checking that an…

    109 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • Office DOCX

    singula-ai/alego

    Create, read, edit, and check Word documents (.docx), including reports, letters, and formatted tables.

    109 GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Office PPTX

    singula-ai/alego

    Create, read, edit, and check PowerPoint presentations (.pptx), including slide text, tables, images, and charts.

    109 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed

Questions about Alego Pre Push Checks

What does Alego Pre Push Checks do?

Use before pushing, force-pushing, marking ready for review, or claiming checks pass on an alego branch, and immediately after gh stack sync publishes rewritten branches, to select the smallest…. Alego Pre Push Checks is an agent skill from singula-ai/alego. Use before pushing, force-pushing, marking ready for review, or claiming checks pass on an alego branch, and immediately after gh stack sync publishes rewritten branches, to select the smallest tests and checks that cover the outgoing or just-published diff without reflexively running the full repository suite.

How do I install Alego Pre Push Checks in Claude Code?

Run `npx skills add singula-ai/alego --skill alego-pre-push-checks -a claude-code`. Or copy the skill folder (.agents/skills/alego-pre-push-checks in singula-ai/alego) into .claude/skills/alego-pre-push-checks in your project. Claude Code loads it when a task matches its description.

How do I install Alego Pre Push Checks in Codex?

Run `npx skills add singula-ai/alego --skill alego-pre-push-checks -a codex`. Or copy the skill folder (.agents/skills/alego-pre-push-checks in singula-ai/alego) into .agents/skills/alego-pre-push-checks in your project. Codex loads it when a task matches its description.

Can I use Alego Pre Push Checks in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add singula-ai/alego --skill alego-pre-push-checks -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/alego-pre-push-checks, .gemini/skills/alego-pre-push-checks, .github/skills/alego-pre-push-checks and .opencode/skills/alego-pre-push-checks in your project.

What does Alego Pre Push Checks need to run?

Going by SKILL.md and its folder, Alego Pre Push Checks needs the command-line tools its instructions call (pnpm, gh, git and vitest).

Does Alego Pre Push Checks access the network?

SKILL.md contains no URLs. Its commands use gh and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Alego Pre Push Checks safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Alego Pre Push Checks use?

Alego Pre Push Checks is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Alego Pre Push Checks use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Alego Pre Push Checks?

Skills that share tags, products or a category with Alego Pre Push Checks: Claims (ruvnet/ruflo, 74k stars), Safe Push (JetBrains/intellij-community, 21k stars), Push (karanhudia/borg-ui, 1.7k stars) and Git Pushing (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Alego Pre Push Checks?

singula-ai (a GitHub organization) maintains it in singula-ai/alego, which has 109 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on September 28, 2026.

Source: singula-ai/alego on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.