Back to list
kettleofketchup

bash-tools

by kettleofketchup

Dota 2 Event Coordinator

1🍴 0📅 Jan 25, 2026

SKILL.md


name: bash-tools description: 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

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:

PatternWhy It's WrongCorrect Approach
echo "content" > file.pyBypasses Write permissionsUse Write tool
cat << 'EOF' > file.pyHeredoc bypasses permissionsUse Write tool
printf '%s' "$content" > fileSame as echo bypassUse Write tool
tee file.py <<< "content"Redirect bypassUse Write tool

See references/permission-patterns.md for comprehensive examples.

Tool References

When Write Tool is Blocked

If the Write tool is blocked for a file:

  1. Accept the block - It exists for a reason
  2. Ask the user if they want to allow the operation
  3. 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

TaskToolNOT This
Create fileWriteecho > file
Edit fileEditsed -i
Read fileReadcat file
Search contentGrepgrep pattern
Find filesGlobfind . -name
Git commandsBash-
npm/yarnBash-
docker/makeBash-
Run testsBash-

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon