agentleFS
7xmohamed7xmohamed/Kata/skills/check/SKILL.md

check

Skill1 starsChanged 6 months agoMITView on GitHub

Reviews code diffs after implementation, auto-fixes safe issues, and runs specialist security and architecture reviewers on large diffs. Also triages issues and PRs when the user mentions them. Not for exploring ideas or debugging.

42 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use develop, scope and 5 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.
  • bamechoSkill

    develop

    开发实施阶段详细规则;进入开发实施时读取;包含执行流程、代码规范、一致性审计、方案包迁移

    Also in 5 projects that use this

  • vltingSkill

    scope

    Interactive planning + orchestration. Approval-gated workflow covering saga→epic→task hierarchy via progressive scoping.

    Also in 5 projects that use this

  • nicolasestremSkill

    document

    Create focused documentation for specific components or features

    Also in 5 projects that use this

  • MicrosoftSkill

    sync

    Sync the current session branch with its upstream branch, or publish the current session branch to a remote. Use when the user asks to sync a branch, pull latest changes, rebase onto upstream, push current branch, publish branch, or set upstream.

    Also in 7 projects that use this

  • Microsoft AzureSkill

    test

    Also in 8 projects that use this

  • jdonohooSkill

    architect

    Architect Vern - Systems design, scalable architecture, production-grade thinking. The blueprints before the build.

    Also in 6 projects that use this

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 35 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the diff, find the problems, fix what can be fixed safely, ask about the rest.

    line 14
  2. Very specific:

    If no open items exist: shift to historical analysis.

    line 35
  3. Distinctive:

    Before reading code, check scope drift: do the diff and the stated goal match?

    line 56
  4. Distinctive:

    Release artifacts missing: verify every artifact listed in the release template exists as a local file and has been uploaded before …

    line 70
  5. Very specific:

    Use gh CLI for all GitHub interactions, not MCP or raw API.

    line 98
  6. Very specific:

    Run bash "${GEMINI_SKILL_DIR:-$HOME/.agents/skills/check}/scripts/run-tests.sh" or the project's known verification command.

    line 102
  7. Distinctive:

    If any of these phrases appear in your reasoning, stop and run verification first:

    line 108

“Common” is measured: kept by at least 6 in 10 of the 35 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

Check: Review Before You Ship

Prefix your first line with ⚔️ inline, not as its own paragraph.

Read the diff, find the problems, fix what can be fixed safely, ask about the rest. Done means verification ran in this session and passed.

Get the Diff

Get the full diff between the current branch and the base branch. If unclear, ask. If already on the base branch, ask which commits to review.

Triage Mode

Activate when the user mentions: issue, PR, "review all", triage, "batch", or "批量处理". Skip the diff flow and run this instead.

Flow:

  1. gh issue list -R <repo> --state open --limit 20 and gh pr list -R <repo> --state open to pull pending items.
  2. For each item, check if a fix already exists before analyzing:
    git tag --sort=-version:refname | head -1          # latest tag
    git log --oneline <tag>..HEAD | grep -i "<keyword>" # merged but unreleased?
    Three outcomes: already shipped (close with note), merged but unreleased (reply "已修复,等下一个版本 release", close), or no fix (analyze).
  3. Classify each item using the Category A-E system in ~/www/GEMINI.md. Do not copy the definitions here; read them from that file.
  4. Draft every reply and show it to Tang for confirmation before calling gh issue comment or any GitHub write operation.
  5. If no open items exist: shift to historical analysis. Run gh issue list -R <repo> --state closed --limit 50 and look for recurring themes, fixes closed without resolution, and deferred features with demand. Produce a short per-project summary with Fix candidates and Feature candidates. Do not implement without approval.

Sign-off line (append to standard sign-off):

triage:           N reviewed, N closed, N deferred

Scope

Measure the diff and classify depth:

DepthCriteriaReviewers
QuickUnder 100 lines, 1-5 filesBase review only
Standard100-500 lines, or 6-10 filesBase + conditional specialists
Deep500+ lines, 10+ files, or touches auth/payments/data mutationBase + all specialists + adversarial pass

State the depth before proceeding.

Did We Build What Was Asked?

Before reading code, check scope drift: do the diff and the stated goal match? Label: on target / drift / incomplete.

Drift signals (examples, not exhaustive -- any one is enough to label drift):

  • A changed file has no connection to the stated goal
  • The diff includes pure refactoring (renames, formatting, restructuring) when the goal was a bug fix or feature
  • A new dependency appears that the goal did not mention
  • Code unrelated to the goal was deleted or commented out
  • A new abstraction or helper was introduced that is not required by the goal

Hard Stops (fix before merging)

Examples, not exhaustive -- flag any diff that could cause irreversible harm if merged unreviewed.

  • Destructive auto-execution: any task marked "safe" or "auto-run" that modifies user-visible state (history files, config, preferences, installed software) must require explicit confirmation.
  • Release artifacts missing: verify every artifact listed in the release template exists as a local file and has been uploaded before declaring done.
  • Unknown identifiers in diff: any function, variable, or type introduced in the diff that does not exist in the codebase is a hard stop. Grep before writing or approving any reference: grep -r "name" . -- no results outside the diff = does not exist.
  • Injection and validation: SQL, command, path injection at system entry points. Credentials hardcoded or logged.
  • Dependency changes: unexpected additions or version bumps in package.json, Cargo.toml, go.mod, requirements.txt. Flag any new dependency not obviously required by the diff.

Specialist Review (Standard and Deep only)

Load references/persona-catalog.md to determine which specialists activate. Launch all activated specialists in parallel via the environment's agent or sub-agent facility when available, passing the full diff. If no parallel reviewer facility exists, run the specialist passes sequentially in the same session.

Merge findings: when two specialists flag the same code location, keep the higher severity and note cross-reviewer agreement. Findings on different code locations are never duplicates even if they share a theme.

Autofix Routing

ClassDefinitionAction
safe_autoUnambiguous, risk-free: typos, missing imports, style inconsistenciesApply immediately
gated_autoLikely correct but changes behavior: null checks, error handling additionsBatch into one user confirmation block
manualRequires judgment: architecture, behavior changes, security tradeoffsPresent in sign-off
advisoryInformational onlyNote in sign-off

Apply all safe_auto fixes first. Batch all gated_auto into one confirmation block. Never ask separately about each one.

Adversarial Pass (Deep only)

"If I were trying to break this system through this specific diff, what would I exploit?" Four angles (see references/persona-catalog.md): assumption violation, composition failures, cascade construction, abuse cases. Suppress findings below 0.60 confidence.

GitHub Operations

Use gh CLI for all GitHub interactions, not MCP or raw API. Confirm CI passes before merging.

Verification

Run bash "${GEMINI_SKILL_DIR:-$HOME/.agents/skills/check}/scripts/run-tests.sh" or the project's known verification command. Paste the full output.

If the script exits non-zero or prints (no test command detected): halt. Do not claim done. Ask the user for the verification command before proceeding. If the user also cannot provide one, document this explicitly in the sign-off as verification: none -- no command available and flag it as a structural gap, not a pass.

For bug fixes: a regression test that fails on the old code must exist before the fix is done.

If any of these phrases appear in your reasoning, stop and run verification first:

  • "should work now" / "probably correct" / "seems to be working" / "trivial change"

Gotchas

What happenedRule
Commented on #249 when discussing #255Run gh issue view N to confirm title before acting
PR comment sounded like a report1-2 sentences, natural, like a colleague. Not structured, not AI-sounding.
PR comment used bullet pointsWrite as paragraphs; thank the contributor first
article.en.md inside _posts_en/ doubled the suffixCheck naming convention of existing files in the target directory first
Deployed without env vars setRun vercel env ls before deploying; diff against local keys
Push failed from auth mismatchRun git remote -v before the first push in a new project

Document Review Mode

Activate when: PDF, document, release notes, white paper, final version, or "check this document"

Review checklist:

  • Privacy scan: Detect PII (names, companies, employment dates, salary hints, location details). Hard stop if any text implies job seeking, competitor info, or personal data leakage.
  • Tone consistency: Flag voice shifts, register mismatches, formulaic phrasing. Check for AI patterns (see /write skill for detection rules).
  • Bilingual validation: For CN/EN pairs, confirm translation accuracy and terminology consistency. Use /write skill's bilingual rules.
  • Rendering check: Placeholder text remaining (Lorem ipsum, TODO, [TBD]), style violations, font fallbacks, broken image links.

Output format: same as code review sign-off, but replace verification: with privacy: clear / N issues found.

Sign-off

files changed:    N (+X -Y)
scope:            on target / drift: [what]
review depth:     quick / standard / deep
hard stops:       N found, N fixed, N deferred
specialists:      [security, architecture] or none
new tests:        N
verification:     [command] -> pass / fail

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.