git-rules
MUST NOT / SHOULD NOT rules for git, commits, pull requests, docs, evidence for claims, and change hygiene: staging, history rewrites, rebases, hooks, scope, and PR descriptions. Use when committing, rebasing, pushing, writing a PR, updating docs and agent instructions, or making a claim about production behavior.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 11
- Forks
- 1
01 前言 Front Matter
- name
- git-rules
- description
- MUST NOT / SHOULD NOT rules for git, commits, pull requests, docs, evidence for claims, and change hygiene: staging, history rewrites, rebases, hooks, scope, and PR descriptions. Use when committing, rebasing, pushing, writing a PR, updating docs and agent instructions, or making a claim about production behavior.
03 SKILL.md 正文
Git and change rules
MUST NOT is a defect. SHOULD NOT needs a stated reason.
Git
- MUST NOT commit credentials, build output, editor state, or unrelated changes.
- MUST NOT bypass hooks (
--no-verify, disabled hooks path) or plain force-push; use--force-with-leaseagainst the tip you saw. - MUST NOT amend or rewrite shared history or another author's commits without permission.
- MUST NOT rebase onto or diff against a stale local
main; use the fetched remote branch. - MUST NOT rebase over a dirty worktree.
- MUST NOT resolve conflicts by taking a whole side; keep both invariants and rerun their tests.
- MUST NOT change git identity or config in automation.
- MUST NOT let a new branch track the default branch as its upstream; a bare
git pushthen targets it. - MUST NOT
git stashin a worktree someone else is editing; commit a WIP or use your own worktree.
Changes and PRs
- MUST NOT remove a timeout, deadline, or guard without a replacement on the same path.
- MUST NOT leave docs, fixtures, types, or generated files stale when behavior changes.
- MUST NOT close issues a PR does not fully resolve.
- MUST NOT add broad, unexplained suppressions or allowlists to get a check green.
- MUST NOT ship a breaking API change without calling it breaking; removed fields, changed meanings, and blocked workflows that callers depend on all count.
- MUST NOT call a change "unchanged" from the diff alone; check the behavior every caller sees.
- SHOULD NOT dismiss a review finding with less evidence than it took to raise it.
- SHOULD NOT widen scope for a discovered follow-up; file it.
- SHOULD NOT take on scope a ticket's technical design added beyond the reported problem without asking whether the fix needs it.
- SHOULD NOT split related work across PRs without a risk reason.
- SHOULD NOT claim performance or cost wins without measurements.
- SHOULD NOT list routine passing checks in PR descriptions; state the problem, the change, and the impact.
- SHOULD NOT write a PR description without the blast radius and the paths each flag covers.
Evidence
- MUST NOT treat an empty result from an unproven query as absence; first show the query can return rows.
- MUST NOT state a rate without its denominator.
- MUST NOT treat a capped page of results as the whole population.
- MUST NOT repeat a number from a subagent's or tool's prose summary; read the raw output.
- MUST NOT call a fix verified because a lower environment shows no error.
- MUST NOT treat "rare in production" as "unreachable"; they need different proof.
Docs and agent instructions
- SHOULD NOT restate code, config values, or numbers that drift; document why and unenforced invariants.
- SHOULD NOT put history, plans, or private details in public docs.
- SHOULD NOT let agent instruction files grow past their size budget, or duplicate a shared instruction file.
04 同仓库更多 Skills
rollout-rules
MUST NOT / SHOULD NOT rules for shipping changes safely: feature flags, deploy order across services, API and message compatibility, irreversible actions, and string-referenced config. Use when adding a flag, changing an API or message contract, deploying a change that spans services, or touching money-moving or irreversible actions.
observability-rules
MUST NOT / SHOULD NOT rules for logs, metrics, and alerts: static messages and structured fields, personal data, metric cardinality, fields monitors depend on, absence alerts, and context binding. Use when adding or reviewing logging, metrics, or monitors.
integrations-rules
MUST NOT / SHOULD NOT rules for third-party APIs and inbound webhooks: response classification, retries and idempotency, delivery records, payload mapping, timestamps and units, batch failure policy, and signature verification. Use when calling, parsing, or receiving a partner or vendor API.
typescript-rules
MUST NOT / SHOULD NOT rules for TypeScript, JavaScript, and Node.js: async and promises, errors, mutation, aliases and dead paths, static analysis, process lifecycle, HTTP clients, caches like Redis or Valkey, and package boundaries. Use when writing or reviewing TS/JS or Node code.
security-rules
MUST NOT / SHOULD NOT rules for application security and HTTP APIs: secrets, auth and sessions, SSRF, injection, CSRF, CSP, LLM prompts, response exposure, and API shape. Use when writing or reviewing an endpoint, auth code, secret handling, outbound fetches, or LLM calls.
rust-rules
MUST NOT / SHOULD NOT rules for Rust: lints, test layout, file size, parallelism, hot loops, caching, build hygiene, and performance claims. Use when writing or reviewing Rust code or running heavy cargo builds.