l-text-rephrase
Find better ways to rephrase text in recently edited files. Presents 3-5 alternatives for user selection.
Text Rephrase Command
The user wants to find a better way to express the text they provided after /text-rephrase.
Input
The user provides text like:
/text-rephrase このモジュールは前述したように、非常に多機能なんですが...
The text after /text-rephrase is the target text to rephrase.
Your Task
1. Find the Source Location
Locate which file contains this text. Use these strategies in order:
- Check current unstaged changes (PRIMARY) - Run
git diffto see the actual content of unstaged changes. The target text should be in the added lines (lines starting with+). This is the most likely location since the user just typed the text. - Search for the text - If not found in unstaged changes, use grep to find the exact location
- Check recently modified files - Use
find src/mdx/notes -name "*.mdx" | xargs ls -lt | head -10
2. Read Context
Once you find the file and line, read the surrounding content (at least 20-30 lines before and after) to understand:
- The overall topic and flow
- The writing style being used
- What point the author is trying to make
3. Generate Rephrase Candidates
Read .claude/skills/_shared/writing-voice.md first — project-wide rule that
AI rephrases must preserve, not amplify, emotion. If the original has no
emotional layer, do not invent one in the rephrase. If the original has
Takazudo-written emotional content, preserve it as-is rather than rewording
the feeling itself (rephrase the surrounding factual content if needed).
Based on the context and the user’s writing style (refer to
doc/docs/writing/writing-style.md), generate 3-5 rephrase candidates. Each
candidate should:
- Preserve the original meaning and the original emotional level (do not add or remove feeling — only rephrase form)
- Match the surrounding writing style
- Offer a different approach (e.g., more concise, more detailed, different structure, different tone within the existing emotional level)
4. Present Options
Present the candidates in a clear format:
## リフレーズ候補
**元の文:**
> [original text]
**候補1:** [brief description of approach]
> [rephrased text]
**候補2:** [brief description of approach]
> [rephrased text]
...
5. Continue Conversation
After presenting candidates, ask the user:
- Which candidate they prefer
- If they want modifications to any candidate
- If they want more options with a different direction
If the user selects a candidate or provides feedback, continue refining until they’re satisfied.
Important Notes
- Always read the writing style guide at
doc/docs/writing/writing-style.mdto match Takazudo’s voice - The rephrase should feel natural in context, not isolated
- Consider the flow from the previous paragraph and to the next
- Maintain appropriate hedging expressions (~と思います, ~のではないでしょうか) as per the style guide
- Keep the author’s characteristic balance of formal/casual tone
Arguments
$ARGUMENTS - The text to rephrase