home / skills / openclaw / skills / ai-alias

This skill analyzes your command history to generate concise shell aliases that speed up daily terminal workflows.

npx playbooks add skill openclaw/skills --skill ai-alias

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
2.1 KB
---
name: alias-gen
description: Generate shell aliases from your command history. Use when streamlining your terminal workflow.
---

# Shell Alias Generator

Analyzes your command history and suggests aliases for commands you type all the time. Stop typing git checkout when you could type gco.

**One command. Zero config. Just works.**

## Quick Start

```bash
npx ai-alias
```

## What It Does

- Reads your shell history (bash, zsh, fish)
- Finds frequently typed long commands
- Generates memorable aliases
- Creates proper shell syntax for your environment
- Groups related commands together

## Usage Examples

```bash
# Analyze and suggest aliases
npx ai-alias

# Generate for specific shell
npx ai-alias --shell zsh

# From specific commands
npx ai-alias "docker compose up, git status, npm run dev"
```

## Best Practices

- **Keep them short** - 2-4 characters ideal
- **Make them memorable** - gc for git commit, not x7
- **Avoid conflicts** - Don't override existing commands
- **Document them** - Comment your aliases file

## When to Use This

- You notice yourself typing the same commands daily
- Setting up a new machine
- Teaching someone your workflow
- Auditing which commands you use most

## Part of the LXGIC Dev Toolkit

This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.

**Find more:**
- GitHub: https://github.com/LXGIC-Studios
- Twitter: https://x.com/lxgicstudios
- Substack: https://lxgicstudios.substack.com
- Website: https://lxgicstudios.com

## Requirements

No install needed. Just run with npx. Node.js 18+ recommended.

```bash
npx ai-alias --help
```

## How It Works

The tool parses your shell history file, counts command frequency, filters out commands with sensitive data, and generates alias definitions. It uses naming conventions that make aliases easy to remember.

## License

MIT. Free forever. Use it however you want.

---

**Built by LXGIC Studios**

- GitHub: [github.com/lxgicstudios/ai-alias](https://github.com/lxgicstudios/ai-alias)
- Twitter: [@lxgicstudios](https://x.com/lxgicstudios)

Overview

This skill generates shell aliases from your command history to streamline repetitive terminal work. It scans bash, zsh, or fish history, surfaces frequently typed long commands, and produces memorable, environment-specific alias definitions. Use it to reduce typing, standardize workflows, and bootstrap aliases on new machines.

How this skill works

The tool parses your shell history file, counts command frequency, and filters out entries that look sensitive. It groups related commands, suggests short, memorable alias names, and outputs syntax tailored to your detected shell. You can run it interactively or feed specific commands to generate focused alias sets.

When to use it

  • You repeatedly type the same long commands
  • Setting up a new machine or dotfiles
  • Onboarding someone to your workflow
  • Auditing and optimizing your command usage
  • After a period of heavy CLI use to capture new patterns

Best practices

  • Keep aliases short and mnemonic (2–4 characters ideal)
  • Avoid overriding built-in commands or common utilities
  • Review suggestions for sensitive arguments before applying
  • Document aliases with comments in your shell config
  • Test new aliases in a session before adding them permanently

Example use cases

  • Convert frequent git sequences into gco, gcm, etc., to speed version control
  • Turn long Docker or compose commands into short run/debug aliases
  • Generate a lightweight alias file when provisioning a new laptop
  • Share a curated alias file with teammates to standardize shortcuts
  • Quickly extract aliases for specific command lists you pass to the tool

FAQ

Do I need to install anything?

No install required—run it with npx and Node.js 18+ is recommended.

Will it expose passwords or tokens?

It filters out likely sensitive data, but you should review suggestions before applying them.

Can I target a specific shell?

Yes—you can request a shell like zsh or fish to get appropriate alias syntax.