prime-directive

Re-establishes mission, authority, and guardrails for autonomous backlog-clearing runs after context compaction.

1|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/blamechris/skill-templates --skill prime-directive-blamechris
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prime-directive
Source: https://github.com/blamechris/skill-templates/tree/main/.claude/skills/prime-directive
Command: npx skills add https://github.com/blamechris/skill-templates --skill prime-directive-blamechris

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Long unattended autonomous runs lose their mission and rules each time the agent's context is compacted and summarized. This Skill provides a reload-resilient constitution that re-grounds the agent after every compaction so a multi-wave backlog-clearing marathon never drifts, duplicates work, or violates its guardrails. ## Core Features & Use Cases - Reload contract: Re-invocation after every compaction restores the mission, granted authority, per-issue loop, and hard guardrails from a single self-contained file, with a STATE header in the session log as the only mandatory post-compaction read. - Autonomous per-issue workflow: Sync from main, triage issues, implement with TDD, open PRs, run mandatory review, and self-merge only under a strict merge gate (clean review, green CI on the final commit, all threads resolved). - Session and cost discipline: Wave-boundary context shedding, idempotent re-entry derived from GitHub state, and a per-wave cost circuit breaker as the sole sanctioned stop condition. - Use Case: You launch an unattended overnight run to clear a GitHub issue backlog; after each context compaction the agent re-invokes the directive, reads the STATE header, and safely resumes the next issue without re-reading the full history. ## Quick Start Invoke /prime-directive at the start of an unattended run and again after every compaction to reload the mission and resume the backlog marathon.

Frequently Asked Questions about prime-directive

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep an autonomous agent on task after context compaction?▼

Re-invoke the prime-directive skill after every compaction. It reloads the mission, authority, per-issue loop, and guardrails from one self-contained file, then reads only the compact STATE header at the top of the session log before resuming work.

How do I run an unattended GitHub backlog-clearing marathon?▼

Invoke /prime-directive at the start of the run to set the mission, then let it hand off to the wave machinery. It triages open issues into completable versus blocked, works them in value order with TDD and PRs, and converges when no tractable issues remain.

When is self-merge allowed in an autonomous run?▼

Self-merge is allowed only under the merge gate: a clean full-review verdict, all CI checks green on the final commit, and all review threads resolved, followed by a synchronous squash merge. Auto-merge, admin overrides, and direct pushes to main are forbidden.

What happens if an autonomous run exceeds its cost budget?▼

A per-wave cost circuit breaker is checked at every wave boundary. If the session is over budget, the agent writes the handoff, updates the STATE header, and stops with a notification instead of starting the next wave.

Does resuming a marathon duplicate completed work?▼

No. Re-entry is idempotent: progress is derived from durable external state such as open and merged PRs per issue plus the session log, never from in-context memory, so re-invoking the directive at any point is safe.