scopes: Command for Claude Code

.claude/commands/pm/epic-refresh.md

epic-refresh is a command for Claude Code from kamiazya/scopes. It costs 0 tokens per session (695 once invoked), scanned A, original, Apache-2.0.

A command that recalculates an epic's progress from the states of its tasks. An epic is a larger piece of work split into smaller tasks.

In plain words
What is it for?
Use it to scan an epic's task files, calculate the percentage completed, and update matching GitHub issue checkboxes when the epic is linked to GitHub.
Why use it?
It replaces a possibly outdated progress value with one based on how many tasks are closed, open, or in progress.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is kamiazya/scopes's own configuration. It tells Claude Code how to work on scopes itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything scopes configures →

Reuse

Borrowing it

Nothing to install: this file belongs to kamiazya/scopes. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/kamiazya/scopes/main/.claude/commands/pm/epic-refresh.md
Clone the repo
git clone --depth 1 https://github.com/kamiazya/scopes

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for epic-refresh

README.md
[![agentmods](https://agentmods.dev/badge/commands/kamiazya/scopes/epic-refresh/github.svg)](https://agentmods.dev/commands/kamiazya/scopes/epic-refresh)
Your own site
<a href="https://agentmods.dev/commands/kamiazya/scopes/epic-refresh"><img src="https://agentmods.dev/badge/commands/kamiazya/scopes/epic-refresh/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for epic-refresh

Your own site · 80×15
<a href="https://agentmods.dev/commands/kamiazya/scopes/epic-refresh"><img src="https://agentmods.dev/badge/commands/kamiazya/scopes/epic-refresh.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 695 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00695
Opus 5.5 $0.00000 $0.00278
Sonnet 5.5 $0.00000 $0.00139
Haiku 4.5 $0.00000 $0.00069

Measured 2mo ago against content hash 9fd477caf71c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

epic-refresh scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/pm/epic-refresh.md · 103 lines

How it starts

The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Epic Refresh

Update epic progress based on task states.

Usage

/pm:epic-refresh <epic_name>

Instructions

1. Count Task Status

Scan all task files in .claude/epics/$ARGUMENTS/:

  • Count total tasks
  • Count tasks with status: closed
  • Count tasks with status: open
  • Count tasks with work in progress

2. Calculate Progress

progress = (closed_tasks / total_tasks) * 100

Round to nearest integer.

3. Update GitHub Task List

If epic has GitHub issue, sync task checkboxes:

# Get epic issue number from epic.md frontmatter
epic_issue={extract_from_github_field}

if [ ! -z "$epic_issue" ]; then
  # Get current epic body
  gh issue view $epic_issue --json body -q .body > /tmp/epic-body.md
  
  # For each task, check its status and update checkbox
  for task_file in .claude/epics/$ARGUMENTS/[0-9]*.md; do
    task_issue=$(grep 'github:' $task_file | grep -oE '[0-9]+$')
    task_status=$(grep 'status:' $task_file | cut -d: -f2 | tr -d ' ')
    
    if [ "$task_status" = "closed" ]; then
      # Mark as checked
      sed -i "s/- \[ \] #$task_issue/- [x] #$task_issue/" /tmp/epic-body.md
    else
      # Ensure unchecked (in case manually checked)
      sed -i "s/- \[x\] #$task_issue/- [ ] #$task_issue/" /tmp/epic-body.md
    fi
  done
  
  # Update epic issue
  gh issue edit $epic_issue --body-file /tmp/epic-body.md
fi

4. Determine Epic Status

  • If progress = 0% and no work started: backlog
  • If progress > 0% and < 100%: in-progress
  • If progress = 100%: completed

5. Update Epic

Get current datetime: date -u +"%Y-%m-%dT%H:%M:%SZ"

Update epic.md frontmatter:

status: {calculated_status}
progress: {calculated_progress}%
updated: {current_datetime}

6. Output

🔄 Epic refreshed: $ARGUMENTS

Tasks:
  Closed: {closed_count}
  Open: {open_count}
  Total: {total_count}
  
Progress: {old_progress}% → {new_progress}%
Status: {old_status} → {new_status}
GitHub: Task list updated ✓

{If complete}: Run /pm:epic-close $ARGUMENTS to close epic
{If in progress}: Run /pm:next to see priority tasks

Read the full file on GitHub · 103 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 103 lines · 0 tokens per session scan A 9fd477caf71c

Subscribe to this mod's changes

epic-refresh is a command published in the GitHub repository kamiazya/scopes (2 stars, last pushed 11mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 695 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

epic-refresh compared with commands from other repositories

epic-refresh next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
epic-refreshkamiazya/scopesCommand211mo agoApache-2.0A0Claude Code
diagnose-deeptracezscaler/zscaler-mcp-serverCommand5510d agoMITA29Claude Code
troubleshoot-experiencezscaler/zscaler-mcp-serverCommand5510d agoMITA25Claude Code
app-healthzscaler/zscaler-mcp-serverCommand5510d agoMITA16Claude Code
compare-locationszscaler/zscaler-mcp-serverCommand5510d agoMITA20Claude Code
investigate-alertszscaler/zscaler-mcp-serverCommand5510d agoMITA23Claude Code
investigate-sandboxzscaler/zscaler-mcp-serverCommand5510d agoMITA30Claude Code