ai-rewriting-text
Installation
SKILL.md
ai-rewriting-text
Rewrite existing text to match a different tone, style, reading level, or audience using DSPy. The core pattern is - source text + target style/tone/audience → rewritten text. Evaluation uses a dual-judge metric that separately scores meaning preservation (fidelity) and style match.
Step 1 - Understand the rewriting task
Before writing code, clarify:
- What text? — source content (paragraph, article, legal clause, doc page)
- What target tone/style? — casual, formal, friendly, authoritative, playful
- What audience? — developers, executives, children, general public
- Reading level target? — grade level or Flesch-Kincaid score
- How much creative liberty? — strict paraphrase vs. free rewrite
- Preserve structure? — keep headings, bullet points, paragraph breaks
Step 2 - Build basic rewriter
import dspy