Home › Grok Build lesson 3: Skills and scripts
Grok Build lesson 3: Skills and scripts
Once it works in your project, make it work your way: an AGENTS.md file and skills give it your conventions, and headless mode lets scripts and automations call it.
Step by step
- Add an AGENTS.md file to the project with your rules (test command, code style, folders to avoid).
- Turn a session that went well into a reusable skill with /skillify.
- Skills run automatically when a task matches, or you call them by name.
- For scripts, run grok -p "your prompt" to get an answer without the full-screen interface.
- Add --output-format streaming-json when another program needs to read the output.
Try it: examples
- AGENTS.md rule
Always run npm test before saying a change is done. Never edit files in /migrations.
- Headless
grok -p "Explain the architecture" --output-format streaming-json
Good to know
- Plugins, hooks and MCP servers also work out of the box.
- Headless mode suits CI jobs and scheduled scripts; give it a narrow prompt.
- Custom models can be added in ~/.grok/config.toml.
Sources (official pages, read Nov 8, 2026)
Written from SpaceXSI's official documentation and product pages; we don't run hands-on tests. Features and limits vary by plan and country.