自用/精选的 Claude Code / Codex 技能:内容创作、客服、市场调研、SEO、Agent 工作流循环、Grok X 实时抓取与评审工具
Python
Loop Spec v1
Use YAML or JSON. YAML is easier for humans; JSON is better for automation.
When producing a spec for a user, include a copy-ready Loop Prompt after the YAML/JSON unless the user asks for machine-only output.
Required Fields
spec_version: 1
kind: agent-workflow-loop
status: draft | provisional | tested | published
name:
purpose:
use_when:
do_not_use_when:
parameters: {}
inputs: []
authority:
may_read: []
may_write: []
must_ask_before: []
state:
stores: []
update_rule:
round:
observe:
choose:
act:
verify:
record:
next_action_rule:
working_signal:
acceptance_gate:
terminal_states:
success:
clean_noop:
blocked:
approval_required:
exhausted:
stagnated:
outputs: []
provenance:
sources: []
generated_at:
execution_handoff:
enabled: false
target:
notes:
Field Rules
use_whendescribes when feedback can change the next action.do_not_use_whennames near-neighbor tasks that should route elsewhere.authority.must_ask_beforecovers destructive writes, production, external messages, paid actions, private data, and account changes.round.observenames the evidence source.round.chooseexplains how evidence selects the next action.round.verifynames concrete proof: command, log, file, screenshot, API response, human approval, or external read-back.round.recordpreserves enough state for the next round.next_action_ruleis the core of the loop. If it is missing, this is probably an SOP.working_signalis the leading indicator that the current attempt is improving.acceptance_gateis the condition before declaring success.terminal_statesmust include success, clean no-op, blocked, approval required, exhausted, and stagnated.execution_handoffis optional and runtime-neutral. Do not hard-code/goal, cron, GitHub Actions, or any private runtime as the only target.
Status
draft: useful but incompleteprovisional: internally coherent but not field-testedtested: verified on at least one realistic casepublished: ready for external reuse, with provenance and notices