global-rules

v2026.09.24

Global safety and operational rules for opencode sessions. Auto-loaded with highest priority on every session. Contains critical rules learned from incidents to prevent system crashes and data loss.

GitHub
Install command
npx skhub add cycleuser/global-rules
Markdown
SKILL.md

Safety Rules

Critical: Read and follow all rules in this directory for every bash/command execution.

Core rules:

  1. Always set explicit timeout on bash calls — 30s for tests, 60s for installs, never default
  2. Never run unscoped full test suites — use -k or file paths to limit scope
  3. Never use rm -rf without variable guards, curl|bash, sudo, or kill -9
  4. Infinite loops must have hard timeout + budget limits — no unbounded while(True)
  5. Redirect stdin with < /dev/null for non-interactive commands

Rules

Incident Record

DateIncidentRoot CausePrevention
2026-05-08opencode TUI crashbash timeout → SIGKILL → stdin FD corrupted → setRawMode errno: 9Always set explicit timeout; never SIGKILL

See Also

  • /安检 from an-jian — Security audit for dangerous patterns
  • /skills from skill-manager — Browse all installed skills
Discovery
Tags

No tags published for this skill.

Version
Latest version metadata

Version

v2026.09.24

Published

Sep 24, 2026

Category

Uncategorized

License

GPL-3.0

Source path

skills/global-rules

Default branch

main

Latest commit

d57a35e

Tree SHA

02d9442