agentleFS
AI-Shell-TeamAI-Shell-Team/aish/skills/prompt-designer/SKILL.md

prompt-designer

Skill578 starsChanged 6 months agoApache-2.0View on GitHub

Design and customize prompts for aish shell. Use when user wants to modify their shell prompt, describe desired prompt style, or switch between prompt themes. Triggers on keywords like "prompt", "提示符", "主题".

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always use printf '%s' not echo

    line 97
  2. Very specific:

    Use $'...' for ANSI color variables

    line 98
  3. Distinctive:

    Keep execution under 100ms

    line 100

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Prompt Designer

Help users design and customize prompts for aish shell.

Workflow

Step 1: Check or Initialize

# Check if user has a prompt file
if [[ ! -f ~/.config/aish/scripts/hooks/aish_prompt.aish ]]; then
    # Create from template
    mkdir -p ~/.config/aish/scripts/hooks
    cp <aish-src>/src/aish/scripts/templates/aish_prompt.aish ~/.config/aish/scripts/hooks/
fi

# Read current content
cat ~/.config/aish/scripts/hooks/aish_prompt.aish

Step 2: Modify or Regenerate

Modify existing:

  • Read current file
  • Apply only requested changes
  • Preserve existing customizations

Regenerate (when user asks):

  • "重写", "重新生成", "create new"
  • Generate completely new prompt

Template Location

<aish-src>/src/aish/scripts/templates/aish_prompt.aish

User Hook Location

~/.config/aish/scripts/hooks/aish_prompt.aish

Environment Variables

VariableDescriptionExample
AISH_CWDCurrent working directory/home/user/project
AISH_EXIT_CODELast command exit code0, 1, 127
AISH_GIT_REPO"1" if in git repository1 or unset
AISH_GIT_BRANCHCurrent branch namemain, feature-x
AISH_GIT_STATUSRepository statusclean, staged, dirty
AISH_GIT_STAGEDNumber of staged files3
AISH_GIT_MODIFIEDNumber of modified files11
AISH_GIT_UNTRACKEDNumber of untracked files9
AISH_GIT_AHEADCommits ahead of upstream2
AISH_GIT_BEHINDCommits behind upstream1
AISH_VIRTUAL_ENVVirtual environment name.venv, myenv

ANSI Colors

R=$'\033[0m'      # Reset
B=$'\033[1m'      # Bold
D=$'\033[2m'      # Dim
RD=$'\033[31m'    # Red
G=$'\033[32m'     # Green
Y=$'\033[33m'     # Yellow
BL=$'\033[34m'    # Blue
M=$'\033[35m'     # Magenta
C=$'\033[36m'     # Cyan

Default Output

:~/n/x/g/aish|main● +1 ↑2 ➜

Example Interactions

User RequestAction
"修改 prompt"Init from template if needed → Read → Modify
"把路径改成红色"Read → Change BL to RD in path section
"添加时间显示"Read → Add $(date +%H:%M) at start
"重写 prompt"Generate fresh from scratch

Tips

  • Always use printf '%s' not echo
  • Use $'...' for ANSI color variables
  • Handle missing variables: ${VAR:-default}
  • Keep execution under 100ms

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.