> Important: all scripts/ paths are relative to this skill directory.
> Preferred entrypoint: cd {this_skill_dir} && python3 humanize.py --text "{entire_user_request}" --output-root ./runs
> Lower-level scripts still work via: cd {this_skill_dir} && python3 scripts/...
> The runtime and model cache live under ${COPAW_WORKING_DIR:-~/.copaw}/models/humanize/.
> In agent shell calls, prefer one-line commands. Do not paste backslash-continued multi-line commands. Always set the shell tool timeout to at least 120 seconds for python3 humanize.py.
> 用户可见输出硬规则:如果 python3 humanize.py ... 打印 === HUMANIZE_FINAL_RESPONSE_BEGIN === / === HUMANIZE_FINAL_RESPONSE_END ===,这两个标记中间的 markdown 就是最终答案。必须原样粘贴给用户,不能总结、不能改写、不能只给最终文案、不能写“已经帮你优化完成了”。用户要看的就是完整过程。
> Final relay rule: if python3 humanize.py ... prints === HUMANIZE_FINAL_RESPONSE_BEGIN === / === HUMANIZE_FINAL_RESPONSE_END ===, return exactly the markdown between them as the final answer. Do not summarize it, do not paraphrase it, and do not add any explanation.
> Fallback relay rule: if the shell output is truncated or the final response block is not visible, open the latest user-visible.md in the run directory and return that markdown exactly.
> Invocation rule: do not build helper JSON or temporary Python snippets to call this skill. Invoke python3 humanize.py directly.
> Forbidden invocation: do not call copaw skills run humanize, python -m skills.humanize..., or any package-style wrapper. Do not pass --mode; rewrite mode is inferred automatically from the full --text request or --original. They are not the canonical entrypoint for this skill.
> Preservation rule: pass the user's full request verbatim via --text by default. If the request contains 原文, 原稿, 正文, draft, or a long draft body, never reinterpret it into separate --task / --constraints arguments and never drop the original draft.
> Compatibility rule: this skill is not CoPaw-only. CoPaw / OpenClaw style agents should use the same SKILL.md + python3 humanize.py --text ... flow. The CoPaw installer is only a convenience sync script for the currently known CoPaw workspace path, not a separate skill protocol. Claude Code and other local coding agents can invoke the same CLI after reading this SKILL.md.
This skill is a practical AutoResearch-style loop for one narrow job:
optimize Chinese communication copy until it reads more like something a real
person would send.
The user normally only needs to define:
task: what situation this message is forconstraints: hard limits such as length, phrases to keep, or phrases to avoidOptional:
original draft: only when the user wants rewrite mode instead of generate modeThis skill then:
Before the first evaluation, bootstrap the local runtime:
cd {this_skill_dir} && python3 scripts/bootstrap_runtime.py
This installs a dedicated venv under CoPaw's working directory and downloads
the default scorer model:
BAAI/bge-reranker-v2-m3Always collect or infer these before you start iterating:
taskhard_constraints.min_chars / hard_constraints.max_chars when length mattershard_constraints.must_include when facts must be preservedhard_constraints.banned_phrases for phrases the user dislikesOptional:
original draftDefault assumptions for V1:
goal: built in, unless the user explicitly overrides itmax_rounds: defaults to 3, and stops early when the quality gate passesstyle_notes: infer from the task and constraints unless the user adds special tone requirementssession_mode: generate unless the user provides an original draftIf the user does not explicitly give a spec file, create one in the run folder.
If the user does not provide a custom goal, use the built-in default goal internally:
更像真人自然发送的中文沟通消息,减少模板腔、客服腔、公告腔和过度AI润色感。保持清楚、可信、有分寸。
This skill follows one product rule:
Split inputs into two layers.
These are part of the task itself, not extra user constraints.
Infer them automatically from the user's intent.
Examples:
给催进度客户发邮件回复 means:给催进度客户发微信回复 means:给老板汇报进度 means:Do not ask the user to restate these semantics as constraints.
If the task already says 邮件, 微信, 客户, 上级, 面试官, or similar, the skill should understand the output form and default tone on its own.
Only treat something as a hard constraint if the user clearly says it.
Examples:
保留“明天下午”和“财务”控制在 90 字内不要出现“感谢您的耐心等待”不要太像模板回复更强势一点不要承诺今天回复If the user did not state a constraint, do not invent one.
No hidden hard limits. No forced formatting rules beyond what the task semantics already imply.
When these layers interact, apply them in this order:
Example:
给催进度客户发邮件回复控制在 60 字内Then the output should still try to behave like an email reply, but the explicit length limit wins.
When this skill is triggered, treat the following as the default workflow.
The user should not need to restate these execution steps each time.
Unless the user explicitly asks for a different mode, always:
scripts/prepare_run.pysession_mode = generate, generate exactly one baseline draft from task + constraintssession_mode = rewrite, treat the user's original message as baselineThese are default responsibilities of the skill.
Do not ask the user to additionally request the full process.
When the skill runs, always reveal the optimization process by default.
After the official run finishes, do not append a second manual rewrite that overrides the skill result.
Relay the official humanize output first. Only provide an extra manual suggestion if the user explicitly asks for another variant.
For normal CoPaw execution, call the skill with the raw user request:
cd {this_skill_dir} && python3 humanize.py --text "{entire_user_request}" --output-root ./runs
Do not summarize the user's request into --task and --constraints unless the user did not provide an original draft and the request is already a simple generation task. If there is any 原文 / draft content, --text is mandatory so the parser can switch to rewrite mode itself.
If the user only says something like "generate a more human customer reply",
you should still follow the full visible session flow automatically.
torch or transformers look complex.scripts/score_copy.py, scripts/compare_candidates.py, and scripts/run_session.py automatically re-enter the managed runtime. Use them as-is.python3 scripts/bootstrap_runtime.py once. If scoring still fails, report the failure. Do not invent a fake keep/discard result.run_from_brief.py succeeds and prints HUMANIZE_USER_VISIBLE_SUMMARY, treat that as the canonical result. Do not overwrite it with a separate handcrafted rewrite or a conflicting final answer.=== HUMANIZE_FINAL_RESPONSE_BEGIN === and === HUMANIZE_FINAL_RESPONSE_END ===, your final user-facing reply must be exactly the markdown between those markers. Do not summarize it, do not paraphrase it, and do not add another conclusion after it.prepare_run.py + handwritten challenger.txt + manual compare loops. That is only for debugging when the user explicitly asks for debugging.python3 humanize.py ... times out, retry the same official command once with a longer timeout. Do not fall back to manual candidate writing, manual scoring, or subjective winner selection.python -c wrappers, JSON builders, or helper scripts just to pass the user's text into this skill. Use the top-level python3 humanize.py command directly.Preferred single-entry command:
cd {this_skill_dir} && python3 humanize.py --task "给催进度客户发微信回复" --constraints "保留“明天下午”和“财务”,控制在90字内" --output-root ./runs
This command:
spec.yamlsource.txtparse-result.jsonbaseline.txtchallenger.txtbaseline.generation.json and challenger.generation.json when drafts are auto-generatedsession-trace.jsonsession-trace.mduser-visible.mduser-visible.htmlstrategy-state.before.jsonstrategy-state.after.jsoncompare-result.jsonreport.htmlMode behavior:
run_from_brief.py automatically uses the original draft as baseline and only auto-generates the challenger unless explicitly overridden.run_from_brief.py automatically generates both baseline and challenger unless explicitly overridden.max_rounds=3; this is a ceiling, not a requirement to run all rounds.python3 humanize.py --max-rounds 5 --text "..." or set HUMANIZE_MAX_ROUNDS=5. Values are clamped to 1..5.${COPAW_WORKING_DIR:-~/.copaw}/models/humanize/strategy-state.json.user_visible_summary_markdown directly to the user instead of only listing file paths.run_from_brief.py now prints a human-readable process summary to stdout before the JSON payload. Prefer relaying that summary directly.--baseline-text and --challenger-text are optional override hooks for debugging, not the default UX.--original-draft. Do not substitute it with --baseline-text during normal use.If you need to inspect planning before running the score, prepare the run first.
This is a debug-only path, not the default user flow:
cd {this_skill_dir} && python3 scripts/prepare_run.py --text "用 humanize 帮我生成并优化一条中文沟通消息。任务:给催进度客户发微信回复。约束:保留“明天下午”和“财务”,控制在90字内。" --output-root ./runs
This creates a full run directory containing:
spec.yamlsource.txtbaseline.txtchallenger.txtbaseline.score.jsonchallenger.score.jsoncompare-result.jsonbest.txtrounds.jsonlreport.mdreport.htmlUse this flow whenever you want the entire optimization process to be visible.
The preferred user input is only:
Optional:
This means the default product UX is:
用 humanize 帮我生成并优化一条中文沟通消息。
任务:给催进度客户发微信回复
约束:保留“明天下午”和“财务”,控制在 90 字内
Loose fallback input is also valid. For example:
用 humanize 帮我生成一条更像真人发的客户微信,保留“明天下午”和“财务”,控制在90字内。
Rewrite mode is also valid. For example:
用 humanize 帮我把这段话改得更像真人一点:
您好,这边已经和财务同事再次确认过了,预计明天下午会给到您明确反馈。感谢您的理解与支持,如有任何问题请随时联系我。
When fields are not labeled, infer:
task: default to a generic Chinese communication optimization taskconstraints: only from obvious signals such as 90字内 or quoted keep/avoid phrasesoriginal draft: only when the remaining text looks like a real message bodyThe mode rule is:
rewritegenerateDo not ask the user for a goal by default.
Only ask for it when the user explicitly wants a different direction from the
built-in "humanize this Chinese message" behavior.
Do not require the user to manually request:
Those are the skill's default responsibilities.
cd {this_skill_dir} && python3 scripts/init_run.py --spec examples/demo_spec.yaml --source examples/demo_baseline.txt --output-root ./runs
This prints a run directory path such as ./runs/20260409-130000-demo.
Save the current best draft into baseline.txt.
cd {this_skill_dir} && python3 scripts/score_copy.py --spec ./runs/<run-id>/spec.yaml --candidate ./runs/<run-id>/baseline.txt --source ./runs/<run-id>/source.txt
Write one revised draft into challenger.txt.
When revising, optimize for:
cd {this_skill_dir} && python3 scripts/compare_candidates.py --spec ./runs/<run-id>/spec.yaml --baseline ./runs/<run-id>/baseline.txt --challenger ./runs/<run-id>/challenger.txt --source ./runs/<run-id>/source.txt
Interpret the result:
decision = keep: promote challenger to best versiondecision = discard: keep the existing baselinecd {this_skill_dir} && python3 scripts/record_round.py --run-dir ./runs/<run-id> --result ./runs/<run-id>/compare-result.json
Repeat only when the user explicitly asks for more than one round.
cd {this_skill_dir} && python3 scripts/render_run_report.py --run-dir ./runs/<run-id>
This generates report.md and report.html.
The exposed score is a single final_score, but internally it is a composite:
model_score: how well the candidate matches the user's task + naturalness rubricrule_score: hard constraints, banned phrases, template-phrase penalties, formatting penaltiesThis is not an "AI detector" score. It is a "human-like Chinese communication
fit" score.
See:
references/scoring.mdreferences/presets.mdDefault behavior:
must_includescripts/bootstrap_runtime.py: first-run installer and model downloaderscripts/parse_user_brief.py: normalize structured or loose user input into spec + session modescripts/prepare_run.py: create a run directory from a raw user brief and decide generate vs rewritescripts/run_from_brief.py: one-command wrapper that prepares the run and executes the official scorerscripts/score_copy.py: score one candidatescripts/compare_candidates.py: compare baseline vs challengerscripts/create_spec.py: create a spec file from simple task/constraint inputs, with goal optionalscripts/init_run.py: create a run directoryscripts/record_round.py: append round results to a logscripts/run_session.py: one-shot visible run with scores, decision, and reportscripts/render_run_report.py: render a human-readable reportscripts/install_to_copaw.py: copy this skill into local CoPaw and enable it共 1 个版本