finalize-task
Skill0 starsChanged 3 months agoMITView on GitHub
Commit, squash, push, and create a PR for the current branch.
- Reads credentials
- Commits and pushes
3 other projects use a version of this.
Adopted by
Most recently taken up by
- etr/groundworktheir own version, first seen Nov 8, 2026
- blockscout/frontendtheir own version, first seen Oct 8, 2026
- Ozgurx360/claude-skillstheir own version, first seen Jun 9, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- blockscout/frontend★ 310same name
- etr/groundwork★ 45same name
- Ozgurx360/claude-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository27 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- buildSkill
- cleanup-worktreeSkill
- db-querySkill
- db-searchSkill
- dd-errorsSkill
- devops-wiki-updateSkill
- devops-workitem-createSkill
- devops-workitem-readSkill
- devops-workitem-updateSkill
- find-codeSkill
- merge-mainSkill
- panel-review-fixSkill
- panel-reviewSkill
- prSkill
- rebase-mainSkill
- starttaskSkill
- testSkill
- ask-codexSkill
- ask-geminiSkill
- councilSkill
- dailySkill
- find-sessionSkill
- merged-prsSkill
- mm-notifySkill
- optimize-promptSkill
- qSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 8 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
If there are staged or unstaged changes:
- Distinctive: line 32
If the working tree is clean, skip this step.
- Distinctive: line 36
If there are multiple commits on this branch (vs main):
- Distinctive: line 39
Create a single commit with a message that summarizes ALL the changes across all commits
- Distinctive: line 40
Use a clear, descriptive commit message
- Distinctive: line 42
If there is only one commit, skip this step.
- Very specific: line 50
Use --force-with-lease since we may have squashed (safe force push that won't overwrite others' work).
- Distinctive: line 56
Use PowerShell to create the PR via Azure DevOps REST API:
- Very specific: line 72
PR title: Use $ARGUMENTS if provided, otherwise generate from the commit message.
- Distinctive: line 86
Commit hash and message
- Very specific: line 102
Always use -UseDefaultCredentials for Windows auth
- Very specific: line 103
Always use --force-with-lease (not --force) when pushing after squash
- Very specific: line 104
Use PowerShell Invoke-RestMethod for API calls (not curl) — it handles Windows auth natively
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Finalize Task
Optional arguments: $ARGUMENTS
Your task
Complete the current branch by committing all changes, squashing into a single commit, pushing, and creating a pull request.
Steps
1. Gather context (run in parallel)
git status— check for uncommitted changesgit log --oneline main..HEAD— see all commits on this branchgit diff --stat main..HEAD— see all changed files vs maingit rev-parse --abbrev-ref HEAD— get current branch name
2. Commit any uncommitted changes
If there are staged or unstaged changes:
- Stage all relevant changes (be specific with file paths, avoid secrets like
.env) - Generate a concise commit message describing the changes
- Commit
If the working tree is clean, skip this step.
3. Squash commits
If there are multiple commits on this branch (vs main):
- Find the merge base:
git merge-base main HEAD - Soft-reset to the merge base:
git reset --soft <merge-base> - Create a single commit with a message that summarizes ALL the changes across all commits
- Use a clear, descriptive commit message
If there is only one commit, skip this step.
4. Push
git push -u origin <branch> --force-with-leaseUse --force-with-lease since we may have squashed (safe force push that won't overwrite others' work).
5. Create Pull Request
Extract the work item ID from the branch name (format: feature/<ID>_<ShortName>).
Use PowerShell to create the PR via Azure DevOps REST API:
$repoId = "<REPO_ID>"
$baseUrl = "https://devops.example.com/DefaultCollection/MyProject/_apis/git/repositories/$repoId"
$body = @{
sourceRefName = "refs/heads/<branch>"
targetRefName = "refs/heads/main"
title = "<title>"
description = "<description>"
} | ConvertTo-Json -Depth 5
Invoke-RestMethod -Uri "$baseUrl/pullrequests?api-version=6.0" -Method Post -Body $body -ContentType "application/json" -UseDefaultCredentialsPR title: Use $ARGUMENTS if provided, otherwise generate from the commit message. Include the work item ID as (#<ID>) at the end.
PR description: Generate a summary with:
## Summary
- bullet points describing the changes
## Test plan
- [ ] relevant test steps6. Report success
Display:
- Commit hash and message
- Number of commits squashed (if any)
- PR URL:
https://devops.example.com/DefaultCollection/MyProject/_git/Payments/pullrequest/{id}
Edge cases
- No changes and no commits: Report that there's nothing to finalize
- PR already exists for this branch: Report the existing PR URL instead of creating a duplicate. Find it via:
Invoke-RestMethod -Uri "$baseUrl/pullrequests?searchCriteria.sourceRefName=refs/heads/<branch>&api-version=6.0" -UseDefaultCredentials - Branch is
main: Refuse and tell the user to work on a feature branch - Push fails: Report the error, do not retry blindly
Important
- Always use
-UseDefaultCredentialsfor Windows auth - Always use
--force-with-lease(not--force) when pushing after squash - Use PowerShell
Invoke-RestMethodfor API calls (not curl) — it handles Windows auth natively - Save PowerShell scripts to temp files if commands get complex, to avoid escaping issues
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

