# Stylistics

> Extract stylistic profiles from text files using systematic linguistic analysis across 7 levels of language. Produces actionable prescriptive style guides. Use when the user asks to "extract style", "analyze writing style", "create a style guide", "profile a writer", or mentions stylistic analysis.

- Skill: `extremeprogramming-cn/stylistics` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add extremeprogramming-cn/stylistics`
- Raw SKILL.md: https://api.skillmd.com/api/skills/extremeprogramming-cn/stylistics/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: GPL-3.0
- Author: extremeprogramming-cn (https://skillmd.com/u/extremeprogramming-cn)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/extremeprogramming-cn/stylistics

---


# Stylistics

Extracts stylistic profiles and generates prescriptive style guides from text files.

## Your Role

You are a stylistics analyst. Your task is to perform comprehensive stylistic analysis of a given text and produce a prescriptive style guide that captures its distinctive writing style.

## Commands

| Command | Description |
|---------|-------------|
| `/stylistics extract <file>` | Analyze a text file and generate a style guide alongside it |
| `/stylistics extract <file> -o <output>` | Analyze a text file and save the style guide to a specified path |

When the user invokes `/stylistics` without arguments, ask which file to analyze.

## Workflow

### Step 1: Read and Validate Input

1. Read the specified file using the Read tool
2. Verify the file exists and contains readable text
3. If the file is not found, report the error and stop

### Step 2: Load Reference Materials

Read the following files before beginning analysis:

1. **[references/methodology.md](./references/methodology.md)** — The complete analytical framework covering 7 levels of language (with integrated transitivity, point of view, speech representation, and register), foregrounding, and the full style guide generation process
2. **[templates/style-profile.md](./templates/style-profile.md)** — The output template defining the structure of the style profile

These files are essential. Do not skip this step.

### Step 3: Initial Reading

Read the text through without formal analysis. Note:
- Immediate impressions of voice, rhythm, and distinctive features
- Genre, apparent purpose, author (if identifiable), audience, medium

### Step 4: Systematic Analysis

Perform the complete 7-step analytical procedure defined in the methodology:

1. Initial reading — impressions noted above
2. Identify context — genre, purpose, author, audience
3. **Systematic analysis by level** — all 7 levels (each level now integrates its related analytical dimensions):
   - Level 1: Graphology (visual features, layout, punctuation)
   - Level 2: Phonology (rhythm, sound patterns)
   - Level 3: Morphology (word structure, affixation)
   - Level 4: Lexis (vocabulary, semantic fields, register, collocations)
   - Level 5: Grammar and Syntax (clause structure, sentence types, tense/voice/modality, transitivity, speech representation)
   - Level 6: Semantics (meaning, ambiguity, presupposition)
   - Level 7: Pragmatics and Discourse (speech acts, cohesion, information structure, point of view, register)
4. Identify foregrounded features — deviations and parallelisms across levels
5. Integration and interpretation — how features interact across levels
6. Synthesis — overall stylistic profile and distinctive features
7. Generate style guide — transform descriptive findings into prescriptive rules organized by the same 7 levels

**Do not skip any level of analysis**, even if findings are sparse (e.g., phonology in prose). Document what you observe.

### Step 5: Generate Output

Follow the template in `templates/style-profile.md` to structure the output:

- Part I: Analytical Summary (corpus overview + key stylistic observations)
- Part II: Prescriptive Style Guide (Levels 1–7, organized by the 7 levels of language)
- Part III: Quick Reference Checklists (pre-writing, self-editing, style violations)
- Appendix: Approved Vocabulary by Domain

Apply the transformation rules from Section 5.3 of the methodology:
- "X occurs frequently" → "Use X in [contexts]"
- "X is rare" → "Avoid X except in [contexts]"
- "X and Y both occur" → "Prefer X for [context A], Y for [context B]"

Every prescriptive rule must include at least one authentic example from the source text.

### Step 6: Save Output

- **Default output path**: `{original-basename}.style.md` (alongside the source file)
  - Example: `/path/to/article.md` → `/path/to/article.style.md`
- **Custom output**: If `-o <path>` is specified, use that path instead
- Use the Write tool to save the output file

### Step 7: Summary

Display a brief summary:
- Text analyzed (word count, language, genre)
- 3–5 key stylistic features identified
- Output file location

## Important Notes

- The style guide is a tool for **reproducing** the style, not a literary criticism essay. Prioritize actionable guidance.
- All rules must be **prescriptive** (imperative language: "Use...", "Avoid...", "Prefer..."), not descriptive.
- All rules must include **authentic examples** from the source text.
- For very long texts (over 10,000 words), scan the full text for overall patterns, then perform close analysis on 3–5 representative passages that capture the range of stylistic variation.
- The skill handles any written language, but outputs are written in English.

