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

hermes-python-script-wrapper-for-shell-cron

Diagnose and safely document Hermes cron script interpreter mismatches, especially when shell scripts are executed as Python or Python wrappers are executed as shell.

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

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.1 KB

SKILL.md(원문)

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

Hermes Python Wrapper for Shell Cron

Purpose

Provide a safe workflow for diagnosing Hermes cron script= interpreter mismatches. The common failure modes are shell syntax being interpreted by Python, or Python code being interpreted by shell. The default workflow only diagnoses and proposes a wrapper plan; writing wrapper files requires user approval.

When to use

  • A Hermes cron job fails with syntax errors around shell constructs such as strict mode, heredocs, or bash conditionals.
  • A cron job fails with shell errors while the entry file contains Python code.
  • The job's configured script extension does not match the interpreter used by the scheduler.
  • A user wants a stable wrapper pattern for cron scripts while keeping the existing script path.

Safety rules

  • Default workflow is read-only.
  • Do not edit scripts, change permissions, trigger jobs, or update cron definitions without explicit approval.
  • Do not copy production scripts into public documentation.
  • Replace real paths with <PROJECT_ROOT>, <SCRIPT_PATH>, <WRAPPER_PATH>, or <IMPLEMENTATION_SCRIPT>.
  • Do not expose script contents if they include credentials, private URLs, tokens, or production data.

Read-only workflow

  1. Identify the failing Hermes cron job and script path from metadata or user-provided error context.
  2. Read the error summary and classify the mismatch:
    • shell syntax reported by Python means the entry is being executed as Python;
    • Python syntax reported by shell means the entry is being executed as shell.
  3. Inspect cron metadata to determine how the scheduler invokes script= for that job.
  4. Inspect only the minimum safe lines of the entry script needed to identify its language and shebang.
  5. Compare the entry script language, extension, shebang, and scheduler invocation mode.
  6. Produce a wrapper plan using placeholders, without writing files.
  7. Include a verification plan that compares direct implementation execution with scheduler-style entry execution.

Evidence to collect

  • Redacted job name or identifier.
  • Configured script path as <SCRIPT_PATH>.
  • Error class and first safe error line.
  • Detected script language: shell, Python, or mixed.
  • Scheduler invocation mode if known.
  • Whether arguments need to be forwarded.
  • Whether stdout/stderr and exit code must be preserved.

Stop conditions

  • The script contains secrets or production-specific data that cannot be safely summarized.
  • The scheduler invocation mode is unknown and cannot be inferred read-only.
  • Fixing requires editing the script, chmod, cron update, or a manual job run without approval.
  • The proposed wrapper might alter stdout/stderr or exit-code semantics.

Optional user-approved actions

Only after explicit user approval:

  • Move implementation content to <IMPLEMENTATION_SCRIPT>.
  • Replace the original entry with a wrapper appropriate for the real invocation mode.
  • Set execute permissions.
  • Run syntax checks and controlled dry-runs.
  • Trigger or run the cron job once to verify recovery.

Generic wrapper patterns

Use these only as templates after approval.

Python entry that delegates to shell:

#!/usr/bin/env python3
import subprocess
import sys

SCRIPT = "<IMPLEMENTATION_SCRIPT>"
result = subprocess.run(["/usr/bin/env", "bash", SCRIPT] + sys.argv[1:])
raise SystemExit(result.returncode)

Shell entry that delegates to shell implementation:

#!/usr/bin/env bash
set -euo pipefail
SCRIPT="<IMPLEMENTATION_SCRIPT>"
exec /usr/bin/env bash "$SCRIPT" "$@"

Final report format

Summary: <interpreter mismatch diagnosis>
Job: <redacted job name/id>
Script: <SCRIPT_PATH>
Observed error: <safe summarized error>
Detected mismatch: <shell-as-python / python-as-shell / unknown>
Read-only evidence: <bullets>
Wrapper plan: <high-level plan with placeholders>
Verification plan: <syntax/direct/scheduler-style checks>
Needs approval before changes: yes

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

Route CEO-first multi-window work into owner-led role loops. Use for 总控/CEO、架构/CTO、内容主编、角色派发与复用、模型路由、来源窗口回调、role-windows 台账、skill 命中统计或 multi-window loop engineering。

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

Dirtytrii/codex-skills112026년 10월 9일 업데이트

Read-only first workflow for diagnosing application incidents by collecting service, log, network, configuration, and functional evidence before proposing any fix.

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

Dirtytrii/codex-skills112026년 10월 9일 업데이트

Run user-authorized black-box web security tests and evidence-based reports. Use for 黑盒安全测试、渗透测试、数据泄露、未授权访问、公开 JS/API、登录爆破防护、CORS 或安全响应头检查。

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

Dirtytrii/codex-skills112026년 10월 9일 업데이트

Choose the narrowest reliable browser surface across Codex Browser, signed-in Chrome, Playwright CLI, and platform scripts. Use for browser automation, logged-in workflows, UI inspection, screenshots, form filling, publish previews, or frontend QA.

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

Dirtytrii/codex-skills112026년 10월 9일 업데이트

提议并执行 rubric 或 bucket 升级。两种模式:**完整 rubric bump**(最高风险动作,5 步强制 + 跨模型审核)和 **--bucket-only 轻量重校**(只换 bucket 边界,不动 rubric 公式)。**Phase 2 强制走 cheat-score-blind sub-agent 给校准池重打分**——不接受 self-scored fallback。触发词:"升级 rubric"/"bump rubric"/"更新公式"/"我想加一个维度"/"调整权重"/"重校桶"/"recalibrate bucket"。

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

Dirtytrii/codex-skills112026년 10월 9일 업데이트

初始化 cheat-on-content 内容校准工作区。仅在用户明确开始该工作流,或其子 skill 确认缺少 .cheat-state.json 时使用;不响应一般项目初始化、安装诊断或 Codex 首次会话。

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

Dirtytrii/codex-skills112026년 10월 9일 업데이트

Dirtytrii의 스킬 모두 보기

이 스킬의 문제 신고