bash-tools
БесплатноБез исполняемых скриптовНе проверенProper usage of Bash and file operation tools. Use this skill when executing shell commands, writing files, or when tempted to use echo/cat/heredoc to pipe…
от kettleofketchup★ 16 звёзд на GitHubОб этом скилле
Bash Tools
Guidelines for proper tool selection when executing commands or modifying files.
Core Principle
Use specialized file tools for file operations. Use Bash only for actual shell commands.
Never use Bash to circumvent file operation permissions. If Write tool is blocked, that's intentional - do not work around it with echo, cat, or heredocs.
Tool Selection Decision Tree
Need to create/overwrite a file?
├── YES → Use Write tool (NOT echo/cat/heredoc)
└── NO → Continue...
Need to edit part of a file?
├── YES → Use Edit tool (NOT sed/awk)
└── NO → Continue...
Need to read file contents?
├── YES → Use Read tool (NOT cat/head/tail)
└── NO → Continue...
Need to search file contents?
├── YES → Use Grep tool (NOT grep/rg in Bash)
└── NO → Continue...
Need to find files by pattern?
├── YES → Use Glob tool (NOT find/ls in Bash)
└── NO → Continue...
Is this an actual shell command? (git, npm, docker, make, etc.)
├── YES → Use Bash tool
└── NO → Reconsider - probably need a file tool
Prohibited Patterns
These patterns attempt to circumvent Write tool permissions and MUST NOT be used:
| Pattern | Why It's Wrong | Correct Approach |
|---|---|---|
echo "content" > file.py |
Bypasses Write permissions | Use Write tool |
cat << 'EOF' > file.py |
Heredoc bypasses permissions | Use Write tool |
printf '%s' "$content" > file |
Same as echo bypass | Use Write tool |
tee file.py <<< "content" |
Redirect bypass | Use Write tool |
See references/permission-patterns.md for comprehensive examples.
Tool References
- Write Tool - Creating and overwriting files
- Bash Tool - Running shell commands
- Edit Tool - Modifying existing files
- Read Tool - Reading file contents
When Write Tool is Blocked
If the Write tool is blocked for a file:
- Accept the block - It exists for a reason
- Ask the user if they want to allow the operation
- Do NOT attempt to use Bash to write the file instead
The permission system protects the user. Circumventing it defeats its purpose.
Updating This Skill
When encountering new permission circumvention patterns or tool usage issues, see references/updating-skill.md.
Quick Reference
| Task | Tool | NOT This |
|---|---|---|
| Create file | Write | echo > file |
| Edit file | Edit | sed -i |
| Read file | Read | cat file |
| Search content | Grep | grep pattern |
| Find files | Glob | find . -name |
| Git commands | Bash | - |
| npm/yarn | Bash | - |
| docker/make | Bash | - |
| Run tests | Bash | - |
Установить bash-tools в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл bash-tools?
Proper usage of Bash and file operation tools. Use this skill when executing shell commands, writing files, or when tempted to use echo/cat/heredoc to pipe content to files. Prevents permission circumvention patterns like piping multiline content through echo instead of using Write tool. Covers Bash tool, Write tool, Edit tool, and Read tool best practices.
Как установить скилл bash-tools?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bash-tools запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic