gate-and-fix
Use on a feature branch that is getting ready to commit, when lint, unit, integration, coverage, and diff gates must pass and failures must be remediated from…
Skill by asura1234
Chalk Labs
Need help deploying gate-and-fix?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/asura1234-gate-and-fix
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/gate-and-fix
What's inside
- Skill name
gate-and-fix- Description
- Use on a feature branch that is getting ready to commit, when lint, unit, integration, coverage, and diff gates must pass and failures must be remediated from complete failure evidence (the main agent decides whether to fix them itself or dispatch subagents), committing and pushing round by round until the branch converges.
- License
- Apache-2.0
- Instructions
- 90 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (22)
- SKILL.md
- guide.md
- coverage-policy.json · references/
- gate-round-format.md · references/
- lint-policy.toml · references/
- bus_quality.py · scripts/
- coverage_run.py · scripts/
- gate_and_fix.py · scripts/
- gate_artifact.py · scripts/
- gate_process.py · scripts/
- profile_report.py · scripts/
- requirements.txt · scripts/
- bus_quality_test.py · scripts/tests/
- coverage_instrumentation_test.py · scripts/tests/
- coverage_pool_exact_counts_test.py · scripts/tests/
- coverage_pool_test.py · scripts/tests/
- gate_and_fix_test.py · scripts/tests/
- profile_crash_recovery_test.py · scripts/tests/
- profile_legacy_upgrade_test.py · scripts/tests/
- profile_lifecycle_test.py · scripts/tests/
- profile_path_test.py · scripts/tests/
- profile_report_test.py · scripts/tests/
SKILL.md (first lines)
Resolve `SKILL_DIR` to the directory containing this loaded SKILL.md; keep the working directory in the target repository.
# Gate and Fix
Read [guide.md](guide.md) and [gate-round-format.md](references/gate-round-format.md) completely.
```text
INPUT = [--base <immutable commit>] [--command "<repo gate command>"]
repo = git rev-parse --show-toplevel
branch = git branch --show-current
IF caller base is absent: run `git fetch origin` before refreshing its default.
base = caller-provided immutable commit, otherwise resolve origin's default branch with:
python3 "<SKILL_DIR>/../rebase-origin-main/scripts/rebase_base.py" --repo "<repo>" --refresh-default
STOP if base resolution fails; never assume master/main.
command = caller-provided --command, otherwise policy.gate_command from the fresh repo scan.
The runner owns scanning; missing configuration is STOP "no gate configured", never PASS.
Run the branch guard (it uses the full origin symbolic ref, never --short):
python3 "<SKILL_DIR>/../rebase-origin-main/scripts/rebase_base.py" --repo "<repo>" --base HEAD --check-branch "<branch>"
IF it fails: STOP with stderr.
IF git status --porcelain --untracked-files=all is nonempty
STOP "The worktree is not clean; commit or remove every tracked and untracked change first."
IF git diff --name-only <base>...HEAD is empty
STOP "There are no committed changes against the base."
branch_slug = branch with every character outside [A-Za-z0-9_-] replaced by `-`
artifact_root = <absolute Git common directory>/bus/gate-and-fix/<branch_slug>
round = 1
LOOP:
Run:
python3 "$SKILL_DIR/../gate-and-fix/scripts/gate_and_fix.py" \
--repo "<repo>" --base "<base>" --round "<round>" \
--artifact-root "<artifact_root>" [--command "<caller command>"]
Capture the runner exit code and its sole stdout line as artifact.
IF exit code NOT IN {0, 1}
STOP with stderr; do not read an old artifact.
Run:
python3 "$SKILL_DIR/../gate-and-fix/scripts/gate_and_fix.py" verify \
--artifact "<artifact>" --base "<resolved base commit>"
IF verification fails
STOP with the artifact; do not infer an outcome from Markdown.
IF exit code == 0
Assert verifier output is PASS; BREAK.
Assert verifier output is FAIL.
Run:
python3 "$SKILL_DIR/../gate-and-fix/scripts/gate_and_fix.py" list \
--artifact "<artifact>" --base "<resolved base commit>"
IF list fails
STOP with the artifact; do not infer failed gates from Markdown.
Capture its one-name-per-line stdout as failed gates.
FOR each listed failed gate and each stream IN {stdout, stderr}
Run:
python3 "$SKILL_DIR/../gate-and-fix/scripts/gate_and_fix.py" show \
--artifact "<artifact>" --base "<resolved base commit>" \
--gate "<gate>" --stream "<stream>"
Capture its exact stdout as that stream's remediation evidence.
Group all failed gate evidence by writable owner.
For a coverage failure, read and apply code-review-guide "Never pad coverage with a tautology"
through guide.md "Coverage-failure remediation" before choosing a repair.
IF the coverage gap is reported rather than repaired
STOP with the FAIL artifact and the reason; reporting does not waive the gate.
**How the remediation is orchestrated is main's own decision**: fix sequentially itself,
dispatch subagents grouped by owner, or mix the two. The basis is how large the failure surface
is, whether the owners are genuinely disjoint, and how much context main has left: one or two
small fixes are usually faster to do directly, because dispatching costs a brief and a context
rebuild; dispatching pays off only when failures span several mutually disjoint owners and every
group carries substantial work. This skill does not prescribe a shape, nor does it presume that
parallel is faster.
Hard constraints when delegating (however many groups): each subagent receives only its own
group's artifact identity, exact owned paths, and decoded logs; it changes only files inside its
own allowlist; it performs no Git mutation; it returns its changed files and blockers. Evidence
with overlapping owners must be in the same group — two agents writing the same file is a STOP,
not something to coordinate.
After every remediation has been collected, main inspects the combined delta.
IF any owner is unsafe/unclear, any group overlaps, a blocker is reported, or no intended
remediation changed the worktree
STOP with the artifact and blocker; do not retry an identical tree.
Invoke `commit-and-push` once. It owns the only Git mutation of this round. Increment round and
repeat the complete profile-selected gate set plus the diff gate on the clean committed tree. For the Bus adapter, never run the live
end-to-end check here. Never run only a selected subset in a later round.
RETURN the final PASS artifact, its base/head, selected gate command, and all round commits.
A missing gate is a reported configuration blocker, never successful verification.
```From asura1234/bus, Apache-2.0.
More from asura1234/bus
- 0.592score
pr
asura1234
Feature-branch PR workflow.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
review-plan
asura1234
Iteratively and read-only review a plan file that follows the project plan template.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
review-pr
asura1234
Iterative code review in which the reviewer proves suspicions in the correctness / security / bug dimensions by writing tests that run red or, preferably for…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
split-pr
asura1234
Split a multi-purpose Bus branch into single-purpose branches from an explicit base, as parallel PRs, a stacked PR train, or a mix of both, with dependencies…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
address-review-comments
asura1234
Author-side adjudication and handling of plan/PR review comments, including fixed whole-file chunks with the same --scope as review-pr.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
e2e-test
asura1234
Use to test the Bus TUI end to end like a manual QA tester, against a QA test doc (default tests/e2e-tui/app.md, optionally only some case IDs).
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
delete-dead-code
asura1234
Clean up entropy on two tracks.
SkillAFreshness: A★ 1Claude Code +9 - 0.588score
merge-pr
asura1234
Watch an open PR's two signals until it can merge — CI conclusions and review comments.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
worktree-new
asura1234
Create a new git worktree (an isolated working copy of the repo) and provision it so it can build, test and commit out of the box — create it from a freshly…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
commit-and-push
asura1234
Analyze the current git changes, split them into commits following "each commit does exactly one thing" with lowercase Conventional Commit subjects, and push…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
rebase-origin-main
asura1234
Rebase the current feature branch onto the latest origin/master, triage conflicts by severity, then force-with-lease push with an explicit refspec.
SkillAFreshness: A★ 1Claude Code +9 - 0.583score
worktree-close
asura1234
Remove a git worktree that is no longer needed.
SkillAFreshness: A★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 24, 2026 (7 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/asura1234/bus
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from asura1234
- 0.592score
pr
asura1234
Feature-branch PR workflow.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
review-plan
asura1234
Iteratively and read-only review a plan file that follows the project plan template.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
address-review-comments
asura1234
Author-side adjudication and handling of plan/PR review comments, including fixed whole-file chunks with the same --scope as review-pr.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
e2e-test
asura1234
Use to test the Bus TUI end to end like a manual QA tester, against a QA test doc (default tests/e2e-tui/app.md, optionally only some case IDs).
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
delete-dead-code
asura1234
Clean up entropy on two tracks.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
review-pr
asura1234
Iterative code review in which the reviewer proves suspicions in the correctness / security / bug dimensions by writing tests that run red or, preferably for…
SkillAFreshness: A★ 1Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get gate-and-fix running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
gate-and-fix skill. Agent Mart. https://agentmart.dev/skills/asura1234-gate-and-fix (last updated 2026-10-24)