跳到正文
cccskills
免费在 GitHub 公开

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.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(7)

  • SKILL.md3.2 KB
  • references/bash-tool.md1.9 KB
  • references/edit-tool.md1.9 KB
  • references/permission-patterns.md3.2 KB
  • references/read-tool.md1.8 KB
  • references/updating-skill.md2.5 KB
  • references/write-tool.md1.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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-

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

aesthetic

免费

Create aesthetically beautiful interfaces following proven design principles. Use when building UI/UX, analyzing designs from inspiration sites, generating design images with ai-multimodal, implementing visual hierarchy and color theory, adding micro-interactions, or creating design documentation. Includes workflows for capturing and analyzing inspiration screenshots with chrome-devtools and ai-multimodal, iterative design image generation until aesthetic standards are met, and comprehensive design system guidance covering BEAUTIFUL (aesthetic principles), RIGHT (functionality/accessibility), SATISFYING (micro-interactions), and PEAK (storytelling) stages. Integrates with chrome-devtools, ai-multimodal, media-processing, ui-styling, and web-frameworks skills.

中文简介正在准备中。当前显示原文说明。

kettleofketchup/DraftForge152026年10月19日 更新

brand

免费

DraftForge brand/theming review. Flags raw <button> over PrimaryButton/SecondaryButton, hardcoded violet/slate over brand tokens, inline styles, missing UserAvatar/EntityBreadcrumb.

中文简介正在准备中。当前显示原文说明。

kettleofketchup/DraftForge152026年10月19日 更新

Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.

中文简介正在准备中。当前显示原文说明。

kettleofketchup/DraftForge152026年10月19日 更新

Django Redis caching with django-cacheops. This skill should be used when implementing caching, adding cache invalidation, optimizing API performance, modifying models that affect cached data, or debugging cache-related issues in the Django backend.

中文简介正在准备中。当前显示原文说明。

kettleofketchup/DraftForge152026年10月19日 更新

Frontend development guidelines for React/TypeScript applications. Modern patterns including Suspense, lazy loading, useSuspenseQuery, file organization with features directory, MUI v7 styling, TanStack Router, performance optimization, and TypeScript best practices. Use when creating components, pages, features, fetching data, styling, routing, or working with frontend code.

中文简介正在准备中。当前显示原文说明。

kettleofketchup/DraftForge152026年10月19日 更新

Python Invoke task automation for DTX website. This skill should be used when running repo commands, backend tests via Docker, database migrations, updating invoke tasks, Docker operations, or workflow automation. Supports dev/test/prod environments with run, exec, up, down commands. References docs/development/invoke-tasks.md for complete command reference.

中文简介正在准备中。当前显示原文说明。

kettleofketchup/DraftForge152026年10月19日 更新

查看 kettleofketchup 的全部技能

报告此技能的问题