
Style Learner
Pick 50–150 word exemplar passages from your repo docs so agents mirror your real voice in technical explanations and product copy.
Install
npx skills add https://github.com/athola/claude-night-market --skill style-learnerWhat is this skill?
- Selection criteria cover rhythm, vocabulary, tone markers, and structural preferences
- Anti-selection rules skip boilerplate, quotes, odd formatting, and atypical lengths
- Optimal exemplar length band: 50–150 words
- Structured annotation format with source line refs and key characteristics
- Exemplar reference module for downstream style-guided generation
Adoption & trust: 1 installs on skills.sh; 304 GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
Recommended Skills
Journey fit
Build docs is the first journey stop because exemplars usually come from architecture and product markdown you are already writing while shipping. Docs subphase covers capturing voice from existing written artifacts rather than generating net-new design assets.
Common Questions / FAQ
Is Style Learner safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Style Learner
# Exemplar Reference Module Select and document representative passages for style guidance. ## Selection Criteria Choose passages that demonstrate: 1. **Characteristic rhythm**: Sentence length variation patterns 2. **Vocabulary choices**: Typical word selection 3. **Tone markers**: How formality/informality is expressed 4. **Structural preferences**: Paragraph and list usage ## Anti-Selection Criteria Avoid passages that: - Are atypically long or short - Contain unusual formatting - Quote external sources - Are transitional/boilerplate - Contain code blocks (unless style includes code) ## Passage Length Optimal exemplar length: **50-150 words** - Too short: Insufficient pattern demonstration - Too long: Dilutes key characteristics ## Annotation Format ```markdown ### Exemplar: Technical Explanation **Source**: docs/architecture.md, lines 45-52 **Word count**: 87 **Demonstrates**: Concise technical explanation with grounded examples > The cache layer sits between the API and database. When a request > arrives, we check Redis first. Cache hits return in under 5ms; > misses fall through to Postgres, adding 50-200ms depending on > query complexity. We chose Redis over Memcached for its richer > data structures—sorted sets power our leaderboard feature. **Key characteristics**: - Short, direct sentences (avg 12 words) - Specific numbers (5ms, 50-200ms) - One em dash for aside - Trade-off explanation ("chose X over Y because") - No filler phrases - Technical but accessible ``` ## Minimum Exemplar Set For a complete style profile, collect at least: | Type | Purpose | |------|---------| | Explanation | How concepts are introduced | | Instruction | How steps are given | | Transition | How sections connect | For narrative content, add: | Type | Purpose | |------|---------| | Description | Scene/object portrayal | | Dialogue | Character voice | | Action | Event pacing | ## Usage in Generation When generating new content, present exemplars as reference: ``` Write in a style similar to this passage: > [exemplar text] Key aspects to match: - Sentence length around X words - [Specific vocabulary preferences] - [Tone markers to include] - [Patterns to avoid] ``` --- module: feature-extraction category: style-analysis dependencies: [Bash, Read] estimated_tokens: 400 --- # Feature Extraction Module Quantitative style metrics extraction from exemplar text. ## Vocabulary Analysis ```bash # Average word length awk '{for(i=1;i<=NF;i++){sum+=length($i);count++}}END{print sum/count}' file.md # Unique word ratio words=$(tr '[:space:]' '\n' < file.md | grep -v '^$' | wc -l) unique=$(tr '[:space:]' '\n' < file.md | grep -v '^$' | sort -u | wc -l) echo "scale=2; $unique / $words" | bc # Contraction count grep -oE "\b\w+'(t|s|d|ll|ve|re|m)\b" file.md | wc -l ``` ## Sentence Analysis ```python import re def analyze_sentences(text): # Split on sentence boundaries sentences = re.split(r'[.!?]+', text) sentences = [s.strip() for s in sentences if s.strip()] lengths = [len(s.split()) for s in sentences] return { 'count': len(sentences), 'avg_length': sum(lengths) / len(lengths), 'min_length': min(lengths), 'max_length': max(lengths), 'std_dev': statistics.stdev(lengths) if len(lengths) > 1 else 0, 'questions': sum(1 for s in sentences if '?' in s), 'fragments': sum(1 for l in lengths if l < 5) } ``` ## Structural Analysis ```bash # Paragraph lengths (sentences per paragraph) awk -v RS='\n\n' '{ gsub(/[.!?]/, "&\n"); n = split($0, a, "\n"); print n }' file.md # List ratio bullets=$(grep -c '^\s*[-*]' file.md) total=$(wc -l < file.md) echo "scale=2; $bullets / $total" | bc # Header depth grep -E '^#{1,6}\s' file.md | head -1 | grep -o '#' | wc -c ``` ## Punctuation Profile ```bash # Per 1000 words words=$(wc -w < file.md) em