Skip to content
cccskills
FreePublished on GitHubEnglish overview

gh-pull-request

Prepare a pull request branch by running the documented build, style, license-header, and Java import checks, then committing and pushing the changes. If the branch has no pull request yet, create one using the project template.

OriginalShow the original description

Verify, commit, and push changes on a PR branch. Runs pre-flight checks (compile, checkstyle, license headers) before every push. Also creates the PR if one doesn't exist yet.

apache/skywalking24,978 stars(GitHub 24,978 + cccskills 0)
Works withGitHub

Run score Not tested

See how to install

Good for

  • Preparing checked changes for a pull request
  • Pushing commits from a feature branch
  • Creating a pull request from the current branch

Overview

What it does

Before sending changes from a pull request branch, this skill guides compile, Checkstyle, license-header, and fully qualified Java class name checks. It explains how to fix problems and repeat the checks, then commit and push the changes. If the current branch has no pull request, it creates one using the project template and adds the specified reviewer. After a merge, it guides you through confirming that the changes reached the default branch before cleaning up the local branch.

When it helps

Use it to prepare changes for a pull request, from build and license checks through submission and branch cleanup after a merge.

Example requests

  • “Check the changes, then commit and push them to the pull request branch.”
  • “If this branch has no pull request, create one using the template.”
  • “Confirm the merged changes and clean up the local branch.”

Notes

This skill uses the project’s Maven wrapper, license-eye, Git, and gh. Pull request creation refers to .github/PULL_REQUEST_TEMPLATE. Work on a feature branch; do not work directly on master.

This overview was written by AI (OpenAI Codex) from the public SKILL.md. Check the original below for the exact behavior.

Document check

AI checked the SKILL.md for operations that need care and for setup requirements. The score comes only from actually running the skill (hands-on test).

SafetyAre sending data, deleting files, and running commands disclosed?
BPartly lackingIt forbids work on master and requires merge verification, but also pushes and deletes branches.
Easy setupDoes it need few tools or API keys, and are they documented?
BPartly lackingIt names the Maven wrapper, license-eye, Git, and gh, but gives no installation steps.

Not counted in the score. Rated by AI (OpenAI Codex) as of Oct 29, 2026. Treat it as a guide and read the original before installing.

Disagree? Request a re-evaluation

Tell us which point is wrong and why. No login needed. We will check it against the SKILL.md, redo the evaluation, and show the result here.

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

Files included (1)

  • SKILL.md6.5 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

PR Branch Workflow

Run pre-flight checks, commit, push, and optionally create a PR.

Pre-flight checks

Run these checks before every commit+push and fix any failures:

1. Compile and checkstyle

# Checkstyle
./mvnw -B -q clean checkstyle:check

# Full build (compile + javadoc)
./mvnw clean flatten:flatten install javadoc:javadoc -B -q -Pall \
  -Dmaven.test.skip \
  -Dcheckstyle.skip \
  -Dgpg.skip

2. License header check

license-eye header check

If invalid files are found, fix with license-eye header fix and re-check.

3. Unnecessary fully-qualified class names

The project checkstyle forbids inline FQCNs — every type reference in code should resolve through an import, not a fully-qualified name. Checkstyle does not always catch this (it misses cases like inline java.util.HashMap, java.util.concurrent.TimeUnit, or org.apache.skywalking.oap.server.telemetry.api.HistogramMetrics.Timer used as a local variable type, generic parameter, or new target). Audit the files the branch touched before pushing:

Use the Grep tool (ripgrep) rather than BSD grep on macOS — the scan below relies on a negative lookahead that BSD grep doesn't support and GNU grep -P does:

pattern: ^(?!\s*(import |package |\s*\*)).*\b(java\.util\.|java\.io\.|java\.nio\.|java\.util\.concurrent\.|javassist\.|org\.apache\.skywalking\.)[A-Z][A-Za-z0-9_]*
glob:    *.java
output_mode: content
-n: true

Scope the scan to files the branch touched, not the whole tree — pre-existing FQDNs on unrelated files generate noise. Use git diff --name-only master...HEAD -- '*.java' to get the changed list, then run the ripgrep pattern against each.

Acceptable exceptions (same as the CLAUDE.md rule):

  • Two classes with the same simple name would collide if both imported.
  • A Javadoc {@link} where the short name would be ambiguous to the reader.
  • Inside a string literal (e.g., a class name passed to Class.forName).

Fix every other hit — add an import and switch to the short name. This includes new java.util.HashMap<>(), java.util.Set<String> parameter types, and org.apache.skywalking.oap.server.telemetry.api.HistogramMetrics.Timer as a local variable type. Field declarations, method signatures, local variables, and generic type arguments should all use the imported short name.

Re-run checkstyle after the fix — a sloppy sed/replace_all can corrupt the import line itself (e.g., turning import java.util.concurrent.locks.ReentrantLock; into import ReentrantLock;), which causes a cryptic checkstyle Range [0, -1) out of bounds for length N error, not a normal violation line. If you see that error, inspect the imports block first.

Commit and push

After checks pass, commit and push:

git add <files>
git commit -m "<message>"
git push -u origin <branch-name>

Branch strategy

  • Never work directly on master branch
  • If on master, create a new branch first: git checkout -b feature/<name> or git checkout -b fix/<name>

Create PR (if not yet created)

Check whether a PR already exists for the current branch:

gh pr view --json number 2>/dev/null

If no PR exists, create one:

PR title

Summarize the changes concisely. Examples:

  • Fix BanyanDB query timeout issue
  • Add support for OpenTelemetry metrics

PR description

Read .github/PULL_REQUEST_TEMPLATE and use its exact format with checkboxes. Do NOT use a custom summary format.

Key template sections — uncomment the relevant one:

For Bug Fixes:

### Fix <bug description or issue link>
- [ ] Add a unit test to verify that the fix works.
- [ ] Explain briefly why the bug exists and how to fix it.

For New Features:

### <Feature description>
- [ ] If this is non-trivial feature, paste the links/URLs to the design doc.
- [ ] Update the documentation to include this new feature.
- [ ] Tests(including UT, IT, E2E) are added to verify the new feature.
- [ ] If it's UI related, attach the screenshots below.

For Performance Improvements:

### Improve the performance of <class or module or ...>
- [ ] Add a benchmark for the improvement.
- [ ] The benchmark result.
- [ ] Links/URLs to the theory proof or discussion articles/blogs.

Always include:

- [ ] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #<issue number>.
- [ ] Update the [`CHANGES` log](https://github.com/apache/skywalking/blob/master/docs/en/changes/changes.md).

Create command

gh pr create --title "<title>" --body "$(cat <<'EOF'
<PR body from template>
EOF
)"

Post-creation

  • Add copilot as a reviewer: gh pr edit <number> --add-reviewer copilot
  • Do NOT add AI assistant as co-author. Code responsibility is on the committer's hands.
  • Return the PR URL when done.

After the PR is merged

Once the PR is merged, sync the default branch and clean up the feature branch:

# 1. Prune stale remote refs. GitHub auto-deletes the PR's branch on merge, so
#    the remote feature branch is usually already gone; --prune removes the
#    dangling local tracking ref.
git fetch origin --prune

# 2. Switch back to the default branch and fast-forward it to include the merge.
git checkout master
git pull --ff-only origin master

# 3. Confirm the change actually landed in master before deleting anything —
#    `git log --oneline -1` should show the merge/squash commit with the PR
#    number, or grep for a symbol the PR introduced.
git log --oneline -1

# 4. Delete the local feature branch. SkyWalking SQUASH-merges PRs, so the
#    feature branch's commit is NOT an ancestor of master (master gets a new
#    squash commit instead). `git branch -d` therefore reports "not fully
#    merged" — that is expected, not an error. After confirming the content is
#    in master (step 3), force-delete:
git branch -d <branch> 2>/dev/null || git branch -D <branch>

Notes:

  • git branch -d failing with "not fully merged" on a squash-merged PR is normal — the squash commit has a different SHA than the feature commit. Verify via step 3, then -D.
  • If the remote branch was not auto-deleted (some repo settings), remove it explicitly: git push origin --delete <branch>.
  • Do NOT skip step 3. Force-deleting a local branch whose work didn't actually merge loses it.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

ci-e2e-debug

FreeSummary

Use this skill to investigate failed end-to-end tests in GitHub Actions. It downloads the run’s log artifacts, checks OAP and other component logs for errors, and summarizes the likely root cause, including failures in standalone test tools.

  • Investigating a failed GitHub Actions E2E run
  • Checking OAP and component logs for errors
  • Tracing failures in standalone test tools
apache/skywalking25KUpdated Oct 29, 2026

compile

FreeSummary

Validate SkyWalking OAP changes by building the backend or full project and running Javadoc and Checkstyle checks. Choose commands for a full CI-style build, a faster backend build, one check, or a single module before submitting a pull request.

  • Running a full build before a PR
  • Checking Javadoc output and errors
  • Building one backend module
apache/skywalking25KUpdated Oct 29, 2026

generate-classes

FreeSummary

Compile SkyWalking DSL scripts for MAL, OAL, LAL, or Hierarchy and save the generated .class files for inspection. Choose one DSL or generate classes for all four, then locate the output and use javap to examine bytecode.

  • Inspecting classes generated from MAL expressions
  • Examining OAL metrics or dispatcher bytecode
  • Generating LAL or Hierarchy classes for debugging
apache/skywalking25KUpdated Oct 29, 2026

license

FreeSummary

Check whether source files carry the required Apache 2.0 headers and whether the dependency license file matches current dependencies. Use the provided commands to fix headers or regenerate the license list, then review any changes before submitting a pull request.

  • Checking Apache license headers before a PR
  • Fixing missing or invalid source headers
  • Reviewing dependency license changes
apache/skywalking25KUpdated Oct 29, 2026

Plan how to add a monitoring target or layer to SkyWalking OAP. The guide maps signals such as metrics, logs, and spans to extension points, and identifies related layer registration, UI templates, documentation, and local verification work.

  • Planning a new SkyWalking monitoring layer
  • Choosing an extension point for metrics or logs
  • Identifying UI and documentation updates
apache/skywalking25KUpdated Oct 29, 2026

package

FreeSummary

Rebuild SkyWalking’s distribution and OAP Docker image after source changes, choosing a command sequence that includes the updated JARs. It also explains how to inspect the image contents before running end-to-end tests.

  • Rebuilding an OAP image after Java source changes
  • Updating the distribution package before Docker builds
  • Checking that a fix reached the image before E2E tests
apache/skywalking25KUpdated Oct 29, 2026

See all skills by apache

Report a problem with this skill