All skills
simota avatar

/guardian

@e307415
by shingo imotasimota/agent-skills85 stars
15

Gatekeeping Git/PR by classifying change essence and recommending granularity, naming, and strategy. Use when PR preparation or commit strategy is needed.

Use this Skill: https://skilld.dev/gh/simota/agent-skills/guardian

This session only. Nothing lands on disk.

referencesquash-optimization.md

≈596 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Squash Optimization Reference

Purpose: Score adjacent commits, group squash candidates, synthesize better messages, and keep attribution and rollback safety intact.

Pairwise Scoring

Evaluate adjacent commit pairs across six weighted factors:

Factor Weight Important rules
Temporal proximity 15 same minute +15, within 10m +12, beyond 1 week -5
Subject relationship 25 identical prefix +25, WIP/fixup +20+, opposing concerns -15, different logical units -25
File overlap 20 full overlap +20, high overlap +15, no overlap -5, lockfile-only -10
Author attribution 15 same author +15, different author -10, multi-author chain -15
Atomicity impact 15 improves atomicity +15, breaks bisectability -15
Test coupling 10 test with implementation +10, standalone test -5

Decision Thresholds

squash_thresholds:
  strong_squash: ">= +30"
  suggest_squash: "+15 to +29"
  neutral: "-14 to +14"
  keep_separate: "<= -15"

Force squash examples:

  • WIP
  • fixup!
  • squash!
  • tmp
  • forgot
  • oops
  • fix typo
  • address review

Force keep examples:

  • unrelated authors without attribution
  • lockfile-only commits
  • security commits
  • revert commits

Group Detection

Group using:

  1. pairwise scores
  2. logical concern consistency
  3. author safety
  4. file overlap
  5. bisectability

Limits:

  • warning at 5 commits or 20 files per group
  • hard max 8 commits or 30 files per group
  • if >3 distinct concerns appear, split the group

Message Synthesis

Message construction rules:

  • choose the strongest non-noise anchor commit
  • preserve scope and intent
  • add Co-authored-by: when attribution matters
  • explain rationale in the body only when useful

Verification and Rollback

Immediate checks:

  • diff integrity
  • build or test verification when available
  • author attribution preserved

Rollback plan:

  • create a backup branch before rewrite
  • reset to backup if post-squash verification fails

CI recommendation:

  • rerun the relevant build/test gate after squash

Orbit-Guardian Squash Boundary

Orbit owns loop-iteration squash execution.

Guardian owns:

  • non-loop squash analysis
  • PR-preparation squash advice
  • message synthesis
  • attribution review
  • post-squash verification guidance

Source: SKILL.md on GitHub

1 warning13d5 checks · Risk SAFE
  • Gen Agent Trust Hub13d

    The skill is a comprehensive Git and PR management tool designed to assist with change classification, quality scoring, and delivery workflows. It has extensive capabilities to execute shell commands for repository manipulation and interacts with the GitHub CLI. While it includes robust safety boundaries, hard gates for security, and a structured escalation process, its core functionality involves processing untrusted code diffs and executing repository-defined build scripts.

  • Socket13d

    No alerts

  • Snyk13d

    Risk: LOW · No issues

  • Runlayer6mo

    6/20 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at e307415. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 2 weeks ago

README badge

README badge for simota/agent-skills/guardian