Official agent skill

Create PR

by DataDog in DataDog/datadog-agent

Create a pull request for the current branch with proper labels and description.

OfficialApache-2.0Auto-check: notesDevelopment

Install Create PR

skills CLI
$ npx skills add DataDog/datadog-agent --skill create-pr -a claude-code

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

GitHub CLI
$ gh skill install DataDog/datadog-agent create-pr --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/DataDog/datadog-agent.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/create-pr .claude/skills/create-pr && 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
create-pr
GitHub stars
3.8k
Token cost
~2.6k tokens
SKILL.md length
1,442 words
Files
1
Skills in repo
35
Repo updated
First seen
Licence
Apache-2.0

At a glance

Create a pull request for the current branch with proper labels and description.

  • Works in 12 steps: Check the current branch. → Get the commits on this branch compared… → Get the diff using git diff main..HEAD… → …
  • Tasks that involve Pull requests
  • SKILL.md covers Instructions, PR Description Guidelines…, Backport Detection and Example, plus 2 more sections
  • Calls git, gh and codex

What it does

Create PR is an agent skill from DataDog/datadog-agent, published by the product's own GitHub organization. Create a pull request for the current branch with proper labels and description. Any agent opening a PR in this repo (via gh pr create or otherwise), whether invoked directly as /create-pr or as part of a larger task, MUST follow this skill's process rather than improvising.

Its SKILL.md is about 2.6k 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 Datadog and Git. The repository describes itself as: Main repository for Datadog Agent. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Pull requests

Example prompts

  • “/create-pr”

Requirements

  • Pre-approved tools (allowed-tools): Bash, Read, Glob

Workflow steps

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

  1. Check the current branch.
  2. Get the commits on this branch compared to main using git log main..HEAD
  3. Get the diff using git diff main..HEAD to understand all changes
  4. Read the PR template from .github/PULL_REQUEST_TEMPLATE.md
  5. Codex review (optional): Check if codex is installed (command -v codex). If it is, run a review against the default branch
  6. PR title: Use conventional commits format, prefixed with the general area of change. Examples
  7. Draft a concise PR description from the commits and diff, then show it to the user for confirmation before opening the PR. See "PR…
  8. Check for a needed backport (see "Backport Detection" below) and note the matching backport/ label(s) if applicable.
  9. Labels: Choose appropriate labels (plus any additional labels passed as $ARGUMENTS)
  10. PR body: Fill in the PR template sections
  11. Push the branch to origin if needed
  12. Open the PR: Now that the title, body, and labels are finalized and confirmed, open the PR. By default, open as Draft using gh pr create…

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Glob

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh
    • codex

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

  • Network

    Links to these hosts (documentation or services it may open):

    • conventionalcommits.org

    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

Create PR loads about 2.6k tokens when it runs. Until then it costs about 72 tokens; SKILL.md has 1,442 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Glob

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 DataDog/datadog-agent at commit a706f1a, republished under its Apache-2.0 licence (© DataDog). 1,442 words, ~2,640 tokens.

Download SKILL.mdSave it as .claude/skills/create-pr/SKILL.md (or your agent's skills folder).
name
create-pr
description
Create a pull request for the current branch with proper labels and description. Any agent opening a PR in this repo (via `gh pr create` or otherwise), whether invoked directly as /create-pr or as part of a larger task, MUST follow this skill's process rather than improvising.
allowed-tools
Bash, Read, Glob
argument-hint
[--real] [additional labels...]
model
sonnet

Create a pull request for the current branch following the Datadog Agent contributing guidelines.

This is the canonical process for opening PRs in this repo. disable-model-invocation: true only means the harness won't auto-invoke this skill as a tool call — it does not mean the process below is optional. Whenever you (or another agent/skill working in this repo) are about to run gh pr create for any reason — not just when the user explicitly types /create-pr — read and follow the steps below instead of assembling a title/body/labels ad hoc.

Ownership: maintained by @DataDog/agent-devx.

Prerequisites: the gh CLI must be installed and authenticated (gh auth status) with access to DataDog/datadog-agent, and origin must point at that repo (or a fork with push access) so git push and gh pr create succeed.

Instructions

  1. Check the current branch.
    • If the current branch is main (or the default branch):
      • Check for uncommitted or staged changes (git status). If there are changes, create a new feature branch from the default branch (git checkout -b <branch-name>), stage the changes, commit, and push.
      • If there are no changes at all, stop and inform the user there is nothing to open a PR for.
    • If the current branch is a feature branch that already has an open PR (gh pr list --head <branch> --state open), check whether the uncommitted/staged changes and unpushed commits are actually related to that PR's existing work. If they are a distinct, unrelated change, don't pile them onto the existing PR/branch — create a new feature branch from the default branch (git checkout main && git pull && git checkout -b <branch-name>), then cherry-pick/move the relevant changes onto it, commit, and push, so the unrelated change gets its own PR. If genuinely unsure whether the changes are related, ask the user.
  2. Get the commits on this branch compared to main using git log main..HEAD
  3. Get the diff using git diff main..HEAD to understand all changes
  4. Read the PR template from .github/PULL_REQUEST_TEMPLATE.md
  5. Codex review (optional): Check if codex is installed (command -v codex). If it is, run a review against the default branch:
    bash
    DEFAULT_BRANCH=$(git rev-parse --abbrev-ref origin/HEAD | sed 's|^origin/||')
    codex review --base "$DEFAULT_BRANCH"
    codex review is an LLM-based review and can take several minutes — do not bound it with a short Bash timeout, and do not let it get killed mid-run. Run it with run_in_background: true and wait for completion (or pass a generous timeout, e.g. the Bash tool max of 600000ms). If it's still running when you check back, keep waiting rather than treating it as done or skipping it, up to that 10-minute ceiling — if it still hasn't finished by then, note that to the user and proceed without it rather than stalling PR creation indefinitely. Show the review output to the user. If codex is not installed, skip this step silently.
  6. PR title: Use conventional commits format, prefixed with the general area of change. Examples:
    • fix(e2e): Fix flaky diagnose test
    • feat(logs): Add new log pipeline
    • refactor(config): Simplify endpoint resolution
  7. Draft a concise PR description from the commits and diff, then show it to the user for confirmation before opening the PR. See "PR Description Guidelines" below — keep the draft short and plain, like a human wrote it in two minutes, not AI-generated prose. Present the draft body (What does this PR do? / Motivation, at minimum) directly in your reply and ask the user to either confirm it as-is or give corrections/missing context (e.g. the real motivation, an issue link, a tradeoff worth mentioning) — don't ask an open-ended "what does this PR do?" question that puts the writing burden back on them. Fold any corrections in before proceeding. Do not open the PR until this confirmation is done.
  8. Check for a needed backport (see "Backport Detection" below) and note the matching backport/<branch> label(s) if applicable.
  9. Labels: Choose appropriate labels (plus any additional labels passed as $ARGUMENTS):
    • If the PR only changes tests, docs, CI config, or developer tooling (no Agent binary code changes), use changelog/no-changelog and qa/no-code-change
    • If the PR changes Agent binary code and QA was done, use qa/done
    • If the PR changes Agent binary code, a reno release note is expected (remind the user)
    • Add any backport/<branch-name> labels identified in step 8, or if the user explicitly asks for a specific backport
  10. PR body: Fill in the PR template sections:
  • What does this PR do?: A clear description of what is changed, based on the user's concise description from step 7. Must be readable independently, tying back to the changed code.
  • Motivation: A reason why the change is made. Point to an issue if applicable. Include drawbacks or tradeoffs if any.
  • Describe how you validated your changes: How you validated the change (tests added/run, benchmarks, manual testing). Only needed when testing included work not covered by test suites.
  • Additional Notes: Any extra context, links to predecessor PRs if part of a chain, notes that make code understanding easier. Only include this section if there is genuinely useful context to add — omit it entirely rather than filling it with filler.
  1. Push the branch to origin if needed
  2. Open the PR: Now that the title, body, and labels are finalized and confirmed, open the PR. By default, open as Draft using gh pr create --draft. If $ARGUMENTS contains --real, open as a regular (non-draft) PR instead (omit the --draft flag). Remove --real from $ARGUMENTS before processing remaining arguments as labels.
  3. Once the PR is pushed, ask the user if they want to follow CI status for this PR. If yes, invoke the /follow-pr skill.
Show full SKILL.md (522 more words)Show less

PR Description Guidelines (from CONTRIBUTING.md)

The PR description should incorporate everything reviewers and future maintainers need:

  • A description of what is changed
  • A reason why the change is made (pointing to an issue is a good reason)
  • When testing had to include work not covered by test suites, a description of how you validated your change
  • Any relevant benchmarks
  • Additional notes that make code understanding easier
  • If part of a chain of PRs, point to the predecessors
  • If there are drawbacks or tradeoffs, raise them

Avoid AI slop. Reviewers can tell when a PR description was auto-generated from a diff — padded, generic, restating the code instead of explaining intent. To avoid this:

  • Draft the description yourself (step 7), but always show it to the user and let them correct or add context before it's final — don't ship your first draft unchecked, and don't outsource the writing to the user either.
  • Keep it short. A few sentences beat a bulleted essay. Don't restate every changed file — the diff already shows that.
  • Don't pad sections with filler when there's nothing to say (e.g. an empty-but-present "Additional Notes" section, or a "Describe how you validated" filled with "N/A" — omit instead).
  • Write plainly, the way the user would describe it in Slack to a teammate, not like a press release ("This PR introduces a robust, comprehensive solution to...").

Backport Detection

Before finalizing labels, determine whether this change likely needs to be backported to a release branch:

  1. List "living" release branch labels: run gh label list --search backport/7 --limit 5. We can limit to 5 as there should not be more than 2 active releases. Equivalently: gh api repos/{owner}/{repo}/labels --paginate --jq '.[] | select(.name | startswith("backport/7")) | .name + " | " + (.description // "")'. Only labels whose description mentions automatic backport-PR creation (e.g. "Automatically create a backport PR to ... once the PR is merged") correspond to active release branches — the repo keeps many old <version>.x branches around that are no longer maintained, so branch existence alone (git ls-remote --heads origin) is not a reliable signal.
  2. Compare against the base branch's target milestone: read release.json's base_branch / current_milestone to see what's currently in development on main. A change merged to main is typically only backported if the same fix is needed in a still-supported release (e.g. a bug also present in the currently-shipping minor version).
  3. Decide relevance: this is a judgment call, not automatic — a new feature usually does not need a backport; a bug fix, security fix, or CI/build resilience fix often does, if the affected release branch(es) still exist and are active. If genuinely unsure, ask the user.
  4. If a backport is warranted, propose the specific backport/<version>.x label(s) to the user for confirmation before adding them — don't silently add backport labels.

Example

bash
gh pr create --draft \
  --title "fix(e2e): Fix flaky diagnose test by adding missing fakeintake redirect" \
  --label "changelog/no-changelog" \
  --label "qa/no-code-change" \
  --body "$(cat <<'EOF'
### What does this PR do?

The diagnose E2E test flaked because it hit fakeintake directly instead of
through the redirect the agent config sets up. Route it through the same
path the agent uses.

### Motivation

Flaked ~1 in 5 runs on main, blocking merges for unrelated PRs.

### Describe how you validated your changes

Ran the test 20x locally with the fix; no failures (previously failed ~4/20).
EOF
)"

Note there is no "Additional Notes" section here — it was omitted because there was nothing beyond the two sections above worth adding, per the "no filler" guidance.

Usage

  • /create-pr — creates a draft PR (default)
  • /create-pr --real — creates a non-draft PR
  • /create-pr --real team/my-team — non-draft PR with an extra label

Output

If you are not following the PR status (step 13): Return the PR URL when done. Otherwise, defer to /follow-pr.

© DataDog, Apache-2.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/create-pr of DataDog/datadog-agent.

Open the folder on GitHubat commit a706f1a

Compare with similar skills

Create PR 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.

Create PR compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Create PR this skillDataDog/datadog-agent3.8k—~2.6kAutomated safety check: NotesApache-2.0
Datadog Data Source GeneratorDataDog/terraform-provider-datadog468—~2.7kAutomated safety check: PassMPL-2.0
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Code Design Rationale Investigatorcursor/plugins10k9 repos~2.6kAutomated safety check: PassNone
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Open Code Review CLIalibaba/open-code-review45k—~3.1kAutomated safety check: PassApache-2.0

Similar skills

  • Datadog Data Source Generator

    DataDog/terraform-provider-datadog

    Official

    Generates a Datadog Terraform provider data source from an OpenAPI operation with tfgen and opens a review-ready GitHub PR with a risk scan and testing guide.

    468 GitHub stars~2.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Official

    Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs.

    10k GitHub starsUsed in 9 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Open Code Review CLI

    alibaba/open-code-review

    Runs the ocr command-line tool to review Git changes, a commit or a branch comparison with an AI model, returning line-level comments and optionally applying fixes.

    45k GitHub stars~3.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed

More from DataDog/datadog-agent

All 35 skills in this repo
  • Triage CI Failure

    DataDog/datadog-agent

    Official

    Classify a failed CI as either caused by an active incident, flakiness, or a true code regression.

    3.8k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Elicit

    DataDog/datadog-agent

    Official

    Run a structured discovery session to build an Allium specification through conversation.

    3.8k GitHub starsUsed in 1 repo~3.7k tokens
    Auto-check passed
  • Follow PR

    DataDog/datadog-agent

    Official

    Monitor the current PR's GitLab pipeline to completion, then report success, auto-fix, or investigate a failure.

    3.8k GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Create Epic Recap

    DataDog/datadog-agent

    Official

    A skill your agent uses when an engineer or manager asks to recap, summarize, or post an update on a Jira Epic — a progress update for an in-progress Epic (how far along it is, what's shipped so…

    3.8k GitHub stars~5k tokensUpdated today
    Auto-check: notes
  • Explain Lading Config

    DataDog/datadog-agent

    Official

    Explains a lading.yaml config file from the regression test suite, using the lading Rust source as ground truth for field meanings and defaults.

    3.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Distill

    DataDog/datadog-agent

    Official

    Extract an Allium specification from an existing codebase. An agent skill from DataDog/datadog-agent.

    3.8k GitHub starsUsed in 1 repo~7k tokens
    Auto-check passed

Works with

Categories

Questions about Create PR

What does Create PR do?

Create a pull request for the current branch with proper labels and description. Create PR is an agent skill from DataDog/datadog-agent, published by the product's own GitHub organization. Create a pull request for the current branch with proper labels and description.

When should I use Create PR?

Create PR fits situations like: tasks that involve Pull requests.

How do I install Create PR in Claude Code?

Run `npx skills add DataDog/datadog-agent --skill create-pr -a claude-code`. Or copy the skill folder (.agents/skills/create-pr in DataDog/datadog-agent) into .claude/skills/create-pr in your project. Claude Code loads it when a task matches its description.

How do I install Create PR in Codex?

Run `npx skills add DataDog/datadog-agent --skill create-pr -a codex`. Or copy the skill folder (.agents/skills/create-pr in DataDog/datadog-agent) into .agents/skills/create-pr in your project. Codex loads it when a task matches its description.

Can I use Create PR 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 DataDog/datadog-agent --skill create-pr -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/create-pr, .gemini/skills/create-pr, .github/skills/create-pr and .opencode/skills/create-pr in your project.

What does Create PR need to run?

Going by SKILL.md and its folder, Create PR needs the command-line tools its instructions call (git, gh and codex). Its frontmatter pre-approves these tools: Bash, Read, Glob.

Does Create PR access the network?

SKILL.md names 1 domain. As links in the text: conventionalcommits.org. This is read from the text; nothing was executed.

Is Create PR safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Create PR use?

Create PR is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Create PR use?

About 2.6k 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 Create PR?

Skills that share tags, products or a category with Create PR: Datadog Data Source Generator (DataDog/terraform-provider-datadog, 468 stars), Finishing a Development Branch (obra/superpowers, 297k stars), Code Design Rationale Investigator (cursor/plugins, 10k stars) and Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Create PR?

DataDog (a GitHub organization, an official publisher) maintains it in DataDog/datadog-agent, which has 3,759 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on October 9, 2026.

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