/skills

Skills.

Skills are reusable prompt templates that become slash commands. They encapsulate workflows, conventions, and domain knowledge into composable units that Nilux loads on demand.

How skills work

A skill is a markdown file with frontmatter metadata and a prompt body. When invoked, the instructions are loaded into the agent’s context, giving it domain-specific guidance for the task at hand.

  • Type /skill-name to invoke
  • Arguments are passed after the name: /deploy staging
  • The agent can also invoke skills automatically when it recognizes a matching task

Creating a skill

Drop a .md file in ~/.nilux/skills/ (global) or .nilux/skills/ (project). Two formats are supported:

  • Flat file: skills/commit.md
  • Directory: skills/commit/skill.md

Both become the /commit slash command. Use the directory format when a skill needs companion files.

markdown
---
name: deploy
description: Deploy to staging or production
allowed-tools: Bash, Read, Grep
argument-hint: environment (staging or production)
user-invocable: true
---
You are a deployment assistant.
1. Verify all tests pass
2. Build the project
3. Deploy to the target environment: {args}
4. Verify the health endpoint
Always confirm with the user before deploying.

Frontmatter fields

  • name — skill identifier, becomes the slash command (defaults to filename)
  • description — what the skill does (shown in /skills list)
  • allowed-tools — restrict which tools the agent can use while running this skill
  • argument-hint — hint text shown after the slash command
  • user-invocable — whether it appears as a slash command (default: true)
  • disable-model-invocation — if true, the skill prompt is injected directly without going through the Skill tool (default: false)
  • when_to_use — description for the agent to auto-invoke the skill when it matches a task

Scopes

  • ~/.nilux/skills/ — global skills, available in every project
  • .nilux/skills/ — project skills, only available in that project

Project skills override global skills with the same name. Use project skills for deployment, code generation, and other project-specific workflows. Use global skills for commit messages, reviews, and patterns you use everywhere.

Invocation

Three ways to invoke a skill:

  1. Slash command: type /deploy staging in the CLI
  2. Explicit request: "use the deploy skill for staging"
  3. Auto-invocation: if when_to_use is set, the agent can invoke the skill automatically when it recognizes a matching task

Skills vs agents

  • Skills — lightweight prompt templates injected into the main conversation. Quick, focused, no extra context window.
  • Agents — isolated sub-conversations with their own context and tools. For complex multi-step execution.

Use skills for guidance, patterns, and quick workflows. Use agents for heavy lifting.

TIP

Use /skills inside a session to see all available skills. Changes to skill files are picked up automatically — no restart needed.