Skills
Skills are reusable prompt templates that can be invoked via slash commands. They encapsulate domain knowledge, workflows, and best practices into composable units that Nilux AI loads on demand. Skills help you work consistently across sessions and share patterns with your team.
How Skills Work
A skill is a named template with:
- A slash command — Invoked as
/skill-nameor with the Skill tool - A system prompt — Instructions injected into the agent's context when invoked
- Optional arguments — Parameters passed to customize behavior
When you invoke a skill, the associated instructions are loaded into the agent's context, giving it domain-specific knowledge and step-by-step guidance for the task at hand.
Built-in Skills
Nilux AI comes with a set of pre-configured skills. Here are some commonly used ones:
/commit
Generates a structured commit message based on staged changes.
> /commit
Analyzing staged changes...
Suggested commit message:
feat(auth): add refresh token rotation
- Rotate refresh token on each access token refresh
- Invalidate old refresh tokens after rotation
- Add RefreshTokenRotation model to database
/review-pr
Reviews a pull request for bugs, style issues, and best practices.
> /review-pr 123
Analyzing PR #123: "Add user dashboard"
Review Summary:
- 3 files changed, +120/-15 lines
- Code quality: Good
- Potential issues:
1. Missing error boundary on new DashboardPage
2. Unhandled loading state in useBalance hook
- Suggestions:
1. Add unit tests for calculateCost function
2. Consider memoizing the filtered transactions list
/explain
Provides a detailed explanation of selected code or a concept.
> /explain src/lib/middleware.ts
/tests
Generates comprehensive tests for a given file or module.
> /tests src/lib/api.ts
Generating test suite for api.ts...
/refactor
Suggests and applies improvements to code structure and readability.
> /refactor src/components/UserList.tsx
Creating Custom Skills
Skills are defined as markdown files in your project's .nilux/skills/ directory. Each skill becomes a slash command:
~/.nilux/skills/
commit.md
review-pr.md
deploy.md
my-custom-workflow.md
Skill File Format
A skill file is a markdown document with frontmatter metadata:
# Deploy Skill
You are a deployment assistant. When invoked:
1. Verify all tests pass: `npm test`
2. Build the project: `npm run build`
3. Check the target environment: {args}
4. Run the appropriate deploy command:
- For "production": `npm run deploy:prod`
- For "staging": `npm run deploy:staging`
5. Confirm the deployment succeeded by checking the health endpoint
6. Report the new version and deployment time
Always confirm with the user before running the actual deploy command.
The {args} placeholder is replaced with whatever the user types after the slash command:
> /deploy staging
Becomes: "Check the target environment: staging"
Skill Metadata
| Field | Required | Description |
|---|---|---|
name | Yes | Skill identifier (becomes the slash command) |
description | Yes | What the skill does (shown in autocomplete) |
args | No | Label for the argument placeholder |
Project-Level vs Global Skills
Skills can be defined at two levels:
Project-Level Skills
Stored in <project>/.nilux/skills/. Only available when working in that project.
my-project/
.nilux/
skills/
deploy.md # Project-specific deployment
generate-api.md # Project-specific code generation
Global Skills
Stored in ~/.nilux/skills/. Available across all projects.
~/.nilux/
skills/
commit.md # Commit message generation (all projects)
review-pr.md # PR review (all projects)
Tip: Put project-specific workflows (deployment, API generation, database migrations) in project-level skills. Put general-purpose skills (commit, review, explain) in global skills.
Skill Invocation
Skills can be invoked in three ways:
Slash Command
Type /skill-name in the CLI:
> /commit
> /review-pr 123
> /deploy staging
Skill Tool
The agent itself can invoke skills using the Skill tool:
Agent invokes Skill:
skill: commit
args: -m 'Fix login bug'
Explicit Request
Ask the agent directly:
> Use the commit skill to generate a message for these changes
> Review PR #123 with the review skill
Example: Database Migration Skill
# Migration Skill
You are a database migration assistant.
1. Check the current migration state: `npm run db:status`
2. Generate a migration with the description: `npm run db:generate -- "{args}"`
3. Show the generated SQL to the user
4. After user approval, apply the migration: `npm run db:migrate`
5. Verify the migration applied: `npm run db:status`
Usage:
> /migrate Add user avatar_url column
Example: API Generator Skill
# API Generator Skill
You are an API endpoint generator for this NestJS project.
When invoked:
1. Read src/modules/ for the existing module structure
2. Create a new module following the existing pattern
3. Generate:
- Controller with {args} endpoint
- Service with business logic
- DTO with validation
- Module registration
4. Register the new module in app.module.ts
5. Run TypeScript check: `npx tsc --noEmit`
Usage:
> /generate-api payments "POST /payments/create"
Best Practices
- Be specific in skill instructions — Include exact commands, file paths, and validation steps
- Add safety checks — Always include "confirm with user" before destructive operations
- Document expected outcomes — Tell the agent what success looks like
- Use project conventions — Reference existing files and patterns in the project
- Test your skills — Run them on sample tasks to verify they work as expected
- Keep skills focused — One skill, one workflow. Compose complex workflows from simple skills.
Skills vs Agents
| Skills | Agents |
|---|---|
| Injected into the main conversation | Run in isolated sub-conversations |
| Lightweight prompt templates | Full tool-using autonomous loops |
| Quick, focused guidance | Complex multi-step execution |
| Slash command interface | Invoked by the agent or explicitly |
| No additional context window | Separate context window per agent |
Tip: Use skills for guidance, patterns, and quick workflows. Use agents for heavy lifting — multi-file searches, large refactors, parallel execution.
Next Steps
- Agents Overview — Autonomous subagents for complex tasks
- MCP Overview — Custom tools via Model Context Protocol
- Configuration — Configure global and project settings
- Tools Overview — All built-in tools