github-pull

A command that imports changes from a linked GitHub issue into a local SpecWeave increment, similar to receiving remote changes with git pull.

In plain words
What is it for?
Use it to pull the latest issue state and team comments for the current or a specified increment.
Why use it?
It prevents local planning records from falling behind when a team changes issue status, labels, comments, assignees, or milestones in GitHub.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/anton-abyzov/specweave/github-pull
Clone the repo
git clone --depth 1 https://github.com/anton-abyzov/specweave
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 716 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00021 $0.00716
Opus 5 $0.00010 $0.00358
Sonnet 5 $0.00004 $0.00143
Haiku 4.5 $0.00002 $0.00072

Measured 2d ago against content hash 32c865ea3d4c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

github-pull 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 2d 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.

plugins/specweave/commands/github-pull.md · 140 lines

How it starts

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

GitHub Pull Command

Usage: sw-github:pull [increment-id]

Purpose: Pull latest changes from GitHub Issues to your local increment (like git pull)


Quick Start

# Pull for current/active increment
sw-github:pull

# Pull for specific increment
sw-github:pull 0005

What Gets Pulled

Field Behavior
Status Issue state (open/closed) -> increment status
Labels Priority labels imported
Comments New team comments imported to notes
Assignees Updated if changed
Milestone Iteration/sprint mapping

Command Behavior

When user runs this command:

1. Resolve Increment

const incrementId = args.incrementId || await findActiveIncrement();

const metadata = JSON.parse(await fs.readFile(
  `.specweave/increments/${incrementId}/metadata.json`, 'utf-8'
));

const issueNumber = metadata?.external_sync?.github?.issue;
if (!issueNumber) {
  console.log(`Not linked to GitHub. Run: sw-github:create ${incrementId}`);
  return;
}

2. Fetch and Compare

Use Skill tool: Skill({ skill: "sw-github:github-sync", args: "Pull changes from GitHub for increment {increment-id}.

Issue: #{issueNumber}

Steps:
1. Fetch issue #{issueNumber} via gh api
2. Compare GitHub state vs local status
3. Apply conflict resolution (external wins for status)
4. Import new comments to increment notes
5. Update labels/assignees in metadata
6. Display what changed"

3. Display Changes

Pulled from GitHub

Issue: #123
Repository: owner/repo

Changes Applied:
  Status: open -> closed (mapped to: completed)
  Labels: +bug, +priority-high
  Comments: 2 new imported

Last synced: 2025-12-04 10:30:00
URL: https://github.com/owner/repo/issues/123

Status Mapping

GitHub State SpecWeave Status
open in-progress
closed completed

Examples

Example 1: Simple Pull

User: sw-github:pull

Claude:
Pulling from GitHub...
  Increment: 0005-payment-integration
  Issue: #123

Changes Applied:
  Status: open -> closed (completed)

Pull complete!

Read the full file on GitHub · 140 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. 2d ago First seen · 140 lines · 21 tokens per session scan A 32c865ea3d4c

Subscribe to this mod's changes

github-pull is a command published in the GitHub repository anton-abyzov/specweave (159 stars, last pushed 2d ago), licensed MIT. It adds 21 tokens to every session and 716 once invoked, about $0.0001 per session on Opus 5. 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-30.