AGENT SKILL

tool

Standards for mechanical scripts in tools/.

License 许可
Apache-2.0
所属仓库
usurobor/cnos
最近更新
2026-11-07
Stars
★ 9
Forks
0

01 前言 Front Matter

name
tool
scope
task-local
triggers
[ "tool", "script", "automation", "CLI", "utility" ]
description
Standards for mechanical scripts in tools/.
governing_question
How do we write a mechanical script so it is fail-fast, idempotent, machine-readable, and free of runtime dependencies?

02 资源文件 15

03 SKILL.md 正文

Tool

Standards for mechanical scripts in tools/.

When

  • Task is mechanical
  • No judgment required
  • AI would burn tokens on clockwork

Principles

  • Zero runtime deps (bash, git, coreutils, jq)
  • NO_COLOR support
  • Prereq checks (fail fast)
  • Idempotent (safe to re-run)
  • Machine-readable output
  • set -euo pipefail

Template

#!/bin/bash
# tool-name.sh — description
# Usage: ./tools/tool-name.sh [args]
# Exit: 0=success, 1=error, 2=no-op

set -euo pipefail

if [[ -n "${NO_COLOR:-}" ]]; then
  RED="" GREEN="" RESET=""
else
  RED='\033[0;31m' GREEN='\033[0;32m' RESET='\033[0m'
fi

check_prereqs() {
  command -v git &>/dev/null || { echo "Missing: git" >&2; exit 1; }
}

main() {
  check_prereqs
  # logic
  echo -e "${GREEN}✓${RESET} Done"
}

main "$@"

Exit Codes

Code Meaning
0 Success
1 Error
2 No-op (already done)

04 同仓库更多 Skills

usurobor
usurobor/cnos

issues/triage

Issue triage doctrine pointer. Use when classifying a new issue, deciding dispatch eligibility, or deciding whether to close/supersede/defer.

★ 9
usurobor
usurobor/cnos

issues/taxonomy

Issue label taxonomy pointer. Use when classifying an issue's kind/area/priority/effort/status/protocol/dispatch labels, or when the board needs to interpret them.

★ 9
usurobor
usurobor/cnos

issues/map

Issue-board (Issue Pivot) generation domain. Use when reasoning about `cn issues map`'s fetch, taxonomy-parse, effort-computation, and render pipeline, or about the board's JSON/HTML output contract.

律师与法务前端开发
★ 9
usurobor
usurobor/cnos

issues

cnos.issues package entrypoint. Use when reasoning about issue taxonomy, the Issue Pivot / issue-board (`cn issues map`), the read-only CDS issue-state evaluator (`cn issues fsm evaluate`), or the current command-dispatch disposition of issue tooling.

★ 9
usurobor
usurobor/cnos

receipt-stream

Cross-cycle receipt-stream doctrine for protocol-iteration. Use when γ closes a cycle and writes the per-cycle iteration artifact (`cdd-iteration.md`), when γ updates the cross-cycle aggregator at `.cdd/iterations/INDEX.md`, when ε reads the receipt stream across cycles to surface protocol-gap patterns, when a finding's disposition lands a cross-repo patch and the cross-repo trace bundle attaches, or when a courtesy empty-findings stub is written for a `protocol_gap_count == 0` cycle.

★ 9
usurobor
usurobor/cnos

mid-flight

Mid-flight γ→in-flight-α rescue channel. Use when γ needs to change a load-bearing fact (pinned axis, scope, AC, blocker) after α has begun coding, when γ edits the cycle's GitHub issue body mid-cycle, or when a spec change lands on origin/main while α/β polling sessions are in-flight.

★ 9