.claude/skills/pr/SKILL.md
Create a well-structured GitHub PR with proper branching, testing, formatting, and documentation. Use when the user says "create a PR", "make a PR", "open a pull request", or wants to submit changes for review. Handles the full workflow: branch creation, implementation, testing, formatting, committing, and PR creation with comprehensive descriptions.
npx skillsauth add talmolab/sleap-nn prInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill guides the complete PR workflow from branch creation to PR submission. Follow all steps in order to ensure high-quality, well-documented contributions.
git checkout main
git pull origin main
Use a descriptive branch name following the pattern: {type}/{description}
Types:
feature/ - New functionalityfix/ - Bug fixesrefactor/ - Code restructuringdocs/ - Documentation updatestest/ - Test additions/improvementsgit checkout -b feature/descriptive-name
Before coding, clearly identify:
If there's an associated GitHub issue, fetch it for context:
gh issue view <issue-number>
Tests go in the tests/ directory, mirroring the source structure.
test_{module_name}.py for module teststests/ subdirectoryCheck GitHub workflows for the project's formatting commands:
# Check .github/workflows/ for exact commands
# Typical formatting for this project:
uv run black sleap_nn tests
uv run ruff check sleap_nn/ --fix
Run the full test suite with coverage:
uv run pytest -q --maxfail=1 --cov --cov-branch && rm -f .coverage.* && uv run coverage annotate
The coverage annotate command creates {module_name.py},cover files next to each module.
To find which files changed:
git diff --name-only $(git merge-base origin/main HEAD)
Review the ,cover files for your changed modules to ensure adequate coverage.
| Marker | Meaning | |--------|---------| | > | Line was executed | | ! | Line was NOT executed (needs test coverage) | | - | Line is not executable (comments, blank lines) |
Make well-structured, atomic commits:
<type>: <short description>
<optional longer description>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Types: feat, fix, refactor, test, docs, chore
git push -u origin <branch-name>
gh pr create --title "<descriptive title>" --body "$(cat <<'EOF'
## Summary
<1-3 bullet points describing the changes>
## Changes Made
- <detailed list of changes>
## Example Usage
```python
# For enhancements, show how to use the new functionality
Closes #<issue-number> (if applicable)
🤖 Generated with Claude Code EOF )"
### If updating an existing PR
Fetch current PR description:
```bash
gh pr view <pr-number> --json body -q '.body'
Update PR description:
gh pr edit <pr-number> --body "<new body>"
If an issue is linked:
gh issue view <issue-number>
Use issue context to ensure PR description addresses all requirements.
# Branch setup
git checkout main && git pull origin main
git checkout -b feature/my-feature
# Format and lint
uv run black sleap_nn tests
uv run ruff check sleap_nn/ --fix
# Test with coverage
uv run pytest -q --maxfail=1 --cov --cov-branch && rm -f .coverage.* && uv run coverage annotate
# Find changed files
git diff --name-only $(git merge-base origin/main HEAD)
# Commit
git add <files>
git commit -m "feat: description"
# Push and create PR
git push -u origin <branch>
gh pr create --title "Title" --body "Description"
# View/edit existing PR
gh pr view <number>
gh pr edit <number> --body "New description"
# View linked issue
gh issue view <number>
development
Scaffolds a structured investigation in scratch/ for empirical research and documentation. Use when the user says "start an investigation" or wants to: trace code paths or data flow ("trace from X to Y", "what touches X", "follow the wiring"), document system architecture comprehensively ("document how the system works", "archeology"), investigate bugs ("figure out why X happens"), explore technical feasibility ("can we do X?"), or explore design options ("explore the API", "gather context", "design alternatives"). Creates dated folder with README. NOT for simple code questions or single-file searches.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.