pinyin-conversion-rules
Ensures accurate and consistent Pinyin tone conversion and rule processing.
Install
mkdir -p .claude/skills/pinyin-conversion-rules && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12821" && unzip -o skill.zip -d .claude/skills/pinyin-conversion-rules && rm skill.zipInstalls to .claude/skills/pinyin-conversion-rules
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Maintain the pure Hanyu Pinyin conversion logic for this project. Use when changing token parsing, tone placement rules, umlaut/v handling, case preservation, neutral tone behavior, or tests around src/pinyin_tones/pinyin_converter.py and tests/test_converter.py.Key capabilities
- →Inspect `pinyin_converter.py` and `test_converter.py`
- →Preserve existing public helpers
- →Add or update `unittest` cases for behavior changes
- →Run tests for pinyin conversion
- →Maintain pure and deterministic conversion logic
- →Enforce tone placement rules
How it works
The skill guides inspection of relevant files, enforces pure conversion logic, preserves public helpers, requires new unit tests for changes, and specifies test execution.
Inputs & outputs
When to use pinyin-conversion-rules
- →Fix tone placement rules
- →Update conversion logic
- →Add new Pinyin tests
About this skill
Pinyin Conversion Rules
Workflow
- Inspect
src/pinyin_tones/pinyin_converter.pyandtests/test_converter.pybefore editing. - Keep conversion pure and deterministic: no clipboard, keyboard, UI, logging, config, or platform logic belongs in this area.
- Preserve the existing public helpers unless the request explicitly allows a breaking change:
convert_pinyin_token,apply_tone,get_tone_target_index, andhas_vowel. - Add or update focused
unittestcases for every behavior change. - Run at least
python tools/run_tests.pywhen possible; for a narrow change, also mention that the relevant coverage istests/test_converter.py.
Rules To Preserve
- Only full tokens shaped like pinyin letters plus a trailing tone digit
1-5are converted. - Tone
5is neutral and currently returns the original token because no diacritic is applied. - Tone placement priority is
a, theno, thene, then specialiu/ui, then the last validi/u/v/üvowel. vandürepresent the umlaut vowel; uppercase input should preserve uppercase output where applicable.- Non-matching or unconvertible input returns the original token.
Reference
Read references/conversion-map.md when you need a compact map of owned files, tests, and common edge cases.
When not to use it
- →When the request involves clipboard, keyboard, UI, logging, config, or platform logic
- →When a breaking change to public helpers is not explicitly allowed
- →When changes do not involve `pinyin_converter.py` or `test_converter.py`
Limitations
- →Conversion logic must remain pure and deterministic
- →Public helpers must be preserved unless breaking changes are explicitly allowed
- →Only full tokens shaped like pinyin letters plus a trailing tone digit `1`-`5` are converted
How it compares
This skill provides a strict workflow for maintaining Hanyu Pinyin conversion logic, ensuring determinism and test coverage, unlike ad-hoc modifications that might introduce inconsistencies.
Compared to similar skills
pinyin-conversion-rules side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| pinyin-conversion-rules (this skill) | 0 | 2mo | No flags | Intermediate |
| jupyter-notebook | 30 | 6mo | Review | Intermediate |
| unsloth | 15 | 8mo | No flags | Intermediate |
| clojure-write | 16 | 3mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
jupyter-notebook
davila7
Use when the user asks to create, scaffold, or edit Jupyter notebooks (`.ipynb`) for experiments, explorations, or tutorials; prefer the bundled templates and run the helper script `new_notebook.py` to generate a clean starting notebook.
unsloth
zechenzhangAGI
Expert guidance for fast fine-tuning with Unsloth - 2-5x faster training, 50-80% less memory, LoRA/QLoRA optimization
clojure-write
metabase
Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions, and best practices. Use when writing, developing, or refactoring Clojure/ClojureScript code.
add-uint-support
pytorch
Add unsigned integer (uint) type support to PyTorch operators by updating AT_DISPATCH macros. Use when adding support for uint16, uint32, uint64 types to operators, kernels, or when user mentions enabling unsigned types, barebones unsigned types, or uint support.
python-pro
sickn33
Master Python 3.12+ with modern features, async programming, performance optimization, and production-ready practices. Expert in the latest Python ecosystem including uv, ruff, pydantic, and FastAPI. Use PROACTIVELY for Python development, optimization, or advanced Python patterns.
copilot-sdk
github
Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent.