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

claude-exec

Run one prompt through headless Claude with scoped permissions and a time bound. Use when: scripting or automating a `claude -p` call, even a simple one.

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

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.3 KB

SKILL.md(원문)

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

Claude Exec — one-shot runtime adapter

Run one caller-supplied prompt through Claude Code print mode and capture the result, only when the caller selects Claude: the native agent stays the default and batches belong to agent-native. Flags match claude --help for 2.1.282; recheck it on other versions.

Failure modes of a quick claude -p

  1. Inherited posture. A bare run loads the user's settings, hooks, plugins, MCP servers and CLAUDE.md; a settings bypassPermissions default held even under --safe-mode. Use the clean flags below and set --tools and --permission-mode to the task's effects.
  2. Renewed time. One bound, from the caller's remaining time: a retry spends it instead of renewing it. Make one attempt; any other is the caller's decision.
  3. Exit 0 as proof. A denied call still exits 0 with is_error: false and "done", and a bare file name once landed in the run's scratchpad, not $WORKDIR. Name targets by path, check effects there, and leave acceptance to a fresh validator.
  4. Silent fallback. With no claude, login or model, report and stop instead of switching runtimes or passing --fallback-model.
  5. Self-review. Review runs as a separate session, never the author's.

Run

Redirect the prompt from a file, or pass it as the argument with </dev/null, because print mode reads stdin to EOF: a pipe left open hangs until the bound kills it. Stock macOS lacks timeout: use GNU timeout or Homebrew's gtimeout, and launch nothing without one.

TO=$(command -v timeout || command -v gtimeout) || { echo "no timeout: not launching" >&2; exit 2; }
cd "$WORKDIR" || exit 2
# Read-only: review, research, questions.
"$TO" -k 10 "$SECS" claude -p --model "$MODEL" --output-format json \
  --setting-sources "" --strict-mcp-config --disable-slash-commands \
  --tools "Read,Grep,Glob" --permission-mode dontAsk \
  <"$PROMPT_FILE" >"$OUT" 2>"$ERR"; echo "exit=$?"
# Edit-capable: authorized file changes under $WORKDIR.
"$TO" -k 10 "$SECS" claude -p --model "$MODEL" --output-format json \
  --setting-sources "" --strict-mcp-config --disable-slash-commands \
  --tools "Read,Grep,Glob,Edit,Write" --permission-mode acceptEdits \
  <"$PROMPT_FILE" >"$OUT" 2>"$ERR"; echo "exit=$?"

Print mode never prompts: unapproved calls are denied and listed in permission_denials. Add Bash to --tools only for authorized commands named in --allowedTools, e.g. "Bash(go test *)"; with settings hooks dropped, that list is the guard. --max-budget-usd stops after the call that crosses it, and --help lists no turn cap, so bound a run by time and budget. --no-session-persistence keeps no transcript.

Result

JSON carries result, is_error, session_id, total_cost_usd, num_turns, permission_denials, and modelUsage keyed by the models billed; identity evidence needs stream-json --verbose per the model-dispatch recipe. Judge by exit status and is_error: an unknown model exited 1 with subtype: "success". Exit 1 also covers a spent budget or missing input; timeout gives 124, or 137 when KILL follows 10 seconds later. Keep at most the caller's byte cap (10 MiB default), mark a cut file truncated, return this, and stop:

command: <exact argv>    posture: <tools; permission mode; clean flags>
model: <requested> -> <modelUsage keys>    exit: <status | timeout at N s>
session_id: <id | none>    output: <path, bytes, truncated: yes|no>
permission_denials: <count and tools>

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

Dispatch independent tasks to parallel workers or subagents without write collisions. Use when: running or planning agents in parallel, even two; check scopes before any launch.

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

boshu2/agentops4502026년 10월 19일 업데이트

Run a supplied task in headless AGY (Antigravity, Gemini) and collect its result. Use when: AGY, Antigravity or Gemini is requested by name; never a fallback.

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

boshu2/agentops4502026년 10월 19일 업데이트

Run one prompt through headless Codex and capture the result. Use when: wanting a one-shot `codex exec` run or CI step. Not for batches or retries.

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

boshu2/agentops4502026년 10월 19일 업데이트

council

무료

Compare independent opinions from several models or contexts without inflating agreement. Use when: wanting a second opinion or debate, or summarizing several reviewers' results.

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

boshu2/agentops4502026년 10월 19일 업데이트

Draft or lint a bounded long-running goal prompt with a finish line and hard limits. Use when: selected by name; one change goes to Plan.

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

boshu2/agentops4502026년 10월 19일 업데이트

doc

무료

Write or update READMEs, docs, repo instructions and handoff notes, checked against source. Use when: documenting something, writing a README or leaving a session handoff.

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

boshu2/agentops4502026년 10월 19일 업데이트

boshu2의 스킬 모두 보기

이 스킬의 문제 신고