parallel-session-coedit-via-source-mtime-and-idempotent-rebuild

parallel-session-coedit-via-source-mtime-and-idempotent-rebuild is a skill for Claude Code from wan-huiyan/agent-traffic-control. It costs 142 tokens per session (2,975 once invoked), scanned A, original, MIT.

A guide to editing one generated deliverable while another session edits it, when the deliverable is assembled from separate source files. An idempotent rebuild produces the same complete output from the current source files each time.

In plain words
What is it for?
Use it for shared HTML pages, slide decks, reports, or similar outputs assembled from per-item sections during parallel work.
Why use it?
It helps avoid overwriting another session's work by changing isolated sources and rebuilding from everything currently saved.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code.

Part of the agent-traffic-control plugin — 107 skills shipped together

Good fit Use it for shared HTML pages, slide decks, reports, or similar outputs assembled from per-item sections during parallel work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wan-huiyan/agent-traffic-control/parallel-session-coedit-via-source-mtime-and-idempotent-rebuild
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.

Any agent
npx skills add wan-huiyan/agent-traffic-control --skill parallel-session-coedit-via-source-mtime-and-idempotent-rebuild
Clone the repo
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control

Made for: Claude Code.

Or install agent-traffic-control, the plugin that ships this one along with the rest of its 107 skills.

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 parallel-session-coedit-via-source-mtime-and-idempotent-rebuild

README.md
[![agentmods](https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/parallel-session-coedit-via-source-mtime-and-idempotent-rebuild/github.svg)](https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/parallel-session-coedit-via-source-mtime-and-idempotent-rebuild)
Your own site
<a href="https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/parallel-session-coedit-via-source-mtime-and-idempotent-rebuild"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/parallel-session-coedit-via-source-mtime-and-idempotent-rebuild/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 parallel-session-coedit-via-source-mtime-and-idempotent-rebuild

Your own site · 80×15
<a href="https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/parallel-session-coedit-via-source-mtime-and-idempotent-rebuild"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/parallel-session-coedit-via-source-mtime-and-idempotent-rebuild.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 142 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,975 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.00142 $0.02975
Opus 5 $0.00071 $0.01488
Sonnet 5 $0.00028 $0.00595
Haiku 4.5 $0.00014 $0.00298

Measured 12d ago against content hash 477a1edf4910, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

parallel-session-coedit-via-source-mtime-and-idempotent-rebuild 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 12d 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/agent-traffic-control/skills/parallel-session-coedit-via-source-mtime-and-idempotent-rebuild/SKILL.md · 198 lines

How it starts

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

Co-editing a section-assembled deliverable alongside a live parallel session

Problem

The user says: "a parallel session is making active edits on the same file, so please don't delete each other's work — maybe only write on it when the other one is finished." The deliverable is large and shared. The naive readings both fail: serialize (do nothing until they finish — wastes the session, ignores the user's "fan out / go fast") or dive in blindly (and clobber their work, which is exactly what they warned against).

There is a third path that is fast AND safe — but only once you notice the build model: the artifact is assembled from per-item source files, and the assembler is idempotent (reads all sources from disk, regenerates the one output). That changes the collision math entirely.

Context / Trigger conditions

  • User warns that another live session / agent is editing the same file; "don't clobber each other"; possibly "only write when the other is finished."
  • The deliverable is generated: a build script (_assemble.py, a bundler, a static-site generator) inlines per-item source files (sections/*.html, partials, slides) into ONE output file. The output is a build artifact, not the source of truth.
  • You need to make real edits this session without losing concurrent work.

Solution

  1. Find the build model FIRST. Never hand-edit the assembled OUTPUT. Locate the assembler and confirm the big file is generated from per-item sources. Edit the source files; the output is regenerated. (If you edit the 2 MB assembled HTML directly, the next rebuild by either session silently overwrites you.)

  2. Map hot/cool per item via SOURCE-FILE mtime — this is your real-time ownership signal, no git needed:

    stat -f '%Sm %N' -t '%H:%M:%S' sections/*.html      # BSD/macOS
    # or: ls --time-style=+%H:%M:%S -l sections/*.html   # GNU
    

    Files touched in the last few minutes = the other session's HOT set; old mtimes = COOL. Re-stat right before each edit batch — the other session moves between cards/items quickly (a broad pass can touch 6+ files in minutes).

Read the full file on GitHub · 198 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. 12d ago First seen · 198 lines · 142 tokens per session scan A 477a1edf4910

Subscribe to this mod's changes

parallel-session-coedit-via-source-mtime-and-idempotent-rebuild is a skill published in the GitHub repository wan-huiyan/agent-traffic-control (3 stars, last pushed yesterday), licensed MIT. It adds 142 tokens to every session and 2,975 once invoked, about $0.0007 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.

Related

Other skills, from other repositories

vertical-onboarding

Onboarding-and-switching playbook for SMB Product-Builder products. Defines the first-run experience that turns a prospect leaving an incumbent (ServiceTitan/Toast/Mindbody/Shopify/QuickBooks) into an activated user — import-first onboarding, the activation milestone, sample-data fallback, and the time-to-first-value…

avelikiy/great_cto · 111 tokens

claude-code-bash-patterns

Claude Code Bash tool patterns with hooks, automation, git workflows. Use for PreToolUse hooks, command chaining, CLI orchestration, custom commands, or encountering bash permissions, command failures, security guards, hook configurations.

secondsky/claude-skills · 52 tokens

sitrep-panel

Keep a live local HTML report updated as you work on a task — a status board, a running "what's happening now" narrative, screenshots, and a newest-first log — served on localhost so the user can watch progress in a browser tab instead of reading the transcript. Use when the user invokes /sitrep-panel, asks for a…

dbl8005/sitrep-panel · 101 tokens

promote

Turn a scratch script into a permanent tool this repo keeps. Use when a check, report, or analysis has proved worth running more than once.

ArcticFox2029/chamnan · 29 tokens

generate-daily-schedule

Use when turning a day's structured inputs — fixed commitments, tasks, and free windows — into a concrete 15-minute schedule. Domain-agnostic; the caller provides all context.

ne11nn/cantos-plugin · 42 tokens

finito

Closes a working session with a coding agent and produces the full closing package: a numbered summary anyone can read, the next steps, what got written down, the real state of the repository including what is left to push, and two blocks the next session resumes from, one to paste after /compact and one to open a…

Mun1to/Finito · 124 tokens