firstmate: Skill for Claude Code

.agents/skills/session-start-recovery/SKILL.md

session-start-recovery is a skill for Claude Code from kunchenguid/firstmate. It costs 26 tokens per session (1,420 once invoked), scanned A, original, MIT.

A startup recovery procedure for interpreting unfinished checks, diagnostics, recovery inputs, and network results from a session-start digest.

In plain words
What is it for?
Use it after session startup when the digest reports actionable diagnostics, incomplete checks, stale state, failed synchronization, or other recovery information.
Why use it?
It separates local startup checks from slower network work and provides recovery guidance when setup, authentication, synchronization, or project state needs attention.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: installed under .agents/ (shared by several agents).

This is kunchenguid/firstmate's own configuration. It tells Claude Code how to work on firstmate 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 firstmate configures →

About the project

firstmate is an agent distribution that lets one coding agent coordinate a crew of autonomous agents working in separate git worktrees. It is for running parallel fixes, investigations, plans, and audits while receiving completed pull requests, merges, or reports through one supervising agent. The catalogue entries provide skills, hooks, instructions, and settings for operating this workflow.

kunchenguid/firstmate · 8,295 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to kunchenguid/firstmate. 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/kunchenguid/firstmate/main/.agents/skills/session-start-recovery/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/kunchenguid/firstmate

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 session-start-recovery

README.md
[![agentmods](https://agentmods.dev/badge/skills/kunchenguid/firstmate/session-start-recovery/github.svg)](https://agentmods.dev/skills/kunchenguid/firstmate/session-start-recovery)
Your own site
<a href="https://agentmods.dev/skills/kunchenguid/firstmate/session-start-recovery"><img src="https://agentmods.dev/badge/skills/kunchenguid/firstmate/session-start-recovery/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 session-start-recovery

Your own site · 80×15
<a href="https://agentmods.dev/skills/kunchenguid/firstmate/session-start-recovery"><img src="https://agentmods.dev/badge/skills/kunchenguid/firstmate/session-start-recovery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,420 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.00026 $0.01420
Opus 5.5 $0.00010 $0.00568
Sonnet 5.5 $0.00005 $0.00284
Haiku 4.5 $0.00003 $0.00142

Measured today against content hash ef7cd34c9cb8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

session-start-recovery 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 today.

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.

.agents/skills/session-start-recovery/SKILL.md · 44 lines

How it starts

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

Session-start recovery

The digest itself makes no external-network call and never waits for one. Every network check a session start owes - GitHub auth, secondmate recovery, secondmate convergence, pending handoff delivery, and project clone refresh - runs off the digest's blocking path in a bounded worker owned by bin/fm-startup-network.sh and is reported in the digest's own NETWORK CHECKS section. The locked startup inactive-outcome scan joins that worker so a slow local current-state read cannot block the digest; its findings use the ordinary durable wake queue.

  1. Lock - acquires the per-home session lock first, before anything mutates shared state, then starts the deferred startup stage above.
  2. Bootstrap - detect-only checks (tool/version problems, the worktree-tangle check, harness override, dispatch-profile validation, backlog-backend status) always run, but routine confirmations stay silent by default. When the lock could not be acquired, the worktree-tangle check uses read-only advisory wording without a checkout repair command. Home-local stale Herdr projection cleanup and the six bootstrap MUTATING sweeps - same-home backlog reconciliation, fleet sync, secondmate convergence, secondmate liveness, pending remote handoff retry, and Relay artifact writes - run only when this session actually holds the lock from step 1; the four network ones among them run in the deferred stage rather than in this section. The secondmate liveness sweep accounts for every registered secondmate and reports skipped or failed recovery as SECONDMATE_LIVENESS: lines. The sweep and the watcher's cadence-gated tick share the recovery contract; for T3 threads, follow the native recovery guide.
  3. Wake queue - when locked, drains and presents the durable wake queue without running the inactive-outcome scan inline, and prints the raw records prominently as this turn's first work queue; a clearly labeled status-event annotation may follow a valid signal record and includes every status line still unread at the presentation cursor, but never replaces the raw record or current-state reconciliation, and a lapsed watcher chain still surfaces here via the same guard alarm. Presented records remain durable until the handling turn runs the generation-bound acknowledgement printed by the drain. Every locked drain also prints a bounded fleet-wide OPEN DECISIONS section when durable decision records remain open, including when the queue itself is empty; reconcile those entries before continuing. A main drain may also print a bounded, one-shot STATUS OUTCOME BACKSTOP when a task's newest captain-facing status event has no covering supervision-branch outcome; handle it as a recovered wake even when no queue row remains. The same drain prints every still-unread note: line and pending-reply resolution since the last presentation in an unbounded UNREAD STATUS section, so an answer buried under a later routine line is not dropped; those lines are not re-printed after that presentation. It also prints a bounded RECORD DIVERGENCE section naming every captain call the status log reads as resolved while its backlog task is still held; nothing is closed for you, and captain-hold-lifecycle owns the reconciliation. When the lock could not be acquired and verified, the queue is left untouched because no session mutation is authorized, and the guard's tangle/watcher-liveness alarms still print in read-only advisory mode without drain, supervision repair, or checkout repair commands.
  4. Supervision operating instructions - after the wake queue and before both digests, the digest emits exactly one operating block for the detected primary harness, followed by the read-once contract that governs them. The script itself never starts supervision; the emitted harness protocol owns the exact wait or wake mechanism.
  5. Fleet-state digest - after that read-once contract and ahead of the context digest, the compact backlog listing owned by bin/fm-session-start.sh; every state/<id>.meta; a bounded tail of each task's state/<id>.status (labeled as wake-EVENT history, not current state, with the full log path printed for a deeper read); the away or quiet posture (state/.afk-contract, plus the state/.afk daemon flag where a daemon runs); and one cheap alive/dead read of each task's recorded backend endpoint. That liveness line is a fast presence check only, not a full state read - when you need a crew's actual current state (a run-step, not just "is the pane there"), read it with bin/fm-crew-state.sh <id> as before; the digest deliberately skips that deeper, slower read for every task so it stays fast and bounded.
  6. Network checks - after the fleet-state digest, the deferred stage's result, or an explicit statement of what it has not confirmed yet. A read-only session runs no network checks at all and says so.
  7. Context digest and next step - last of the bulk sections, the full contents of data/projects.md, data/secondmates.md, data/captain.md, data/captain-shared.md, and data/learnings.md, each clearly delimited, followed by the closing reminder. A file that does not exist prints an explicit ABSENT marker, never confused with an empty-but-present file: absence is meaningful (captain.md absent means use the firstmate repo's built-in defaults, projects.md absent means rebuild it from the clones under projects/, etc.). The closing reminder points back to the emitted supervision block and preserves only the lock, afk, Relay, and read-once reminders.

Read the full file on GitHub · 44 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. today Changed ef7cd34c9cb8
  2. 2d ago Changed d8777669cc36
  3. 25d ago Changed 772e416e09fb
  4. 27d ago First seen · 44 lines · 26 tokens per session scan A ff705c5c4b87

Subscribe to this mod's changes

session-start-recovery is a skill published in the GitHub repository kunchenguid/firstmate (8,295 stars, last pushed today), licensed MIT. It adds 26 tokens to every session and 1,420 once invoked, about $0.0001 per session on Opus 5.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-09-28.

Related

Other skills, from other repositories

gke-workload-troubleshooting

Diagnoses GKE workload failures (CrashLoopBackOff, OOMKilled, ImagePullBackOff, Pending, etc.) via logs and events. Use when pods fail to start or crash repeatedly. Don't use for GKE cluster infrastructure provisioning, node pool creation, or non-Kubernetes Google Cloud services.

google/skills · 69 tokens

application-integration-troubleshooting

Diagnoses failed, stuck, or silent Google Cloud Application Integration runs and Integration Connectors tasks using the REST API, Cloud Logging, and Cloud Monitoring. Use when an integration fails, returns HTTP 200 without doing the expected work, hangs in a suspended or retry state, or hits IAM, run-as service…

google/skills · 105 tokens

gke-workload-scaling-troubleshooting

Diagnoses GKE HorizontalPodAutoscaler (HPA) failures — metrics showing as , FailedGetResourceMetric / FailedGetScale / FailedComputeMetricsReplicas events, missing Pod resource requests, custom/external metrics-pipeline breakage (FailedGetExternalMetric / FailedGetCustomMetric, unavailable metrics adapter…

google/skills · 170 tokens

gke-ai-troubleshooting-tpu-mxla-hang

Diagnose GKE Cloud TPU multi-slice training hangs (Megascale HANGDETECTED logs and hang monitored events) using the ML Diagnostics Megascale XLA (MXLA) Hang Analyzer (gcloud alpha mldiagnostics monitored-events) and 1-minute Cloud Monitoring multi-slice latency metrics (kubernetes.io/container/multislice/).…

google/skills · 192 tokens

gke-ai-troubleshooting-tpu-performance-degradation

Diagnose GKE Cloud TPU training throughput drops and step-time regressions (15%+ TPU duty-cycle drop) using ML Diagnostics Workload Monitoring (gcloud alpha mldiagnostics monitored-events / hypercomputecluster.googleapis.com/v1alpha) and 1-minute Cloud Monitoring system metrics (kubernetes.io/node/accelerator/).…

google/skills · 200 tokens

gke-ai-troubleshooting-jobset-interruption

Diagnoses GKE JobSet interruptions, restarts, and preemptions for AI/ML training workloads autonomously. Use when troubleshooting JobSet restart loops, spot VM preemptions, node readiness failures, host VM issues, or coordinator worker crashes. Don't use for general GKE cluster creation, basic workload deployment, or…

google/skills · 83 tokens