Agent skill

Dpis Precommit Review

by Kwensiu in Kwensiu/DPIS

Review DPIS changes before committing or opening a pull request, including scope, domain-rule compliance, tests, Android validation, SonarQube MCP checks, and Git hygiene.

GPL-3.0Auto-check passedDevelopment

Install Dpis Precommit Review

skills CLI
$ npx skills add Kwensiu/DPIS --skill dpis-precommit-review -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Kwensiu/DPIS dpis-precommit-review --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Kwensiu/DPIS.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/dpis-precommit-review .claude/skills/dpis-precommit-review && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dpis-precommit-review
GitHub stars
108
Token cost
~2.8k tokens
SKILL.md length
1,490 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
GPL-3.0

At a glance

Review DPIS changes before committing or opening a pull request, including scope, domain-rule compliance, tests, Android validation, SonarQube MCP checks, and Git hygiene.

  • Works in 4 steps: Apply project and domain rules. → Validate behavior at the smallest useful… → Read Sonar through MCP; audit boundaries… → …
  • Tasks that involve Pull requests
  • SKILL.md covers Commit-path decision, Review order, Tool habits and Completion report
  • Calls git, gh and adb

What it does

Dpis Precommit Review is an agent skill from Kwensiu/DPIS. Review DPIS changes before committing or opening a pull request, including scope, domain-rule compliance, tests, Android validation, SonarQube MCP checks, and Git hygiene.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Pull requests. It works with Git, Model Context Protocol and Android. The repository describes itself as: 独立调节应用 DPI 与字体缩放 | Per-app DPI and font scaling. The licence is GPL-3.0.

When your agent uses it

  • Tasks that involve Pull requests

Example prompts

  • “/dpis-precommit-review”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Apply project and domain rules.
  2. Validate behavior at the smallest useful level, then at CI level.
  3. Read Sonar through MCP; audit boundaries instead of gaming metrics.
  4. Finish Git safely.

What it can do on your machine

Read from SKILL.md and the folder at commit 9491f2c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh
    • adb

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dpis Precommit Review loads about 2.8k tokens when it runs. Until then it costs about 48 tokens; SKILL.md has 1,490 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~48
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Kwensiu/DPIS at commit 9491f2c, republished under its GPL-3.0 licence (© Kwensiu). 1,490 words, ~2,760 tokens.

Download SKILL.mdSave it as .claude/skills/dpis-precommit-review/SKILL.md (or your agent's skills folder).
name
dpis-precommit-review
description
Review DPIS changes before committing or opening a pull request, including scope, domain-rule compliance, tests, Android validation, SonarQube MCP checks, and Git hygiene.

DPIS Pre-Commit Review

Use this skill when a change is ready for commit, when the user asks for a review before merging, or when a pull request check needs local validation. It is a project workflow, not a replacement for AGENTS.md, CONTEXT.md, or the runtime/localization playbooks. Read those documents first when their scope applies.

Commit-path decision

Run this decision once for each logical change, after the local review and required validation are complete and before pushing the commit. Do not ask the user again for every intermediate commit in the same change.

Ask the user to choose one of these paths:

  • Pull request: push the current branch and create or update a PR. Let the PR workflows provide the authoritative PR checks and Sonar PR analysis.
  • Sonar-only validation: push the current branch without opening a PR, manually run the Sonar workflow for that branch, and inspect the uploaded branch analysis through SonarQube MCP. Use this path for small changes when the user wants Sonar feedback but does not need PR review or merge blocking.

Cloud Sonar cannot analyze uncommitted local files. The Sonar-only path therefore still requires a commit and push before analysis. It does not grant permission to merge or push main; those actions still require an explicit user request. If the user chooses neither path, finish the local review and report that cloud Sonar was not run.

For the Sonar-only path, after the commit is pushed:

powershell
gh workflow run sonarqube.yml --ref <current-branch>

Wait for the workflow to finish, then query SonarQube MCP using the branch name. Use list_branches and pass branch, not pullRequest, to the measures, issue, coverage, and quality-gate queries described below. Report the New Code issues, new-code coverage, and any actionable Bugs, Vulnerabilities, or Code Smells. A Sonar-only result is feedback for code improvement, not a merge blocker, unless the user explicitly asks for a gate.

Review order

  1. Establish the change boundary.
    • Run git status --short, git diff --stat, and git diff --check.
    • Inspect git diff HEAD and confirm every changed or untracked file belongs to the user's request. Never absorb unrelated work or reset it away.
    • Check the current branch and merge base when the review is for a PR.
    • Use semble for semantic discovery before rg; use rg only when every literal occurrence must be audited. For large command output, use context-mode batch/filter tools and surface only derived evidence.

1b. Slice large diffs before reviewing them as one blob.

  • Do not feed an entire feature-migration or Activity-extraction branch into one reviewer pass. A saturated context produces generic praise and misses leftover call sites.
  • Split the diff by ownership first: Compose dialog state, a feature Activity session, process/quirk adapters, tests/smoke anchors, then any remaining MainActivity wiring.
  • For each slice, prove behavior, state ownership, and every old API call site before looking at naming taste.
  • When the user asks for sub-agent review, or when two or more slices are independent, dispatch one read-only reviewer per slice in parallel. Reuse the same reviewer for follow-ups on that slice. Do not spawn a new reviewer for a one-line clarification.
  • Report only merge-blocking issues as blockers: behavior regressions, ownership violations, missed call sites, tests that pin stale implementation. Optional structure notes stay non-blocking unless they violate AGENTS.md (especially MainActivity slim-down and package ownership).
  • After the slices return, the parent agent merges findings, checks that reviewers did not contradict each other on shared files, and does not treat “could split further” as a required follow-up.
  1. Apply project and domain rules.

    • Read AGENTS.md and CONTEXT.md; read the relevant active document under docs/ for runtime routes, diagnostics, or other named boundaries.
    • Check package/file ownership, Kotlin/Java boundaries, Compose state ownership, naming, comments, UTF-8 without BOM, and stale source-smoke anchors.
    • Java-to-Kotlin on the touched set: if the diff materially changes an existing Java class whose responsibility sits in the Kotlin/Compose ownership boundary, migrate that class to Kotlin in the same change. Skip only files that are unsafe or too complex to convert here: reflection, JNI, flavor Xposed entrypoints, externally observed JVM signatures, or a conversion that would expand far beyond the current ownership boundary. Record that reason in the change; do not leave a convertible Java file for a later cleanup when this review already touched it.
    • MainActivity.java slim-down: if MainActivity.java is in the diff, audit any newly touched or newly exposed workspace/feature logic nested in it (editor sessions, dialogs, coordinators, exporters, diagnostics, or other feature state machines). Extract that work into focused classes under app/src/main/java/com/dpis/module/ in the same change. Keep MainActivity limited to app-shell startup and event wiring. Do not grow nested workspace workflows there, even as a temporary host.
    • For runtime hooks, prove or preserve the route in order: entry, guard, dependency, install, callback, package resolution, mutation, visible effect. Do not infer a later stage from an earlier log.
    • For UI changes, trace the active rendering layer and validate the actual flavor/device path; a source edit alone is not proof of a visible change.
  2. Validate behavior at the smallest useful level, then at CI level.

    • Run targeted tests while iterating, then always run the full pre-commit suite before a real commit: ./gradlew :app:testAllDebugUnitTests.
    • For Sonar/coverage changes, also run: ./gradlew :app:jacocoModernDebugUnitTestReport. That is only the local coverage XML CI uploads. After PR Check has published an analysis, read the Cloud result through the SonarQube MCP (see below). Do not curl Sonar REST or scrape GitHub check logs for the same facts.
    • Build both debug flavors for shared, flavor, dependency, R8, or hook changes: ./gradlew :app:assembleModernDebug :app:assembleLegacyDebug.
    • For Compose changes, install the successful Modern debug APK on the active device when available and validate the affected flow. Never use monkey; use an explicit launcher component with adb shell am start.
    • Run Android CLI supplemental checks sequentially: android studio check, then android studio analyze-file --project=<reported-name> <path> for touched Java/Kotlin files. Treat findings as optimization leads, not as a replacement for Gradle, tests, lint, or runtime evidence. Record when the bridge/project is unavailable.
  3. Read Sonar through MCP; audit boundaries instead of gaming metrics.

    • Project key: Kwensiu_DPIS. MCP talks to the already-uploaded Cloud analysis. It does not run the scanner.
    • On a PR: list_pull_requests, then pass that Sonar PR key to get_project_quality_gate_status, get_component_measures (new_coverage, new_violations), search_sonar_issues_in_projects (inNewCodePeriod), and search_files_by_coverage / get_file_coverage_details. Never pass a git branch name as pullRequest. Do not set both branch and pullRequest.
    • Off a PR: list_branches (LONG for main) and use branch.
    • sonar.exclusions removes files from analysis; sonar.coverage.exclusions removes only coverage accounting. Do not confuse the two.
    • Keep portable stores, parsers, codecs, policy, and other deterministic domain logic measurable. Exclude only framework-bound UI, lifecycle, Xposed/hooked-process, root, or other code the active JVM harness cannot execute.
    • Decide coverage ownership before writing the file. Untestable Activity/Compose/dialog/session hosts go in **/presentation/** (or ui/** / runtime/** / root/** / flavor trees). Measurable policy stays outside those trees and ships with a behavior test. Do not add a path to sonar.coverage.exclusions after the quality gate fails. Do not add a one-off file exclusion; move the file into an excluded directory or extract the policy. runtime/** remains a review item: new pure policy there should be lifted out, not used as a dump.
    • Treat a broad glob such as app/src/main/java/**/runtime/** as a review item. New pure policy code under an excluded directory should be audited for extraction or a narrower rule; do not widen exclusions to make the percentage pass.
    • After a merged PR changes the baseline, wait for the main-branch analysis (MCP list_branches / quality gate on main) before opening a boundary-audit PR. Keep that audit separate from feature or migration changes.
  4. Finish Git safely.

    • Re-read the final diff after all fixes. Stage named files only; never use git add . or git add -A for a scoped change.
    • Use a Conventional Commit subject (fix:, refactor:, test:, etc.) that states the outcome. Keep related code, tests, and docs together and unrelated changes out.
    • Do not commit if the required full suite is failing unless the user explicitly accepts that risk. Do not push, merge, or open a PR unless the user asks for it.
    • After a requested push, report the commit hash, branch, verification commands, and current GitHub check state. A pending check is not a pass.
Show full SKILL.md (138 more words)Show less

Tool habits

  • In Codex, call rtk explicitly for compact output when useful; do not assume its shell hook is active.
  • Use apply_patch for manual edits. Preserve UTF-8 without BOM and avoid shell/Python write tricks for source files.
  • Keep raw logs, reports, credentials, scanner state, APKs, Frida artifacts, and temporary probes out of the repository unless intentionally promoted.
  • When a check reports only a percentage or a generic failure, inspect the local test/coverage report and the SonarQube MCP result before proposing exclusions or small blind patches.

Completion report

End with a concise record of:

  • files and behavior changed;
  • tests/builds/Android CLI/device checks run and their result;
  • SonarQube MCP quality-gate / new-code measures, plus any exclusion changes;
  • the selected commit path (PR, Sonar-only validation, or local-only review);
  • commit hash and push/PR/check status, if those actions were requested;
  • anything not run and why.

© Kwensiu, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/dpis-precommit-review of Kwensiu/DPIS.

Open the folder on GitHubat commit 9491f2c

Compare with similar skills

Dpis Precommit Review next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dpis Precommit Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dpis Precommit Review this skillKwensiu/DPIS108—~2.8kAutomated safety check: PassGPL-3.0
Zhtw Conventionssysprog21/zhtw-mcp488—~2kAutomated safety check: PassMIT
Close Task Commit Push PRdevoxx/DevoxxGenieIDEAPlugin684—~1kAutomated safety check: NotesMIT
Pre-PR Reviewyuga-hashimoto/and-code123—~710Automated safety check: PassMIT
Git GitHub Opsc5inco/compose-pokedexer143—~1.3kAutomated safety check: PassMIT
PR Review Feedback Handlergittower/git-flow-next458—~2.9kAutomated safety check: NotesCustom licence

Similar skills

  • Zhtw Conventions

    sysprog21/zhtw-mcp

    The zhtw-mcp conventions no gate enforces - the register a comment, a commit message and a PR reply are written in, where Chinese belongs in the tree and where it does not, the untracked working…

    488 GitHub stars~2k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Close Task Commit Push PR

    devoxx/DevoxxGenieIDEAPlugin

    Close the active backlog task (detected from branch name), commit all changes, push to remote, and open a pull request.

    684 GitHub stars~1k tokensUpdated 9 days ago
    DevelopmentAuto-check: notes
  • Pre-PR Review

    yuga-hashimoto/and-code

    Runs local checks and a repo-reviewer subagent over the whole branch diff before a pull request is opened, then records the approval in the PR description.

    123 GitHub stars~710 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Git GitHub Ops

    c5inco/compose-pokedexer

    Handles Pokedexer Git and GitHub workflows: inspect changes, prepare commit messages, manage branches and pushes, and create or update issues and pull requests with safe file-based inputs.

    143 GitHub stars~1.3k tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • PR Review Feedback Handler

    gittower/git-flow-next

    Fetches review comments on a pull request, judges each one, writes the evaluation to a plan file and implements accepted changes, waiting for approval before anything public.

    458 GitHub stars~2.9k tokensUpdated 1 mo ago
    DevelopmentAuto-check: notes
  • Repo Repair

    oaslananka/kicad-mcp-pro

    A skill your agent uses for maintainer-requested pull request repairs in kicad-mcp-pro; maps changes to repository-native validation gates and safety constraints.

    120 GitHub stars~581 tokensUpdated today
    DevelopmentAuto-check passed

More from Kwensiu/DPIS

  • Dpis Hyperos Smoke

    Kwensiu/DPIS

    Run automated DPIS HyperOS device smoke tests for package-specific dp/font emulation or replacement.

    108 GitHub stars~715 tokensUpdated 2 days ago
    Auto-check passed
  • Project-local DPIS hook implementation and diagnosis workflow for Xposed API routing.

    108 GitHub stars~1.8k tokensUpdated 2 days ago
    Auto-check passed
  • Dpis Localization

    Kwensiu/DPIS

    Project-local DPIS localization workflow. An agent skill from Kwensiu/DPIS.

    108 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed
  • Dpis Release Notes

    Kwensiu/DPIS

    Rewrite DPIS release notes for ordinary users. An agent skill from Kwensiu/DPIS.

    108 GitHub stars~713 tokensUpdated 2 days ago
    Auto-check passed
  • Project-local DPIS runtime hook diagnosis workflow. An agent skill from Kwensiu/DPIS.

    108 GitHub stars~1.7k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Dpis Precommit Review

What does Dpis Precommit Review do?

Review DPIS changes before committing or opening a pull request, including scope, domain-rule compliance, tests, Android validation, SonarQube MCP checks, and Git hygiene. Dpis Precommit Review is an agent skill from Kwensiu/DPIS. Review DPIS changes before committing or opening a pull request, including scope, domain-rule compliance, tests, Android validation, SonarQube MCP checks, and Git hygiene.

When should I use Dpis Precommit Review?

Dpis Precommit Review fits situations like: tasks that involve Pull requests.

How do I install Dpis Precommit Review in Claude Code?

Run `npx skills add Kwensiu/DPIS --skill dpis-precommit-review -a claude-code`. Or copy the skill folder (.agents/skills/dpis-precommit-review in Kwensiu/DPIS) into .claude/skills/dpis-precommit-review in your project. Claude Code loads it when a task matches its description.

How do I install Dpis Precommit Review in Codex?

Run `npx skills add Kwensiu/DPIS --skill dpis-precommit-review -a codex`. Or copy the skill folder (.agents/skills/dpis-precommit-review in Kwensiu/DPIS) into .agents/skills/dpis-precommit-review in your project. Codex loads it when a task matches its description.

Can I use Dpis Precommit Review in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Kwensiu/DPIS --skill dpis-precommit-review -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dpis-precommit-review, .gemini/skills/dpis-precommit-review, .github/skills/dpis-precommit-review and .opencode/skills/dpis-precommit-review in your project.

What does Dpis Precommit Review need to run?

Going by SKILL.md and its folder, Dpis Precommit Review needs the command-line tools its instructions call (git, gh and adb). Our summary lists: Python 3.

Does Dpis Precommit Review access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Dpis Precommit Review safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dpis Precommit Review use?

Dpis Precommit Review is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dpis Precommit Review use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Dpis Precommit Review?

Skills that share tags, products or a category with Dpis Precommit Review: Zhtw Conventions (sysprog21/zhtw-mcp, 488 stars), Close Task Commit Push PR (devoxx/DevoxxGenieIDEAPlugin, 684 stars), Pre-PR Review (yuga-hashimoto/and-code, 123 stars) and Git GitHub Ops (c5inco/compose-pokedexer, 143 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dpis Precommit Review?

Kwensiu (a GitHub user) maintains it in Kwensiu/DPIS, which has 108 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 6, 2026.

Source: Kwensiu/DPIS on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.