Skip to content

Commit df39a83

Browse files
committed
chore(ai): align skill rules for commit and PR
1 parent 61c8bf2 commit df39a83

3 files changed

Lines changed: 47 additions & 11 deletions

File tree

.agents/skills/commit-guidelines/SKILL.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ description: Guidelines for analyzing changes and creating branches and commits
77

88
- **MUST NOT** skip hooks execution under any circumstances
99

10-
## 1: Analyze Changes
10+
## Analyze Changes
1111

12+
- Perform a comprehensive review of all the changes
1213
- Perform a full security analysis before committing (see `security` skill)
1314
- Validate documentation and reference integrity (e.g. documentation links, path references, hardcoded paths, test file references)
1415
- Analyze diffs and identify:
@@ -18,14 +19,17 @@ description: Guidelines for analyzing changes and creating branches and commits
1819
- Atomic operations across multiple files
1920
- Small related changes
2021
- Breaking changes
21-
- Determine commit message constraints before drafting messages:
22-
- Check for commitlint configuration in this order: `commitlint.config.*`, `.commitlintrc*`, then `package.json` `commitlint` section
23-
- If commitlint config exists, follow its rules (including inherited presets)
24-
- If no commitlint config exists, use Conventional Commits (`<type>[(<scope>)][!]: <summary>`)
2522

26-
## 2: Branch and Commit
23+
## Branch
2724

2825
- Create a new branch using concise AND descriptive branch names from analysis. It is your job to generate the branch name, do not ask the user to provide it
26+
27+
## Commit
28+
29+
- **MUST** determine and follow commit title and message constraints before drafting messages:
30+
- Check for commitlint configuration in this order: `commitlint.config.*`, `.commitlintrc*`, then `package.json` `commitlint` section
31+
- If commitlint config exists, follow its rules (including inherited presets)
32+
- If no commitlint config exists, use Conventional Commits (`<type>[(<scope>)][!]: <summary>`)
2933
- Create separate commits for:
3034
- Different functional areas or independent concerns
3135
- Different change types
@@ -37,4 +41,6 @@ description: Guidelines for analyzing changes and creating branches and commits
3741
- Breaking changes should be clearly marked and include details
3842
- Request explicit approval, never auto-commit without user confirmation
3943

40-
> For pushing and opening a pull request, see `pr-guidelines` skill.
44+
## Pull Request
45+
46+
- For pushing and opening a pull request, see `pr-guidelines` skill.

.agents/skills/github-cli/SKILL.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: github-cli
3+
description: Rules for using gh CLI for all GitHub interactions.
4+
---
5+
6+
# GitHub CLI Rules
7+
8+
> [!IMPORTANT]
9+
> All rules and guidelines in this document are **MANDATORY**
10+
11+
## Core Rule
12+
13+
- Use `gh` CLI for all GitHub interactions when `gh` is available.
14+
- Do not use generic web fetching tools for GitHub URLs when the same operation can be done with `gh`.
15+
16+
## Required Usage
17+
18+
- Repository and file content: use `gh api`.
19+
- Pull requests: use `gh pr` and `gh api`.
20+
- Issues: use `gh issue` and `gh api`.
21+
- Checks, runs, and releases: use `gh run`, `gh release`, and `gh api`.
22+
- Authentication and context checks: use `gh auth status` and related `gh` commands.
23+
24+
## Examples
25+
26+
- List docs directory: `gh api repos/jdx/mise/contents/docs`
27+
- Read a file raw: `gh api repos/jdx/mise/contents/docs/tasks/file-tasks.md -H "Accept: application/vnd.github.raw+json"`
28+
- View PR comments: `gh api repos/<owner>/<repo>/pulls/<number>/comments`
29+
30+
## Fallback
31+
32+
- If `gh` is not installed or not authenticated, report the exact blocker and next command needed.
33+
- Do not silently switch to web fetch for GitHub operations.

.agents/skills/pr-guidelines/SKILL.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ description: Guidelines for pushing branches and creating pull requests with pro
1515

1616
## 2: Pull Request
1717

18-
- Determine pull request title rules before drafting:
19-
- Check for commitlint configuration in this order: `commitlint.config.*`, `.commitlintrc*`, then `package.json` `commitlint` section
20-
- If commitlint config exists, align the pull request title format to those rules
21-
- If no commitlint config exists, use Conventional Commits-compatible format (`<type>[(<scope>)][!]: <summary>`)
18+
- PR title and message formatting **MUST** follow the same guidelines as commits
2219
- The pull request body should include a brief summary of the changes and any relevant context or notes for the reviewer
2320
- **MUST NOT** include commit messages in the pull request body — these are clear from the PR's commit history and will quickly become stale
2421
- Reference any related issues or pull requests where relevant

0 commit comments

Comments
 (0)