finish-up-pr
Finalize a PR by cleaning up comments, verifying test coverage, checking README accuracy, tightening type specs, and reviewing the PR title and description.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Finalize a PR by cleaning up comments, verifying test coverage, checking README accuracy, tightening type specs, and reviewing the PR title and description.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Prepare and publish a new release. Updates CHANGELOG.md and README.md with version information, analyzes git commits to determine semantic version, and guides through the release process.
Review and address open (unresolved) GitHub PR review comments. Assesses relevance, correctness, and whether to implement in this PR or as a follow-up. For bugs, writes a failing test first. For design issues, considers updating CLAUDE.md.
| name | finish-up-pr |
| description | Finalize a PR by cleaning up comments, verifying test coverage, checking README accuracy, tightening type specs, and reviewing the PR title and description. |
You are performing a final quality pass on the current PR before it is merged. Work through each step below in order, making fixes directly in the code.
Get the full diff of this branch against main:
git diff main...HEAD
git diff main...HEAD --stat
git log main..HEAD --oneline
Read every changed file in full before making any edits. Build a clear picture of:
In each changed file, look for and remove:
%% old_function(X) -> ...)%% TODO: fix this that refer to work already done in this PR%% Increment counter above Counter + 1)Do NOT remove:
After removing, run make format to re-format.
Identify every function and type that was added or meaningfully changed in this PR.
For each changed public function or behaviour, verify there is:
Check the test files in test/ for coverage. Prefer calling through spectra.erl for public API tests; use internal modules like spectra_json.erl only when you are explicitly testing internal behaviour.
If a function is missing a positive or negative test, write one. Place new tests in the appropriate existing test file, or create a new test/<feature>_test.erl file if none exists.
After adding tests, run:
make build-test
Report which tests were added and which functions they cover.
Read README.md in full and compare it against the changes made in this PR.
Check for:
If the README is out of date, update it. Keep additions concise and consistent with the existing style.
Review all type definitions (-type, -opaque) and function specs (-spec) in changed files.
Look for types that are less specific than they should be:
tuple() where a record type like #some_record{} could be usedany() or term() where a concrete type is knownlist() where [specific_type()] could be usedinteger() where a range like 1..5 or a union of literals would be more preciseatom() where a union of specific atoms (e.g., ok | error | pending) applies{ok, term()} | {error, term()} that could name their payload typesFor each loosely-typed spec you find:
After changes, run:
make format
make build-test
Fetch the current PR title and body:
gh pr view --json title,body
Compare them against the actual changes in this PR (git log main..HEAD --oneline and the diff).
Check for:
If the title or description is out of date, suggest an updated version and ask the user whether to apply it. Use:
gh pr edit --title "new title" --body "new body"
Run the full test suite including property-based tests:
make proper
If make proper fails, investigate and fix before finishing.
Report back to the user with a concise summary: