Update the current story's acceptance criteria checkboxes based on recent git history, then sync the updated body back to the linked GitHub issue. Use when the user says "update story", "mark AC done", "sync story", or "update the issue".
76
96%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Sync the current branch's story markdown file with what has actually been completed, then push the updated AC back to the linked GitHub issue.
Extract the issue number from the current branch name:
git rev-parse --abbrev-ref HEADBranch naming convention is OPS-NNNN/description — the issue number is the digits after OPS-.
If the branch name has no OPS-NNNN pattern, ask the developer: "I couldn't detect an issue number from the branch name. What is the GitHub issue number for this work?"
Look for a story file in .claude/stories/ whose frontmatter contains a matching issue: field:
grep -rl "issue: <NUMBER>" .claude/stories/If multiple files match, list them and ask the developer which one to update.
If no file matches, list all story files and ask the user which one applies:
ls .claude/stories/If .claude/stories/ is empty or doesn't exist, ask: "No story file found for this branch. Would you like to create one now?" If yes, invoke the /init-story skill and stop — /update-story will be runnable once the story file exists.
Read the story file in full before proceeding.
Collect all commits on this branch since it diverged from main:
git log main..HEAD --onelineRead the full diff to understand what was actually implemented — not just filenames:
git diff main..HEADFor large diffs, use git log -p main..HEAD to get the full patch per commit.
Compare the commits and full diff against each unchecked AC item in the story file.
Rules:
[x] — only evaluate currently unchecked items[x] only when you are confident the work is clearly reflected in the code diff — not speculatively based on commit messages aloneEdit the story file to update the checkboxes. Do not change any other content.
Fetch the current issue body from GitHub:
gh issue view <NUMBER> --json body -q .bodyIf this command fails, tell the developer what failed, show them the updated story file content, and ask them to paste the updated AC section into the GitHub issue manually. Stop here.
Merge AC state carefully — do not treat the story file as the sole authority:
[x]) if it is checked in either the story file or the current GitHub issue body. This prevents overwriting boxes a PM or reviewer checked directly on GitHub.To find the AC section boundary in the issue body, look for a heading matching Acceptance Criteria (any markdown heading level or bold format). Replace only the content between that heading and the next heading (or end of section). If no recognizable AC section header exists, append the updated AC at the end of the issue body rather than replacing — and tell the developer so they can reformat manually if needed.
Write the updated body to a temp file using the Write tool (not shell redirection — avoids quoting issues with %, $, backticks, and quotes), then pass it via --body-file:
# Use the Write tool to write the updated body to a temp path, e.g. /tmp/issue-body.md
gh issue edit <NUMBER> --body-file /tmp/issue-body.md
rm /tmp/issue-body.mdIf this command fails, tell the developer what failed and show them the full updated body to paste manually.
Tell the user:
https://github.com/HHS/OPRE-OPS/issues/<NUMBER>gh commands failed, clearly state that the GitHub sync did not complete and what to do next4ff5a51
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.