Agent Tracks is now integrated with Haijun Code. See the documentation for details.
✨ Ask Assistant ⌘ I
takebox

Using Scripts

How to bundle executable scripts with your Agent Tracks.

Why include scripts?

Scripts let your track perform automated tasks — linting, formatting, validation, code generation, and more. The agent can execute these scripts as part of following your track instructions.

Adding scripts to a track

my-track/
├── TRACK.md
└── scripts/
    ├── validate.sh
    ├── format.py
    └── generate.js

Referencing scripts in TRACK.md

Mention scripts by their relative path in your instructions:

---
name: code-quality
description: Run quality checks and format code
---

# Code Quality

1. Run the validation script: `scripts/validate.sh`
2. Fix any issues reported
3. Run the formatter: `scripts/format.py`
4. Verify all checks pass

Script permissions

Ensure scripts are executable before packaging your track:

chmod +x scripts/*.sh
chmod +x scripts/*.py

Cross-platform considerations

To support multiple platforms:

  • Use bash for maximum compatibility
  • Avoid platform-specific paths (use relative paths)
  • Check for required tools at the start of scripts
  • Provide alternative scripts for different platforms when needed