ywc-setup
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-11-08
- Stars
- ★ 8
- Forks
- 1
02 资源文件 8
- 参考文档agents/openai.yaml455 B
- 参考文档evals/evals.json5.3 KB
- 参考文档README.en.md1.3 KB
- 参考文档README.ja.md1.4 KB
- 参考文档README.ko.md1.4 KB
- 参考文档README.md1.4 KB
- 脚本scripts/test-write-config.sh1.6 KB
- 脚本scripts/write-config.sh4.3 KB
03 SKILL.md 正文
ywc-setup
Announce: "Using ywc-setup to configure the Codex YWC output-language default."
This skill writes the minimal language config used by Codex ywc-* skills. It
is Codex-only. The canonical language resolution policy is
../references/language-resolution.md.
Anti-Triggers
Do not use this skill for:
- Claude Code skill setup or Claude-only configuration.
- Session language defaults. Session defaults are intentionally unsupported.
- Creating project documentation; use
ywc-project-docsfor that. - Translating existing files.
Inputs
Supported scopes:
--scope project- write.codex/ywc.jsonin the current repository.--scope user- write~/.codex/ywc.json.
Optional fields:
--lang <value>- normalize and write a supported language code.--initials <value>- write unchanged when it matches^[a-z0-9]{2,4}$.- At least one of
--langor--initialsis required. Values are never silently normalized for initials; uppercase input is rejected.
Supported canonical language codes:
kojaenzhes
Accept these aliases in user input and normalize before writing:
| Alias | Write as |
|---|---|
ko, kr, korean, 한국어 |
ko |
ja, japanese, 日本語 |
ja |
en, english |
en |
zh, chinese, 中文 |
zh |
es, spanish, espanol, español |
es |
Workflow
- Parse the user's requested scope.
- If
--scope project, target.codex/ywc.json. - If
--scope user, target~/.codex/ywc.json. - If
--scope session, reject it and do not write any file. - If scope is omitted, ask whether to use
projectoruser.
- If
- Parse the requested fields.
- If
--lang <value>is present, normalize it using the alias table. - If both fields are omitted, ask for the requested field values.
- If
--langis omitted but--initialsis supplied, do not ask for a language; preserve the existing language value. - If language is unsupported, ask for a corrected value before writing.
- If
--initialsis present, reject values outside^[a-z0-9]{2,4}$. - If only
--initialsis present, preserve the existing language value. - If only
--langis present, preserve the existing initials value.
- If
- Before writing, state the target path and canonical language code.
- Create the parent directory when needed.
- Under an exclusive adjacent lock, read the existing JSON object, merge only the requested fields, and preserve unknown keys. Write through a unique same-directory temporary file, flush and fsync it, atomically replace the target, fsync the directory, and validate the replaced JSON.
The resulting object may contain either or both optional fields:
{
"lang": "<canonical-code>",
"initials": "<lowercase-alphanumeric>"
}
- Report the completed scope, path, and language code.
Existing unknown keys are retained. Do not create .codex/tmp/ywc-session.json.
Output Format
After a successful write, report the result in this shape:
Status: DONE
Scope: <project|user>
Path: <target-path>
Language: <canonical-code>
Initials: <lowercase-alphanumeric>
If the skill needs more information or rejects the request, use the same
Status: line with NEEDS_CONTEXT or BLOCKED, then state the reason and the
next required input.
Session Scope Rejection
If the user requests --scope session, explain:
- Session defaults are intentionally out of scope.
- Conversation language follows the user's current language naturally.
- Durable artifact language is resolved by the shared policy:
explicit
--lang> project.codex/ywc.json> project guidanceAGENTS.md/CODEX.md/CLAUDE.md> user~/.codex/ywc.json> ask user.
Then stop without writing files.
Validation
After writing a config file:
- Confirm the file exists at the expected path.
- Confirm it is valid JSON.
- Confirm
.langis one ofko,ja,en,zh, ores. - When present, confirm
.initialsmatches^[a-z0-9]{2,4}$.
For project scope, do not commit .codex/ywc.json automatically. It is a project
policy file; let the user decide whether it belongs in version control.
04 同仓库更多 Skills
missing-frontmatter
暂无简介
malformed-frontmatter
暂无简介
fixture-501-fail
(ywc) Use when aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Do not use for x.
fixture-500-pass
(ywc) Use when aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Do not use for x.
ywc-worktrees
(ywc) Use when creating, auditing, pruning, or resolving git worktrees for isolated task workspaces, whether delegated from an executor or used standalone. Triggers: "worktree 생성", "worktree audit", "worktree 정리", "worktree prune", "ywc-worktrees", "create worktree". Do not use for branch creation/deletion alone, PR creation (use ywc-create-pr), CI or merge delivery (use ywc-finish-branch), task orchestration (use ywc-sequential-executor or ywc-parallel-executor), or non-git isolation.
ywc-wayfinder
(ywc) Use when a large or uncertain change needs multi-session discovery with a deterministic local map and exactly one active ticket before planning or implementation. Triggers: "wayfinder", "길찾기", "discovery map", "multi-session discovery", "탐색 ticket", "経路整理", "探索マップ", "ywc-wayfinder". Do not use for ordinary planning (use ywc-plan), idea clarification (use ywc-brainstorm), direct implementation, or tracker/database writes outside the local Markdown map.