C.W.K.
Stream
Lesson 05 of 07 · published

스크립트 — Skill 안의 deterministic 함

~14 min · skills, scripts, deterministic, shell

Level 0🌱 입문자
0 XP0/70 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

일부 step 은 모델 일이 아니어야 함

Skill 이 실행 가능 스크립트 (bash, Python, Node) 와 함께 ship + body 에서 호출 가능. 패턴: 반드시 deterministic 해야 할 — test 돌리기, 데이터 정규화, service 쿼리 — 가 스크립트로. 모델이 orchestrate; 스크립트가 실행.

왜: 모델은 판단에 위대, 12 순차 명령어 typo 없이 실행에 그저그래. 매번 같은 파이프라인 돌리는 bash 스크립트가 Claude 한테 npm install + npm run build + npm test + output 파싱 + 결과 포맷 순서 기억 시키는 것보다 reliable.

Code

A Skill that calls its own script·markdown
---
name: bench-and-report
description: Run the project's benchmark suite and write a report.
invocation: explicit
paths:
  - scripts/run-bench.sh
  - templates/report.md
---

You are running performance benchmarks.

1. Execute scripts/run-bench.sh; capture stdout (machine-readable JSON)
2. Read templates/report.md
3. Fill in the template with bench results
4. Write the report to ./bench-report-$(date +%F).md
5. Highlight any regressions vs the previous report (if found in repo root)
scripts/run-bench.sh·bash
#!/usr/bin/env bash
set -euo pipefail
cd "$(git rev-parse --show-toplevel)"

# Run the actual bench (deterministic — same inputs, same outputs)
npm run bench -- --json > /tmp/bench-out.json

# Emit machine-readable JSON for the model to consume
jq '{
  ts: now | todate,
  results: .results,
  total_ms: .total_ms
}' /tmp/bench-out.json

External links

Exercise

Skill 에 deterministic 부분 (도구 run, service 쿼리, 데이터 정규화) 하는 스크립트 추가. body 가 스크립트 호출하고 output consume. Skill 이 모델 paraphrasing 에 resilient 해진 거 verify.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.