본문으로 건너뛰기
cccskills
무료GitHub에 공개

run-shell

Execute shell commands for system operations, directory creation, and script execution. When you need to run system commands, execute scripts, install packages, or manage processes. Note - if commands fail consecutively, try different approaches.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md2.9 KB
  • agents/openai.yaml301 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Run Shell

执行 Shell 命令。

Parameters

参数类型必填说明
commandstring是要执行的 Shell 命令
cwdstring否工作目录(可选)
timeoutinteger否超时时间(秒),默认 60,范围 10-600

Examples

列出目录:

{"command": "ls -la"}

安装依赖:

{"command": "pip install requests", "timeout": 300}

在指定目录执行:

{"command": "npm install", "cwd": "/path/to/project"}

Timeout Guidelines

  • 简单命令: 30-60 秒
  • 安装/下载: 300 秒
  • 长时间任务: 根据需要设置更长时间

Windows PowerShell 指引(重要)

转义保护

系统会自动将 PowerShell 命令通过 -EncodedCommand(Base64 UTF-16LE)编码执行, 避免 cmd.exe → PowerShell 的多层引号/特殊字符转义破坏。直接传入 PowerShell 命令即可。

何时使用 PowerShell vs Python 脚本

场景推荐方式原因
简单系统查询(进程/服务/文件列表)PowerShell cmdletGet-Process, Get-ChildItem 等一行搞定
复杂文本处理(正则、URL 提取、HTML/JSON 解析)Python 脚本避免 PowerShell 正则 one-liner 的复杂性
批量文件操作(重命名、过滤、转换)Python 脚本更可靠,不受 PowerShell 管道转义影响
网络下载/HTTP 请求Python 脚本requests/urllib 比 Invoke-WebRequest 更灵活

推荐的 Python 脚本模式

对于复杂文本处理任务,务必使用 write_file + run_shell 组合:

步骤 1: write_file 写入 data/temp/task_xxx.py
步骤 2: run_shell "python data/temp/task_xxx.py"

禁止:在 run_shell 中写包含复杂正则的 PowerShell one-liner,例如:

# 禁止这种写法
powershell -Command "Get-Content file.html | Select-String -Pattern '(?<=src=\")[^\"]+' | ForEach-Object { $_.Matches.Value } | Sort-Object -Unique | Out-File urls.txt"

应改为写 Python 脚本:

import re
from pathlib import Path
html = Path("file.html").read_text(encoding="utf-8")
urls = sorted(set(re.findall(r'src="([^"]+)"', html)))
Path("urls.txt").write_text("\n".join(urls), encoding="utf-8")

Notes

  • Windows 使用 PowerShell/cmd 命令(自动 EncodedCommand 编码)
  • Linux/Mac 使用 bash 命令
  • 如果命令连续失败,请尝试不同的命令或方法
  • 失败时可调用 get_session_logs 查看详细日志

Related Skills

  • write-file: 写入文件
  • read-file: 读取文件

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Record important information to long-term memory for learning user preferences, successful patterns, and error lessons. When you need to remember user preferences, save successful patterns, or record lessons from errors.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

openakita/openakita2천2026년 9월 24일 업데이트

Click page elements by CSS selector or text content. When you need to click buttons, links, or select options. PREREQUISITE - must use browser_navigate to open target page first.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

openakita/openakita2천2026년 9월 24일 업데이트

Extract page content and element text from current webpage. When you need to read page information, get element values, scrape data, or verify page content.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

openakita/openakita2천2026년 9월 24일 업데이트

List all open browser tabs with their index, URL and title. When you need to check what pages are open, manage multiple tabs, or find a specific tab to switch to.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

openakita/openakita2천2026년 9월 24일 업데이트

Navigate browser to specified URL to open a webpage. When you need to open webpages or start web automation. PREREQUISITE - must call before browser_click/type operations. Auto-starts browser if not running.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

openakita/openakita2천2026년 9월 24일 업데이트

Open new browser tab and navigate to URL (keeps current page open). When you need to open additional page without closing current, or multi-task across pages. PREREQUISITE - must confirm browser is running first.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

openakita/openakita2천2026년 9월 24일 업데이트

openakita의 스킬 모두 보기

이 스킬의 문제 신고