ctx:execute

A workflow for carrying out several coding tasks at the same time using separate Git worktrees and agent sessions. A Git worktree is an additional working folder connected to the same repository, allowing branches to be worked on independently.

In plain words
What is it for?
Use it when multiple independent development tasks need to be implemented concurrently.
Why use it?
It separates parallel changes so agents do not overwrite one another's files or branch state. It also checks the repository and Git setup before starting.

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/shakestzd/contextune/ctx-execute
Clone the repo
git clone --depth 1 https://github.com/shakestzd/contextune
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 11,323 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.00016 $0.11323
Opus 5 $0.00008 $0.05661
Sonnet 5 $0.00003 $0.02265
Haiku 4.5 $0.00002 $0.01132

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

Security

Grade A, and why

ctx:execute 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.

commands/ctx-execute.md · 1,606 lines

How it starts

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

Parallel Execute - Run Parallel Development Workflow

You are executing an automated parallel development workflow with optimized parallel setup.

Contextune Integration: This command can be triggered via /contextune:parallel:execute or natural language like "work on these tasks in parallel", "parallelize this work".


🎯 Performance-Optimized Architecture

Key Innovation: Worktrees are pre-created by script, agents focus purely on implementation, enabling deterministic parallel execution.

Setup Performance (Measured Actuals):

  • 5 tasks: Setup completes in ~5s (deterministic script)
  • 10 tasks: Setup completes in ~5s (parallel, O(1) scaling)
  • 20 tasks: Setup completes in ~5s (constant time regardless of task count)

Note: Times shown are actual measurements from completed workflows, not estimates.

Scaling: Setup time is O(1) instead of O(n) — constant regardless of task count!


Phase 0: Validate Prerequisites and Setup Infrastructure

Check required tools:

# Verify git and worktree support
git --version && git worktree list

Requirements:

  • Git 2.5+ (worktree support)
  • Clean working directory (no uncommitted changes on main)
  • Auto-approval configured (see below)

If validation fails:

  • Report missing tools to user
  • Provide installation instructions
  • Stop execution

⚡ IMPORTANT: Configure Auto-Approval to Avoid Bottlenecks

Problem: Without auto-approval, you must approve EVERY git command from EVERY parallel agent individually, negating all parallelism benefits!

Solution: Pre-approve safe git commands using Claude Code's IAM permission system.

Quick Setup:

  1. Run in Claude Code: /permissions

  2. Add these allow rules:

    Bash(git add:*)
    Bash(git commit:*)
    Bash(git push:*)
    
  3. Set permission mode: "defaultMode": "acceptEdits" in settings

  4. Done! Agents work autonomously 🚀

📖 Complete guide: See docs/AUTO_APPROVAL_CONFIGURATION.md for:

  • Full configuration options
  • Security considerations
  • PreToolUse hook setup (advanced)
  • Troubleshooting

Read the full file on GitHub · 1,606 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 · 1,606 lines · 16 tokens per session scan A e873276646ef

Subscribe to this mod's changes

ctx:execute is a command published in the GitHub repository shakestzd/contextune (5 stars, last pushed 8mo ago), licensed MIT. It adds 16 tokens to every session and 11,323 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-31.