V2

From aws-samples/sample-agent-skill-eval · View interactive version

V2 is an AI agent skill from the GitHub repository aws-samples/sample-agent-skill-eval. Validates PR titles and branch names against the company naming convention. Use when the user mentions PR titles, branch naming, pull request naming conventions, or asks to check whether a PR title or branch name follows the standard format.

How to use this skill

Skill file

PR Naming Convention Validator

This skill validates pull request titles and branch names against the company's

standardized naming convention. It helps catch formatting issues before code review.

When to use this skill

Convention summary

PR title format: [TEAM-<number>] <type>: <description>

Branch name format: <team>/<ticket>-<description>

For the full convention with examples and edge cases, read

references/naming-rules.md in this skill's directory.

How to validate

Use the validation script at scripts/check_pr.py in this skill's directory.

The script uses pure regex matching — no shell commands, no eval, no external

dependencies beyond Python's standard library.

Validating a PR title

python <skill-path>/scripts/check_pr.py title "[TEAM-42] feat: add user authentication"

Validating a branch name

python <skill-path>/scripts/check_pr.py branch "platform/TEAM-42-add-auth"

Output format

The script prints a JSON object to stdout:

{
  "valid": true,
  "input": "[TEAM-42] feat: add user authentication",
  "type": "title"
}

On failure, the output includes an errors array explaining what went wrong:

{
  "valid": false,
  "input": "fix stuff",
  "type": "title",
  "errors": [
    "PR title must match format: [TEAM-<number>] <type>: <description>"
  ]
}

Helping users fix issues

When a PR title or branch name fails validation, don't just report the error —

suggest a corrected version. For example:

User input: "added login feature for TEAM-42"

Suggested fix: "[TEAM-42] feat: add login feature"

User input (branch): "feature/login-page"

Suggested fix: "platform/TEAM-42-add-login-page" (ask the user for the

team name and ticket number if not provided)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.