Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
athola avatar

Summon

  • 77 installs
  • 325 repo stars
  • Updated August 2, 2026
  • athola/claude-night-market

Summon is an agent skill that manages egregore token budget windows, rate-limit detection, and cooldown-driven graceful shutdown.

About

Summon exposes the Budget module from the Claude Night Market egregore stack: a token-window management protocol for solo builders who run multi-session agent workflows without blowing API limits. It defines how the orchestrator reads and updates `.egregore/budget.json`, rolls sessions inside a default five-hour window, and reacts when Claude returns throttling signals. Rate-limit detection covers 429 responses, embedded rate-limit messages, and retry-after headers; on hit, work halts and cooldown begins using a padded schedule so a watchdog does not immediately re-trigger the same cap. The skill is for indie operators wiring custom agent runtimes or Night Market–style summon flows, not for one-off chat turns. Use it when you need predictable shutdown and resume behavior across chained skill invocations. It complements generic retry logic by making budget state explicit and session-aware.

  • Tracks cumulative token usage and session count inside a configurable budget window (default 5 hours).
  • Detects rate limits via HTTP 429, API error text, or explicit retry-after headers and stops work immediately.
  • Computes cooldown as retry-after minutes plus configurable padding (default 10 minutes) to avoid relaunch loops.
  • Falls back to a 30-minute default cooldown plus padding when retry-after is missing.
  • Persists window start, estimated tokens, last rate limit, and cooldown_until in structured JSON state.

Summon by the numbers

  • 77 all-time installs (skills.sh)
  • Ranked #5,386 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/athola/claude-night-market --skill summon

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs77
repo stars325
Security audit0 / 3 scanners passed
Last updatedAugust 2, 2026
Repositoryathola/claude-night-market

What it does

Keep long-running egregore agent sessions inside token windows and recover cleanly from Claude API rate limits.

Who is it for?

Best when you're operating custom egregore or Night Market orchestrators across multiple agent sessions in one day.

Skip if: Skip if you only use short single-turn Claude Code tasks and never hit cumulative token or rate-limit windows.

When should I use this skill?

Managing token budget windows, detecting API rate limits, or configuring cooldown before resuming egregore sessions.

What you get

After applying the protocol, the orchestrator persists budget state, enters a padded cooldown on limits, and avoids relaunching until the window is safe again.

  • Updated budget.json with window, tokens, and cooldown fields
  • Orchestrator stop and cooldown schedule on rate limit

By the numbers

  • Default budget window type 5h
  • Default cooldown padding 10 minutes
  • Default 30-minute cooldown when retry-after is absent

Files

SKILL.mdMarkdownGitHub ↗

Table of Contents

Summon

Overview

Summon is the egregore orchestration loop. It reads the manifest (.egregore/manifest.json), selects the next active work item, maps the current pipeline step to a specialist skill, and invokes that skill. After each step it advances the pipeline, checks context and token budgets, and repeats until all items are completed or the budget is exhausted.

The orchestrator never re-implements phase logic. Each pipeline step delegates to an existing skill via Skill() calls. Summon only manages state transitions, retries, and budget guards.

When To Use

  • Processing one or more work items through the full

intake-build-quality-ship pipeline.

  • Resuming an interrupted egregore session (manifest already

exists with active items).

  • Running autonomously under a watchdog that relaunches on

exit.

When NOT To Use

  • Running a single skill in isolation (call the skill

directly instead).

  • Exploratory work where the pipeline does not apply.
  • When human review is needed before every step (use manual

skill invocations).

Launching the Orchestrator

Always launch the orchestrator agent in the FOREGROUND. Do not use run_in_background: true. The main session becomes the egregore: it blocks on the orchestrator agent until the egregore finishes or is dismissed.

Agent(
  subagent_type: "egregore:orchestrator",
  prompt: "<context about work items and current state>",
  run_in_background: false   // Required
)

If you launch the orchestrator in the background, the main session will have nothing to do and will stop. This defeats the entire purpose of the egregore. The stop hook cannot prevent this because background agents are detached.

Manifest Mode

Before launching the orchestrator, ensure the manifest has the correct run mode:

  • Default (no `--bounded` flag): set "indefinite": true

in the manifest. The egregore will scan for new work after completing all items and run until dismissed.

  • With `--bounded` flag: set "mode": "bounded" in the

manifest. The egregore stops after all items are completed or failed.

If the manifest already exists and has "mode": "bounded" but the user did NOT pass --bounded, update the manifest to "indefinite": true before launching.

After launching, do NOT produce any summary, status table, or "what's happening" output. The orchestrator IS the session now. Let it run.

Orchestration Loop

Follow these steps exactly. Each iteration processes one pipeline step for one work item.

1. Load state

manifest  = Read(".egregore/manifest.json")
config    = Read(".egregore/config.json")
budget    = Read(".egregore/budget.json")

If manifest.json does not exist, stop with an error: "No manifest found. Run egregore init first."

2. Pick the next work item

item = manifest.next_active_item()

If item is None, all work is done. Save the manifest, report completion, and exit.

3. Map current step to a skill

Look up item.pipeline_stage and item.pipeline_step in the Pipeline-to-Skill Mapping table below. Determine the skill name or action to invoke.

4. Invoke the skill

Call Skill() or execute the mapped action. Pass any required context (branch name, issue ref, etc.) from the work item.

5. Handle the result

On success:

  • Call manifest.advance(item.id) to move to the next step.
  • Reset item.attempts to 0.
  • Save the manifest.

On failure:

  • Call manifest.fail_current_step(item.id, reason).
  • If item.attempts < item.max_attempts, retry the same

step on the next iteration.

  • If item.status is now "failed", log the failure and

move to the next work item.

  • Save the manifest.

6. Check context budget

Estimate context window usage. If usage exceeds 80%:

1. Save the manifest to disk. 2. Write a continuation note to .egregore/continuation.json with the current item ID, stage, and step. 3. Invoke Skill(conserve:clear-context). 4. The watchdog or caller will relaunch a fresh session that resumes from the saved state.

7. Check token budget

If the last skill call returned a rate limit error:

1. Record the rate limit in budget.json via budget.record_rate_limit(cooldown_minutes). 2. Save budget.json. 3. Alert the overseer (see notify.py). 4. Schedule in-session recovery (2.1.71+): use CronCreate to schedule a one-shot resume prompt at the cooldown expiry time. The session stays alive and resumes automatically with context preserved. 5. Fallback (pre-2.1.71 or cooldown > 7 days): exit gracefully. The watchdog checks cooldown before relaunching.

8. Repeat

Go back to step 2. Continue until all items are completed, all items are failed, or a budget limit is reached.

Pipeline-to-Skill Mapping

StageStepSkill/Action
intakeparseParse prompt or fetch issue via gh issue view
intakevalidateValidate requirements are actionable
intakeprioritizeOrder by complexity (single item = skip)
buildbrainstormSkill(attune:project-brainstorming)
buildspecifySkill(attune:project-specification)
buildblueprintSkill(attune:project-planning)
buildexecuteSkill(attune:project-execution)
qualitycode-reviewSkill(pensive:code-refinement)
qualityunbloatSkill(conserve:bloat-detector)
qualitycode-refinementSkill(pensive:code-refinement)
qualityupdate-testsSkill(sanctum:test-updates)
qualityupdate-docsSkill(sanctum:doc-updates)
shipprepare-prSkill(sanctum:pr-prep)
shippr-reviewSkill(sanctum:pr-review)
shipfix-prApply review fixes
shipmergegh pr merge (if auto_merge enabled)

The intake stage steps (parse, validate, prioritize) are handled inline by the orchestrator. See modules/intake.md for details.

Context Overflow Protocol

The orchestrator runs inside a finite context window. To avoid losing state when the window fills:

1. Monitor usage. After each skill invocation, estimate how much of the context window has been consumed. 2. At 80% capacity, trigger a context save:

  • Persist the full manifest to disk.
  • Write .egregore/continuation.json with a snapshot of

the current position.

  • Invoke Skill(conserve:clear-context).

3. On relaunch, load continuation.json and resume from the saved position. The manifest on disk is the source of truth for pipeline progress. 4. Increment manifest.continuation_count each time a context-overflow handoff occurs.

This protocol ensures zero lost progress across context boundaries.

Progress Monitoring & Self-Healing (2.1.71+)

After loading state (step 1), schedule a recurring heartbeat that both reports status and recovers stalled pipelines:

CronCreate(
  cron: "*/5 * * * *",
  prompt: "Check .egregore/manifest.json. If there are pending or active items that are not being processed, resume the orchestration loop by invoking Skill(egregore:summon). Otherwise, report status via /egregore:status.",
  recurring: true
)

This serves two purposes:

1. Visibility: emits a status summary every 5 minutes so autonomous runs are observable. 2. Self-healing: if a user prompt, context compaction, or unexpected error breaks the orchestration loop, the next heartbeat detects stalled items and re-enters the pipeline automatically.

The cron task auto-expires after 7 days by default. Use durable: true to persist across restarts, or CronDelete to cancel early.

Token Budget Protocol

Egregore sessions consume API tokens across a budget window (default: 5 hours). The budget protocol prevents runaway spending:

1. Before each skill call, check budget.json for an active cooldown. If is_in_cooldown(budget) returns true, exit and let the watchdog retry later. 2. On rate limit error, record the event via budget.record_rate_limit(cooldown_minutes). The cooldown duration equals the API retry-after header plus config.budget.cooldown_padding_minutes. 3. Save and exit. Write budget.json, alert the overseer, and exit with code 0. 4. The watchdog checks budget.json before relaunching. It will not start a new session until the cooldown expires.

See modules/budget.md for the full calculation and state schema.

Failure Handling

Each work item allows up to max_attempts retries per step (default: 3, configurable in config.json).

  • Retry: If a step fails and attempts < max_attempts,

the orchestrator retries the same step on the next iteration. The manifest is saved between retries.

  • Mark failed: If attempts >= max_attempts, the item

status changes to "failed" and failure_reason is set. The orchestrator moves to the next active item.

  • Alert: On failure, notify the overseer via the

configured notification channel.

  • Never block: The orchestrator must never wait for human

input. If a step requires clarification, record a decision (see modules/decisions.md) and proceed with the best available option.

Module Reference

  • pipeline.md: Stage and step definitions, transition

rules, idempotency guarantees.

  • budget.md: Token window management, rate limit

detection, cooldown calculation, graceful shutdown.

  • intake.md: Work item parsing for prompts and GitHub

issues, brainstorm skip logic.

  • decisions.md: Autonomous decision-making framework,

decision log format, examples.

Related skills

How it compares

Use instead of ad-hoc sleep-and-retry loops that ignore shared session budget files.

FAQ

Who is summon for?

Summon is for developers and agent operators who run Athola egregore-style orchestration and need disciplined token and rate-limit handling across sessions.

When should I use summon?

Use summon during Operate when you maintain `.egregore/budget.json`, detect 429 or retry-after from the API, or need default 5-hour windows and padded cooldowns before resuming skill chains.

Is summon safe to install?

Review the Security Audits panel on this Prism page and inspect the skill source in your repo before letting an orchestrator write budget state or stop production runs.

AI & Agent Buildingagentsautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.