agent-spec-kit
Use this skill when an agent CLI's behavior should be versioned data rather than code strings — managing prompts, policies, and output schemas — or when standing up an autonomous loop (scheduled/event-driven runs with guarded apply) and its maintain/release rails. Triggers on "externalize the prompt", "version the agent's policy", "the agent's output schema", "make this CLI run on a schedule", "autonomous bot", "agent decision contract", "set up the maintainer loop", "release the CLI". Distilled from openclaw/clawsweeper.
What this skill does
# Agent spec kit
Treat an agent CLI's *behavior* as versioned, reviewable data — and, when it runs
unattended, stand up the loop and the maintain/release rails. Distilled from
`clawsweeper` (an autonomous bot whose entire job is four data layers over a
deterministic engine).
## Part 1 — Behavior as data
Pull the agent's behavior out of code strings into four sibling directories, each
diffable and reviewable in a PR. Full patterns:
[`references/behavior-as-data.md`](references/behavior-as-data.md).
- **`prompts/`** — the task spec as markdown (role, scope guardrails, a read-only command
allowlist, a confidence/evidence bar, references to the target repo's `AGENTS.md` and
`.agents/maintainer-notes/`, and a one-line pointer to the output schema). Mode is a
swappable prompt layer (`plan` / `execute` / `autonomous`) over a shared system prompt.
Template: [`templates/prompt.template.md`](templates/prompt.template.md).
- **`instructions/`** — policy docs the model reads at runtime. Each = a gate (when it
applies) + positive criteria + a ranked evidence order + a hard "Never" list + literal
comment templates + escalation verbs (`needs_human`, `route_security`) with an
anti-overuse clause. Template: [`templates/policy.template.md`](templates/policy.template.md).
- **`schema/`** — the output contract as a **closed** JSON Schema
(`additionalProperties: false`), handed to the model as `--output-schema` AND
re-validated on parse. Bake provenance in (every evidence item requires `file`+`sha`)
and **lock safety-critical fields with `const`** (e.g. `security_sensitive: false`,
`merge_preflight.security_status: "cleared"`). Template:
[`templates/decision.schema.template.json`](templates/decision.schema.template.json).
- **`config/`** — per-target profiles + limits (worker caps, deny-lists).
🔶 DECISION GATE (schema bump): if you change the output schema, ask the human before
bumping its version and confirm consumers/validators are updated in lockstep.
## Part 2 — The autonomous loop 🔶 DECISION GATE (safety posture)
Only stand up unattended execution after confirming with the human that the safety model
holds (run **audit-agent-cli** with the *autonomous loop* posture first). The loop is
GitHub Actions; patterns in [`references/autonomous-loop.md`](references/autonomous-loop.md):
- A single overloaded `schedule:` where **cron lane = job type**.
- Custom `repository_dispatch` event types for low-latency event-driven runs.
- `workflow_run` chaining for deterministic post-processing.
- **Separate read-token (plan/review) and write-token (execute) jobs**, the execute job
gated by an org var + explicit mode.
- A versioned `parseCommand` regex turning `@bot` / `/command` comments into a fixed
intent set; the bot routes off its own hidden verdict markers, not prose.
- **Generated state committed to a separate state repo** (keeps the code repo clean and
the decision history independently auditable).
## Part 3 — Maintain & release
The maintainer-mode rails (all three OpenClaw repos):
- **Merge + credit:** accept breadth PRs; every CHANGELOG entry credits the contributor
(`thanks @handle`). Maintainer days are high-commit / low-churn — that's healthy.
- **Honest, frequent releases:** `Unreleased` stub → `## X.Y.Z - YYYY-MM-DD`; version
reflects maturity. Automate release notes by extracting the matching CHANGELOG section
(fail the release if it's missing). Bracket publish with pre-flight credential checks
and post-publish verification.
- **Release-prep checklist** (`docs/release-prep.md`): audit-only — changelog
completeness, `npm view` current version, dry-run package contents — no tag/publish.
## Definition of done
- [ ] behavior lives in `prompts/` + `instructions/` + `schema/` (+ `config/`), not code strings
- [ ] output schema is closed, handed to the model AND re-validated, with safety fields `const`-locked
- [ ] (if a loop) read/write token split, recheck-before-mutate, state in a separate repo,
audited at the autonomous-loop posture
- [ ] CHANGELOG credits contributors; release notes automated from it
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.