accountable-engineerin…
Use explicit human checkpoints for architecture, security, rollout, or operational decisions.
Draft pull requests with structured descriptions using gh CLI
$ npx -y skills add jellydn/my-ai-tools --skill draft-pull-request --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/draft-pull-requestContext preview
The summary Claude sees to decide when to auto-load this skill.
Draft pull requests with structured descriptions using gh CLI
name: draft-pull-request description: "Draft pull requests with structured descriptions using gh CLI" license: MIT compatibility: cline, claude, opencode, amp, codex, gemini, cursor, pi hint: Use when creating or updating a draft pull request with a structured description using gh CLI user-invocable: true disable-model-invocation: true metadata: audience: all workflow: git
Create a draft pull request, or update the current branch's PR, with a **What / Why / How** description. The description must let a reviewer understand why the change exists and the shape of the implementation without reading every line of the diff.
/draft-pull-request [title]
| File | Read when | | -------------------------------------------- | ---------------------------------------------------------- | | `$SKILL_PATH/references/pr-body-template.md` | Always, before you write the PR body | | `$SKILL_PATH/references/change-outline.md` | The **How** section needs a file tree, call tree, or shape |
BASE_BRANCH=$(gh repo view --json defaultBranchRef -q '.defaultBranchRef.name') git branch --show-current git status --short --branch # Reuse an existing PR for this branch instead of opening a duplicate gh pr view --json number,url,title,state,isDraft,baseRefName,body 2>/dev/null
its body in step 4. Do not create a second PR or change its draft state.
from the default branch.
unfamiliar changes uncommitted and mention them in the final report.
git fetch origin "$BASE_BRANCH" --quiet git log "origin/$BASE_BRANCH"..HEAD --oneline git diff "origin/$BASE_BRANCH"...HEAD --stat git diff "origin/$BASE_BRANCH"...HEAD
This stays correct when the branch lives in a fork and `origin` is not the base repository.
1. Read `$SKILL_PATH/references/pr-body-template.md` and follow its rules. 2. If the repository has its own PR template (`.github/pull_request_template.md`, `.github/PULL_REQUEST_TEMPLATE/`, or `docs/pull_request_template.md`), keep its headings and checklists, and put the What / Why / How content into the matching sections. 3. When prose alone does not show the shape of the change, read `$SKILL_PATH/references/change-outline.md` and add one to three small views to **How**. 4. Write the body to a temporary file, not to the repository:
BODY_FILE=$(mktemp "${TMPDIR:-/tmp}/pr-body.XXXXXX")# Never force-push. git push -u origin HEAD # New PR gh pr create --draft --base "$BASE_BRANCH" --title "<PR title>" --body-file "$BODY_FILE" # Existing PR from step 1 gh pr edit <number> --body-file "$BODY_FILE"
Use `--body-file` instead of `--body` so that Markdown, backticks, and code fences survive shell quoting.
`gh pr edit --body-file` replaces the whole body. Before you edit an existing PR, carry over from its current `body` anything the diff cannot tell you: links, reviewer notes, and checklist items that someone ticked and that still apply.
gh pr view --json url,title,isDraft -q '"\(.url) draft=\(.isDraft) \(.title)"' rm -f "$BODY_FILE"
Reply with:
- PR: [#<number> <title>](<url>) (<draft or ready for review, from isDraft>) - Summary: <2-3 sentences: what the PR does and the key decision> - Validation: <commands run and their results, or "not run"> - Left out: <uncommitted or unrelated changes, or "none">
Closes #142 ## What Add a refresh-token endpoint and automatic token renewal in the API client. ## Why Users are logged out when the 1-hour access token expires, which interrupts long sessions. ## How - `POST /auth/refresh` validates the HttpOnly refresh cookie and issues a new access token. - The API client retries a `401` response once, after a refresh, before it shows an error. ```diff request(url) send with access token + if status is 401 and not retried + refreshToken() + retry once return response
Portable, source-controlled configuration for AI coding assistants. my-ai-tools installs one consistent set of agent guidelines, skills, commands, hooks, MCP servers, and tool settings across supported AI coding assistants.
Use explicit human checkpoints for architecture, security, rollout, or operational decisions.
Record architecture decisions with ADRs — captures why, alternatives considered, and consequences
Use when monitoring an open GitHub PR for CI failures, review feedback, mergeability, and safe retries or fixes.
Inspect history and architecture for hidden constraints before risky cross-cutting changes.
Build an interactive report or experiment when the user asks to explore model capabilities.
Audit a diff for structural maintainability and unnecessary complexity.