agentleFS
www-donghanhcungban-orgwww-donghanhcungban-org/X-Templates/.claude/skills/gate/SKILL.md

gate

Skill16 starsChanged 7 days agoMITView on GitHub

Chạy cổng chất lượng đầy đủ (build · typecheck · lint · test, lint nên gồm kiểm format; qua dev-task.sh của khung — `.xtemplates/scripts/` ở dự án đích, `scripts/` ở repo khung) trước khi đẩy/mở PR (có CI: `gate-fast`, CI là cổng đầy đủ) và xuất Báo cáo xác thực; có mục ❌ thì KHÔNG đẩy/merge. Cổng commit do hook tự chạy (`gate-fast`). Dùng trước khi đẩy/mở PR, khi người dùng gõ /gate, "kiểm tra trước khi đẩy".

  • Commits and pushes

33 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use new, checkpoint and 6 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • codebycoreySkill

    new

    Start a new change with a proposal. Use when starting a feature, creating a proposal, or beginning planned work.

    Also in 3 projects that use this

  • genomewalkerSkill

    checkpoint

    Save a checkpoint of task status, decisions, active files, and next steps

    Also in 3 projects that use this

  • AWSSkill

    ship

    Finalize dev work on an issue branch — update docs, push, and open a PR.

    Also in 6 projects that use this

  • Microsoft AzureSkill

    build

    Build the TypeSpec Rust emitter from source. Run this after cloning the repo, after pulling changes, or when TypeScript source files have been modified.

    Also in 3 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 3 projects that use this

  • Microsoft AzureSkill

    docs

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 29 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Commit message conventional (feat|fix|refactor|docs|test|chore|perf|ci|build(scope): ...), ≤ 100 ký tự dòng đầu.

    line 13

“Common” is measured: kept by at least 6 in 10 of the 29 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/gate — cổng máy trước, người sau

<DT> = .xtemplates/scripts/dev-task.sh ở dự án đích (ưu tiên, như hook), scripts/dev-task.sh ở repo khung. Lệnh thật của dự án nằm ở xt.yaml (ưu tiên) → .claude/project-commands.sh → tự dò (package.json/pyproject/go.mod/Cargo.toml/Makefile). Không suy diễn lệnh từ văn xuôi; nếu xt.yaml thiếu khoá, đề xuất thêm.

Cổng commit (hook tự chạy — không gọi /gate trước mỗi commit)

  1. Hook PreToolUse chạy <DT> gate-fast (hoặc gate theo commit_gate trong xt.yaml) trước git commit; đỏ thì commit không chạy — sửa rồi commit lại.
  2. Tự review diff: đúng mục tiêu, không sửa nhầm, không console.log/code chết, không bí mật (git diff --cached | grep -iE "api[_-]?key|secret|password|token"), input đã validate, nhánh lỗi đã xử lý.
  3. Commit message conventional (feat|fix|refactor|docs|test|chore|perf|ci|build(scope): ...), ≤ 100 ký tự dòng đầu.

Trước khi đẩy/mở PR (/gate)

  1. Có CI chạy đúng các khoá xt.yaml và merge đòi CI xanh: đẩy ngay (PR nháp, LOOP-STOP-031) — mỗi commit đã qua gate-fast (format · lint · typecheck · test liên quan file đổi, hook cổng commit); CI là cổng đầy đủ (song song, nhanh hơn chạy nối tiếp ở máy; lọt lỗi chỉ tốn một lượt CI — ADR-0056). Không có CI, lần đẩy cuối trước cắt bản, hoặc người dùng gõ /gate: <DT> gate (build → typecheck → lint → test; đỏ một cái là dừng), đọc output thật. Nhánh cập nhật/xung đột/CI do xt.py merge-check quyết sau khi mở PR.
  2. Đối chiếu tiêu chí chấp nhận trong SPEC + mục blueprint liên quan (tick kèm bằng chứng).
  3. Nếu đổi schema: migration có phiên bản + đường lùi. Nếu đổi API: hợp đồng + CHANGELOG.
  4. Rà bảo mật nhanh: quyền kiểm ở server, không lộ dữ liệu, không nới cấu hình cổng.
  5. Mở PR bằng gh pr create --draft, gh pr ready chỉ khi là PR số nhỏ nhất cùng nhánh đích (LOOP-STOP-031); sau đó xt.py pr next --pr <N> quyết bước kế (CI, review khi máy đòi — LOOP-STOP-022, pha build hoãn review trừ rủi ro cao — ADR-0062). Máy chỉ đòi review khi nhánh đích đặt merge_review: required; mặc định optional merge cả PR rủi ro cao khi CI xanh (ADR-0079) — dự án cần thì đặt required hoặc merge_hard_exceptions: human.

Báo cáo xác thực (xuất nguyên dạng khi người dùng gọi /gate; trong autopilot chỉ cần exit code)

Build ✅/❌ | Type ✅/❌ (lỗi: ..) | Lint (gồm kiểm format) ✅/❌ (cảnh báo: ..) | Test ✅/❌ (X/Y)
Tự review diff ✅ | Không bí mật/rác ✅ | Tiêu chí chấp nhận ✅ | Blueprint liên quan ✅
Rủi ro/ảnh hưởng: .. | Góp ý: ..
KẾT LUẬN: Sẵn sàng  /  Cần xử lý: [..]

Bất kỳ ❌ → sửa, chạy lại toàn bộ, không đẩy/merge. Không skip/disable test, không hạ ngưỡng coverage/lint để xanh.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.