Skip to main content

prompt-designer

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", "提示符", "主题".

소스 정보

저장소
AI-Shell-Team/aish
최근 소스 활동
2026년 6월 2일 09:54
감지된 SKILL.md 언어
영어
스타
561
포크
123

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
prompt-designer
description
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", "提示符", "主题".
allowed-tools
["bash","read_file","write_file"]
# Prompt Designer Help users design and customize prompts for aish shell. ## Workflow ### Step 1: Check or Initialize ```bash # 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 | Variable | Description | Example | |----------|-------------|---------| | `AISH_CWD` | Current working directory | `/home/user/project` | | `AISH_EXIT_CODE` | Last command exit code | `0`, `1`, `127` | | `AISH_GIT_REPO` | "1" if in git repository | `1` or unset | | `AISH_GIT_BRANCH` | Current branch name | `main`, `feature-x` | | `AISH_GIT_STATUS` | Repository status | `clean`, `staged`, `dirty` | | `AISH_GIT_STAGED` | Number of staged files | `3` | | `AISH_GIT_MODIFIED` | Number of modified files | `11` | | `AISH_GIT_UNTRACKED` | Number of untracked files | `9` | | `AISH_GIT_AHEAD` | Commits ahead of upstream | `2` | | `AISH_GIT_BEHIND` | Commits behind upstream | `1` | | `AISH_VIRTUAL_ENV` | Virtual environment name | `.venv`, `myenv` | ## ANSI Colors ```bash 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 Request | Action | |--------------|--------| | "修改 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
GitHub에서 보기