Grok CLI Skills: Skill Files, SKILL.md, and Slash Commands

This article was produced with AI assistance. Editorial standards apply.

Engineer reviewing Grok CLI skills and SKILL.md files on a dark terminal workstation AI Edited
Illustrative photo of a Grok Build skill-file workstation · created with AI assistance. View raw image

Last updated: 30 August 2026

Key takeaways

  • A CLI skill is a folder with SKILL.md (YAML frontmatter + markdown instructions), not a chat memory.
  • Grok Build walks ./.grok/skills/, ~/.grok/skills/, plugin skills/ dirs, and extra [skills] paths.
  • User-invocable packs appear as slash commands; description drives auto-invoke.
  • Teach-a-Task on Grok Bot is a different surface — keep that walkthrough on its own URL.

Place Grok CLI skills as a repo folder with SKILL.md under ./.grok/skills/, then confirm discovery with grok inspect or the TUI Skills tab. Queries for grok skill files belong on this URL. Teach a task stays on how to create your first Grok skill.

Place skill files where Grok Build walks {#place-skill-files}

xAI defines skills as reusable folders of markdown instructions, scripts, and resources. The coding agent loads them from disk. Consumer Skills on grok.com (documents, decks, spreadsheets) are a separate product surface, announced on the official @grok account as prebuilt and custom workflow packs.

The xAI skills, plugins, and marketplaces page is the discovery contract:

LocationRole
./.grok/skills/Project packs, walked up to the repo root
~/.grok/skills/User-level packs (every project)
Enabled plugin skills/Bundled with a plugin
[skills] paths in ~/.grok/config.tomlExtra roots

Grok Build reads Claude Code skill trees and the AGENTS.md family with no extra setup. User-level ~/.agents/skills/ is on that compatibility list. For verified production routines with typed tools JSON, start in the engineering hub.

Write SKILL.md frontmatter Grok actually reads {#write-skill-md}

Engineering desk with a laptop and printed skill-folder spec beside a dark terminal AI Edited
Illustrative photo · created with AI assistance · original file

SKILL.md starts with YAML frontmatter. Extra keys are ignored. The open Agent Skills specification requires name (kebab-case, matching the parent folder) and description. Grok adds CLI-specific keys on top of that baseline.

  1. Create ./.grok/skills/your-skill-name/ (project) or ~/.grok/skills/your-skill-name/ (user).
  2. Write SKILL.md with name and a description that states what it does and when to fire.
  3. Add scripts/ or references/ only when the body would otherwise bloat.
  4. Open /skills in the TUI, or run grok inspect, to confirm the pack loaded.

Documented Grok fields include when-to-use (alias when_to_use), paths (gitignore globs; hidden until a matching file is touched), allowed-tools (does not grant or restrict tools), argument-hint, user-invocable (only the literal true counts), and disable-model-invocation. Keys model, effort, license, and compatibility are accepted and not applied.

The description field is the auto-invoke trigger. Vague copy loads the pack on unrelated turns and burns context. Registry architecture for typed enterprise routines lives in Grok bot skills architecture; that essay is the schema story, this URL is the filesystem story.

Browse verified engineering routines →

Keep Teach-a-Task on the product path {#cli-vs-teach-a-task}

Search for skill files and slash commands belongs here. Search for teach Grok a task belongs on how to create your first Grok skill.

Grok Bot skills are reusable instruction sets you save from a conversation. Teach a task records visible computer interaction (up to ten minutes, no microphone) and drafts a skill you still have to harden with failure rules and approval boundaries. That flow is documented under Grok Bot skills and routines.

CLI packs are git-diffable folders. Bot product skills are account-scoped workflows. Mixing those intents produces a soft duplicate of the Teach-a-Task URL. Keep this page on disk layout, frontmatter, and TUI discovery.

Public X discussion of consumer Skills (web/iOS/Android) tracks the grok.com launch, not SKILL.md on disk. An operator who wired GitHub plus a custom skill that rereads context.md is using the instruction-pack idea; the CLI equivalent is still a folder Grok Build can walk.

Invoke, inspect, and gate writes {#invoke-inspect-gate}

User-invocable packs show up as slash commands (/your-skill-name). Name collisions use a qualified form such as /local:commit. The same extensions modal opens from /skills, /plugins, /hooks, or /mcps.

Install the agent with the bootstrap in the Grok Build overview, then run grok inspect in the repo you care about. Inspect lists config sources, instruction files, skills, plugins, hooks, and MCP servers for that cwd. A missing pack is usually the wrong directory, a non-SKILL.md filename, or user-invocable not set to the literal true.

Markdown instructions are not an execution sandbox. allowed-tools does not grant tools. Writes to GitHub, Slack, or a CRM still need a two-phase preview. Pair a local pack with a typed directory routine such as the PR conflict flagger when the next step is a mutation.

FAQ {#faq}

What is a Grok skill file?

A Grok skill file is SKILL.md inside a named folder: YAML frontmatter plus markdown instructions, optionally with scripts/ and references/.

Where do I put skill files for the CLI?

Start with ./.grok/skills/<name>/SKILL.md in the repo or ~/.grok/skills/<name>/SKILL.md for every project. Extra roots go under [skills] paths in ~/.grok/config.toml.

How do I invoke a pack by name?

User-invocable packs appear as slash commands in the TUI. Set disable-model-invocation when you want slash-only and no auto-invoke.

Is Teach a Task the same as SKILL.md?

No. Teach a Task records a Grok Bot computer workflow. SKILL.md is the Grok Build / Agent Skills folder format this page covers.

Ship the folder, then verify

Commit project packs so teammates inherit the same slash commands. Run grok inspect after every path change. More operator guides like this appear when you search BotSkillsStack Grok skill files on Google.

Sources

Make BotSkillsStack a Preferred Source

Keep agent-skill architecture guides highlighted in Google Search.

Add on Google
Preferred Source added