askill
finalize

finalizeSafety 94Repository

Post-implementation completion workflow: lint, test, clean up, commit, and create PR. Triggers: "finalize", "commit this", "wrap up", "create PR", "ship it", "done implementing".

13 stars
1.2k downloads
Updated 3/27/2026

Package Files

Loading files...
SKILL.md

Finalize

What I'll do

Run the full completion pipeline: lint → test → clean up → commit → PR. Ensures nothing ships without passing quality gates and nothing is left behind.

Inputs I'll use (ask only if missing)

  • What was implemented (feature name or branch)
  • Target branch for PR (default: main)
  • Any files to exclude from commit (.env, credentials, large binaries)

How I'll think about this

1. SCAN — Detect what needs finalizing

git status                              # uncommitted changes
git worktree list                       # orphaned worktrees
git branch --no-merged main             # unmerged feature branches
find . -name "*.orig" -o -name "*.bak"  # temp files
ls .worktrees/ 2>/dev/null              # stale worktree dirs

Report what was found before proceeding.

2. LINT — Run language-appropriate linters

StackCommand
Java / Mavenmvn checkstyle:check spotbugs:check -q
Java / Gradle./gradlew checkstyleMain spotbugsMain
React / TypeScriptnpx eslint . --ext .ts,.tsx && npx tsc --noEmit
Flutter / Dartdart analyze && dart format --set-exit-if-changed .
Android / Kotlin./gradlew ktlintCheck detekt
AngularJSnpx eslint . --ext .js

Show actual linter output. If lint fails:

  • Auto-fix what can be auto-fixed (eslint --fix, dart format)
  • Surface remaining issues and fix them
  • Re-run to confirm clean

3. TEST — Run test suites

StackCommand
Java / Mavenmvn test -q
Java / Gradle./gradlew test
React / Vitestnpx vitest run
Flutterflutter test
Android./gradlew testDebugUnitTest
Playwrightnpx playwright test

Show actual test output with pass/fail counts. If tests fail → fix and re-run. Do NOT proceed with failing tests.

4. CLEAN — Remove debris

# Worktree cleanup
git worktree prune
rm -rf .worktrees/ 2>/dev/null

# Stale branches (only merged ones)
git branch --merged main | grep -v main | grep -v '\*' | xargs -r git branch -d

# Temp files
find . -name "*.orig" -name "*.bak" -name ".DS_Store" -delete 2>/dev/null
rm -f e2e/.captures.json 2>/dev/null

# Build artifacts (don't commit these)
# Check .gitignore covers: node_modules, target, build, .gradle, .dart_tool

5. STAGE — Selective git add

# Stage specific files — NEVER git add -A blindly
# Exclude: .env, credentials, secrets, large binaries, build dirs
git add <specific files and directories>

# Review what's staged
git diff --cached --stat

Show the staged file list to user for confirmation.

6. COMMIT — Conventional commit

git commit -m "<type>(<scope>): <description>"
  • Derive type from changes: feat, fix, refactor, test, docs, chore
  • Derive scope from primary directory changed
  • Description from the feature/task name

7. PR — Create pull request

gh pr create --title "<title>" --body "$(cat <<'EOF'
## Summary
<bullet points of what changed>

## Test Results
<paste actual test output summary>

## Checklist
- [ ] Lint: clean
- [ ] Tests: all passing
- [ ] No orphaned worktrees or temp files
- [ ] No secrets or credentials in diff
EOF
)"

Return the PR URL.

Anti-patterns to flag

  • ⚠️ Committing with failing tests
  • ⚠️ git add -A without reviewing what's staged
  • ⚠️ Committing .env, credentials, or secrets
  • ⚠️ Leaving orphaned worktrees or feature branches
  • ⚠️ Empty commit messages or non-conventional format
  • ⚠️ Skipping lint because "it's just a small change"

Quality bar

  • ✅ Zero lint errors on committed code
  • ✅ All tests pass with actual output shown
  • ✅ No orphaned worktrees or stale branches remain
  • ✅ No temp files, build artifacts, or secrets in the commit
  • ✅ PR created with summary and test evidence
  • ✅ Conventional commit message with correct type and scope

Workflow context

  • Follows: /spec-to-impl, /verify-impl, or any manual implementation work
  • Feeds into: /pr-review (PR is ready for review)
  • Related: /release-notes (PR description feeds release notes)

Output contract

produces:
  - type: git_commit
    ref: "<commit SHA>"
  - type: pull_request
    url: "<PR URL>"
    branch: "<branch name>"
  - type: evidence
    lint_output: "<actual linter stdout>"
    test_output: "<actual test runner stdout>"
    files_committed: ["<list>"]

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

94/100Analyzed 3/28/2026

Excellent, production-ready skill document. Comprehensive 7-step workflow (SCAN→LINT→TEST→CLEAN→STAGE→COMMIT→PR) with multi-stack commands, clear anti-patterns, quality gates, and structured output contract. Strong actionability, safety warnings, and reusability. Minor deduction for generic metadata field.

94
96
92
96
95

Metadata

Licenseunknown
Version-
Updated3/27/2026
PublisherOmexIT

Tags

ci-cdgithub-actionslintingtesting