ADocumentation Index
Fetch the complete documentation index at: https://zikun.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
SKILL.md is not magic. It is a Markdown file with a YAML header that Claude Code’s native skill loader reads, registers as a slash-command, and feeds back as the system prompt when invoked. Everything sophisticated in gstack (the cross-skill handoff, the safety hooks, the institutional memory) is built out of that single primitive.
Anatomy of a SKILL.md
The frontmatter declares everything Claude Code needs to know to register and run the skill. The body is the prompt.SKILL.md (skeleton)
The four-tier preamble
scripts/resolvers/preamble.ts composes the shared preamble in four tiers. Every skill declares which tier it needs with preamble-tier: 1 to 4 in frontmatter. Lower tiers are leaner. Tier 4 is the full kitchen sink and is also the default when a skill does not declare a tier.
- Tier 1
- Tier 2
- Tier 3
- Tier 4
Included. Bash bootstrap, upgrade check, lake-intro, telemetry consent, voice directive (trimmed), completion-status protocol.Used by.
/browse, /setup-browser-cookies, /benchmark, /make-pdf, /benchmark-models.These skills are atomic primitives. They do one thing per invocation and do not need the heavier behavioral framework.What the preamble bash actually does
Every skill, on every invocation, runs roughly this sequence before the user-facing prompt starts.Check for a gstack version upgrade
Emits
UPGRADE_AVAILABLE x to y if the global install is behind. Subsequent steps respect the user’s snooze preference.Touch a per-session file
~/.gstack/sessions/$PPID. Used to detect concurrent sessions. Files older than 120 minutes are swept.Read user config
proactive, skill_prefix, explain_level, telemetry, question_tuning, checkpoint_mode from ~/.gstack/config.yaml.Detect git branch plus repo mode
Distinguishes a regular checkout from a Conductor worktree from a vendored install. Affects path resolution downstream.
Log to analytics
Append-only JSONL at
~/.gstack/analytics/skill-usage.jsonl. If telemetry is set to community, also fires gstack-telemetry-log for remote reporting.Load learnings count plus recent learnings
~/.gstack/projects/$SLUG/learnings.jsonl. If count exceeds 5, fires gstack-learnings-search to surface relevant prior patterns.The state directory is the glue
Skills do not share runtime memory. Each invocation is a freshclaude -p process. The hand-off mechanism is the filesystem. Every skill that produces output for downstream consumption writes to a predictable path under ~/.gstack/. Every downstream skill reads from that same path.
~/.gstack/ (the substrate)
The discovery mechanism is
ls -t. /plan-ceo-review runs ls -t ~/.gstack/projects/$SLUG/*-design-*.md | head -1 to find the most recent design doc. /qa runs ls -t ~/.gstack/projects/$SLUG/*-test-plan-*.md | head -1 to find the test plan. No registry, no manifest. The most recently modified file with the matching glob is the source of truth.The hook system
Safety skills (/careful, /freeze, /guard, /investigate) declare PreToolUse hooks in their frontmatter. When the skill is active, Claude Code fires the hook script before every matching tool call. The hook reads the tool input as JSON, decides, and emits a verdict.
careful/bin/check-careful.sh
Empty object means allow
Empty JSON means the tool call proceeds normally with no user prompt.
permissionDecision ask means warn
Surfaces the warning to the user, who can override and proceed or cancel.
permissionDecision deny means block
The tool call is rejected outright. Used by
/freeze to block edits outside the boundary.Cross-skill invocation
Skills invoke other skills through Claude Code’s nativeSkill tool. The top-level SKILL.md contains explicit routing rules in its body.
{{INVOKE_SKILL:office-hours}} template placeholder mid-flow. For example, /plan-ceo-review offers to drop into /office-hours mid-session when the user cannot articulate the problem.
Subagent dispatch
/ship and /cso use Claude Code’s Agent tool (subagent_type: "general-purpose") to dispatch self-contained subtasks that would otherwise bloat the parent context. Coverage audits, plan-completion audits, Greptile review-comment triage, parallel security verifiers.
Subagent contract
{"coverage_pct":87,"gaps":3,"diagram":"...","tests_added":[...]}.
The /autoplan meta-orchestrator
/autoplan is structurally different from every other skill. It reads other SKILL.md files from disk through the Read tool and follows their instructions inline, while overriding the AskUserQuestion calls with six encoded decision principles. It is a skill that programmatically runs other skills as if they were a library.
/autoplan execution model