AGENT SKILL

日文写作规则提案起草

japanese-writing-drafter

检测操作员是否在对话中途纠正了智能体的日文措辞(重写句子、指出风格问题、说'这个措辞不好,改成 X 这样'),并将一条待定写作规则提案起草到 ~/.claude/writing-lint/proposals.jsonl 中,供人工后续审阅。本技能是 proposals.jsonl 的唯一写入者——它从不编辑 rules.jsonl,也从不将 status 设置为 pending 以外的任何值。将规则提升到 rules.jsonl 仅通过人工运行 scripts/writing-rule-approve.sh 完成。当用户提到 writing-rule proposal、表現を直して、文体を直して、その言い方はNG、writing lint 提案、指摘をルール化して时使用。不要为以下场景加载:批准或拒绝提案(使用 scripts/writing-rule-approve.sh)、列出资定提案(使用 scripts/writing-rule-list.sh)、或依据现有词典扫描文本(由 writinglint 引擎 / PostToolUse hook 完成)。

适用职业翻译
License 许可
MIT
最近更新
2026-11-11
Stars
★ 3.2k
Forks
306

01 前言 Front Matter

name
japanese-writing-drafter
description
Detect when the operator corrects the agent's Japanese phrasing mid-conversation (rewrites a sentence, calls out a style problem, says 'this wording is bad, say it like X instead') and draft a pending writing-rule proposal into ~/.claude/writing-lint/proposals.jsonl for later human review. This skill is the ONLY writer of proposals.jsonl — it never edits rules.jsonl and never sets status to anything but pending. Promotion to rules.jsonl only happens via the human-run scripts/writing-rule-approve.sh. Use when user mentions writing-rule proposal, 表現を直して, 文体を直して, その言い方はNG, writing lint 提案, 指摘をルール化して. Do NOT load for: approving or rejecting proposals (use scripts/writing-rule-approve.sh), listing pending proposals (use scripts/writing-rule-list.sh), or scanning text against the existing dictionary (the writinglint engine / PostToolUse hook does that).
allowed-tools
[ "Read", "Bash" ]
description-en
Detect when the operator corrects the agent's Japanese phrasing mid-conversation (rewrites a sentence, calls out a style problem, says 'this wording is bad, say it like X instead') and draft a pending writing-rule proposal into ~/.claude/writing-lint/proposals.jsonl for later human review. This skill is the ONLY writer of proposals.jsonl — it never edits rules.jsonl and never sets status to anything but pending. Promotion to rules.jsonl only happens via the human-run scripts/writing-rule-approve.sh. Use when user mentions writing-rule proposal, 表現を直して, 文体を直して, その言い方はNG, writing lint 提案, 指摘をルール化して. Do NOT load for: approving or rejecting proposals (use scripts/writing-rule-approve.sh), listing pending proposals (use scripts/writing-rule-list.sh), or scanning text against the existing dictionary (the writinglint engine / PostToolUse hook does that).
description-ja
会話内で operator が agent の日本語表現を直した(文を書き直した、文体を明示的に指摘した、「その言い方じゃなくてこう書いて」と言った)ことを検知し、~/.claude/writing-lint/proposals.jsonl へ pending の writing-rule 提案を追記する。このskillだけが proposals.jsonl に書き込み、rules.jsonl は一切編集せず、status は pending 以外にしない。rules.jsonl への昇格は人間が実行する scripts/writing-rule-approve.sh 経由のみ。Use when user mentions 表現を直して, 文体を直して, その言い方はNG, writing lint 提案, 指摘をルール化して. Do NOT load for: 提案の承認/却下 (scripts/writing-rule-approve.sh を使う), pending 一覧表示 (scripts/writing-rule-list.sh を使う), 既存辞書での文章スキャン (writinglint エンジン / PostToolUse hook の役割)。
user-invocable
true

02 资源文件 1

03 SKILL.md 正文

japanese-writing-drafter

会話内で operator が agent の日本語表現を直したときだけ、その指摘を pending の writing-rule 提案として ~/.claude/writing-lint/proposals.jsonl に追記する。提案の追記のみを行い、承認・却下・rules.jsonl への昇格は一切行わない。

核心契約

  • 書き込みはこの skill 経由のみ: proposals.jsonl に status: pending の行を追記できるのはこの skill だけ。他のどのスクリプト・hook もこのファイルに書き込まない。
  • 自動昇格経路は存在しない: rules.jsonl を更新できるのは人間が手で実行する scripts/writing-rule-approve.sh --id <id> だけ。この skill からも、他のどの hook からも writing-rule-approve.sh を自動起動しない。
  • 1 回の検知につき 1 提案。status は常に "pending" で書く。

トリガー条件

会話の中で、次のいずれかが起きたときだけ発動する(雑談・通常の作業指示では発動しない)。

  • operator が直前の agent 発言・生成物の日本語表現をそのまま書き直した
  • operator が「その言い方はNG」「〜じゃなくて…と書いて」のように文体・言い回しを名指しで指摘した
  • operator が明示的に「これルール化して」「writing-lint に登録して」と言った

手順

  1. before / after を確定する: 直された元の表現 (before) と、operator が示した / 暗に求めた書き直し後の表現 (after) を会話から抽出する。before が具体的な語句・言い回しに絞れないほど曖昧なら、提案せずに終える(無理に一般化しない)。
  2. pattern を作る: before の該当フラグメントを Go 正規表現 (RE2) として書く。特殊文字はエスケープする。ヒット範囲を広げすぎない(writing-rule.v1 の pattern は文全体ではなく該当箇所のみでよい)。
  3. good を作る: after をそのまま、または要点を保った短い言い換えとして書く。
  4. scenes を決める: 会話の文脈から分かるときだけ ["external"] / ["chat"] / ["docs"] 等を付ける。不明なら省略する(省略は「全シーン適用」の意味になる。無理に推測しない)。
  5. id を作る: 内容が分かる kebab-case スラッグに 8 桁の一意サフィックスを付ける(例: no-meta-narration-a1b2c3d4)。
  6. 追記する: 以下のコマンドで templates/schemas/writing-rule-proposal.v1.json に対する手書きバリデーション(必須キー + additionalProperties: false)を通してから 1 行追記する。CLAUDE_WRITING_LINT_PROPOSALS が設定されていればそのパスを、無ければ ~/.claude/writing-lint/proposals.jsonl を使う。
python3 - <<'PY'
import json, os, sys, uuid
from datetime import datetime, timezone

repo_root = "REPO_ROOT"  # 呼び出し時に実際のリポジトリルートへ置き換える
schema_path = os.path.join(repo_root, "templates/schemas/writing-rule-proposal.v1.json")
proposals_path = os.environ.get("CLAUDE_WRITING_LINT_PROPOSALS") or os.path.join(
    os.path.expanduser("~"), ".claude/writing-lint/proposals.jsonl"
)

with open(schema_path, encoding="utf-8") as f:
    schema = json.load(f)

record = {
    "id": "SLUG-" + uuid.uuid4().hex[:8],
    "pattern": "PATTERN_HERE",
    "good": "GOOD_HERE",
    "status": "pending",
    "evidence": "EVIDENCE_HERE",
    "created_at": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"),
}
# scenes / severity は分かるときだけ足す:
# record["scenes"] = ["external"]
# record["severity"] = "warning"


def validate(data, sch):
    required = set(sch.get("required", []))
    props = sch.get("properties", {})
    if sch.get("additionalProperties") is False:
        extra = set(data.keys()) - set(props.keys())
        if extra:
            raise ValueError(f"additional properties not allowed: {sorted(extra)}")
    for key in required:
        if key not in data:
            raise ValueError(f"missing required property: {key}")


validate(record, schema)

os.makedirs(os.path.dirname(proposals_path) or ".", exist_ok=True)
with open(proposals_path, "a", encoding="utf-8") as f:
    f.write(json.dumps(record, ensure_ascii=False) + "\n")

print(f"drafted pending proposal: {record['id']}")
PY
  1. operator に伝える: 追記した id と、確認・承認コマンド (scripts/writing-rule-list.sh / scripts/writing-rule-approve.sh --id <id>) を短く伝える。承認するかどうかは operator の判断であり、この skill は待たない。

関連

  • 承認 / 却下: scripts/writing-rule-approve.sh --id <id> (--reject で却下)
  • pending 一覧: scripts/writing-rule-list.sh
  • スキーマ: templates/schemas/writing-rule-proposal.v1.json (提案) / templates/schemas/writing-rule.v1.json (承認後のルール)
  • スキャンエンジン: go/internal/writinglint/ (Phase 135.1)

04 同仓库更多 Skills

Chachamaru127
Chachamaru127/claude-code-harness

技能退出与切换

escape-skill

暂无简介

软件开发工程师插件与技能管理
★ 3.2k
Chachamaru127
Chachamaru127/claude-code-harness

空内容审查与复核

zz-review-empty

暂无简介

普通用户回答复核
★ 3.2k
Chachamaru127
Chachamaru127/claude-code-harness

跨会话消息通知与交接

session-send

当用户要求通知其他会话、请求会话交接、说'告诉其他智能体',或需要跨会话传递消息时使用此技能。

软件开发工程师会话上下文交接
★ 3.2k
Chachamaru127
Chachamaru127/claude-code-harness

记忆与 SSOT 管理

memory

管理 SSOT(单一事实来源)、记忆及跨工具记忆搜索。负责维护 decisions.md 和 patterns.md。当用户提到 memory、SSOT、decisions.md、patterns.md、合并、迁移、SSOT 提升、同步记忆、保存经验、记忆搜索、harness-mem、过往决策或记录此事时使用。请勿在以下场景加载:实现工作、评审、临时笔记或会话内日志记录。

软件开发工程师知识管理与沉淀
★ 3.2k
Chachamaru127
Chachamaru127/claude-code-harness

文件清理与归档

maintenance

文件清理与归档。整理臃肿的 Plans.md、session-log.md、旧日志和状态文件。触发词:/maintenance、cleanup、archive、organize、split session-log。请勿在以下场景加载:实现、评审、发布、新功能开发。

软件开发工程师文件系统操作与管理
★ 3.2k
Chachamaru127
Chachamaru127/claude-code-harness

计划任务并行执行

harness-work

HAR:执行 Plans.md 中的任务,从单个任务到完整的并行团队运行。触发词:implement、execute、do everything、breezing、team run、parallel、composer、composer 2.5。不要为以下场景加载:规划(planning)、评审(review)、发布(release)、设置(setup)。

软件开发工程师编码任务委派
★ 3.2k