Skip to content

KunanonJ/superstacks / plugins/superstacks/skills/sample-review

sample-review

Verified

Use when sampling recently merged PRs against repo standards and CONSTRAINTS.md. Propose environment tightenings, not per-PR comments. Default 5 per day.

FileKindSize
SKILL.mdskill md1.2 KB
scripts/sample_merged.pyscript1.6 KB

scripts/sample_merged.py

View on GitHub
#!/usr/bin/env python3
"""List recently merged commits for sample-review. Stdlib only. Prints hashes, nothing else."""

from __future__ import annotations

import argparse
import subprocess
import sys


def main(argv: list[str] | None = None) -> int:
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("--n", type=int, default=5, help="Sample size (default 5)")
    parser.add_argument(
        "--since",
        default="1 day ago",
        help='git --since value (default "1 day ago")',
    )
    args = parser.parse_args(argv)
    proc = subprocess.run(
        [
            "git",
            "log",
            "--merges",
            f"--since={args.since}",
            f"-n{args.n}",
            "--format=%H %s",
        ],
        check=False,
        capture_output=True,
        text=True,
    )
    if proc.returncode != 0:
        # Non-merge repos still have merged work as first-parent commits.
        proc = subprocess.run(
            [
                "git",
                "log",
                f"--since={args.since}",
                f"-n{args.n}",
                "--format=%H %s",
            ],
            check=False,
            capture_output=True,
            text=True,
        )
    if proc.returncode != 0:
        print(proc.stderr, file=sys.stderr)
        return proc.returncode
    lines = [line for line in proc.stdout.splitlines() if line.strip()]
    print(f"sample-review n={args.n} since={args.since} got={len(lines)}")
    for line in lines:
        print(line)
    return 0


if __name__ == "__main__":
    sys.exit(main())
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall