scopes: Command for Claude Code

.claude/commands/pm/test-reference-update.md

test-reference-update is a command for Claude Code from kamiazya/scopes. It costs 0 tokens per session (750 once invoked), scanned C, original, Apache-2.0.

A test command for checking how task references are updated when local project tasks are synchronized with GitHub issues.

In plain words
What is it for?
Use it to create sample task files and mappings, then test the reference-update logic used by the project synchronization workflow.
Why use it?
It helps verify that task dependencies and conflict references still point to the correct issue numbers after synchronization.

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/test-reference-update.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 test-reference-update

README.md
[![agentmods](https://agentmods.dev/badge/commands/kamiazya/scopes/test-reference-update/github.svg)](https://agentmods.dev/commands/kamiazya/scopes/test-reference-update)
Your own site
<a href="https://agentmods.dev/commands/kamiazya/scopes/test-reference-update"><img src="https://agentmods.dev/badge/commands/kamiazya/scopes/test-reference-update/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 test-reference-update

Your own site · 80×15
<a href="https://agentmods.dev/commands/kamiazya/scopes/test-reference-update"><img src="https://agentmods.dev/badge/commands/kamiazya/scopes/test-reference-update.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 750 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00750
Opus 5.5 $0.00000 $0.00300
Sonnet 5.5 $0.00000 $0.00150
Haiku 4.5 $0.00000 $0.00075

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

Security

Grade C, and why

test-reference-update scanned grade C with 1 finding 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf /tmp/test-refs
.claude/commands/pm/test-reference-update.md · 135 lines

How it starts

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

Test Reference Update

Test the task reference update logic used in epic-sync.

Usage

/pm:test-reference-update

Instructions

1. Create Test Files

Create test task files with references:

mkdir -p /tmp/test-refs
cd /tmp/test-refs

# Create task 001
cat > 001.md << 'EOF'
---
name: Task One
status: open
depends_on: []
parallel: true
conflicts_with: [002, 003]
---
# Task One
This is task 001.
EOF

# Create task 002
cat > 002.md << 'EOF'
---
name: Task Two
status: open
depends_on: [001]
parallel: false
conflicts_with: [003]
---
# Task Two
This is task 002, depends on 001.
EOF

# Create task 003
cat > 003.md << 'EOF'
---
name: Task Three
status: open
depends_on: [001, 002]
parallel: false
conflicts_with: []
---
# Task Three
This is task 003, depends on 001 and 002.
EOF

2. Create Mappings

Simulate the issue creation mappings:

# Simulate task -> issue number mapping
cat > /tmp/task-mapping.txt << 'EOF'
001.md:42
002.md:43
003.md:44
EOF

# Create old -> new ID mapping
> /tmp/id-mapping.txt
while IFS=: read -r task_file task_number; do
  old_num=$(basename "$task_file" .md)
  echo "$old_num:$task_number" >> /tmp/id-mapping.txt
done < /tmp/task-mapping.txt

echo "ID Mapping:"
cat /tmp/id-mapping.txt

3. Update References

Process each file and update references:

while IFS=: read -r task_file task_number; do
  echo "Processing: $task_file -> $task_number.md"
  
  # Read the file content
  content=$(cat "$task_file")
  
  # Update references
  while IFS=: read -r old_num new_num; do
    content=$(echo "$content" | sed "s/\b$old_num\b/$new_num/g")
  done < /tmp/id-mapping.txt
  
  # Write to new file
  new_name="${task_number}.md"
  echo "$content" > "$new_name"
  
  echo "Updated content preview:"
  grep -E "depends_on:|conflicts_with:" "$new_name"
  echo "---"
done < /tmp/task-mapping.txt

4. Verify Results

Check that references were updated correctly:

echo "=== Final Results ==="
for file in 42.md 43.md 44.md; do
  echo "File: $file"
  grep -E "name:|depends_on:|conflicts_with:" "$file"
  echo ""
done

Read the full file on GitHub · 135 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 · 135 lines · 0 tokens per session scan C 6cc157c1eb43

Subscribe to this mod's changes

test-reference-update 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 750 tokens. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

test-reference-update compared with commands from other repositories

test-reference-update next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
test-reference-updatekamiazya/scopesCommand211mo agoApache-2.0C0Claude 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