{"id":"eeae68b2-a495-4052-b458-41dfaf1352ef","entityType":"agent","slug":"clawhub-athola-nm-scribe-style-learner","name":"style-learner","canonicalUrl":"https://www.xpersona.co/agent/clawhub-athola-nm-scribe-style-learner","canonicalPath":"/agent/clawhub-athola-nm-scribe-style-learner","generatedAt":"2026-10-10T10:44:41.764Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-10T06:02:06.100Z","emptyReason":null},"description":"Extracts writing style patterns from exemplar text into a reusable profile Skill: style-learner Owner: athola Summary: Extracts writing style patterns from exemplar text into a reusable profile Tags: latest:1.9.19 Version history: v1.9.19 | 2026-08-26T13:22:10.842Z | user Release v1.9.19 v1.9.17 | 2026-07-30T05:42:06.379Z | user Release v1.9.17 v1.9.16 | 2026-07-14T19:58:55.224Z | user Release v1.9.16 v1.9.14 | 2026-06-30T18:06:33.094Z | user Release v1.9.14 v1.9.13 | 2026-06-27T16:24:16.44","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.6K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s17emme0e2m3cpf7k2jvp3a84984b8z9:nm-scribe-style-learner","sourceUrl":"https://clawhub.ai/athola/nm-scribe-style-learner","homepage":"https://clawhub.ai/athola/skills/nm-scribe-style-learner","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/athola/nm-scribe-style-learner","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/athola/skills/nm-scribe-style-learner","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":64,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Extracts writing style patterns from exemplar text into a reusable profile Skill: style-learner Owner: athola Summary: Extracts writing style patterns from exem"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T06:02:06.100Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T06:02:06.100Z","emptyReason":null},"stars":null,"forks":null,"downloads":1633,"packageName":null,"latestVersion":"1.9.19","tractionLabel":"1.6K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T06:02:06.024Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T06:02:06.100Z","lastCrawledAt":"2026-10-10T06:02:06.024Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T06:02:06.024Z","lastVerifiedAt":null,"highlights":[{"version":"1.9.19","createdAt":"2026-08-26T13:22:10.842Z","changelog":"Release v1.9.19","fileCount":6,"zipByteSize":8399},{"version":"1.9.17","createdAt":"2026-07-30T05:42:06.379Z","changelog":"Release v1.9.17","fileCount":6,"zipByteSize":8309},{"version":"1.9.16","createdAt":"2026-07-14T19:58:55.224Z","changelog":"Release v1.9.16","fileCount":6,"zipByteSize":8485},{"version":"1.9.14","createdAt":"2026-06-30T18:06:33.094Z","changelog":"Release v1.9.14","fileCount":6,"zipByteSize":8434},{"version":"1.9.13","createdAt":"2026-06-27T16:24:16.441Z","changelog":"Release v1.9.13","fileCount":6,"zipByteSize":8390},{"version":"1.9.12","createdAt":"2026-06-19T03:19:59.631Z","changelog":"Release v1.9.12","fileCount":6,"zipByteSize":8469},{"version":"1.0.2","createdAt":"2026-05-09T02:20:29.372Z","changelog":"Release v1.9.5","fileCount":6,"zipByteSize":8241},{"version":"1.0.1","createdAt":"2026-05-06T14:21:59.795Z","changelog":"Release v1.9.4","fileCount":5,"zipByteSize":7022}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17emme0e2m3cpf7k2jvp3a84984b8z9:nm-scribe-style-learner","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-style-learner/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-style-learner/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-style-learner/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-style-learner/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-style-learner/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-style-learner/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T10:44:41.762Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-style-learner/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-style-learner/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-style-learner/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-style-learner/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-10T06:02:06.100Z","emptyReason":null},"readme":"Skill: style-learner\n\nOwner: athola\n\nSummary: Extracts writing style patterns from exemplar text into a reusable profile\n\nTags: latest:1.9.19\n\nVersion history:\n\nv1.9.19 | 2026-08-26T13:22:10.842Z | user\n\nRelease v1.9.19\n\nv1.9.17 | 2026-07-30T05:42:06.379Z | user\n\nRelease v1.9.17\n\nv1.9.16 | 2026-07-14T19:58:55.224Z | user\n\nRelease v1.9.16\n\nv1.9.14 | 2026-06-30T18:06:33.094Z | user\n\nRelease v1.9.14\n\nv1.9.13 | 2026-06-27T16:24:16.441Z | user\n\nRelease v1.9.13\n\nv1.9.12 | 2026-06-19T03:19:59.631Z | user\n\nRelease v1.9.12\n\nv1.0.2 | 2026-05-09T02:20:29.372Z | user\n\nRelease v1.9.5\n\nv1.0.1 | 2026-05-06T14:21:59.795Z | user\n\nRelease v1.9.4\n\nv1.0.0 | 2026-04-20T15:01:35.464Z | auto\n\nstyle-learner 1.0.0 — initial public release\n\n- Introduces a systematic approach to learning and codifying writing style from exemplar texts\n- Defines steps for feature extraction, exemplar selection, style profile generation, and validation\n- Outlines required metrics for vocabulary, sentence structure, formatting, and punctuation\n- Provides templates for style profiles and exemplar passages\n- Integrates with slop-detector for validation and anti-pattern detection\n- Offers checklists and clear usage instructions for applying extracted style to new content\n\nArchive index:\n\nArchive v1.9.19: 6 files, 8399 bytes\n\nFiles: modules/exemplar-reference.md (2317b), modules/feature-extraction.md (2393b), modules/style-application.md (2362b), skill-card.md (2132b), SKILL.md (7015b), _meta.json (143b)\n\nFile v1.9.19:SKILL.md\n\n---\nname: style-learner\ndescription: Extracts writing style patterns from exemplar text into a reusable profile\nversion: 1.9.8\ntriggers:\n  - style\n  - voice\n  - tone\n  - exemplar\n  - learning\n  - consistency\n  - creating a style guide or learning a specific author's voice\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/scribe\", \"emoji\": \"\\u270d\\ufe0f\", \"requires\": {\"config\": [\"night-market.scribe:shared\", \"night-market.scribe:slop-detector\"]}}}\nsource: claude-night-market\nsource_plugin: scribe\n---\n\n> **Night Market Skill** — ported from [claude-night-market/scribe](https://github.com/athola/claude-night-market/tree/master/plugins/scribe). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Style Learning Skill\n\n**A style profile is metrics plus exemplars. Either alone\nis too weak to reproduce a voice.**\n\nExtract style from exemplar text and codify it as a profile\nthat downstream skills (`scribe:doc-generator`,\n`scribe:voice-generate`) can apply consistently.\n\n## Approach: Feature Extraction and Exemplar Reference\n\nThe skill combines two methods because each fails alone:\n\n1. **Feature Extraction**: quantifiable metrics (sentence\n   length distribution, vocabulary complexity, structural\n   patterns). Reproducible but soulless.\n2. **Exemplar Reference**: specific passages that\n   demonstrate the target style. Vivid but hard to apply\n   at scale.\n\nTogether they form a profile precise enough to score new\ntext and rich enough to guide rewrites. Metrics catch what\nexemplars miss; exemplars carry what metrics flatten.\n\n## Required TodoWrite Items\n\n1. `style-learner:exemplar-collected` - Source texts gathered\n2. `style-learner:features-extracted` - Quantitative metrics computed\n3. `style-learner:exemplars-selected` - Representative passages identified\n4. `style-learner:profile-generated` - Style guide created\n5. `style-learner:validation-complete` - Profile tested against new content\n\n## Step 1: Collect Exemplar Text\n\nGather representative samples of the target style.\n\n**Minimum requirements**:\n- At least 1000 words of exemplar text\n- Multiple samples preferred (shows consistency)\n- Same genre/context as target output\n\n```markdown\n## Exemplar Sources\n\n| Source | Word Count | Type |\n|--------|------------|------|\n| README.md | 850 | Technical |\n| blog-post-1.md | 1200 | Narrative |\n| api-guide.md | 2100 | Reference |\n```\n\n## Step 2: Feature Extraction\n\nLoad: `@modules/feature-extraction.md`\n\n### Vocabulary Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Average word length | chars/word | Complexity level |\n| Unique word ratio | unique/total | Vocabulary breadth |\n| Jargon density | technical terms/100 words | Audience level |\n| Contraction rate | contractions/sentences | Formality |\n\n### Sentence Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Average length | words/sentence | Complexity |\n| Length variance | std dev of lengths | Natural variation |\n| Question frequency | questions/100 sentences | Engagement style |\n| Fragment usage | fragments/100 sentences | Stylistic punch |\n\n### Structural Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Paragraph length | sentences/paragraph | Density |\n| List ratio | bullet lines/total lines | Format preference |\n| Header depth | max header level | Organization style |\n| Code block frequency | code blocks/1000 words | Technical density |\n\n### Punctuation Profile\n\n| Metric | Normal Range | Style Indicator |\n|--------|--------------|-----------------|\n| Em dash rate | 0-3/1000 words | Parenthetical style |\n| Semicolon rate | 0-2/1000 words | Formal complexity |\n| Exclamation rate | 0-1/1000 words | Enthusiasm level |\n| Ellipsis rate | 0-1/1000 words | Trailing thought style |\n\n## Step 3: Exemplar Selection\n\nLoad: `@modules/exemplar-reference.md`\n\nSelect 3-5 passages (50-150 words each) that best represent the target style.\n\n**Selection criteria**:\n- Demonstrates characteristic sentence rhythm\n- Shows typical vocabulary choices\n- Represents the desired tone\n- Avoids atypical or exceptional passages\n\n### Exemplar Template\n\n```markdown\n### Exemplar 1: [Label]\n**Source**: [filename, lines X-Y]\n**Demonstrates**: [what aspect of style]\n\n> [Quoted passage]\n\n**Key characteristics**:\n- [Observation 1]\n- [Observation 2]\n```\n\n## Step 4: Generate Style Profile\n\nCombine extracted features and exemplars into a usable style guide.\n\n### Profile Format\n\n```yaml\n# Style Profile: [Name]\n# Generated: [Date]\n# Exemplar sources: [List]\n\nvoice:\n  tone: [professional/casual/academic/conversational]\n  perspective: [first-person/third-person/second-person]\n  formality: [formal/neutral/informal]\n\nvocabulary:\n  average_word_length: X.X\n  jargon_level: [none/light/moderate/heavy]\n  contractions: [avoid/occasional/frequent]\n  preferred_terms:\n    - \"use\" over \"utilize\"\n    - \"help\" over \"facilitate\"\n  avoided_terms:\n    - delve\n    - leverage\n    - comprehensive\n\nsentences:\n  average_length: XX words\n  length_variance: [low/medium/high]\n  fragments_allowed: [yes/no/sparingly]\n  questions_used: [yes/no/sparingly]\n\nstructure:\n  paragraphs: [short/medium/long] (X-Y sentences)\n  lists: [prefer prose/balanced/prefer lists]\n  headers: [descriptive/terse/question-style]\n\npunctuation:\n  em_dashes: [avoid/sparingly/freely]\n  semicolons: [avoid/sparingly/freely]\n  oxford_comma: [yes/no]\n\nexemplars:\n  - label: \"[Exemplar 1 label]\"\n    text: |\n      [Quoted passage]\n  - label: \"[Exemplar 2 label]\"\n    text: |\n      [Quoted passage]\n\nanti_patterns:\n  - [Pattern to avoid 1]\n  - [Pattern to avoid 2]\n```\n\n## Step 5: Validation\n\nTest the profile against new content:\n\n1. Generate sample content using the profile\n2. Compare metrics to extracted features\n3. Have user evaluate voice/tone match\n4. Refine profile based on feedback\n\n### Validation Checklist\n\n- [ ] Metrics within 20% of exemplar averages\n- [ ] No anti-pattern violations\n- [ ] Tone matches user expectation\n- [ ] Vocabulary aligns with exemplars\n- [ ] Structure follows profile guidelines\n\n## Usage in Generation\n\nWhen generating new content, reference the profile:\n\n```markdown\nGenerate [content type] following the style profile:\n- Voice: [from profile]\n- Sentence length: target ~[X] words, vary between [Y-Z]\n- Use exemplar passage as tone reference:\n  > [exemplar quote]\n- Avoid: [anti-patterns from profile]\n```\n\n## Module Reference\n\n- See `modules/style-application.md` for applying learned styles to new content\n\n## Integration with slop-detector\n\nAfter generating content, run slop-detector to verify:\n1. No AI markers introduced\n2. Style metrics match profile\n3. Anti-patterns avoided\n\n## Exit Criteria\n\n- Style profile document created\n- At least 3 exemplar passages included\n- Quantitative metrics extracted\n- Anti-patterns from slop-detector integrated\n- Validation test passed\n\nFile v1.9.19:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-scribe-style-learner\",\n  \"version\": \"1.9.19\",\n  \"publishedAt\": 1787750530842\n}\n\nFile v1.9.19:modules/exemplar-reference.md\n\n---\nmodule: exemplar-reference\ncategory: style-analysis\ndependencies: [Read]\nestimated_tokens: 350\n---\n\n# Exemplar Reference Module\n\nSelect and document representative passages for style guidance.\n\n## Selection Criteria\n\nChoose passages that demonstrate:\n\n1. **Characteristic rhythm**: Sentence length variation patterns\n2. **Vocabulary choices**: Typical word selection\n3. **Tone markers**: How formality/informality is expressed\n4. **Structural preferences**: Paragraph and list usage\n\n## Anti-Selection Criteria\n\nAvoid passages that:\n\n- Are atypically long or short\n- Contain unusual formatting\n- Quote external sources\n- Are transitional/boilerplate\n- Contain code blocks (unless style includes code)\n\n## Passage Length\n\nOptimal exemplar length: **50-150 words**\n\n- Too short: Insufficient pattern demonstration\n- Too long: Dilutes key characteristics\n\n## Annotation Format\n\n```markdown\n### Exemplar: Technical Explanation\n\n**Source**: docs/architecture.md, lines 45-52\n**Word count**: 87\n**Demonstrates**: Concise technical explanation with grounded examples\n\n> The cache layer sits between the API and database. When a request\n> arrives, we check Redis first. Cache hits return in under 5ms;\n> misses fall through to Postgres, adding 50-200ms depending on\n> query complexity. We chose Redis over Memcached for its richer\n> data structures—sorted sets power our leaderboard feature.\n\n**Key characteristics**:\n- Short, direct sentences (avg 12 words)\n- Specific numbers (5ms, 50-200ms)\n- One em dash for aside\n- Trade-off explanation (\"chose X over Y because\")\n- No filler phrases\n- Technical but accessible\n```\n\n## Minimum Exemplar Set\n\nFor a complete style profile, collect at least:\n\n| Type | Purpose |\n|------|---------|\n| Explanation | How concepts are introduced |\n| Instruction | How steps are given |\n| Transition | How sections connect |\n\nFor narrative content, add:\n\n| Type | Purpose |\n|------|---------|\n| Description | Scene/object portrayal |\n| Dialogue | Character voice |\n| Action | Event pacing |\n\n## Usage in Generation\n\nWhen generating new content, present exemplars as reference:\n\n```\nWrite in a style similar to this passage:\n\n> [exemplar text]\n\nKey aspects to match:\n- Sentence length around X words\n- [Specific vocabulary preferences]\n- [Tone markers to include]\n- [Patterns to avoid]\n```\n\nFile v1.9.19:modules/feature-extraction.md\n\n---\nmodule: feature-extraction\ncategory: style-analysis\ndependencies: [Bash, Read]\nestimated_tokens: 400\n---\n\n# Feature Extraction Module\n\nQuantitative style metrics extraction from exemplar text.\n\n## Vocabulary Analysis\n\n```bash\n# Average word length\nawk '{for(i=1;i<=NF;i++){sum+=length($i);count++}}END{print sum/count}' file.md\n\n# Unique word ratio\nwords=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | wc -l)\nunique=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | sort -u | wc -l)\necho \"scale=2; $unique / $words\" | bc\n\n# Contraction count\ngrep -oE \"\\b\\w+'(t|s|d|ll|ve|re|m)\\b\" file.md | wc -l\n```\n\n## Sentence Analysis\n\n```python\nimport re\n\ndef analyze_sentences(text):\n    # Split on sentence boundaries\n    sentences = re.split(r'[.!?]+', text)\n    sentences = [s.strip() for s in sentences if s.strip()]\n\n    lengths = [len(s.split()) for s in sentences]\n\n    return {\n        'count': len(sentences),\n        'avg_length': sum(lengths) / len(lengths),\n        'min_length': min(lengths),\n        'max_length': max(lengths),\n        'std_dev': statistics.stdev(lengths) if len(lengths) > 1 else 0,\n        'questions': sum(1 for s in sentences if '?' in s),\n        'fragments': sum(1 for l in lengths if l < 5)\n    }\n```\n\n## Structural Analysis\n\n```bash\n# Paragraph lengths (sentences per paragraph)\nawk -v RS='\\n\\n' '{\n    gsub(/[.!?]/, \"&\\n\");\n    n = split($0, a, \"\\n\");\n    print n\n}' file.md\n\n# List ratio\nbullets=$(grep -c '^\\s*[-*]' file.md)\ntotal=$(wc -l < file.md)\necho \"scale=2; $bullets / $total\" | bc\n\n# Header depth\ngrep -E '^#{1,6}\\s' file.md | head -1 | grep -o '#' | wc -c\n```\n\n## Punctuation Profile\n\n```bash\n# Per 1000 words\nwords=$(wc -w < file.md)\n\nem_dashes=$(grep -o '—' file.md | wc -l)\nsemicolons=$(grep -o ';' file.md | wc -l)\nexclamations=$(grep -o '!' file.md | wc -l)\ncolons=$(grep -o ':' file.md | wc -l)\n\necho \"Em dashes: $((em_dashes * 1000 / words)) per 1000\"\necho \"Semicolons: $((semicolons * 1000 / words)) per 1000\"\n```\n\n## Output Format\n\n```yaml\nvocabulary:\n  avg_word_length: 5.2\n  unique_ratio: 0.42\n  contraction_rate: 3.5  # per 100 sentences\n\nsentences:\n  avg_length: 18.4\n  std_dev: 8.2\n  question_rate: 2.1  # per 100\n  fragment_rate: 1.5  # per 100\n\nstructure:\n  avg_paragraph_sentences: 4.2\n  list_ratio: 0.15\n  max_header_depth: 3\n\npunctuation:\n  em_dash_rate: 1.8  # per 1000 words\n  semicolon_rate: 0.5\n  exclamation_rate: 0.2\n```\n\nFile v1.9.19:modules/style-application.md\n\n---\nmodule: style-application\ncategory: writing-quality\ndependencies: [Write, Edit]\nestimated_tokens: 350\n---\n\n# Style Application Module\n\nApply learned style profiles to new content generation and editing.\n\n## Generation Prompting\n\nWhen generating new content with a style profile:\n\n```markdown\n## Style Guidelines\n\n**Voice**: [profile.voice.tone] with [profile.voice.perspective] perspective\n\n**Sentence targets**:\n- Average length: [profile.sentences.average_length] words\n- Vary between [min] and [max]\n- [Fragment guidance from profile]\n\n**Vocabulary**:\n- Prefer: [profile.vocabulary.preferred_terms]\n- Avoid: [profile.vocabulary.avoided_terms]\n- Contractions: [profile.vocabulary.contractions]\n\n**Structure**:\n- Paragraphs: [profile.structure.paragraphs]\n- Lists: [profile.structure.lists]\n\n**Reference exemplar**:\n> [Most relevant exemplar passage]\n\n**Anti-patterns** (will be checked by slop-detector):\n[profile.anti_patterns]\n```\n\n## Editing to Match Style\n\nWhen editing existing content to match a profile:\n\n### Step 1: Measure Current State\n\nExtract metrics from current content and compare to profile.\n\n| Metric | Current | Target | Gap |\n|--------|---------|--------|-----|\n| Avg sentence length | 24 | 18 | -6 |\n| Contraction rate | 0.5 | 3.5 | +3.0 |\n| List ratio | 0.45 | 0.15 | -0.30 |\n\n### Step 2: Prioritize Changes\n\n1. **High gap** metrics first\n2. **Anti-pattern** violations\n3. **Vocabulary** substitutions\n4. **Structural** adjustments\n\n### Step 3: Section-by-Section Editing\n\nFor each section:\n1. Show current metrics\n2. Propose specific changes\n3. Present exemplar for reference\n4. Wait for approval\n5. Apply changes\n6. Re-measure\n\n## Validation Loop\n\nAfter applying style:\n\n```\n1. Run slop-detector on output\n2. Re-extract metrics\n3. Compare to profile targets\n4. Flag remaining gaps > 20%\n5. Iterate if needed\n```\n\n## Style Drift Detection\n\nFor ongoing content:\n\n```bash\n# Compare new content metrics to profile\nnew_metrics=$(extract_metrics new-doc.md)\nprofile_metrics=$(cat .scribe/style-profile.yaml)\n\n# Alert if drift > threshold\nif [ $avg_sentence_diff -gt 5 ]; then\n    echo \"WARNING: Sentence length drifting from profile\"\nfi\n```\n\n## Integration Points\n\n| Tool | Integration |\n|------|-------------|\n| slop-detector | Validate anti-patterns |\n| doc-generator | Apply during generation |\n| pre-commit | Check style conformance |\n\nFile v1.9.19:skill-card.md\n\n## Description:\n\nExtracts writing style patterns from exemplar text into a reusable profile.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[athola](https://clawhub.ai/user/athola)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers, writers, and content teams use this skill to build reusable style profiles from exemplar writing. The skill combines quantitative writing metrics with representative passages so downstream agents can generate or edit text in a consistent voice.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Broad trigger words such as style, voice, and tone may activate the skill during ordinary writing requests.\n\nMitigation: Confirm the activation is relevant before allowing the skill to read exemplar material or edit documents.\n\nRisk: A style profile can misrepresent a voice if exemplar text is too short, atypical, or from the wrong genre.\n\nMitigation: Use at least 1000 words of representative exemplar text, include multiple samples when available, and validate generated output against the profile.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/athola/skills/nm-scribe-style-learner)\n- [Publisher profile](https://clawhub.ai/user/athola)\n- [Scribe plugin homepage](https://github.com/athola/claude-night-market/tree/master/plugins/scribe)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, configuration, guidance]\n\n**Output Format:** [Markdown style profile with extracted metrics, exemplar passages, anti-patterns, and validation guidance.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include shell commands for measuring writing metrics; generated profiles should be checked against exemplar text before reuse.]\n\n## Skill Version(s):\n\n1.9.19 (source: server release metadata; artifact frontmatter reports 1.9.8)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.9.17: 6 files, 8309 bytes\n\nFiles: modules/exemplar-reference.md (2317b), modules/feature-extraction.md (2393b), modules/style-application.md (2362b), skill-card.md (2027b), SKILL.md (7015b), _meta.json (143b)\n\nFile v1.9.17:SKILL.md\n\n---\nname: style-learner\ndescription: Extracts writing style patterns from exemplar text into a reusable profile\nversion: 1.9.8\ntriggers:\n  - style\n  - voice\n  - tone\n  - exemplar\n  - learning\n  - consistency\n  - creating a style guide or learning a specific author's voice\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/scribe\", \"emoji\": \"\\u270d\\ufe0f\", \"requires\": {\"config\": [\"night-market.scribe:shared\", \"night-market.scribe:slop-detector\"]}}}\nsource: claude-night-market\nsource_plugin: scribe\n---\n\n> **Night Market Skill** — ported from [claude-night-market/scribe](https://github.com/athola/claude-night-market/tree/master/plugins/scribe). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Style Learning Skill\n\n**A style profile is metrics plus exemplars. Either alone\nis too weak to reproduce a voice.**\n\nExtract style from exemplar text and codify it as a profile\nthat downstream skills (`scribe:doc-generator`,\n`scribe:voice-generate`) can apply consistently.\n\n## Approach: Feature Extraction and Exemplar Reference\n\nThe skill combines two methods because each fails alone:\n\n1. **Feature Extraction**: quantifiable metrics (sentence\n   length distribution, vocabulary complexity, structural\n   patterns). Reproducible but soulless.\n2. **Exemplar Reference**: specific passages that\n   demonstrate the target style. Vivid but hard to apply\n   at scale.\n\nTogether they form a profile precise enough to score new\ntext and rich enough to guide rewrites. Metrics catch what\nexemplars miss; exemplars carry what metrics flatten.\n\n## Required TodoWrite Items\n\n1. `style-learner:exemplar-collected` - Source texts gathered\n2. `style-learner:features-extracted` - Quantitative metrics computed\n3. `style-learner:exemplars-selected` - Representative passages identified\n4. `style-learner:profile-generated` - Style guide created\n5. `style-learner:validation-complete` - Profile tested against new content\n\n## Step 1: Collect Exemplar Text\n\nGather representative samples of the target style.\n\n**Minimum requirements**:\n- At least 1000 words of exemplar text\n- Multiple samples preferred (shows consistency)\n- Same genre/context as target output\n\n```markdown\n## Exemplar Sources\n\n| Source | Word Count | Type |\n|--------|------------|------|\n| README.md | 850 | Technical |\n| blog-post-1.md | 1200 | Narrative |\n| api-guide.md | 2100 | Reference |\n```\n\n## Step 2: Feature Extraction\n\nLoad: `@modules/feature-extraction.md`\n\n### Vocabulary Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Average word length | chars/word | Complexity level |\n| Unique word ratio | unique/total | Vocabulary breadth |\n| Jargon density | technical terms/100 words | Audience level |\n| Contraction rate | contractions/sentences | Formality |\n\n### Sentence Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Average length | words/sentence | Complexity |\n| Length variance | std dev of lengths | Natural variation |\n| Question frequency | questions/100 sentences | Engagement style |\n| Fragment usage | fragments/100 sentences | Stylistic punch |\n\n### Structural Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Paragraph length | sentences/paragraph | Density |\n| List ratio | bullet lines/total lines | Format preference |\n| Header depth | max header level | Organization style |\n| Code block frequency | code blocks/1000 words | Technical density |\n\n### Punctuation Profile\n\n| Metric | Normal Range | Style Indicator |\n|--------|--------------|-----------------|\n| Em dash rate | 0-3/1000 words | Parenthetical style |\n| Semicolon rate | 0-2/1000 words | Formal complexity |\n| Exclamation rate | 0-1/1000 words | Enthusiasm level |\n| Ellipsis rate | 0-1/1000 words | Trailing thought style |\n\n## Step 3: Exemplar Selection\n\nLoad: `@modules/exemplar-reference.md`\n\nSelect 3-5 passages (50-150 words each) that best represent the target style.\n\n**Selection criteria**:\n- Demonstrates characteristic sentence rhythm\n- Shows typical vocabulary choices\n- Represents the desired tone\n- Avoids atypical or exceptional passages\n\n### Exemplar Template\n\n```markdown\n### Exemplar 1: [Label]\n**Source**: [filename, lines X-Y]\n**Demonstrates**: [what aspect of style]\n\n> [Quoted passage]\n\n**Key characteristics**:\n- [Observation 1]\n- [Observation 2]\n```\n\n## Step 4: Generate Style Profile\n\nCombine extracted features and exemplars into a usable style guide.\n\n### Profile Format\n\n```yaml\n# Style Profile: [Name]\n# Generated: [Date]\n# Exemplar sources: [List]\n\nvoice:\n  tone: [professional/casual/academic/conversational]\n  perspective: [first-person/third-person/second-person]\n  formality: [formal/neutral/informal]\n\nvocabulary:\n  average_word_length: X.X\n  jargon_level: [none/light/moderate/heavy]\n  contractions: [avoid/occasional/frequent]\n  preferred_terms:\n    - \"use\" over \"utilize\"\n    - \"help\" over \"facilitate\"\n  avoided_terms:\n    - delve\n    - leverage\n    - comprehensive\n\nsentences:\n  average_length: XX words\n  length_variance: [low/medium/high]\n  fragments_allowed: [yes/no/sparingly]\n  questions_used: [yes/no/sparingly]\n\nstructure:\n  paragraphs: [short/medium/long] (X-Y sentences)\n  lists: [prefer prose/balanced/prefer lists]\n  headers: [descriptive/terse/question-style]\n\npunctuation:\n  em_dashes: [avoid/sparingly/freely]\n  semicolons: [avoid/sparingly/freely]\n  oxford_comma: [yes/no]\n\nexemplars:\n  - label: \"[Exemplar 1 label]\"\n    text: |\n      [Quoted passage]\n  - label: \"[Exemplar 2 label]\"\n    text: |\n      [Quoted passage]\n\nanti_patterns:\n  - [Pattern to avoid 1]\n  - [Pattern to avoid 2]\n```\n\n## Step 5: Validation\n\nTest the profile against new content:\n\n1. Generate sample content using the profile\n2. Compare metrics to extracted features\n3. Have user evaluate voice/tone match\n4. Refine profile based on feedback\n\n### Validation Checklist\n\n- [ ] Metrics within 20% of exemplar averages\n- [ ] No anti-pattern violations\n- [ ] Tone matches user expectation\n- [ ] Vocabulary aligns with exemplars\n- [ ] Structure follows profile guidelines\n\n## Usage in Generation\n\nWhen generating new content, reference the profile:\n\n```markdown\nGenerate [content type] following the style profile:\n- Voice: [from profile]\n- Sentence length: target ~[X] words, vary between [Y-Z]\n- Use exemplar passage as tone reference:\n  > [exemplar quote]\n- Avoid: [anti-patterns from profile]\n```\n\n## Module Reference\n\n- See `modules/style-application.md` for applying learned styles to new content\n\n## Integration with slop-detector\n\nAfter generating content, run slop-detector to verify:\n1. No AI markers introduced\n2. Style metrics match profile\n3. Anti-patterns avoided\n\n## Exit Criteria\n\n- Style profile document created\n- At least 3 exemplar passages included\n- Quantitative metrics extracted\n- Anti-patterns from slop-detector integrated\n- Validation test passed\n\nFile v1.9.17:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-scribe-style-learner\",\n  \"version\": \"1.9.17\",\n  \"publishedAt\": 1785390126379\n}\n\nFile v1.9.17:modules/exemplar-reference.md\n\n---\nmodule: exemplar-reference\ncategory: style-analysis\ndependencies: [Read]\nestimated_tokens: 350\n---\n\n# Exemplar Reference Module\n\nSelect and document representative passages for style guidance.\n\n## Selection Criteria\n\nChoose passages that demonstrate:\n\n1. **Characteristic rhythm**: Sentence length variation patterns\n2. **Vocabulary choices**: Typical word selection\n3. **Tone markers**: How formality/informality is expressed\n4. **Structural preferences**: Paragraph and list usage\n\n## Anti-Selection Criteria\n\nAvoid passages that:\n\n- Are atypically long or short\n- Contain unusual formatting\n- Quote external sources\n- Are transitional/boilerplate\n- Contain code blocks (unless style includes code)\n\n## Passage Length\n\nOptimal exemplar length: **50-150 words**\n\n- Too short: Insufficient pattern demonstration\n- Too long: Dilutes key characteristics\n\n## Annotation Format\n\n```markdown\n### Exemplar: Technical Explanation\n\n**Source**: docs/architecture.md, lines 45-52\n**Word count**: 87\n**Demonstrates**: Concise technical explanation with grounded examples\n\n> The cache layer sits between the API and database. When a request\n> arrives, we check Redis first. Cache hits return in under 5ms;\n> misses fall through to Postgres, adding 50-200ms depending on\n> query complexity. We chose Redis over Memcached for its richer\n> data structures—sorted sets power our leaderboard feature.\n\n**Key characteristics**:\n- Short, direct sentences (avg 12 words)\n- Specific numbers (5ms, 50-200ms)\n- One em dash for aside\n- Trade-off explanation (\"chose X over Y because\")\n- No filler phrases\n- Technical but accessible\n```\n\n## Minimum Exemplar Set\n\nFor a complete style profile, collect at least:\n\n| Type | Purpose |\n|------|---------|\n| Explanation | How concepts are introduced |\n| Instruction | How steps are given |\n| Transition | How sections connect |\n\nFor narrative content, add:\n\n| Type | Purpose |\n|------|---------|\n| Description | Scene/object portrayal |\n| Dialogue | Character voice |\n| Action | Event pacing |\n\n## Usage in Generation\n\nWhen generating new content, present exemplars as reference:\n\n```\nWrite in a style similar to this passage:\n\n> [exemplar text]\n\nKey aspects to match:\n- Sentence length around X words\n- [Specific vocabulary preferences]\n- [Tone markers to include]\n- [Patterns to avoid]\n```\n\nFile v1.9.17:modules/feature-extraction.md\n\n---\nmodule: feature-extraction\ncategory: style-analysis\ndependencies: [Bash, Read]\nestimated_tokens: 400\n---\n\n# Feature Extraction Module\n\nQuantitative style metrics extraction from exemplar text.\n\n## Vocabulary Analysis\n\n```bash\n# Average word length\nawk '{for(i=1;i<=NF;i++){sum+=length($i);count++}}END{print sum/count}' file.md\n\n# Unique word ratio\nwords=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | wc -l)\nunique=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | sort -u | wc -l)\necho \"scale=2; $unique / $words\" | bc\n\n# Contraction count\ngrep -oE \"\\b\\w+'(t|s|d|ll|ve|re|m)\\b\" file.md | wc -l\n```\n\n## Sentence Analysis\n\n```python\nimport re\n\ndef analyze_sentences(text):\n    # Split on sentence boundaries\n    sentences = re.split(r'[.!?]+', text)\n    sentences = [s.strip() for s in sentences if s.strip()]\n\n    lengths = [len(s.split()) for s in sentences]\n\n    return {\n        'count': len(sentences),\n        'avg_length': sum(lengths) / len(lengths),\n        'min_length': min(lengths),\n        'max_length': max(lengths),\n        'std_dev': statistics.stdev(lengths) if len(lengths) > 1 else 0,\n        'questions': sum(1 for s in sentences if '?' in s),\n        'fragments': sum(1 for l in lengths if l < 5)\n    }\n```\n\n## Structural Analysis\n\n```bash\n# Paragraph lengths (sentences per paragraph)\nawk -v RS='\\n\\n' '{\n    gsub(/[.!?]/, \"&\\n\");\n    n = split($0, a, \"\\n\");\n    print n\n}' file.md\n\n# List ratio\nbullets=$(grep -c '^\\s*[-*]' file.md)\ntotal=$(wc -l < file.md)\necho \"scale=2; $bullets / $total\" | bc\n\n# Header depth\ngrep -E '^#{1,6}\\s' file.md | head -1 | grep -o '#' | wc -c\n```\n\n## Punctuation Profile\n\n```bash\n# Per 1000 words\nwords=$(wc -w < file.md)\n\nem_dashes=$(grep -o '—' file.md | wc -l)\nsemicolons=$(grep -o ';' file.md | wc -l)\nexclamations=$(grep -o '!' file.md | wc -l)\ncolons=$(grep -o ':' file.md | wc -l)\n\necho \"Em dashes: $((em_dashes * 1000 / words)) per 1000\"\necho \"Semicolons: $((semicolons * 1000 / words)) per 1000\"\n```\n\n## Output Format\n\n```yaml\nvocabulary:\n  avg_word_length: 5.2\n  unique_ratio: 0.42\n  contraction_rate: 3.5  # per 100 sentences\n\nsentences:\n  avg_length: 18.4\n  std_dev: 8.2\n  question_rate: 2.1  # per 100\n  fragment_rate: 1.5  # per 100\n\nstructure:\n  avg_paragraph_sentences: 4.2\n  list_ratio: 0.15\n  max_header_depth: 3\n\npunctuation:\n  em_dash_rate: 1.8  # per 1000 words\n  semicolon_rate: 0.5\n  exclamation_rate: 0.2\n```\n\nFile v1.9.17:modules/style-application.md\n\n---\nmodule: style-application\ncategory: writing-quality\ndependencies: [Write, Edit]\nestimated_tokens: 350\n---\n\n# Style Application Module\n\nApply learned style profiles to new content generation and editing.\n\n## Generation Prompting\n\nWhen generating new content with a style profile:\n\n```markdown\n## Style Guidelines\n\n**Voice**: [profile.voice.tone] with [profile.voice.perspective] perspective\n\n**Sentence targets**:\n- Average length: [profile.sentences.average_length] words\n- Vary between [min] and [max]\n- [Fragment guidance from profile]\n\n**Vocabulary**:\n- Prefer: [profile.vocabulary.preferred_terms]\n- Avoid: [profile.vocabulary.avoided_terms]\n- Contractions: [profile.vocabulary.contractions]\n\n**Structure**:\n- Paragraphs: [profile.structure.paragraphs]\n- Lists: [profile.structure.lists]\n\n**Reference exemplar**:\n> [Most relevant exemplar passage]\n\n**Anti-patterns** (will be checked by slop-detector):\n[profile.anti_patterns]\n```\n\n## Editing to Match Style\n\nWhen editing existing content to match a profile:\n\n### Step 1: Measure Current State\n\nExtract metrics from current content and compare to profile.\n\n| Metric | Current | Target | Gap |\n|--------|---------|--------|-----|\n| Avg sentence length | 24 | 18 | -6 |\n| Contraction rate | 0.5 | 3.5 | +3.0 |\n| List ratio | 0.45 | 0.15 | -0.30 |\n\n### Step 2: Prioritize Changes\n\n1. **High gap** metrics first\n2. **Anti-pattern** violations\n3. **Vocabulary** substitutions\n4. **Structural** adjustments\n\n### Step 3: Section-by-Section Editing\n\nFor each section:\n1. Show current metrics\n2. Propose specific changes\n3. Present exemplar for reference\n4. Wait for approval\n5. Apply changes\n6. Re-measure\n\n## Validation Loop\n\nAfter applying style:\n\n```\n1. Run slop-detector on output\n2. Re-extract metrics\n3. Compare to profile targets\n4. Flag remaining gaps > 20%\n5. Iterate if needed\n```\n\n## Style Drift Detection\n\nFor ongoing content:\n\n```bash\n# Compare new content metrics to profile\nnew_metrics=$(extract_metrics new-doc.md)\nprofile_metrics=$(cat .scribe/style-profile.yaml)\n\n# Alert if drift > threshold\nif [ $avg_sentence_diff -gt 5 ]; then\n    echo \"WARNING: Sentence length drifting from profile\"\nfi\n```\n\n## Integration Points\n\n| Tool | Integration |\n|------|-------------|\n| slop-detector | Validate anti-patterns |\n| doc-generator | Apply during generation |\n| pre-commit | Check style conformance |\n\nFile v1.9.17:skill-card.md\n\n## Description: <br>\nExtracts writing style patterns from exemplar text into a reusable profile. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[athola](https://clawhub.ai/user/athola) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and writing-focused agents use this skill to analyze exemplar text, extract quantitative style features, select representative passages, and produce a reusable style profile for later generation or editing. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill may activate on broad writing-style requests. <br>\nMitigation: Confirm that the current task is intended to analyze or apply a style profile before collecting exemplars or generating profile content. <br>\nRisk: Generated profiles may retain representative excerpts from exemplar text. <br>\nMitigation: Use only exemplar text that is appropriate to analyze and retain, and review generated profiles before sharing or storing them. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/athola/skills/nm-scribe-style-learner) <br>\n- [Project homepage](https://github.com/athola/claude-night-market/tree/master/plugins/scribe) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, configuration, guidance, shell commands] <br>\n**Output Format:** [Markdown and YAML-style style profiles with metrics, exemplars, validation checklists, and optional shell command snippets.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Profiles may include representative excerpts from user-provided exemplars.] <br>\n\n## Skill Version(s): <br>\n1.9.17 (source: server release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.9.16: 6 files, 8485 bytes\n\nFiles: modules/exemplar-reference.md (2317b), modules/feature-extraction.md (2393b), modules/style-application.md (2362b), skill-card.md (2453b), SKILL.md (7015b), _meta.json (143b)\n\nFile v1.9.16:SKILL.md\n\n---\nname: style-learner\ndescription: Extracts writing style patterns from exemplar text into a reusable profile\nversion: 1.9.8\ntriggers:\n  - style\n  - voice\n  - tone\n  - exemplar\n  - learning\n  - consistency\n  - creating a style guide or learning a specific author's voice\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/scribe\", \"emoji\": \"\\u270d\\ufe0f\", \"requires\": {\"config\": [\"night-market.scribe:shared\", \"night-market.scribe:slop-detector\"]}}}\nsource: claude-night-market\nsource_plugin: scribe\n---\n\n> **Night Market Skill** — ported from [claude-night-market/scribe](https://github.com/athola/claude-night-market/tree/master/plugins/scribe). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Style Learning Skill\n\n**A style profile is metrics plus exemplars. Either alone\nis too weak to reproduce a voice.**\n\nExtract style from exemplar text and codify it as a profile\nthat downstream skills (`scribe:doc-generator`,\n`scribe:voice-generate`) can apply consistently.\n\n## Approach: Feature Extraction and Exemplar Reference\n\nThe skill combines two methods because each fails alone:\n\n1. **Feature Extraction**: quantifiable metrics (sentence\n   length distribution, vocabulary complexity, structural\n   patterns). Reproducible but soulless.\n2. **Exemplar Reference**: specific passages that\n   demonstrate the target style. Vivid but hard to apply\n   at scale.\n\nTogether they form a profile precise enough to score new\ntext and rich enough to guide rewrites. Metrics catch what\nexemplars miss; exemplars carry what metrics flatten.\n\n## Required TodoWrite Items\n\n1. `style-learner:exemplar-collected` - Source texts gathered\n2. `style-learner:features-extracted` - Quantitative metrics computed\n3. `style-learner:exemplars-selected` - Representative passages identified\n4. `style-learner:profile-generated` - Style guide created\n5. `style-learner:validation-complete` - Profile tested against new content\n\n## Step 1: Collect Exemplar Text\n\nGather representative samples of the target style.\n\n**Minimum requirements**:\n- At least 1000 words of exemplar text\n- Multiple samples preferred (shows consistency)\n- Same genre/context as target output\n\n```markdown\n## Exemplar Sources\n\n| Source | Word Count | Type |\n|--------|------------|------|\n| README.md | 850 | Technical |\n| blog-post-1.md | 1200 | Narrative |\n| api-guide.md | 2100 | Reference |\n```\n\n## Step 2: Feature Extraction\n\nLoad: `@modules/feature-extraction.md`\n\n### Vocabulary Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Average word length | chars/word | Complexity level |\n| Unique word ratio | unique/total | Vocabulary breadth |\n| Jargon density | technical terms/100 words | Audience level |\n| Contraction rate | contractions/sentences | Formality |\n\n### Sentence Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Average length | words/sentence | Complexity |\n| Length variance | std dev of lengths | Natural variation |\n| Question frequency | questions/100 sentences | Engagement style |\n| Fragment usage | fragments/100 sentences | Stylistic punch |\n\n### Structural Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Paragraph length | sentences/paragraph | Density |\n| List ratio | bullet lines/total lines | Format preference |\n| Header depth | max header level | Organization style |\n| Code block frequency | code blocks/1000 words | Technical density |\n\n### Punctuation Profile\n\n| Metric | Normal Range | Style Indicator |\n|--------|--------------|-----------------|\n| Em dash rate | 0-3/1000 words | Parenthetical style |\n| Semicolon rate | 0-2/1000 words | Formal complexity |\n| Exclamation rate | 0-1/1000 words | Enthusiasm level |\n| Ellipsis rate | 0-1/1000 words | Trailing thought style |\n\n## Step 3: Exemplar Selection\n\nLoad: `@modules/exemplar-reference.md`\n\nSelect 3-5 passages (50-150 words each) that best represent the target style.\n\n**Selection criteria**:\n- Demonstrates characteristic sentence rhythm\n- Shows typical vocabulary choices\n- Represents the desired tone\n- Avoids atypical or exceptional passages\n\n### Exemplar Template\n\n```markdown\n### Exemplar 1: [Label]\n**Source**: [filename, lines X-Y]\n**Demonstrates**: [what aspect of style]\n\n> [Quoted passage]\n\n**Key characteristics**:\n- [Observation 1]\n- [Observation 2]\n```\n\n## Step 4: Generate Style Profile\n\nCombine extracted features and exemplars into a usable style guide.\n\n### Profile Format\n\n```yaml\n# Style Profile: [Name]\n# Generated: [Date]\n# Exemplar sources: [List]\n\nvoice:\n  tone: [professional/casual/academic/conversational]\n  perspective: [first-person/third-person/second-person]\n  formality: [formal/neutral/informal]\n\nvocabulary:\n  average_word_length: X.X\n  jargon_level: [none/light/moderate/heavy]\n  contractions: [avoid/occasional/frequent]\n  preferred_terms:\n    - \"use\" over \"utilize\"\n    - \"help\" over \"facilitate\"\n  avoided_terms:\n    - delve\n    - leverage\n    - comprehensive\n\nsentences:\n  average_length: XX words\n  length_variance: [low/medium/high]\n  fragments_allowed: [yes/no/sparingly]\n  questions_used: [yes/no/sparingly]\n\nstructure:\n  paragraphs: [short/medium/long] (X-Y sentences)\n  lists: [prefer prose/balanced/prefer lists]\n  headers: [descriptive/terse/question-style]\n\npunctuation:\n  em_dashes: [avoid/sparingly/freely]\n  semicolons: [avoid/sparingly/freely]\n  oxford_comma: [yes/no]\n\nexemplars:\n  - label: \"[Exemplar 1 label]\"\n    text: |\n      [Quoted passage]\n  - label: \"[Exemplar 2 label]\"\n    text: |\n      [Quoted passage]\n\nanti_patterns:\n  - [Pattern to avoid 1]\n  - [Pattern to avoid 2]\n```\n\n## Step 5: Validation\n\nTest the profile against new content:\n\n1. Generate sample content using the profile\n2. Compare metrics to extracted features\n3. Have user evaluate voice/tone match\n4. Refine profile based on feedback\n\n### Validation Checklist\n\n- [ ] Metrics within 20% of exemplar averages\n- [ ] No anti-pattern violations\n- [ ] Tone matches user expectation\n- [ ] Vocabulary aligns with exemplars\n- [ ] Structure follows profile guidelines\n\n## Usage in Generation\n\nWhen generating new content, reference the profile:\n\n```markdown\nGenerate [content type] following the style profile:\n- Voice: [from profile]\n- Sentence length: target ~[X] words, vary between [Y-Z]\n- Use exemplar passage as tone reference:\n  > [exemplar quote]\n- Avoid: [anti-patterns from profile]\n```\n\n## Module Reference\n\n- See `modules/style-application.md` for applying learned styles to new content\n\n## Integration with slop-detector\n\nAfter generating content, run slop-detector to verify:\n1. No AI markers introduced\n2. Style metrics match profile\n3. Anti-patterns avoided\n\n## Exit Criteria\n\n- Style profile document created\n- At least 3 exemplar passages included\n- Quantitative metrics extracted\n- Anti-patterns from slop-detector integrated\n- Validation test passed\n\nFile v1.9.16:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-scribe-style-learner\",\n  \"version\": \"1.9.16\",\n  \"publishedAt\": 1784059135224\n}\n\nFile v1.9.16:modules/exemplar-reference.md\n\n---\nmodule: exemplar-reference\ncategory: style-analysis\ndependencies: [Read]\nestimated_tokens: 350\n---\n\n# Exemplar Reference Module\n\nSelect and document representative passages for style guidance.\n\n## Selection Criteria\n\nChoose passages that demonstrate:\n\n1. **Characteristic rhythm**: Sentence length variation patterns\n2. **Vocabulary choices**: Typical word selection\n3. **Tone markers**: How formality/informality is expressed\n4. **Structural preferences**: Paragraph and list usage\n\n## Anti-Selection Criteria\n\nAvoid passages that:\n\n- Are atypically long or short\n- Contain unusual formatting\n- Quote external sources\n- Are transitional/boilerplate\n- Contain code blocks (unless style includes code)\n\n## Passage Length\n\nOptimal exemplar length: **50-150 words**\n\n- Too short: Insufficient pattern demonstration\n- Too long: Dilutes key characteristics\n\n## Annotation Format\n\n```markdown\n### Exemplar: Technical Explanation\n\n**Source**: docs/architecture.md, lines 45-52\n**Word count**: 87\n**Demonstrates**: Concise technical explanation with grounded examples\n\n> The cache layer sits between the API and database. When a request\n> arrives, we check Redis first. Cache hits return in under 5ms;\n> misses fall through to Postgres, adding 50-200ms depending on\n> query complexity. We chose Redis over Memcached for its richer\n> data structures—sorted sets power our leaderboard feature.\n\n**Key characteristics**:\n- Short, direct sentences (avg 12 words)\n- Specific numbers (5ms, 50-200ms)\n- One em dash for aside\n- Trade-off explanation (\"chose X over Y because\")\n- No filler phrases\n- Technical but accessible\n```\n\n## Minimum Exemplar Set\n\nFor a complete style profile, collect at least:\n\n| Type | Purpose |\n|------|---------|\n| Explanation | How concepts are introduced |\n| Instruction | How steps are given |\n| Transition | How sections connect |\n\nFor narrative content, add:\n\n| Type | Purpose |\n|------|---------|\n| Description | Scene/object portrayal |\n| Dialogue | Character voice |\n| Action | Event pacing |\n\n## Usage in Generation\n\nWhen generating new content, present exemplars as reference:\n\n```\nWrite in a style similar to this passage:\n\n> [exemplar text]\n\nKey aspects to match:\n- Sentence length around X words\n- [Specific vocabulary preferences]\n- [Tone markers to include]\n- [Patterns to avoid]\n```\n\nFile v1.9.16:modules/feature-extraction.md\n\n---\nmodule: feature-extraction\ncategory: style-analysis\ndependencies: [Bash, Read]\nestimated_tokens: 400\n---\n\n# Feature Extraction Module\n\nQuantitative style metrics extraction from exemplar text.\n\n## Vocabulary Analysis\n\n```bash\n# Average word length\nawk '{for(i=1;i<=NF;i++){sum+=length($i);count++}}END{print sum/count}' file.md\n\n# Unique word ratio\nwords=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | wc -l)\nunique=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | sort -u | wc -l)\necho \"scale=2; $unique / $words\" | bc\n\n# Contraction count\ngrep -oE \"\\b\\w+'(t|s|d|ll|ve|re|m)\\b\" file.md | wc -l\n```\n\n## Sentence Analysis\n\n```python\nimport re\n\ndef analyze_sentences(text):\n    # Split on sentence boundaries\n    sentences = re.split(r'[.!?]+', text)\n    sentences = [s.strip() for s in sentences if s.strip()]\n\n    lengths = [len(s.split()) for s in sentences]\n\n    return {\n        'count': len(sentences),\n        'avg_length': sum(lengths) / len(lengths),\n        'min_length': min(lengths),\n        'max_length': max(lengths),\n        'std_dev': statistics.stdev(lengths) if len(lengths) > 1 else 0,\n        'questions': sum(1 for s in sentences if '?' in s),\n        'fragments': sum(1 for l in lengths if l < 5)\n    }\n```\n\n## Structural Analysis\n\n```bash\n# Paragraph lengths (sentences per paragraph)\nawk -v RS='\\n\\n' '{\n    gsub(/[.!?]/, \"&\\n\");\n    n = split($0, a, \"\\n\");\n    print n\n}' file.md\n\n# List ratio\nbullets=$(grep -c '^\\s*[-*]' file.md)\ntotal=$(wc -l < file.md)\necho \"scale=2; $bullets / $total\" | bc\n\n# Header depth\ngrep -E '^#{1,6}\\s' file.md | head -1 | grep -o '#' | wc -c\n```\n\n## Punctuation Profile\n\n```bash\n# Per 1000 words\nwords=$(wc -w < file.md)\n\nem_dashes=$(grep -o '—' file.md | wc -l)\nsemicolons=$(grep -o ';' file.md | wc -l)\nexclamations=$(grep -o '!' file.md | wc -l)\ncolons=$(grep -o ':' file.md | wc -l)\n\necho \"Em dashes: $((em_dashes * 1000 / words)) per 1000\"\necho \"Semicolons: $((semicolons * 1000 / words)) per 1000\"\n```\n\n## Output Format\n\n```yaml\nvocabulary:\n  avg_word_length: 5.2\n  unique_ratio: 0.42\n  contraction_rate: 3.5  # per 100 sentences\n\nsentences:\n  avg_length: 18.4\n  std_dev: 8.2\n  question_rate: 2.1  # per 100\n  fragment_rate: 1.5  # per 100\n\nstructure:\n  avg_paragraph_sentences: 4.2\n  list_ratio: 0.15\n  max_header_depth: 3\n\npunctuation:\n  em_dash_rate: 1.8  # per 1000 words\n  semicolon_rate: 0.5\n  exclamation_rate: 0.2\n```\n\nFile v1.9.16:modules/style-application.md\n\n---\nmodule: style-application\ncategory: writing-quality\ndependencies: [Write, Edit]\nestimated_tokens: 350\n---\n\n# Style Application Module\n\nApply learned style profiles to new content generation and editing.\n\n## Generation Prompting\n\nWhen generating new content with a style profile:\n\n```markdown\n## Style Guidelines\n\n**Voice**: [profile.voice.tone] with [profile.voice.perspective] perspective\n\n**Sentence targets**:\n- Average length: [profile.sentences.average_length] words\n- Vary between [min] and [max]\n- [Fragment guidance from profile]\n\n**Vocabulary**:\n- Prefer: [profile.vocabulary.preferred_terms]\n- Avoid: [profile.vocabulary.avoided_terms]\n- Contractions: [profile.vocabulary.contractions]\n\n**Structure**:\n- Paragraphs: [profile.structure.paragraphs]\n- Lists: [profile.structure.lists]\n\n**Reference exemplar**:\n> [Most relevant exemplar passage]\n\n**Anti-patterns** (will be checked by slop-detector):\n[profile.anti_patterns]\n```\n\n## Editing to Match Style\n\nWhen editing existing content to match a profile:\n\n### Step 1: Measure Current State\n\nExtract metrics from current content and compare to profile.\n\n| Metric | Current | Target | Gap |\n|--------|---------|--------|-----|\n| Avg sentence length | 24 | 18 | -6 |\n| Contraction rate | 0.5 | 3.5 | +3.0 |\n| List ratio | 0.45 | 0.15 | -0.30 |\n\n### Step 2: Prioritize Changes\n\n1. **High gap** metrics first\n2. **Anti-pattern** violations\n3. **Vocabulary** substitutions\n4. **Structural** adjustments\n\n### Step 3: Section-by-Section Editing\n\nFor each section:\n1. Show current metrics\n2. Propose specific changes\n3. Present exemplar for reference\n4. Wait for approval\n5. Apply changes\n6. Re-measure\n\n## Validation Loop\n\nAfter applying style:\n\n```\n1. Run slop-detector on output\n2. Re-extract metrics\n3. Compare to profile targets\n4. Flag remaining gaps > 20%\n5. Iterate if needed\n```\n\n## Style Drift Detection\n\nFor ongoing content:\n\n```bash\n# Compare new content metrics to profile\nnew_metrics=$(extract_metrics new-doc.md)\nprofile_metrics=$(cat .scribe/style-profile.yaml)\n\n# Alert if drift > threshold\nif [ $avg_sentence_diff -gt 5 ]; then\n    echo \"WARNING: Sentence length drifting from profile\"\nfi\n```\n\n## Integration Points\n\n| Tool | Integration |\n|------|-------------|\n| slop-detector | Validate anti-patterns |\n| doc-generator | Apply during generation |\n| pre-commit | Check style conformance |\n\nFile v1.9.16:skill-card.md\n\n## Description: <br>\nExtracts writing style patterns from exemplar text into a reusable profile. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[athola](https://clawhub.ai/user/athola) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers, writers, and content teams use this skill to analyze exemplar writing and create reusable style profiles. The profiles combine quantitative metrics, selected passages, anti-patterns, and validation notes for consistent generation or editing. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Broad triggers such as style, voice, and tone may activate the skill more often than intended. <br>\nMitigation: Confirm that style learning is intended before collecting exemplars or generating a profile. <br>\nRisk: User-provided exemplar text may contain sensitive, proprietary, or personal writing. <br>\nMitigation: Use only exemplar material that is approved for style reference and remove unnecessary secrets or confidential details. <br>\nRisk: A generated profile may overfit limited exemplars or misrepresent the target voice. <br>\nMitigation: Validate the profile against new content, compare metrics to the exemplars, and revise before relying on it for production writing. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/athola/skills/nm-scribe-style-learner) <br>\n- [Scribe plugin homepage](https://github.com/athola/claude-night-market/tree/master/plugins/scribe) <br>\n- [Feature Extraction Module](modules/feature-extraction.md) <br>\n- [Exemplar Reference Module](modules/exemplar-reference.md) <br>\n- [Style Application Module](modules/style-application.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, configuration, guidance] <br>\n**Output Format:** [Markdown with YAML-style profile sections and exemplar passages] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include quantitative style metrics, selected exemplars, anti-patterns, and validation notes.] <br>\n\n## Skill Version(s): <br>\n1.9.16 (source: server release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.9.14: 6 files, 8434 bytes\n\nFiles: modules/exemplar-reference.md (2317b), modules/feature-extraction.md (2393b), modules/style-application.md (2362b), skill-card.md (2321b), SKILL.md (7015b), _meta.json (143b)\n\nFile v1.9.14:SKILL.md\n\n---\nname: style-learner\ndescription: Extracts writing style patterns from exemplar text into a reusable profile\nversion: 1.9.8\ntriggers:\n  - style\n  - voice\n  - tone\n  - exemplar\n  - learning\n  - consistency\n  - creating a style guide or learning a specific author's voice\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/scribe\", \"emoji\": \"\\u270d\\ufe0f\", \"requires\": {\"config\": [\"night-market.scribe:shared\", \"night-market.scribe:slop-detector\"]}}}\nsource: claude-night-market\nsource_plugin: scribe\n---\n\n> **Night Market Skill** — ported from [claude-night-market/scribe](https://github.com/athola/claude-night-market/tree/master/plugins/scribe). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Style Learning Skill\n\n**A style profile is metrics plus exemplars. Either alone\nis too weak to reproduce a voice.**\n\nExtract style from exemplar text and codify it as a profile\nthat downstream skills (`scribe:doc-generator`,\n`scribe:voice-generate`) can apply consistently.\n\n## Approach: Feature Extraction and Exemplar Reference\n\nThe skill combines two methods because each fails alone:\n\n1. **Feature Extraction**: quantifiable metrics (sentence\n   length distribution, vocabulary complexity, structural\n   patterns). Reproducible but soulless.\n2. **Exemplar Reference**: specific passages that\n   demonstrate the target style. Vivid but hard to apply\n   at scale.\n\nTogether they form a profile precise enough to score new\ntext and rich enough to guide rewrites. Metrics catch what\nexemplars miss; exemplars carry what metrics flatten.\n\n## Required TodoWrite Items\n\n1. `style-learner:exemplar-collected` - Source texts gathered\n2. `style-learner:features-extracted` - Quantitative metrics computed\n3. `style-learner:exemplars-selected` - Representative passages identified\n4. `style-learner:profile-generated` - Style guide created\n5. `style-learner:validation-complete` - Profile tested against new content\n\n## Step 1: Collect Exemplar Text\n\nGather representative samples of the target style.\n\n**Minimum requirements**:\n- At least 1000 words of exemplar text\n- Multiple samples preferred (shows consistency)\n- Same genre/context as target output\n\n```markdown\n## Exemplar Sources\n\n| Source | Word Count | Type |\n|--------|------------|------|\n| README.md | 850 | Technical |\n| blog-post-1.md | 1200 | Narrative |\n| api-guide.md | 2100 | Reference |\n```\n\n## Step 2: Feature Extraction\n\nLoad: `@modules/feature-extraction.md`\n\n### Vocabulary Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Average word length | chars/word | Complexity level |\n| Unique word ratio | unique/total | Vocabulary breadth |\n| Jargon density | technical terms/100 words | Audience level |\n| Contraction rate | contractions/sentences | Formality |\n\n### Sentence Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Average length | words/sentence | Complexity |\n| Length variance | std dev of lengths | Natural variation |\n| Question frequency | questions/100 sentences | Engagement style |\n| Fragment usage | fragments/100 sentences | Stylistic punch |\n\n### Structural Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Paragraph length | sentences/paragraph | Density |\n| List ratio | bullet lines/total lines | Format preference |\n| Header depth | max header level | Organization style |\n| Code block frequency | code blocks/1000 words | Technical density |\n\n### Punctuation Profile\n\n| Metric | Normal Range | Style Indicator |\n|--------|--------------|-----------------|\n| Em dash rate | 0-3/1000 words | Parenthetical style |\n| Semicolon rate | 0-2/1000 words | Formal complexity |\n| Exclamation rate | 0-1/1000 words | Enthusiasm level |\n| Ellipsis rate | 0-1/1000 words | Trailing thought style |\n\n## Step 3: Exemplar Selection\n\nLoad: `@modules/exemplar-reference.md`\n\nSelect 3-5 passages (50-150 words each) that best represent the target style.\n\n**Selection criteria**:\n- Demonstrates characteristic sentence rhythm\n- Shows typical vocabulary choices\n- Represents the desired tone\n- Avoids atypical or exceptional passages\n\n### Exemplar Template\n\n```markdown\n### Exemplar 1: [Label]\n**Source**: [filename, lines X-Y]\n**Demonstrates**: [what aspect of style]\n\n> [Quoted passage]\n\n**Key characteristics**:\n- [Observation 1]\n- [Observation 2]\n```\n\n## Step 4: Generate Style Profile\n\nCombine extracted features and exemplars into a usable style guide.\n\n### Profile Format\n\n```yaml\n# Style Profile: [Name]\n# Generated: [Date]\n# Exemplar sources: [List]\n\nvoice:\n  tone: [professional/casual/academic/conversational]\n  perspective: [first-person/third-person/second-person]\n  formality: [formal/neutral/informal]\n\nvocabulary:\n  average_word_length: X.X\n  jargon_level: [none/light/moderate/heavy]\n  contractions: [avoid/occasional/frequent]\n  preferred_terms:\n    - \"use\" over \"utilize\"\n    - \"help\" over \"facilitate\"\n  avoided_terms:\n    - delve\n    - leverage\n    - comprehensive\n\nsentences:\n  average_length: XX words\n  length_variance: [low/medium/high]\n  fragments_allowed: [yes/no/sparingly]\n  questions_used: [yes/no/sparingly]\n\nstructure:\n  paragraphs: [short/medium/long] (X-Y sentences)\n  lists: [prefer prose/balanced/prefer lists]\n  headers: [descriptive/terse/question-style]\n\npunctuation:\n  em_dashes: [avoid/sparingly/freely]\n  semicolons: [avoid/sparingly/freely]\n  oxford_comma: [yes/no]\n\nexemplars:\n  - label: \"[Exemplar 1 label]\"\n    text: |\n      [Quoted passage]\n  - label: \"[Exemplar 2 label]\"\n    text: |\n      [Quoted passage]\n\nanti_patterns:\n  - [Pattern to avoid 1]\n  - [Pattern to avoid 2]\n```\n\n## Step 5: Validation\n\nTest the profile against new content:\n\n1. Generate sample content using the profile\n2. Compare metrics to extracted features\n3. Have user evaluate voice/tone match\n4. Refine profile based on feedback\n\n### Validation Checklist\n\n- [ ] Metrics within 20% of exemplar averages\n- [ ] No anti-pattern violations\n- [ ] Tone matches user expectation\n- [ ] Vocabulary aligns with exemplars\n- [ ] Structure follows profile guidelines\n\n## Usage in Generation\n\nWhen generating new content, reference the profile:\n\n```markdown\nGenerate [content type] following the style profile:\n- Voice: [from profile]\n- Sentence length: target ~[X] words, vary between [Y-Z]\n- Use exemplar passage as tone reference:\n  > [exemplar quote]\n- Avoid: [anti-patterns from profile]\n```\n\n## Module Reference\n\n- See `modules/style-application.md` for applying learned styles to new content\n\n## Integration with slop-detector\n\nAfter generating content, run slop-detector to verify:\n1. No AI markers introduced\n2. Style metrics match profile\n3. Anti-patterns avoided\n\n## Exit Criteria\n\n- Style profile document created\n- At least 3 exemplar passages included\n- Quantitative metrics extracted\n- Anti-patterns from slop-detector integrated\n- Validation test passed\n\nFile v1.9.14:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-scribe-style-learner\",\n  \"version\": \"1.9.14\",\n  \"publishedAt\": 1782842793094\n}\n\nFile v1.9.14:modules/exemplar-reference.md\n\n---\nmodule: exemplar-reference\ncategory: style-analysis\ndependencies: [Read]\nestimated_tokens: 350\n---\n\n# Exemplar Reference Module\n\nSelect and document representative passages for style guidance.\n\n## Selection Criteria\n\nChoose passages that demonstrate:\n\n1. **Characteristic rhythm**: Sentence length variation patterns\n2. **Vocabulary choices**: Typical word selection\n3. **Tone markers**: How formality/informality is expressed\n4. **Structural preferences**: Paragraph and list usage\n\n## Anti-Selection Criteria\n\nAvoid passages that:\n\n- Are atypically long or short\n- Contain unusual formatting\n- Quote external sources\n- Are transitional/boilerplate\n- Contain code blocks (unless style includes code)\n\n## Passage Length\n\nOptimal exemplar length: **50-150 words**\n\n- Too short: Insufficient pattern demonstration\n- Too long: Dilutes key characteristics\n\n## Annotation Format\n\n```markdown\n### Exemplar: Technical Explanation\n\n**Source**: docs/architecture.md, lines 45-52\n**Word count**: 87\n**Demonstrates**: Concise technical explanation with grounded examples\n\n> The cache layer sits between the API and database. When a request\n> arrives, we check Redis first. Cache hits return in under 5ms;\n> misses fall through to Postgres, adding 50-200ms depending on\n> query complexity. We chose Redis over Memcached for its richer\n> data structures—sorted sets power our leaderboard feature.\n\n**Key characteristics**:\n- Short, direct sentences (avg 12 words)\n- Specific numbers (5ms, 50-200ms)\n- One em dash for aside\n- Trade-off explanation (\"chose X over Y because\")\n- No filler phrases\n- Technical but accessible\n```\n\n## Minimum Exemplar Set\n\nFor a complete style profile, collect at least:\n\n| Type | Purpose |\n|------|---------|\n| Explanation | How concepts are introduced |\n| Instruction | How steps are given |\n| Transition | How sections connect |\n\nFor narrative content, add:\n\n| Type | Purpose |\n|------|---------|\n| Description | Scene/object portrayal |\n| Dialogue | Character voice |\n| Action | Event pacing |\n\n## Usage in Generation\n\nWhen generating new content, present exemplars as reference:\n\n```\nWrite in a style similar to this passage:\n\n> [exemplar text]\n\nKey aspects to match:\n- Sentence length around X words\n- [Specific vocabulary preferences]\n- [Tone markers to include]\n- [Patterns to avoid]\n```\n\nFile v1.9.14:modules/feature-extraction.md\n\n---\nmodule: feature-extraction\ncategory: style-analysis\ndependencies: [Bash, Read]\nestimated_tokens: 400\n---\n\n# Feature Extraction Module\n\nQuantitative style metrics extraction from exemplar text.\n\n## Vocabulary Analysis\n\n```bash\n# Average word length\nawk '{for(i=1;i<=NF;i++){sum+=length($i);count++}}END{print sum/count}' file.md\n\n# Unique word ratio\nwords=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | wc -l)\nunique=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | sort -u | wc -l)\necho \"scale=2; $unique / $words\" | bc\n\n# Contraction count\ngrep -oE \"\\b\\w+'(t|s|d|ll|ve|re|m)\\b\" file.md | wc -l\n```\n\n## Sentence Analysis\n\n```python\nimport re\n\ndef analyze_sentences(text):\n    # Split on sentence boundaries\n    sentences = re.split(r'[.!?]+', text)\n    sentences = [s.strip() for s in sentences if s.strip()]\n\n    lengths = [len(s.split()) for s in sentences]\n\n    return {\n        'count': len(sentences),\n        'avg_length': sum(lengths) / len(lengths),\n        'min_length': min(lengths),\n        'max_length': max(lengths),\n        'std_dev': statistics.stdev(lengths) if len(lengths) > 1 else 0,\n        'questions': sum(1 for s in sentences if '?' in s),\n        'fragments': sum(1 for l in lengths if l < 5)\n    }\n```\n\n## Structural Analysis\n\n```bash\n# Paragraph lengths (sentences per paragraph)\nawk -v RS='\\n\\n' '{\n    gsub(/[.!?]/, \"&\\n\");\n    n = split($0, a, \"\\n\");\n    print n\n}' file.md\n\n# List ratio\nbullets=$(grep -c '^\\s*[-*]' file.md)\ntotal=$(wc -l < file.md)\necho \"scale=2; $bullets / $total\" | bc\n\n# Header depth\ngrep -E '^#{1,6}\\s' file.md | head -1 | grep -o '#' | wc -c\n```\n\n## Punctuation Profile\n\n```bash\n# Per 1000 words\nwords=$(wc -w < file.md)\n\nem_dashes=$(grep -o '—' file.md | wc -l)\nsemicolons=$(grep -o ';' file.md | wc -l)\nexclamations=$(grep -o '!' file.md | wc -l)\ncolons=$(grep -o ':' file.md | wc -l)\n\necho \"Em dashes: $((em_dashes * 1000 / words)) per 1000\"\necho \"Semicolons: $((semicolons * 1000 / words)) per 1000\"\n```\n\n## Output Format\n\n```yaml\nvocabulary:\n  avg_word_length: 5.2\n  unique_ratio: 0.42\n  contraction_rate: 3.5  # per 100 sentences\n\nsentences:\n  avg_length: 18.4\n  std_dev: 8.2\n  question_rate: 2.1  # per 100\n  fragment_rate: 1.5  # per 100\n\nstructure:\n  avg_paragraph_sentences: 4.2\n  list_ratio: 0.15\n  max_header_depth: 3\n\npunctuation:\n  em_dash_rate: 1.8  # per 1000 words\n  semicolon_rate: 0.5\n  exclamation_rate: 0.2\n```\n\nFile v1.9.14:modules/style-application.md\n\n---\nmodule: style-application\ncategory: writing-quality\ndependencies: [Write, Edit]\nestimated_tokens: 350\n---\n\n# Style Application Module\n\nApply learned style profiles to new content generation and editing.\n\n## Generation Prompting\n\nWhen generating new content with a style profile:\n\n```markdown\n## Style Guidelines\n\n**Voice**: [profile.voice.tone] with [profile.voice.perspective] perspective\n\n**Sentence targets**:\n- Average length: [profile.sentences.average_length] words\n- Vary between [min] and [max]\n- [Fragment guidance from profile]\n\n**Vocabulary**:\n- Prefer: [profile.vocabulary.preferred_terms]\n- Avoid: [profile.vocabulary.avoided_terms]\n- Contractions: [profile.vocabulary.contractions]\n\n**Structure**:\n- Paragraphs: [profile.structure.paragraphs]\n- Lists: [profile.structure.lists]\n\n**Reference exemplar**:\n> [Most relevant exemplar passage]\n\n**Anti-patterns** (will be checked by slop-detector):\n[profile.anti_patterns]\n```\n\n## Editing to Match Style\n\nWhen editing existing content to match a profile:\n\n### Step 1: Measure Current State\n\nExtract metrics from current content and compare to profile.\n\n| Metric | Current | Target | Gap |\n|--------|---------|--------|-----|\n| Avg sentence length | 24 | 18 | -6 |\n| Contraction rate | 0.5 | 3.5 | +3.0 |\n| List ratio | 0.45 | 0.15 | -0.30 |\n\n### Step 2: Prioritize Changes\n\n1. **High gap** metrics first\n2. **Anti-pattern** violations\n3. **Vocabulary** substitutions\n4. **Structural** adjustments\n\n### Step 3: Section-by-Section Editing\n\nFor each section:\n1. Show current metrics\n2. Propose specific changes\n3. Present exemplar for reference\n4. Wait for approval\n5. Apply changes\n6. Re-measure\n\n## Validation Loop\n\nAfter applying style:\n\n```\n1. Run slop-detector on output\n2. Re-extract metrics\n3. Compare to profile targets\n4. Flag remaining gaps > 20%\n5. Iterate if needed\n```\n\n## Style Drift Detection\n\nFor ongoing content:\n\n```bash\n# Compare new content metrics to profile\nnew_metrics=$(extract_metrics new-doc.md)\nprofile_metrics=$(cat .scribe/style-profile.yaml)\n\n# Alert if drift > threshold\nif [ $avg_sentence_diff -gt 5 ]; then\n    echo \"WARNING: Sentence length drifting from profile\"\nfi\n```\n\n## Integration Points\n\n| Tool | Integration |\n|------|-------------|\n| slop-detector | Validate anti-patterns |\n| doc-generator | Apply during generation |\n| pre-commit | Check style conformance |\n\nFile v1.9.14:skill-card.md\n\n## Description: <br>\nExtracts writing style patterns from exemplar text into a reusable profile. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[athola](https://clawhub.ai/user/athola) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nWriters, editors, and developers use this skill to analyze exemplar text, extract style metrics and representative passages, and create a reusable profile for consistent drafting or rewriting. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The broad trigger list may surface the skill during unrelated writing requests. <br>\nMitigation: Confirm that the user wants style-profile generation or style rewriting before reading exemplar files or applying edits. <br>\nRisk: A style profile can misrepresent an author's voice if exemplar text is too sparse or from the wrong context. <br>\nMitigation: Use at least 1000 words from same-genre samples, select representative passages, and validate generated output against metrics and user feedback. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/athola/skills/nm-scribe-style-learner) <br>\n- [Project homepage from package metadata](https://github.com/athola/claude-night-market/tree/master/plugins/scribe) <br>\n- [Feature extraction module](artifact/modules/feature-extraction.md) <br>\n- [Exemplar reference module](artifact/modules/exemplar-reference.md) <br>\n- [Style application module](artifact/modules/style-application.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown guidance with YAML-style profile examples and shell command snippets] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Produces reusable style profiles with metrics, exemplars, anti-patterns, and validation guidance.] <br>\n\n## Skill Version(s): <br>\n1.9.14 (source: server release evidence; artifact frontmatter reports 1.9.8) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.9.13: 6 files, 8390 bytes\n\nFiles: modules/exemplar-reference.md (2317b), modules/feature-extraction.md (2393b), modules/style-application.md (2362b), skill-card.md (2209b), SKILL.md (7015b), _meta.json (143b)\n\nFile v1.9.13:SKILL.md\n\n---\nname: style-learner\ndescription: Extracts writing style patterns from exemplar text into a reusable profile\nversion: 1.9.8\ntriggers:\n  - style\n  - voice\n  - tone\n  - exemplar\n  - learning\n  - consistency\n  - creating a style guide or learning a specific author's voice\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/scribe\", \"emoji\": \"\\u270d\\ufe0f\", \"requires\": {\"config\": [\"night-market.scribe:shared\", \"night-market.scribe:slop-detector\"]}}}\nsource: claude-night-market\nsource_plugin: scribe\n---\n\n> **Night Market Skill** — ported from [claude-night-market/scribe](https://github.com/athola/claude-night-market/tree/master/plugins/scribe). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Style Learning Skill\n\n**A style profile is metrics plus exemplars. Either alone\nis too weak to reproduce a voice.**\n\nExtract style from exemplar text and codify it as a profile\nthat downstream skills (`scribe:doc-generator`,\n`scribe:voice-generate`) can apply consistently.\n\n## Approach: Feature Extraction and Exemplar Reference\n\nThe skill combines two methods because each fails alone:\n\n1. **Feature Extraction**: quantifiable metrics (sentence\n   length distribution, vocabulary complexity, structural\n   patterns). Reproducible but soulless.\n2. **Exemplar Reference**: specific passages that\n   demonstrate the target style. Vivid but hard to apply\n   at scale.\n\nTogether they form a profile precise enough to score new\ntext and rich enough to guide rewrites. Metrics catch what\nexemplars miss; exemplars carry what metrics flatten.\n\n## Required TodoWrite Items\n\n1. `style-learner:exemplar-collected` - Source texts gathered\n2. `style-learner:features-extracted` - Quantitative metrics computed\n3. `style-learner:exemplars-selected` - Representative passages identified\n4. `style-learner:profile-generated` - Style guide created\n5. `style-learner:validation-complete` - Profile tested against new content\n\n## Step 1: Collect Exemplar Text\n\nGather representative samples of the target style.\n\n**Minimum requirements**:\n- At least 1000 words of exemplar text\n- Multiple samples preferred (shows consistency)\n- Same genre/context as target output\n\n```markdown\n## Exemplar Sources\n\n| Source | Word Count | Type |\n|--------|------------|------|\n| README.md | 850 | Technical |\n| blog-post-1.md | 1200 | Narrative |\n| api-guide.md | 2100 | Reference |\n```\n\n## Step 2: Feature Extraction\n\nLoad: `@modules/feature-extraction.md`\n\n### Vocabulary Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Average word length | chars/word | Complexity level |\n| Unique word ratio | unique/total | Vocabulary breadth |\n| Jargon density | technical terms/100 words | Audience level |\n| Contraction rate | contractions/sentences | Formality |\n\n### Sentence Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Average length | words/sentence | Complexity |\n| Length variance | std dev of lengths | Natural variation |\n| Question frequency | questions/100 sentences | Engagement style |\n| Fragment usage | fragments/100 sentences | Stylistic punch |\n\n### Structural Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Paragraph length | sentences/paragraph | Density |\n| List ratio | bullet lines/total lines | Format preference |\n| Header depth | max header level | Organization style |\n| Code block frequency | code blocks/1000 words | Technical density |\n\n### Punctuation Profile\n\n| Metric | Normal Range | Style Indicator |\n|--------|--------------|-----------------|\n| Em dash rate | 0-3/1000 words | Parenthetical style |\n| Semicolon rate | 0-2/1000 words | Formal complexity |\n| Exclamation rate | 0-1/1000 words | Enthusiasm level |\n| Ellipsis rate | 0-1/1000 words | Trailing thought style |\n\n## Step 3: Exemplar Selection\n\nLoad: `@modules/exemplar-reference.md`\n\nSelect 3-5 passages (50-150 words each) that best represent the target style.\n\n**Selection criteria**:\n- Demonstrates characteristic sentence rhythm\n- Shows typical vocabulary choices\n- Represents the desired tone\n- Avoids atypical or exceptional passages\n\n### Exemplar Template\n\n```markdown\n### Exemplar 1: [Label]\n**Source**: [filename, lines X-Y]\n**Demonstrates**: [what aspect of style]\n\n> [Quoted passage]\n\n**Key characteristics**:\n- [Observation 1]\n- [Observation 2]\n```\n\n## Step 4: Generate Style Profile\n\nCombine extracted features and exemplars into a usable style guide.\n\n### Profile Format\n\n```yaml\n# Style Profile: [Name]\n# Generated: [Date]\n# Exemplar sources: [List]\n\nvoice:\n  tone: [professional/casual/academic/conversational]\n  perspective: [first-person/third-person/second-person]\n  formality: [formal/neutral/informal]\n\nvocabulary:\n  average_word_length: X.X\n  jargon_level: [none/light/moderate/heavy]\n  contractions: [avoid/occasional/frequent]\n  preferred_terms:\n    - \"use\" over \"utilize\"\n    - \"help\" over \"facilitate\"\n  avoided_terms:\n    - delve\n    - leverage\n    - comprehensive\n\nsentences:\n  average_length: XX words\n  length_variance: [low/medium/high]\n  fragments_allowed: [yes/no/sparingly]\n  questions_used: [yes/no/sparingly]\n\nstructure:\n  paragraphs: [short/medium/long] (X-Y sentences)\n  lists: [prefer prose/balanced/prefer lists]\n  headers: [descriptive/terse/question-style]\n\npunctuation:\n  em_dashes: [avoid/sparingly/freely]\n  semicolons: [avoid/sparingly/freely]\n  oxford_comma: [yes/no]\n\nexemplars:\n  - label: \"[Exemplar 1 label]\"\n    text: |\n      [Quoted passage]\n  - label: \"[Exemplar 2 label]\"\n    text: |\n      [Quoted passage]\n\nanti_patterns:\n  - [Pattern to avoid 1]\n  - [Pattern to avoid 2]\n```\n\n## Step 5: Validation\n\nTest the profile against new content:\n\n1. Generate sample content using the profile\n2. Compare metrics to extracted features\n3. Have user evaluate voice/tone match\n4. Refine profile based on feedback\n\n### Validation Checklist\n\n- [ ] Metrics within 20% of exemplar averages\n- [ ] No anti-pattern violations\n- [ ] Tone matches user expectation\n- [ ] Vocabulary aligns with exemplars\n- [ ] Structure follows profile guidelines\n\n## Usage in Generation\n\nWhen generating new content, reference the profile:\n\n```markdown\nGenerate [content type] following the style profile:\n- Voice: [from profile]\n- Sentence length: target ~[X] words, vary between [Y-Z]\n- Use exemplar passage as tone reference:\n  > [exemplar quote]\n- Avoid: [anti-patterns from profile]\n```\n\n## Module Reference\n\n- See `modules/style-application.md` for applying learned styles to new content\n\n## Integration with slop-detector\n\nAfter generating content, run slop-detector to verify:\n1. No AI markers introduced\n2. Style metrics match profile\n3. Anti-patterns avoided\n\n## Exit Criteria\n\n- Style profile document created\n- At least 3 exemplar passages included\n- Quantitative metrics extracted\n- Anti-patterns from slop-detector integrated\n- Validation test passed\n\nFile v1.9.13:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-scribe-style-learner\",\n  \"version\": \"1.9.13\",\n  \"publishedAt\": 1782577456441\n}\n\nFile v1.9.13:modules/exemplar-reference.md\n\n---\nmodule: exemplar-reference\ncategory: style-analysis\ndependencies: [Read]\nestimated_tokens: 350\n---\n\n# Exemplar Reference Module\n\nSelect and document representative passages for style guidance.\n\n## Selection Criteria\n\nChoose passages that demonstrate:\n\n1. **Characteristic rhythm**: Sentence length variation patterns\n2. **Vocabulary choices**: Typical word selection\n3. **Tone markers**: How formality/informality is expressed\n4. **Structural preferences**: Paragraph and list usage\n\n## Anti-Selection Criteria\n\nAvoid passages that:\n\n- Are atypically long or short\n- Contain unusual formatting\n- Quote external sources\n- Are transitional/boilerplate\n- Contain code blocks (unless style includes code)\n\n## Passage Length\n\nOptimal exemplar length: **50-150 words**\n\n- Too short: Insufficient pattern demonstration\n- Too long: Dilutes key characteristics\n\n## Annotation Format\n\n```markdown\n### Exemplar: Technical Explanation\n\n**Source**: docs/architecture.md, lines 45-52\n**Word count**: 87\n**Demonstrates**: Concise technical explanation with grounded examples\n\n> The cache layer sits between the API and database. When a request\n> arrives, we check Redis first. Cache hits return in under 5ms;\n> misses fall through to Postgres, adding 50-200ms depending on\n> query complexity. We chose Redis over Memcached for its richer\n> data structures—sorted sets power our leaderboard feature.\n\n**Key characteristics**:\n- Short, direct sentences (avg 12 words)\n- Specific numbers (5ms, 50-200ms)\n- One em dash for aside\n- Trade-off explanation (\"chose X over Y because\")\n- No filler phrases\n- Technical but accessible\n```\n\n## Minimum Exemplar Set\n\nFor a complete style profile, collect at least:\n\n| Type | Purpose |\n|------|---------|\n| Explanation | How concepts are introduced |\n| Instruction | How steps are given |\n| Transition | How sections connect |\n\nFor narrative content, add:\n\n| Type | Purpose |\n|------|---------|\n| Description | Scene/object portrayal |\n| Dialogue | Character voice |\n| Action | Event pacing |\n\n## Usage in Generation\n\nWhen generating new content, present exemplars as reference:\n\n```\nWrite in a style similar to this passage:\n\n> [exemplar text]\n\nKey aspects to match:\n- Sentence length around X words\n- [Specific vocabulary preferences]\n- [Tone markers to include]\n- [Patterns to avoid]\n```\n\nFile v1.9.13:modules/feature-extraction.md\n\n---\nmodule: feature-extraction\ncategory: style-analysis\ndependencies: [Bash, Read]\nestimated_tokens: 400\n---\n\n# Feature Extraction Module\n\nQuantitative style metrics extraction from exemplar text.\n\n## Vocabulary Analysis\n\n```bash\n# Average word length\nawk '{for(i=1;i<=NF;i++){sum+=length($i);count++}}END{print sum/count}' file.md\n\n# Unique word ratio\nwords=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | wc -l)\nunique=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | sort -u | wc -l)\necho \"scale=2; $unique / $words\" | bc\n\n# Contraction count\ngrep -oE \"\\b\\w+'(t|s|d|ll|ve|re|m)\\b\" file.md | wc -l\n```\n\n## Sentence Analysis\n\n```python\nimport re\n\ndef analyze_sentences(text):\n    # Split on sentence boundaries\n    sentences = re.split(r'[.!?]+', text)\n    sentences = [s.strip() for s in sentences if s.strip()]\n\n    lengths = [len(s.split()) for s in sentences]\n\n    return {\n        'count': len(sentences),\n        'avg_length': sum(lengths) / len(lengths),\n        'min_length': min(lengths),\n        'max_length': max(lengths),\n        'std_dev': statistics.stdev(lengths) if len(lengths) > 1 else 0,\n        'questions': sum(1 for s in sentences if '?' in s),\n        'fragments': sum(1 for l in lengths if l < 5)\n    }\n```\n\n## Structural Analysis\n\n```bash\n# Paragraph lengths (sentences per paragraph)\nawk -v RS='\\n\\n' '{\n    gsub(/[.!?]/, \"&\\n\");\n    n = split($0, a, \"\\n\");\n    print n\n}' file.md\n\n# List ratio\nbullets=$(grep -c '^\\s*[-*]' file.md)\ntotal=$(wc -l < file.md)\necho \"scale=2; $bullets / $total\" | bc\n\n# Header depth\ngrep -E '^#{1,6}\\s' file.md | head -1 | grep -o '#' | wc -c\n```\n\n## Punctuation Profile\n\n```bash\n# Per 1000 words\nwords=$(wc -w < file.md)\n\nem_dashes=$(grep -o '—' file.md | wc -l)\nsemicolons=$(grep -o ';' file.md | wc -l)\nexclamations=$(grep -o '!' file.md | wc -l)\ncolons=$(grep -o ':' file.md | wc -l)\n\necho \"Em dashes: $((em_dashes * 1000 / words)) per 1000\"\necho \"Semicolons: $((semicolons * 1000 / words)) per 1000\"\n```\n\n## Output Format\n\n```yaml\nvocabulary:\n  avg_word_length: 5.2\n  unique_ratio: 0.42\n  contraction_rate: 3.5  # per 100 sentences\n\nsentences:\n  avg_length: 18.4\n  std_dev: 8.2\n  question_rate: 2.1  # per 100\n  fragment_rate: 1.5  # per 100\n\nstructure:\n  avg_paragraph_sentences: 4.2\n  list_ratio: 0.15\n  max_header_depth: 3\n\npunctuation:\n  em_dash_rate: 1.8  # per 1000 words\n  semicolon_rate: 0.5\n  exclamation_rate: 0.2\n```\n\nFile v1.9.13:modules/style-application.md\n\n---\nmodule: style-application\ncategory: writing-quality\ndependencies: [Write, Edit]\nestimated_tokens: 350\n---\n\n# Style Application Module\n\nApply learned style profiles to new content generation and editing.\n\n## Generation Prompting\n\nWhen generating new content with a style profile:\n\n```markdown\n## Style Guidelines\n\n**Voice**: [profile.voice.tone] with [profile.voice.perspective] perspective\n\n**Sentence targets**:\n- Average length: [profile.sentences.average_length] words\n- Vary between [min] and [max]\n- [Fragment guidance from profile]\n\n**Vocabulary**:\n- Prefer: [profile.vocabulary.preferred_terms]\n- Avoid: [profile.vocabulary.avoided_terms]\n- Contractions: [profile.vocabulary.contractions]\n\n**Structure**:\n- Paragraphs: [profile.structure.paragraphs]\n- Lists: [profile.structure.lists]\n\n**Reference exemplar**:\n> [Most relevant exemplar passage]\n\n**Anti-patterns** (will be checked by slop-detector):\n[profile.anti_patterns]\n```\n\n## Editing to Match Style\n\nWhen editing existing content to match a profile:\n\n### Step 1: Measure Current State\n\nExtract metrics from current content and compare to profile.\n\n| Metric | Current | Target | Gap |\n|--------|---------|--------|-----|\n| Avg sentence length | 24 | 18 | -6 |\n| Contraction rate | 0.5 | 3.5 | +3.0 |\n| List ratio | 0.45 | 0.15 | -0.30 |\n\n### Step 2: Prioritize Changes\n\n1. **High gap** metrics first\n2. **Anti-pattern** violations\n3. **Vocabulary** substitutions\n4. **Structural** adjustments\n\n### Step 3: Section-by-Section Editing\n\nFor each section:\n1. Show current metrics\n2. Propose specific changes\n3. Present exemplar for reference\n4. Wait for approval\n5. Apply changes\n6. Re-measure\n\n## Validation Loop\n\nAfter applying style:\n\n```\n1. Run slop-detector on output\n2. Re-extract metrics\n3. Compare to profile targets\n4. Flag remaining gaps > 20%\n5. Iterate if needed\n```\n\n## Style Drift Detection\n\nFor ongoing content:\n\n```bash\n# Compare new content metrics to profile\nnew_metrics=$(extract_metrics new-doc.md)\nprofile_metrics=$(cat .scribe/style-profile.yaml)\n\n# Alert if drift > threshold\nif [ $avg_sentence_diff -gt 5 ]; then\n    echo \"WARNING: Sentence length drifting from profile\"\nfi\n```\n\n## Integration Points\n\n| Tool | Integration |\n|------|-------------|\n| slop-detector | Validate anti-patterns |\n| doc-generator | Apply during generation |\n| pre-commit | Check style conformance |\n\nFile v1.9.13:skill-card.md\n\n## Description: <br>\nExtracts writing style patterns from exemplar text into a reusable profile. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[athola](https://clawhub.ai/user/athola) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nWriters, editors, and developer agents use this skill to analyze exemplar text, extract measurable style features, select representative passages, and build a reusable profile for consistent future writing or editing. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Broad style-related triggers may activate the skill during general writing discussions. <br>\nMitigation: Review when the skill is active and use it only when style learning or style application is intended. <br>\nRisk: Exemplar text can contain sensitive or proprietary writing samples. <br>\nMitigation: Provide only exemplar content that is appropriate for analysis and reuse in a style profile. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/athola/skills/nm-scribe-style-learner) <br>\n- [Scribe Plugin Homepage](https://github.com/athola/claude-night-market/tree/master/plugins/scribe) <br>\n- [Feature Extraction Module](artifact/modules/feature-extraction.md) <br>\n- [Exemplar Reference Module](artifact/modules/exemplar-reference.md) <br>\n- [Style Application Module](artifact/modules/style-application.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, guidance, shell commands, configuration] <br>\n**Output Format:** [Markdown and YAML-style profile guidance with optional shell command snippets.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Produces style metrics, exemplar selections, anti-patterns, validation checks, and reusable style-profile structure.] <br>\n\n## Skill Version(s): <br>\n1.9.13 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.9.12: 6 files, 8469 bytes\n\nFiles: modules/exemplar-reference.md (2317b), modules/feature-extraction.md (2393b), modules/style-application.md (2362b), skill-card.md (2415b), SKILL.md (7015b), _meta.json (143b)\n\nFile v1.9.12:SKILL.md\n\n---\nname: style-learner\ndescription: Extracts writing style patterns from exemplar text into a reusable profile\nversion: 1.9.8\ntriggers:\n  - style\n  - voice\n  - tone\n  - exemplar\n  - learning\n  - consistency\n  - creating a style guide or learning a specific author's voice\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/scribe\", \"emoji\": \"\\u270d\\ufe0f\", \"requires\": {\"config\": [\"night-market.scribe:shared\", \"night-market.scribe:slop-detector\"]}}}\nsource: claude-night-market\nsource_plugin: scribe\n---\n\n> **Night Market Skill** — ported from [claude-night-market/scribe](https://github.com/athola/claude-night-market/tree/master/plugins/scribe). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Style Learning Skill\n\n**A style profile is metrics plus exemplars. Either alone\nis too weak to reproduce a voice.**\n\nExtract style from exemplar text and codify it as a profile\nthat downstream skills (`scribe:doc-generator`,\n`scribe:voice-generate`) can apply consistently.\n\n## Approach: Feature Extraction and Exemplar Reference\n\nThe skill combines two methods because each fails alone:\n\n1. **Feature Extraction**: quantifiable metrics (sentence\n   length distribution, vocabulary complexity, structural\n   patterns). Reproducible but soulless.\n2. **Exemplar Reference**: specific passages that\n   demonstrate the target style. Vivid but hard to apply\n   at scale.\n\nTogether they form a profile precise enough to score new\ntext and rich enough to guide rewrites. Metrics catch what\nexemplars miss; exemplars carry what metrics flatten.\n\n## Required TodoWrite Items\n\n1. `style-learner:exemplar-collected` - Source texts gathered\n2. `style-learner:features-extracted` - Quantitative metrics computed\n3. `style-learner:exemplars-selected` - Representative passages identified\n4. `style-learner:profile-generated` - Style guide created\n5. `style-learner:validation-complete` - Profile tested against new content\n\n## Step 1: Collect Exemplar Text\n\nGather representative samples of the target style.\n\n**Minimum requirements**:\n- At least 1000 words of exemplar text\n- Multiple samples preferred (shows consistency)\n- Same genre/context as target output\n\n```markdown\n## Exemplar Sources\n\n| Source | Word Count | Type |\n|--------|------------|------|\n| README.md | 850 | Technical |\n| blog-post-1.md | 1200 | Narrative |\n| api-guide.md | 2100 | Reference |\n```\n\n## Step 2: Feature Extraction\n\nLoad: `@modules/feature-extraction.md`\n\n### Vocabulary Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Average word length | chars/word | Complexity level |\n| Unique word ratio | unique/total | Vocabulary breadth |\n| Jargon density | technical terms/100 words | Audience level |\n| Contraction rate | contractions/sentences | Formality |\n\n### Sentence Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Average length | words/sentence | Complexity |\n| Length variance | std dev of lengths | Natural variation |\n| Question frequency | questions/100 sentences | Engagement style |\n| Fragment usage | fragments/100 sentences | Stylistic punch |\n\n### Structural Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Paragraph length | sentences/paragraph | Density |\n| List ratio | bullet lines/total lines | Format preference |\n| Header depth | max header level | Organization style |\n| Code block frequency | code blocks/1000 words | Technical density |\n\n### Punctuation Profile\n\n| Metric | Normal Range | Style Indicator |\n|--------|--------------|-----------------|\n| Em dash rate | 0-3/1000 words | Parenthetical style |\n| Semicolon rate | 0-2/1000 words | Formal complexity |\n| Exclamation rate | 0-1/1000 words | Enthusiasm level |\n| Ellipsis rate | 0-1/1000 words | Trailing thought style |\n\n## Step 3: Exemplar Selection\n\nLoad: `@modules/exemplar-reference.md`\n\nSelect 3-5 passages (50-150 words each) that best represent the target style.\n\n**Selection criteria**:\n- Demonstrates characteristic sentence rhythm\n- Shows typical vocabulary choices\n- Represents the desired tone\n- Avoids atypical or exceptional passages\n\n### Exemplar Template\n\n```markdown\n### Exemplar 1: [Label]\n**Source**: [filename, lines X-Y]\n**Demonstrates**: [what aspect of style]\n\n> [Quoted passage]\n\n**Key characteristics**:\n- [Observation 1]\n- [Observation 2]\n```\n\n## Step 4: Generate Style Profile\n\nCombine extracted features and exemplars into a usable style guide.\n\n### Profile Format\n\n```yaml\n# Style Profile: [Name]\n# Generated: [Date]\n# Exemplar sources: [List]\n\nvoice:\n  tone: [professional/casual/academic/conversational]\n  perspective: [first-person/third-person/second-person]\n  formality: [formal/neutral/informal]\n\nvocabulary:\n  average_word_length: X.X\n  jargon_level: [none/light/moderate/heavy]\n  contractions: [avoid/occasional/frequent]\n  preferred_terms:\n    - \"use\" over \"utilize\"\n    - \"help\" over \"facilitate\"\n  avoided_terms:\n    - delve\n    - leverage\n    - comprehensive\n\nsentences:\n  average_length: XX words\n  length_variance: [low/medium/high]\n  fragments_allowed: [yes/no/sparingly]\n  questions_used: [yes/no/sparingly]\n\nstructure:\n  paragraphs: [short/medium/long] (X-Y sentences)\n  lists: [prefer prose/balanced/prefer lists]\n  headers: [descriptive/terse/question-style]\n\npunctuation:\n  em_dashes: [avoid/sparingly/freely]\n  semicolons: [avoid/sparingly/freely]\n  oxford_comma: [yes/no]\n\nexemplars:\n  - label: \"[Exemplar 1 label]\"\n    text: |\n      [Quoted passage]\n  - label: \"[Exemplar 2 label]\"\n    text: |\n      [Quoted passage]\n\nanti_patterns:\n  - [Pattern to avoid 1]\n  - [Pattern to avoid 2]\n```\n\n## Step 5: Validation\n\nTest the profile against new content:\n\n1. Generate sample content using the profile\n2. Compare metrics to extracted features\n3. Have user evaluate voice/tone match\n4. Refine profile based on feedback\n\n### Validation Checklist\n\n- [ ] Metrics within 20% of exemplar averages\n- [ ] No anti-pattern violations\n- [ ] Tone matches user expectation\n- [ ] Vocabulary aligns with exemplars\n- [ ] Structure follows profile guidelines\n\n## Usage in Generation\n\nWhen generating new content, reference the profile:\n\n```markdown\nGenerate [content type] following the style profile:\n- Voice: [from profile]\n- Sentence length: target ~[X] words, vary between [Y-Z]\n- Use exemplar passage as tone reference:\n  > [exemplar quote]\n- Avoid: [anti-patterns from profile]\n```\n\n## Module Reference\n\n- See `modules/style-application.md` for applying learned styles to new content\n\n## Integration with slop-detector\n\nAfter generating content, run slop-detector to verify:\n1. No AI markers introduced\n2. Style metrics match profile\n3. Anti-patterns avoided\n\n## Exit Criteria\n\n- Style profile document created\n- At least 3 exemplar passages included\n- Quantitative metrics extracted\n- Anti-patterns from slop-detector integrated\n- Validation test passed\n\nFile v1.9.12:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-scribe-style-learner\",\n  \"version\": \"1.9.12\",\n  \"publishedAt\": 1781839199631\n}\n\nFile v1.9.12:modules/exemplar-reference.md\n\n---\nmodule: exemplar-reference\ncategory: style-analysis\ndependencies: [Read]\nestimated_tokens: 350\n---\n\n# Exemplar Reference Module\n\nSelect and document representative passages for style guidance.\n\n## Selection Criteria\n\nChoose passages that demonstrate:\n\n1. **Characteristic rhythm**: Sentence length variation patterns\n2. **Vocabulary choices**: Typical word selection\n3. **Tone markers**: How formality/informality is expressed\n4. **Structural preferences**: Paragraph and list usage\n\n## Anti-Selection Criteria\n\nAvoid passages that:\n\n- Are atypically long or short\n- Contain unusual formatting\n- Quote external sources\n- Are transitional/boilerplate\n- Contain code blocks (unless style includes code)\n\n## Passage Length\n\nOptimal exemplar length: **50-150 words**\n\n- Too short: Insufficient pattern demonstration\n- Too long: Dilutes key characteristics\n\n## Annotation Format\n\n```markdown\n### Exemplar: Technical Explanation\n\n**Source**: docs/architecture.md, lines 45-52\n**Word count**: 87\n**Demonstrates**: Concise technical explanation with grounded examples\n\n> The cache layer sits between the API and database. When a request\n> arrives, we check Redis first. Cache hits return in under 5ms;\n> misses fall through to Postgres, adding 50-200ms depending on\n> query complexity. We chose Redis over Memcached for its richer\n> data structures—sorted sets power our leaderboard feature.\n\n**Key characteristics**:\n- Short, direct sentences (avg 12 words)\n- Specific numbers (5ms, 50-200ms)\n- One em dash for aside\n- Trade-off explanation (\"chose X over Y because\")\n- No filler phrases\n- Technical but accessible\n```\n\n## Minimum Exemplar Set\n\nFor a complete style profile, collect at least:\n\n| Type | Purpose |\n|------|---------|\n| Explanation | How concepts are introduced |\n| Instruction | How steps are given |\n| Transition | How sections connect |\n\nFor narrative content, add:\n\n| Type | Purpose |\n|------|---------|\n| Description | Scene/object portrayal |\n| Dialogue | Character voice |\n| Action | Event pacing |\n\n## Usage in Generation\n\nWhen generating new content, present exemplars as reference:\n\n```\nWrite in a style similar to this passage:\n\n> [exemplar text]\n\nKey aspects to match:\n- Sentence length around X words\n- [Specific vocabulary preferences]\n- [Tone markers to include]\n- [Patterns to avoid]\n```\n\nFile v1.9.12:modules/feature-extraction.md\n\n---\nmodule: feature-extraction\ncategory: style-analysis\ndependencies: [Bash, Read]\nestimated_tokens: 400\n---\n\n# Feature Extraction Module\n\nQuantitative style metrics extraction from exemplar text.\n\n## Vocabulary Analysis\n\n```bash\n# Average word length\nawk '{for(i=1;i<=NF;i++){sum+=length($i);count++}}END{print sum/count}' file.md\n\n# Unique word ratio\nwords=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | wc -l)\nunique=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | sort -u | wc -l)\necho \"scale=2; $unique / $words\" | bc\n\n# Contraction count\ngrep -oE \"\\b\\w+'(t|s|d|ll|ve|re|m)\\b\" file.md | wc -l\n```\n\n## Sentence Analysis\n\n```python\nimport re\n\ndef analyze_sentences(text):\n    # Split on sentence boundaries\n    sentences = re.split(r'[.!?]+', text)\n    sentences = [s.strip() for s in sentences if s.strip()]\n\n    lengths = [len(s.split()) for s in sentences]\n\n    return {\n        'count': len(sentences),\n        'avg_length': sum(lengths) / len(lengths),\n        'min_length': min(lengths),\n        'max_length': max(lengths),\n        'std_dev': statistics.stdev(lengths) if len(lengths) > 1 else 0,\n        'questions': sum(1 for s in sentences if '?' in s),\n        'fragments': sum(1 for l in lengths if l < 5)\n    }\n```\n\n## Structural Analysis\n\n```bash\n# Paragraph lengths (sentences per paragraph)\nawk -v RS='\\n\\n' '{\n    gsub(/[.!?]/, \"&\\n\");\n    n = split($0, a, \"\\n\");\n    print n\n}' file.md\n\n# List ratio\nbullets=$(grep -c '^\\s*[-*]' file.md)\ntotal=$(wc -l < file.md)\necho \"scale=2; $bullets / $total\" | bc\n\n# Header depth\ngrep -E '^#{1,6}\\s' file.md | head -1 | grep -o '#' | wc -c\n```\n\n## Punctuation Profile\n\n```bash\n# Per 1000 words\nwords=$(wc -w < file.md)\n\nem_dashes=$(grep -o '—' file.md | wc -l)\nsemicolons=$(grep -o ';' file.md | wc -l)\nexclamations=$(grep -o '!' file.md | wc -l)\ncolons=$(grep -o ':' file.md | wc -l)\n\necho \"Em dashes: $((em_dashes * 1000 / words)) per 1000\"\necho \"Semicolons: $((semicolons * 1000 / words)) per 1000\"\n```\n\n## Output Format\n\n```yaml\nvocabulary:\n  avg_word_length: 5.2\n  unique_ratio: 0.42\n  contraction_rate: 3.5  # per 100 sentences\n\nsentences:\n  avg_length: 18.4\n  std_dev: 8.2\n  question_rate: 2.1  # per 100\n  fragment_rate: 1.5  # per 100\n\nstructure:\n  avg_paragraph_sentences: 4.2\n  list_ratio: 0.15\n  max_header_depth: 3\n\npunctuation:\n  em_dash_rate: 1.8  # per 1000 words\n  semicolon_rate: 0.5\n  exclamation_rate: 0.2\n```\n\nFile v1.9.12:modules/style-application.md\n\n---\nmodule: style-application\ncategory: writing-quality\ndependencies: [Write, Edit]\nestimated_tokens: 350\n---\n\n# Style Application Module\n\nApply learned style profiles to new content generation and editing.\n\n## Generation Prompting\n\nWhen generating new content with a style profile:\n\n```markdown\n## Style Guidelines\n\n**Voice**: [profile.voice.tone] with [profile.voice.perspective] perspective\n\n**Sentence targets**:\n- Average length: [profile.sentences.average_length] words\n- Vary between [min] and [max]\n- [Fragment guidance from profile]\n\n**Vocabulary**:\n- Prefer: [profile.vocabulary.preferred_terms]\n- Avoid: [profile.vocabulary.avoided_terms]\n- Contractions: [profile.vocabulary.contractions]\n\n**Structure**:\n- Paragraphs: [profile.structure.paragraphs]\n- Lists: [profile.structure.lists]\n\n**Reference exemplar**:\n> [Most relevant exemplar passage]\n\n**Anti-patterns** (will be checked by slop-detector):\n[profile.anti_patterns]\n```\n\n## Editing to Match Style\n\nWhen editing existing content to match a profile:\n\n### Step 1: Measure Current State\n\nExtract metrics from current content and compare to profile.\n\n| Metric | Current | Target | Gap |\n|--------|---------|--------|-----|\n| Avg sentence length | 24 | 18 | -6 |\n| Contraction rate | 0.5 | 3.5 | +3.0 |\n| List ratio | 0.45 | 0.15 | -0.30 |\n\n### Step 2: Prioritize Changes\n\n1. **High gap** metrics first\n2. **Anti-pattern** violations\n3. **Vocabulary** substitutions\n4. **Structural** adjustments\n\n### Step 3: Section-by-Section Editing\n\nFor each section:\n1. Show current metrics\n2. Propose specific changes\n3. Present exemplar for reference\n4. Wait for approval\n5. Apply changes\n6. Re-measure\n\n## Validation Loop\n\nAfter applying style:\n\n```\n1. Run slop-detector on output\n2. Re-extract metrics\n3. Compare to profile targets\n4. Flag remaining gaps > 20%\n5. Iterate if needed\n```\n\n## Style Drift Detection\n\nFor ongoing content:\n\n```bash\n# Compare new content metrics to profile\nnew_metrics=$(extract_metrics new-doc.md)\nprofile_metrics=$(cat .scribe/style-profile.yaml)\n\n# Alert if drift > threshold\nif [ $avg_sentence_diff -gt 5 ]; then\n    echo \"WARNING: Sentence length drifting from profile\"\nfi\n```\n\n## Integration Points\n\n| Tool | Integration |\n|------|-------------|\n| slop-detector | Validate anti-patterns |\n| doc-generator | Apply during generation |\n| pre-commit | Check style conformance |\n\nFile v1.9.12:skill-card.md\n\n## Description: <br>\nExtracts writing style patterns from exemplar text into a reusable profile. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[athola](https://clawhub.ai/user/athola) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and developers use this skill to analyze writing samples, extract style metrics and representative exemplars, and create a reusable profile for consistent generation or editing. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Broad style, voice, tone, and exemplar triggers may activate the skill during general writing requests. <br>\nMitigation: Confirm the user wants style learning before collecting exemplars or generating a profile. <br>\nRisk: Exemplar text may include sensitive or proprietary writing samples. <br>\nMitigation: Use only exemplar text the user is comfortable having analyzed in the local agent workflow. <br>\nRisk: A weak or unrepresentative sample set can produce a profile that does not match the intended voice. <br>\nMitigation: Collect at least 1000 words across representative samples, include multiple exemplars, and validate generated output against the profile. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/athola/nm-scribe-style-learner) <br>\n- [Scribe Plugin Homepage](https://github.com/athola/claude-night-market/tree/master/plugins/scribe) <br>\n- [Feature Extraction Module](modules/feature-extraction.md) <br>\n- [Exemplar Reference Module](modules/exemplar-reference.md) <br>\n- [Style Application Module](modules/style-application.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Analysis, Markdown, Shell commands, Configuration, Guidance] <br>\n**Output Format:** [Markdown guidance with YAML-style profile content and inline shell command examples] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Style profiles combine quantitative metrics, selected exemplars, anti-patterns, and validation checks.] <br>\n\n## Skill Version(s): <br>\n1.9.12 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.2: 6 files, 8241 bytes\n\nFiles: modules/exemplar-reference.md (2317b), modules/feature-extraction.md (2393b), modules/style-application.md (2362b), skill-card.md (2403b), SKILL.md (6611b), _meta.json (142b)\n\nFile v1.0.2:SKILL.md\n\n---\nname: style-learner\ndescription: Learn and extract writing style patterns from exemplar text for consistent\nversion: 1.9.5\ntriggers:\n  - style\n  - voice\n  - tone\n  - exemplar\n  - learning\n  - consistency\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/scribe\", \"emoji\": \"\\u270d\\ufe0f\", \"requires\": {\"config\": [\"night-market.scribe:shared\", \"night-market.scribe:slop-detector\"]}}}\nsource: claude-night-market\nsource_plugin: scribe\n---\n\n> **Night Market Skill** — ported from [claude-night-market/scribe](https://github.com/athola/claude-night-market/tree/master/plugins/scribe). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Style Learning Skill\n\nExtract and codify writing style from exemplar text for consistent application.\n\n## Approach: Feature Extraction + Exemplar Reference\n\nThis skill combines two complementary methods:\n\n1. **Feature Extraction**: Quantifiable style metrics (sentence length, vocabulary complexity, structural patterns)\n2. **Exemplar Reference**: Specific passages that demonstrate desired style\n\nTogether, these create a comprehensive style profile that can guide content generation and editing.\n\n## Required TodoWrite Items\n\n1. `style-learner:exemplar-collected` - Source texts gathered\n2. `style-learner:features-extracted` - Quantitative metrics computed\n3. `style-learner:exemplars-selected` - Representative passages identified\n4. `style-learner:profile-generated` - Style guide created\n5. `style-learner:validation-complete` - Profile tested against new content\n\n## Step 1: Collect Exemplar Text\n\nGather representative samples of the target style.\n\n**Minimum requirements**:\n- At least 1000 words of exemplar text\n- Multiple samples preferred (shows consistency)\n- Same genre/context as target output\n\n```markdown\n## Exemplar Sources\n\n| Source | Word Count | Type |\n|--------|------------|------|\n| README.md | 850 | Technical |\n| blog-post-1.md | 1200 | Narrative |\n| api-guide.md | 2100 | Reference |\n```\n\n## Step 2: Feature Extraction\n\nLoad: `@modules/feature-extraction.md`\n\n### Vocabulary Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Average word length | chars/word | Complexity level |\n| Unique word ratio | unique/total | Vocabulary breadth |\n| Jargon density | technical terms/100 words | Audience level |\n| Contraction rate | contractions/sentences | Formality |\n\n### Sentence Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Average length | words/sentence | Complexity |\n| Length variance | std dev of lengths | Natural variation |\n| Question frequency | questions/100 sentences | Engagement style |\n| Fragment usage | fragments/100 sentences | Stylistic punch |\n\n### Structural Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Paragraph length | sentences/paragraph | Density |\n| List ratio | bullet lines/total lines | Format preference |\n| Header depth | max header level | Organization style |\n| Code block frequency | code blocks/1000 words | Technical density |\n\n### Punctuation Profile\n\n| Metric | Normal Range | Style Indicator |\n|--------|--------------|-----------------|\n| Em dash rate | 0-3/1000 words | Parenthetical style |\n| Semicolon rate | 0-2/1000 words | Formal complexity |\n| Exclamation rate | 0-1/1000 words | Enthusiasm level |\n| Ellipsis rate | 0-1/1000 words | Trailing thought style |\n\n## Step 3: Exemplar Selection\n\nLoad: `@modules/exemplar-reference.md`\n\nSelect 3-5 passages (50-150 words each) that best represent the target style.\n\n**Selection criteria**:\n- Demonstrates characteristic sentence rhythm\n- Shows typical vocabulary choices\n- Represents the desired tone\n- Avoids atypical or exceptional passages\n\n### Exemplar Template\n\n```markdown\n### Exemplar 1: [Label]\n**Source**: [filename, lines X-Y]\n**Demonstrates**: [what aspect of style]\n\n> [Quoted passage]\n\n**Key characteristics**:\n- [Observation 1]\n- [Observation 2]\n```\n\n## Step 4: Generate Style Profile\n\nCombine extracted features and exemplars into a usable style guide.\n\n### Profile Format\n\n```yaml\n# Style Profile: [Name]\n# Generated: [Date]\n# Exemplar sources: [List]\n\nvoice:\n  tone: [professional/casual/academic/conversational]\n  perspective: [first-person/third-person/second-person]\n  formality: [formal/neutral/informal]\n\nvocabulary:\n  average_word_length: X.X\n  jargon_level: [none/light/moderate/heavy]\n  contractions: [avoid/occasional/frequent]\n  preferred_terms:\n    - \"use\" over \"utilize\"\n    - \"help\" over \"facilitate\"\n  avoided_terms:\n    - delve\n    - leverage\n    - comprehensive\n\nsentences:\n  average_length: XX words\n  length_variance: [low/medium/high]\n  fragments_allowed: [yes/no/sparingly]\n  questions_used: [yes/no/sparingly]\n\nstructure:\n  paragraphs: [short/medium/long] (X-Y sentences)\n  lists: [prefer prose/balanced/prefer lists]\n  headers: [descriptive/terse/question-style]\n\npunctuation:\n  em_dashes: [avoid/sparingly/freely]\n  semicolons: [avoid/sparingly/freely]\n  oxford_comma: [yes/no]\n\nexemplars:\n  - label: \"[Exemplar 1 label]\"\n    text: |\n      [Quoted passage]\n  - label: \"[Exemplar 2 label]\"\n    text: |\n      [Quoted passage]\n\nanti_patterns:\n  - [Pattern to avoid 1]\n  - [Pattern to avoid 2]\n```\n\n## Step 5: Validation\n\nTest the profile against new content:\n\n1. Generate sample content using the profile\n2. Compare metrics to extracted features\n3. Have user evaluate voice/tone match\n4. Refine profile based on feedback\n\n### Validation Checklist\n\n- [ ] Metrics within 20% of exemplar averages\n- [ ] No anti-pattern violations\n- [ ] Tone matches user expectation\n- [ ] Vocabulary aligns with exemplars\n- [ ] Structure follows profile guidelines\n\n## Usage in Generation\n\nWhen generating new content, reference the profile:\n\n```markdown\nGenerate [content type] following the style profile:\n- Voice: [from profile]\n- Sentence length: target ~[X] words, vary between [Y-Z]\n- Use exemplar passage as tone reference:\n  > [exemplar quote]\n- Avoid: [anti-patterns from profile]\n```\n\n## Module Reference\n\n- See `modules/style-application.md` for applying learned styles to new content\n\n## Integration with slop-detector\n\nAfter generating content, run slop-detector to verify:\n1. No AI markers introduced\n2. Style metrics match profile\n3. Anti-patterns avoided\n\n## Exit Criteria\n\n- Style profile document created\n- At least 3 exemplar passages included\n- Quantitative metrics extracted\n- Anti-patterns from slop-detector integrated\n- Validation test passed\n\nFile v1.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-scribe-style-learner\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1778293229372\n}\n\nFile v1.0.2:modules/exemplar-reference.md\n\n---\nmodule: exemplar-reference\ncategory: style-analysis\ndependencies: [Read]\nestimated_tokens: 350\n---\n\n# Exemplar Reference Module\n\nSelect and document representative passages for style guidance.\n\n## Selection Criteria\n\nChoose passages that demonstrate:\n\n1. **Characteristic rhythm**: Sentence length variation patterns\n2. **Vocabulary choices**: Typical word selection\n3. **Tone markers**: How formality/informality is expressed\n4. **Structural preferences**: Paragraph and list usage\n\n## Anti-Selection Criteria\n\nAvoid passages that:\n\n- Are atypically long or short\n- Contain unusual formatting\n- Quote external sources\n- Are transitional/boilerplate\n- Contain code blocks (unless style includes code)\n\n## Passage Length\n\nOptimal exemplar length: **50-150 words**\n\n- Too short: Insufficient pattern demonstration\n- Too long: Dilutes key characteristics\n\n## Annotation Format\n\n```markdown\n### Exemplar: Technical Explanation\n\n**Source**: docs/architecture.md, lines 45-52\n**Word count**: 87\n**Demonstrates**: Concise technical explanation with grounded examples\n\n> The cache layer sits between the API and database. When a request\n> arrives, we check Redis first. Cache hits return in under 5ms;\n> misses fall through to Postgres, adding 50-200ms depending on\n> query complexity. We chose Redis over Memcached for its richer\n> data structures—sorted sets power our leaderboard feature.\n\n**Key characteristics**:\n- Short, direct sentences (avg 12 words)\n- Specific numbers (5ms, 50-200ms)\n- One em dash for aside\n- Trade-off explanation (\"chose X over Y because\")\n- No filler phrases\n- Technical but accessible\n```\n\n## Minimum Exemplar Set\n\nFor a complete style profile, collect at least:\n\n| Type | Purpose |\n|------|---------|\n| Explanation | How concepts are introduced |\n| Instruction | How steps are given |\n| Transition | How sections connect |\n\nFor narrative content, add:\n\n| Type | Purpose |\n|------|---------|\n| Description | Scene/object portrayal |\n| Dialogue | Character voice |\n| Action | Event pacing |\n\n## Usage in Generation\n\nWhen generating new content, present exemplars as reference:\n\n```\nWrite in a style similar to this passage:\n\n> [exemplar text]\n\nKey aspects to match:\n- Sentence length around X words\n- [Specific vocabulary preferences]\n- [Tone markers to include]\n- [Patterns to avoid]\n```\n\nFile v1.0.2:modules/feature-extraction.md\n\n---\nmodule: feature-extraction\ncategory: style-analysis\ndependencies: [Bash, Read]\nestimated_tokens: 400\n---\n\n# Feature Extraction Module\n\nQuantitative style metrics extraction from exemplar text.\n\n## Vocabulary Analysis\n\n```bash\n# Average word length\nawk '{for(i=1;i<=NF;i++){sum+=length($i);count++}}END{print sum/count}' file.md\n\n# Unique word ratio\nwords=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | wc -l)\nunique=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | sort -u | wc -l)\necho \"scale=2; $unique / $words\" | bc\n\n# Contraction count\ngrep -oE \"\\b\\w+'(t|s|d|ll|ve|re|m)\\b\" file.md | wc -l\n```\n\n## Sentence Analysis\n\n```python\nimport re\n\ndef analyze_sentences(text):\n    # Split on sentence boundaries\n    sentences = re.split(r'[.!?]+', text)\n    sentences = [s.strip() for s in sentences if s.strip()]\n\n    lengths = [len(s.split()) for s in sentences]\n\n    return {\n        'count': len(sentences),\n        'avg_length': sum(lengths) / len(lengths),\n        'min_length': min(lengths),\n        'max_length': max(lengths),\n        'std_dev': statistics.stdev(lengths) if len(lengths) > 1 else 0,\n        'questions': sum(1 for s in sentences if '?' in s),\n        'fragments': sum(1 for l in lengths if l < 5)\n    }\n```\n\n## Structural Analysis\n\n```bash\n# Paragraph lengths (sentences per paragraph)\nawk -v RS='\\n\\n' '{\n    gsub(/[.!?]/, \"&\\n\");\n    n = split($0, a, \"\\n\");\n    print n\n}' file.md\n\n# List ratio\nbullets=$(grep -c '^\\s*[-*]' file.md)\ntotal=$(wc -l < file.md)\necho \"scale=2; $bullets / $total\" | bc\n\n# Header depth\ngrep -E '^#{1,6}\\s' file.md | head -1 | grep -o '#' | wc -c\n```\n\n## Punctuation Profile\n\n```bash\n# Per 1000 words\nwords=$(wc -w < file.md)\n\nem_dashes=$(grep -o '—' file.md | wc -l)\nsemicolons=$(grep -o ';' file.md | wc -l)\nexclamations=$(grep -o '!' file.md | wc -l)\ncolons=$(grep -o ':' file.md | wc -l)\n\necho \"Em dashes: $((em_dashes * 1000 / words)) per 1000\"\necho \"Semicolons: $((semicolons * 1000 / words)) per 1000\"\n```\n\n## Output Format\n\n```yaml\nvocabulary:\n  avg_word_length: 5.2\n  unique_ratio: 0.42\n  contraction_rate: 3.5  # per 100 sentences\n\nsentences:\n  avg_length: 18.4\n  std_dev: 8.2\n  question_rate: 2.1  # per 100\n  fragment_rate: 1.5  # per 100\n\nstructure:\n  avg_paragraph_sentences: 4.2\n  list_ratio: 0.15\n  max_header_depth: 3\n\npunctuation:\n  em_dash_rate: 1.8  # per 1000 words\n  semicolon_rate: 0.5\n  exclamation_rate: 0.2\n```\n\nFile v1.0.2:modules/style-application.md\n\n---\nmodule: style-application\ncategory: writing-quality\ndependencies: [Write, Edit]\nestimated_tokens: 350\n---\n\n# Style Application Module\n\nApply learned style profiles to new content generation and editing.\n\n## Generation Prompting\n\nWhen generating new content with a style profile:\n\n```markdown\n## Style Guidelines\n\n**Voice**: [profile.voice.tone] with [profile.voice.perspective] perspective\n\n**Sentence targets**:\n- Average length: [profile.sentences.average_length] words\n- Vary between [min] and [max]\n- [Fragment guidance from profile]\n\n**Vocabulary**:\n- Prefer: [profile.vocabulary.preferred_terms]\n- Avoid: [profile.vocabulary.avoided_terms]\n- Contractions: [profile.vocabulary.contractions]\n\n**Structure**:\n- Paragraphs: [profile.structure.paragraphs]\n- Lists: [profile.structure.lists]\n\n**Reference exemplar**:\n> [Most relevant exemplar passage]\n\n**Anti-patterns** (will be checked by slop-detector):\n[profile.anti_patterns]\n```\n\n## Editing to Match Style\n\nWhen editing existing content to match a profile:\n\n### Step 1: Measure Current State\n\nExtract metrics from current content and compare to profile.\n\n| Metric | Current | Target | Gap |\n|--------|---------|--------|-----|\n| Avg sentence length | 24 | 18 | -6 |\n| Contraction rate | 0.5 | 3.5 | +3.0 |\n| List ratio | 0.45 | 0.15 | -0.30 |\n\n### Step 2: Prioritize Changes\n\n1. **High gap** metrics first\n2. **Anti-pattern** violations\n3. **Vocabulary** substitutions\n4. **Structural** adjustments\n\n### Step 3: Section-by-Section Editing\n\nFor each section:\n1. Show current metrics\n2. Propose specific changes\n3. Present exemplar for reference\n4. Wait for approval\n5. Apply changes\n6. Re-measure\n\n## Validation Loop\n\nAfter applying style:\n\n```\n1. Run slop-detector on output\n2. Re-extract metrics\n3. Compare to profile targets\n4. Flag remaining gaps > 20%\n5. Iterate if needed\n```\n\n## Style Drift Detection\n\nFor ongoing content:\n\n```bash\n# Compare new content metrics to profile\nnew_metrics=$(extract_metrics new-doc.md)\nprofile_metrics=$(cat .scribe/style-profile.yaml)\n\n# Alert if drift > threshold\nif [ $avg_sentence_diff -gt 5 ]; then\n    echo \"WARNING: Sentence length drifting from profile\"\nfi\n```\n\n## Integration Points\n\n| Tool | Integration |\n|------|-------------|\n| slop-detector | Validate anti-patterns |\n| doc-generator | Apply during generation |\n| pre-commit | Check style conformance |\n\nFile v1.0.2:skill-card.md\n\n## Description: <br>\nLearns writing style patterns from exemplar text and produces reusable guidance for consistent style application. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[athola](https://clawhub.ai/user/athola) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nWriters, editors, and developers use this skill to analyze exemplar text, extract style metrics, select representative passages, and build a style profile for generating or editing content in a consistent voice. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Exemplar text may contain sensitive or proprietary writing samples. <br>\nMitigation: Provide only exemplar text you are comfortable having analyzed and stored in a style profile. <br>\nRisk: Generated style profiles may overfit, misrepresent, or expose traits from the supplied examples. <br>\nMitigation: Review generated style profiles and exemplar selections before reuse. <br>\nRisk: Broad writing-related trigger words may activate the skill when style learning is not intended. <br>\nMitigation: Confirm the requested task before collecting examples or editing profile files. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/athola/nm-scribe-style-learner) <br>\n- [OpenClaw metadata homepage](https://github.com/athola/claude-night-market/tree/master/plugins/scribe) <br>\n- [Feature extraction module](artifact/modules/feature-extraction.md) <br>\n- [Exemplar reference module](artifact/modules/exemplar-reference.md) <br>\n- [Style application module](artifact/modules/style-application.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, Configuration, Guidance] <br>\n**Output Format:** [Markdown style profiles, analysis notes, exemplar selections, and editing guidance] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May create or edit style profiles from user-provided exemplar text.] <br>\n\n## Skill Version(s): <br>\n1.0.2 (source: server release metadata; artifact frontmatter reports upstream 1.9.5) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.1: 5 files, 7022 bytes\n\nFiles: modules/exemplar-reference.md (2317b), modules/feature-extraction.md (2393b), modules/style-application.md (2362b), SKILL.md (6611b), _meta.json (142b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: style-learner\ndescription: Learn and extract writing style patterns from exemplar text for consistent\nversion: 1.9.4\ntriggers:\n  - style\n  - voice\n  - tone\n  - exemplar\n  - learning\n  - consistency\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/scribe\", \"emoji\": \"\\u270d\\ufe0f\", \"requires\": {\"config\": [\"night-market.scribe:shared\", \"night-market.scribe:slop-detector\"]}}}\nsource: claude-night-market\nsource_plugin: scribe\n---\n\n> **Night Market Skill** — ported from [claude-night-market/scribe](https://github.com/athola/claude-night-market/tree/master/plugins/scribe). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Style Learning Skill\n\nExtract and codify writing style from exemplar text for consistent application.\n\n## Approach: Feature Extraction + Exemplar Reference\n\nThis skill combines two complementary methods:\n\n1. **Feature Extraction**: Quantifiable style metrics (sentence length, vocabulary complexity, structural patterns)\n2. **Exemplar Reference**: Specific passages that demonstrate desired style\n\nTogether, these create a comprehensive style profile that can guide content generation and editing.\n\n## Required TodoWrite Items\n\n1. `style-learner:exemplar-collected` - Source texts gathered\n2. `style-learner:features-extracted` - Quantitative metrics computed\n3. `style-learner:exemplars-selected` - Representative passages identified\n4. `style-learner:profile-generated` - Style guide created\n5. `style-learner:validation-complete` - Profile tested against new content\n\n## Step 1: Collect Exemplar Text\n\nGather representative samples of the target style.\n\n**Minimum requirements**:\n- At least 1000 words of exemplar text\n- Multiple samples preferred (shows consistency)\n- Same genre/context as target output\n\n```markdown\n## Exemplar Sources\n\n| Source | Word Count | Type |\n|--------|------------|------|\n| README.md | 850 | Technical |\n| blog-post-1.md | 1200 | Narrative |\n| api-guide.md | 2100 | Reference |\n```\n\n## Step 2: Feature Extraction\n\nLoad: `@modules/feature-extraction.md`\n\n### Vocabulary Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Average word length | chars/word | Complexity level |\n| Unique word ratio | unique/total | Vocabulary breadth |\n| Jargon density | technical terms/100 words | Audience level |\n| Contraction rate | contractions/sentences | Formality |\n\n### Sentence Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Average length | words/sentence | Complexity |\n| Length variance | std dev of lengths | Natural variation |\n| Question frequency | questions/100 sentences | Engagement style |\n| Fragment usage | fragments/100 sentences | Stylistic punch |\n\n### Structural Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Paragraph length | sentences/paragraph | Density |\n| List ratio | bullet lines/total lines | Format preference |\n| Header depth | max header level | Organization style |\n| Code block frequency | code blocks/1000 words | Technical density |\n\n### Punctuation Profile\n\n| Metric | Normal Range | Style Indicator |\n|--------|--------------|-----------------|\n| Em dash rate | 0-3/1000 words | Parenthetical style |\n| Semicolon rate | 0-2/1000 words | Formal complexity |\n| Exclamation rate | 0-1/1000 words | Enthusiasm level |\n| Ellipsis rate | 0-1/1000 words | Trailing thought style |\n\n## Step 3: Exemplar Selection\n\nLoad: `@modules/exemplar-reference.md`\n\nSelect 3-5 passages (50-150 words each) that best represent the target style.\n\n**Selection criteria**:\n- Demonstrates characteristic sentence rhythm\n- Shows typical vocabulary choices\n- Represents the desired tone\n- Avoids atypical or exceptional passages\n\n### Exemplar Template\n\n```markdown\n### Exemplar 1: [Label]\n**Source**: [filename, lines X-Y]\n**Demonstrates**: [what aspect of style]\n\n> [Quoted passage]\n\n**Key characteristics**:\n- [Observation 1]\n- [Observation 2]\n```\n\n## Step 4: Generate Style Profile\n\nCombine extracted features and exemplars into a usable style guide.\n\n### Profile Format\n\n```yaml\n# Style Profile: [Name]\n# Generated: [Date]\n# Exemplar sources: [List]\n\nvoice:\n  tone: [professional/casual/academic/conversational]\n  perspective: [first-person/third-person/second-person]\n  formality: [formal/neutral/informal]\n\nvocabulary:\n  average_word_length: X.X\n  jargon_level: [none/light/moderate/heavy]\n  contractions: [avoid/occasional/frequent]\n  preferred_terms:\n    - \"use\" over \"utilize\"\n    - \"help\" over \"facilitate\"\n  avoided_terms:\n    - delve\n    - leverage\n    - comprehensive\n\nsentences:\n  average_length: XX words\n  length_variance: [low/medium/high]\n  fragments_allowed: [yes/no/sparingly]\n  questions_used: [yes/no/sparingly]\n\nstructure:\n  paragraphs: [short/medium/long] (X-Y sentences)\n  lists: [prefer prose/balanced/prefer lists]\n  headers: [descriptive/terse/question-style]\n\npunctuation:\n  em_dashes: [avoid/sparingly/freely]\n  semicolons: [avoid/sparingly/freely]\n  oxford_comma: [yes/no]\n\nexemplars:\n  - label: \"[Exemplar 1 label]\"\n    text: |\n      [Quoted passage]\n  - label: \"[Exemplar 2 label]\"\n    text: |\n      [Quoted passage]\n\nanti_patterns:\n  - [Pattern to avoid 1]\n  - [Pattern to avoid 2]\n```\n\n## Step 5: Validation\n\nTest the profile against new content:\n\n1. Generate sample content using the profile\n2. Compare metrics to extracted features\n3. Have user evaluate voice/tone match\n4. Refine profile based on feedback\n\n### Validation Checklist\n\n- [ ] Metrics within 20% of exemplar averages\n- [ ] No anti-pattern violations\n- [ ] Tone matches user expectation\n- [ ] Vocabulary aligns with exemplars\n- [ ] Structure follows profile guidelines\n\n## Usage in Generation\n\nWhen generating new content, reference the profile:\n\n```markdown\nGenerate [content type] following the style profile:\n- Voice: [from profile]\n- Sentence length: target ~[X] words, vary between [Y-Z]\n- Use exemplar passage as tone reference:\n  > [exemplar quote]\n- Avoid: [anti-patterns from profile]\n```\n\n## Module Reference\n\n- See `modules/style-application.md` for applying learned styles to new content\n\n## Integration with slop-detector\n\nAfter generating content, run slop-detector to verify:\n1. No AI markers introduced\n2. Style metrics match profile\n3. Anti-patterns avoided\n\n## Exit Criteria\n\n- Style profile document created\n- At least 3 exemplar passages included\n- Quantitative metrics extracted\n- Anti-patterns from slop-detector integrated\n- Validation test passed\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-scribe-style-learner\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1778077319795\n}\n\nFile v1.0.1:modules/exemplar-reference.md\n\n---\nmodule: exemplar-reference\ncategory: style-analysis\ndependencies: [Read]\nestimated_tokens: 350\n---\n\n# Exemplar Reference Module\n\nSelect and document representative passages for style guidance.\n\n## Selection Criteria\n\nChoose passages that demonstrate:\n\n1. **Characteristic rhythm**: Sentence length variation patterns\n2. **Vocabulary choices**: Typical word selection\n3. **Tone markers**: How formality/informality is expressed\n4. **Structural preferences**: Paragraph and list usage\n\n## Anti-Selection Criteria\n\nAvoid passages that:\n\n- Are atypically long or short\n- Contain unusual formatting\n- Quote external sources\n- Are transitional/boilerplate\n- Contain code blocks (unless style includes code)\n\n## Passage Length\n\nOptimal exemplar length: **50-150 words**\n\n- Too short: Insufficient pattern demonstration\n- Too long: Dilutes key characteristics\n\n## Annotation Format\n\n```markdown\n### Exemplar: Technical Explanation\n\n**Source**: docs/architecture.md, lines 45-52\n**Word count**: 87\n**Demonstrates**: Concise technical explanation with grounded examples\n\n> The cache layer sits between the API and database. When a request\n> arrives, we check Redis first. Cache hits return in under 5ms;\n> misses fall through to Postgres, adding 50-200ms depending on\n> query complexity. We chose Redis over Memcached for its richer\n> data structures—sorted sets power our leaderboard feature.\n\n**Key characteristics**:\n- Short, direct sentences (avg 12 words)\n- Specific numbers (5ms, 50-200ms)\n- One em dash for aside\n- Trade-off explanation (\"chose X over Y because\")\n- No filler phrases\n- Technical but accessible\n```\n\n## Minimum Exemplar Set\n\nFor a complete style profile, collect at least:\n\n| Type | Purpose |\n|------|---------|\n| Explanation | How concepts are introduced |\n| Instruction | How steps are given |\n| Transition | How sections connect |\n\nFor narrative content, add:\n\n| Type | Purpose |\n|------|---------|\n| Description | Scene/object portrayal |\n| Dialogue | Character voice |\n| Action | Event pacing |\n\n## Usage in Generation\n\nWhen generating new content, present exemplars as reference:\n\n```\nWrite in a style similar to this passage:\n\n> [exemplar text]\n\nKey aspects to match:\n- Sentence length around X words\n- [Specific vocabulary preferences]\n- [Tone markers to include]\n- [Patterns to avoid]\n```\n\nFile v1.0.1:modules/feature-extraction.md\n\n---\nmodule: feature-extraction\ncategory: style-analysis\ndependencies: [Bash, Read]\nestimated_tokens: 400\n---\n\n# Feature Extraction Module\n\nQuantitative style metrics extraction from exemplar text.\n\n## Vocabulary Analysis\n\n```bash\n# Average word length\nawk '{for(i=1;i<=NF;i++){sum+=length($i);count++}}END{print sum/count}' file.md\n\n# Unique word ratio\nwords=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | wc -l)\nunique=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | sort -u | wc -l)\necho \"scale=2; $unique / $words\" | bc\n\n# Contraction count\ngrep -oE \"\\b\\w+'(t|s|d|ll|ve|re|m)\\b\" file.md | wc -l\n```\n\n## Sentence Analysis\n\n```python\nimport re\n\ndef analyze_sentences(text):\n    # Split on sentence boundaries\n    sentences = re.split(r'[.!?]+', text)\n    sentences = [s.strip() for s in sentences if s.strip()]\n\n    lengths = [len(s.split()) for s in sentences]\n\n    return {\n        'count': len(sentences),\n        'avg_length': sum(lengths) / len(lengths),\n        'min_length': min(lengths),\n        'max_length': max(lengths),\n        'std_dev': statistics.stdev(lengths) if len(lengths) > 1 else 0,\n        'questions': sum(1 for s in sentences if '?' in s),\n        'fragments': sum(1 for l in lengths if l < 5)\n    }\n```\n\n## Structural Analysis\n\n```bash\n# Paragraph lengths (sentences per paragraph)\nawk -v RS='\\n\\n' '{\n    gsub(/[.!?]/, \"&\\n\");\n    n = split($0, a, \"\\n\");\n    print n\n}' file.md\n\n# List ratio\nbullets=$(grep -c '^\\s*[-*]' file.md)\ntotal=$(wc -l < file.md)\necho \"scale=2; $bullets / $total\" | bc\n\n# Header depth\ngrep -E '^#{1,6}\\s' file.md | head -1 | grep -o '#' | wc -c\n```\n\n## Punctuation Profile\n\n```bash\n# Per 1000 words\nwords=$(wc -w < file.md)\n\nem_dashes=$(grep -o '—' file.md | wc -l)\nsemicolons=$(grep -o ';' file.md | wc -l)\nexclamations=$(grep -o '!' file.md | wc -l)\ncolons=$(grep -o ':' file.md | wc -l)\n\necho \"Em dashes: $((em_dashes * 1000 / words)) per 1000\"\necho \"Semicolons: $((semicolons * 1000 / words)) per 1000\"\n```\n\n## Output Format\n\n```yaml\nvocabulary:\n  avg_word_length: 5.2\n  unique_ratio: 0.42\n  contraction_rate: 3.5  # per 100 sentences\n\nsentences:\n  avg_length: 18.4\n  std_dev: 8.2\n  question_rate: 2.1  # per 100\n  fragment_rate: 1.5  # per 100\n\nstructure:\n  avg_paragraph_sentences: 4.2\n  list_ratio: 0.15\n  max_header_depth: 3\n\npunctuation:\n  em_dash_rate: 1.8  # per 1000 words\n  semicolon_rate: 0.5\n  exclamation_rate: 0.2\n```\n\nFile v1.0.1:modules/style-application.md\n\n---\nmodule: style-application\ncategory: writing-quality\ndependencies: [Write, Edit]\nestimated_tokens: 350\n---\n\n# Style Application Module\n\nApply learned style profiles to new content generation and editing.\n\n## Generation Prompting\n\nWhen generating new content with a style profile:\n\n```markdown\n## Style Guidelines\n\n**Voice**: [profile.voice.tone] with [profile.voice.perspective] perspective\n\n**Sentence targets**:\n- Average length: [profile.sentences.average_length] words\n- Vary between [min] and [max]\n- [Fragment guidance from profile]\n\n**Vocabulary**:\n- Prefer: [profile.vocabulary.preferred_terms]\n- Avoid: [profile.vocabulary.avoided_terms]\n- Contractions: [profile.vocabulary.contractions]\n\n**Structure**:\n- Paragraphs: [profile.structure.paragraphs]\n- Lists: [profile.structure.lists]\n\n**Reference exemplar**:\n> [Most relevant exemplar passage]\n\n**Anti-patterns** (will be checked by slop-detector):\n[profile.anti_patterns]\n```\n\n## Editing to Match Style\n\nWhen editing existing content to match a profile:\n\n### Step 1: Measure Current State\n\nExtract metrics from current content and compare to profile.\n\n| Metric | Current | Target | Gap |\n|--------|---------|--------|-----|\n| Avg sentence length | 24 | 18 | -6 |\n| Contraction rate | 0.5 | 3.5 | +3.0 |\n| List ratio | 0.45 | 0.15 | -0.30 |\n\n### Step 2: Prioritize Changes\n\n1. **High gap** metrics first\n2. **Anti-pattern** violations\n3. **Vocabulary** substitutions\n4. **Structural** adjustments\n\n### Step 3: Section-by-Section Editing\n\nFor each section:\n1. Show current metrics\n2. Propose specific changes\n3. Present exemplar for reference\n4. Wait for approval\n5. Apply changes\n6. Re-measure\n\n## Validation Loop\n\nAfter applying style:\n\n```\n1. Run slop-detector on output\n2. Re-extract metrics\n3. Compare to profile targets\n4. Flag remaining gaps > 20%\n5. Iterate if needed\n```\n\n## Style Drift Detection\n\nFor ongoing content:\n\n```bash\n# Compare new content metrics to profile\nnew_metrics=$(extract_metrics new-doc.md)\nprofile_metrics=$(cat .scribe/style-profile.yaml)\n\n# Alert if drift > threshold\nif [ $avg_sentence_diff -gt 5 ]; then\n    echo \"WARNING: Sentence length drifting from profile\"\nfi\n```\n\n## Integration Points\n\n| Tool | Integration |\n|------|-------------|\n| slop-detector | Validate anti-patterns |\n| doc-generator | Apply during generation |\n| pre-commit | Check style conformance |\n\nArchive v1.0.0: 5 files, 7023 bytes\n\nFiles: modules/exemplar-reference.md (2317b), modules/feature-extraction.md (2393b), modules/style-application.md (2362b), SKILL.md (6611b), _meta.json (142b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: style-learner\ndescription: Learn and extract writing style patterns from exemplar text for consistent\nversion: 1.8.2\ntriggers:\n  - style\n  - voice\n  - tone\n  - exemplar\n  - learning\n  - consistency\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/scribe\", \"emoji\": \"\\u270d\\ufe0f\", \"requires\": {\"config\": [\"night-market.scribe:shared\", \"night-market.scribe:slop-detector\"]}}}\nsource: claude-night-market\nsource_plugin: scribe\n---\n\n> **Night Market Skill** — ported from [claude-night-market/scribe](https://github.com/athola/claude-night-market/tree/master/plugins/scribe). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Style Learning Skill\n\nExtract and codify writing style from exemplar text for consistent application.\n\n## Approach: Feature Extraction + Exemplar Reference\n\nThis skill combines two complementary methods:\n\n1. **Feature Extraction**: Quantifiable style metrics (sentence length, vocabulary complexity, structural patterns)\n2. **Exemplar Reference**: Specific passages that demonstrate desired style\n\nTogether, these create a comprehensive style profile that can guide content generation and editing.\n\n## Required TodoWrite Items\n\n1. `style-learner:exemplar-collected` - Source texts gathered\n2. `style-learner:features-extracted` - Quantitative metrics computed\n3. `style-learner:exemplars-selected` - Representative passages identified\n4. `style-learner:profile-generated` - Style guide created\n5. `style-learner:validation-complete` - Profile tested against new content\n\n## Step 1: Collect Exemplar Text\n\nGather representative samples of the target style.\n\n**Minimum requirements**:\n- At least 1000 words of exemplar text\n- Multiple samples preferred (shows consistency)\n- Same genre/context as target output\n\n```markdown\n## Exemplar Sources\n\n| Source | Word Count | Type |\n|--------|------------|------|\n| README.md | 850 | Technical |\n| blog-post-1.md | 1200 | Narrative |\n| api-guide.md | 2100 | Reference |\n```\n\n## Step 2: Feature Extraction\n\nLoad: `@modules/feature-extraction.md`\n\n### Vocabulary Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Average word length | chars/word | Complexity level |\n| Unique word ratio | unique/total | Vocabulary breadth |\n| Jargon density | technical terms/100 words | Audience level |\n| Contraction rate | contractions/sentences | Formality |\n\n### Sentence Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Average length | words/sentence | Complexity |\n| Length variance | std dev of lengths | Natural variation |\n| Question frequency | questions/100 sentences | Engagement style |\n| Fragment usage | fragments/100 sentences | Stylistic punch |\n\n### Structural Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Paragraph length | sentences/paragraph | Density |\n| List ratio | bullet lines/total lines | Format preference |\n| Header depth | max header level | Organization style |\n| Code block frequency | code blocks/1000 words | Technical density |\n\n### Punctuation Profile\n\n| Metric | Normal Range | Style Indicator |\n|--------|--------------|-----------------|\n| Em dash rate | 0-3/1000 words | Parenthetical style |\n| Semicolon rate | 0-2/1000 words | Formal complexity |\n| Exclamation rate | 0-1/1000 words | Enthusiasm level |\n| Ellipsis rate | 0-1/1000 words | Trailing thought style |\n\n## Step 3: Exemplar Selection\n\nLoad: `@modules/exemplar-reference.md`\n\nSelect 3-5 passages (50-150 words each) that best represent the target style.\n\n**Selection criteria**:\n- Demonstrates characteristic sentence rhythm\n- Shows typical vocabulary choices\n- Represents the desired tone\n- Avoids atypical or exceptional passages\n\n### Exemplar Template\n\n```markdown\n### Exemplar 1: [Label]\n**Source**: [filename, lines X-Y]\n**Demonstrates**: [what aspect of style]\n\n> [Quoted passage]\n\n**Key characteristics**:\n- [Observation 1]\n- [Observation 2]\n```\n\n## Step 4: Generate Style Profile\n\nCombine extracted features and exemplars into a usable style guide.\n\n### Profile Format\n\n```yaml\n# Style Profile: [Name]\n# Generated: [Date]\n# Exemplar sources: [List]\n\nvoice:\n  tone: [professional/casual/academic/conversational]\n  perspective: [first-person/third-person/second-person]\n  formality: [formal/neutral/informal]\n\nvocabulary:\n  average_word_length: X.X\n  jargon_level: [none/light/moderate/heavy]\n  contractions: [avoid/occasional/frequent]\n  preferred_terms:\n    - \"use\" over \"utilize\"\n    - \"help\" over \"facilitate\"\n  avoided_terms:\n    - delve\n    - leverage\n    - comprehensive\n\nsentences:\n  average_length: XX words\n  length_variance: [low/medium/high]\n  fragments_allowed: [yes/no/sparingly]\n  questions_used: [yes/no/sparingly]\n\nstructure:\n  paragraphs: [short/medium/long] (X-Y sentences)\n  lists: [prefer prose/balanced/prefer lists]\n  headers: [descriptive/terse/question-style]\n\npunctuation:\n  em_dashes: [avoid/sparingly/freely]\n  semicolons: [avoid/sparingly/freely]\n  oxford_comma: [yes/no]\n\nexemplars:\n  - label: \"[Exemplar 1 label]\"\n    text: |\n      [Quoted passage]\n  - label: \"[Exemplar 2 label]\"\n    text: |\n      [Quoted passage]\n\nanti_patterns:\n  - [Pattern to avoid 1]\n  - [Pattern to avoid 2]\n```\n\n## Step 5: Validation\n\nTest the profile against new content:\n\n1. Generate sample content using the profile\n2. Compare metrics to extracted features\n3. Have user evaluate voice/tone match\n4. Refine profile based on feedback\n\n### Validation Checklist\n\n- [ ] Metrics within 20% of exemplar averages\n- [ ] No anti-pattern violations\n- [ ] Tone matches user expectation\n- [ ] Vocabulary aligns with exemplars\n- [ ] Structure follows profile guidelines\n\n## Usage in Generation\n\nWhen generating new content, reference the profile:\n\n```markdown\nGenerate [content type] following the style profile:\n- Voice: [from profile]\n- Sentence length: target ~[X] words, vary between [Y-Z]\n- Use exemplar passage as tone reference:\n  > [exemplar quote]\n- Avoid: [anti-patterns from profile]\n```\n\n## Module Reference\n\n- See `modules/style-application.md` for applying learned styles to new content\n\n## Integration with slop-detector\n\nAfter generating content, run slop-detector to verify:\n1. No AI markers introduced\n2. Style metrics match profile\n3. Anti-patterns avoided\n\n## Exit Criteria\n\n- Style profile document created\n- At least 3 exemplar passages included\n- Quantitative metrics extracted\n- Anti-patterns from slop-detector integrated\n- Validation test passed\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-scribe-style-learner\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1776697295464\n}\n\nFile v1.0.0:modules/exemplar-reference.md\n\n---\nmodule: exemplar-reference\ncategory: style-analysis\ndependencies: [Read]\nestimated_tokens: 350\n---\n\n# Exemplar Reference Module\n\nSelect and document representative passages for style guidance.\n\n## Selection Criteria\n\nChoose passages that demonstrate:\n\n1. **Characteristic rhythm**: Sentence length variation patterns\n2. **Vocabulary choices**: Typical word selection\n3. **Tone markers**: How formality/informality is expressed\n4. **Structural preferences**: Paragraph and list usage\n\n## Anti-Selection Criteria\n\nAvoid passages that:\n\n- Are atypically long or short\n- Contain unusual formatting\n- Quote external sources\n- Are transitional/boilerplate\n- Contain code blocks (unless style includes code)\n\n## Passage Length\n\nOptimal exemplar length: **50-150 words**\n\n- Too short: Insufficient pattern demonstration\n- Too long: Dilutes key characteristics\n\n## Annotation Format\n\n```markdown\n### Exemplar: Technical Explanation\n\n**Source**: docs/architecture.md, lines 45-52\n**Word count**: 87\n**Demonstrates**: Concise technical explanation with grounded examples\n\n> The cache layer sits between the API and database. When a request\n> arrives, we check Redis first. Cache hits return in under 5ms;\n> misses fall through to Postgres, adding 50-200ms depending on\n> query complexity. We chose Redis over Memcached for its richer\n> data structures—sorted sets power our leaderboard feature.\n\n**Key characteristics**:\n- Short, direct sentences (avg 12 words)\n- Specific numbers (5ms, 50-200ms)\n- One em dash for aside\n- Trade-off explanation (\"chose X over Y because\")\n- No filler phrases\n- Technical but accessible\n```\n\n## Minimum Exemplar Set\n\nFor a complete style profile, collect at least:\n\n| Type | Purpose |\n|------|---------|\n| Explanation | How concepts are introduced |\n| Instruction | How steps are given |\n| Transition | How sections connect |\n\nFor narrative content, add:\n\n| Type | Purpose |\n|------|---------|\n| Description | Scene/object portrayal |\n| Dialogue | Character voice |\n| Action | Event pacing |\n\n## Usage in Generation\n\nWhen generating new content, present exemplars as reference:\n\n```\nWrite in a style similar to this passage:\n\n> [exemplar text]\n\nKey aspects to match:\n- Sentence length around X words\n- [Specific vocabulary preferences]\n- [Tone markers to include]\n- [Patterns to avoid]\n```\n\nFile v1.0.0:modules/feature-extraction.md\n\n---\nmodule: feature-extraction\ncategory: style-analysis\ndependencies: [Bash, Read]\nestimated_tokens: 400\n---\n\n# Feature Extraction Module\n\nQuantitative style metrics extraction from exemplar text.\n\n## Vocabulary Analysis\n\n```bash\n# Average word length\nawk '{for(i=1;i<=NF;i++){sum+=length($i);count++}}END{print sum/count}' file.md\n\n# Unique word ratio\nwords=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | wc -l)\nunique=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | sort -u | wc -l)\necho \"scale=2; $unique / $words\" | bc\n\n# Contraction count\ngrep -oE \"\\b\\w+'(t|s|d|ll|ve|re|m)\\b\" file.md | wc -l\n```\n\n## Sentence Analysis\n\n```python\nimport re\n\ndef analyze_sentences(text):\n    # Split on sentence boundaries\n    sentences = re.split(r'[.!?]+', text)\n    sentences = [s.strip() for s in sentences if s.strip()]\n\n    lengths = [len(s.split()) for s in sentences]\n\n    return {\n        'count': len(sentences),\n        'avg_length': sum(lengths) / len(lengths),\n        'min_length': min(lengths),\n        'max_length': max(lengths),\n        'std_dev': statistics.stdev(lengths) if len(lengths) > 1 else 0,\n        'questions': sum(1 for s in sentences if '?' in s),\n        'fragments': sum(1 for l in lengths if l < 5)\n    }\n```\n\n## Structural Analysis\n\n```bash\n# Paragraph lengths (sentences per paragraph)\nawk -v RS='\\n\\n' '{\n    gsub(/[.!?]/, \"&\\n\");\n    n = split($0, a, \"\\n\");\n    print n\n}' file.md\n\n# List ratio\nbullets=$(grep -c '^\\s*[-*]' file.md)\ntotal=$(wc -l < file.md)\necho \"scale=2; $bullets / $total\" | bc\n\n# Header depth\ngrep -E '^#{1,6}\\s' file.md | head -1 | grep -o '#' | wc -c\n```\n\n## Punctuation Profile\n\n```bash\n# Per 1000 words\nwords=$(wc -w < file.md)\n\nem_dashes=$(grep -o '—' file.md | wc -l)\nsemicolons=$(grep -o ';' file.md | wc -l)\nexclamations=$(grep -o '!' file.md | wc -l)\ncolons=$(grep -o ':' file.md | wc -l)\n\necho \"Em dashes: $((em_dashes * 1000 / words)) per 1000\"\necho \"Semicolons: $((semicolons * 1000 / words)) per 1000\"\n```\n\n## Output Format\n\n```yaml\nvocabulary:\n  avg_word_length: 5.2\n  un","readmeExcerpt":"Skill: style-learner Owner: athola Summary: Extracts writing style patterns from exemplar text into a reusable profile Tags: latest:1.9.19 Version history: v1.9.19 | 2026-08-26T13:22:10.842Z | user Release v1.9.19 v1.9.17 | 2026-07-30T05:42:06.379Z | user Release v1.9.17 v1.9.16 | 2026-07-14T19:58:55.224Z | user Release v1.9.16 v1.9.14 | 2026-06-30T18:06:33.094Z | user Release v1.9.14 v1.9.13 | 2026-06-27T16:24:16.44","codeSnippets":[],"executableExamples":[{"language":"markdown","snippet":"## Exemplar Sources\n\n| Source | Word Count | Type |\n|--------|------------|------|\n| README.md | 850 | Technical |\n| blog-post-1.md | 1200 | Narrative |\n| api-guide.md | 2100 | Reference |"},{"language":"markdown","snippet":"### Exemplar 1: [Label]\n**Source**: [filename, lines X-Y]\n**Demonstrates**: [what aspect of style]\n\n> [Quoted passage]\n\n**Key characteristics**:\n- [Observation 1]\n- [Observation 2]"},{"language":"yaml","snippet":"# Style Profile: [Name]\n# Generated: [Date]\n# Exemplar sources: [List]\n\nvoice:\n  tone: [professional/casual/academic/conversational]\n  perspective: [first-person/third-person/second-person]\n  formality: [formal/neutral/informal]\n\nvocabulary:\n  average_word_length: X.X\n  jargon_level: [none/light/moderate/heavy]\n  contractions: [avoid/occasional/frequent]\n  preferred_terms:\n    - \"use\" over \"utilize\"\n    - \"help\" over \"facilitate\"\n  avoided_terms:\n    - delve\n    - leverage\n    - comprehensive\n\nsentences:\n  average_length: XX words\n  length_variance: [low/medium/high]\n  fragments_allowed: [yes/no/sparingly]\n  questions_used: [yes/no/sparingly]\n\nstructure:\n  paragraphs: [short/medium/long] (X-Y sentences)\n  lists: [prefer prose/balanced/prefer lists]\n  headers: [descriptive/terse/question-style]\n\npunctuation:\n  em_dashes: [avoid/sparingly/freely]\n  semicolons: [avoid/sparingly/freely]\n  oxford_comma: [yes/no]\n\nexemplars:\n  - label: \"[Exemplar 1 label]\"\n    text: |\n      [Quoted passage]\n  - label: \"[Exemplar 2 label]\"\n    text: |\n      [Quoted passage]\n\nanti_patterns:\n  - [Pattern to avoid 1]\n  - [Pattern to avoid 2]"},{"language":"markdown","snippet":"Generate [content type] following the style profile:\n- Voice: [from profile]\n- Sentence length: target ~[X] words, vary between [Y-Z]\n- Use exemplar passage as tone reference:\n  > [exemplar quote]\n- Avoid: [anti-patterns from profile]"},{"language":"markdown","snippet":"### Exemplar: Technical Explanation\n\n**Source**: docs/architecture.md, lines 45-52\n**Word count**: 87\n**Demonstrates**: Concise technical explanation with grounded examples\n\n> The cache layer sits between the API and database. When a request\n> arrives, we check Redis first. Cache hits return in under 5ms;\n> misses fall through to Postgres, adding 50-200ms depending on\n> query complexity. We chose Redis over Memcached for its richer\n> data structures—sorted sets power our leaderboard feature.\n\n**Key characteristics**:\n- Short, direct sentences (avg 12 words)\n- Specific numbers (5ms, 50-200ms)\n- One em dash for aside\n- Trade-off explanation (\"chose X over Y because\")\n- No filler phrases\n- Technical but accessible"},{"language":"text","snippet":"Write in a style similar to this passage:\n\n> [exemplar text]\n\nKey aspects to match:\n- Sentence length around X words\n- [Specific vocabulary preferences]\n- [Tone markers to include]\n- [Patterns to avoid]"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: style-learner\ndescription: Extracts writing style patterns from exemplar text into a reusable profile\nversion: 1.9.8\ntriggers:\n  - style\n  - voice\n  - tone\n  - exemplar\n  - learning\n  - consistency\n  - creating a style guide or learning a specific author's voice\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/scribe\", \"emoji\": \"\\u270d\\ufe0f\", \"requires\": {\"config\": [\"night-market.scribe:shared\", \"night-market.scribe:slop-detector\"]}}}\nsource: claude-night-market\nsource_plugin: scribe\n---\n\n> **Night Market Skill** — ported from [claude-night-market/scribe](https://github.com/athola/claude-night-market/tree/master/plugins/scribe). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# Style Learning Skill\n\n**A style profile is metrics plus exemplars. Either alone\nis too weak to reproduce a voice.**\n\nExtract style from exemplar text and codify it as a profile\nthat downstream skills (`scribe:doc-generator`,\n`scribe:voice-generate`) can apply consistently.\n\n## Approach: Feature Extraction and Exemplar Reference\n\nThe skill combines two methods because each fails alone:\n\n1. **Feature Extraction**: quantifiable metrics (sentence\n   length distribution, vocabulary complexity, structural\n   patterns). Reproducible but soulless.\n2. **Exemplar Reference**: specific passages that\n   demonstrate the target style. Vivid but hard to apply\n   at scale.\n\nTogether they form a profile precise enough to score new\ntext and rich enough to guide rewrites. Metrics catch what\nexemplars miss; exemplars carry what metrics flatten.\n\n## Required TodoWrite Items\n\n1. `style-learner:exemplar-collected` - Source texts gathered\n2. `style-learner:features-extracted` - Quantitative metrics computed\n3. `style-learner:exemplars-selected` - Representative passages identified\n4. `style-learner:profile-generated` - Style guide created\n5. `style-learner:validation-complete` - Profile tested against new content\n\n## Step 1: Collect Exemplar Text\n\nGather representative samples of the target style.\n\n**Minimum requirements**:\n- At least 1000 words of exemplar text\n- Multiple samples preferred (shows consistency)\n- Same genre/context as target output\n\n```markdown\n## Exemplar Sources\n\n| Source | Word Count | Type |\n|--------|------------|------|\n| README.md | 850 | Technical |\n| blog-post-1.md | 1200 | Narrative |\n| api-guide.md | 2100 | Reference |\n```\n\n## Step 2: Feature Extraction\n\nLoad: `@modules/feature-extraction.md`\n\n### Vocabulary Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| Average word length | chars/word | Complexity level |\n| Unique word ratio | unique/total | Vocabulary breadth |\n| Jargon density | technical terms/100 words | Audience level |\n| Contraction rate | contractions/sentences | Formality |\n\n### Sentence Metrics\n\n| Metric | How to Measure | What It Indicates |\n|--------|----------------|-------------------|\n| A"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-scribe-style-learner\",\n  \"version\": \"1.9.19\",\n  \"publishedAt\": 1787750530842\n}"},{"path":"modules/exemplar-reference.md","content":"---\nmodule: exemplar-reference\ncategory: style-analysis\ndependencies: [Read]\nestimated_tokens: 350\n---\n\n# Exemplar Reference Module\n\nSelect and document representative passages for style guidance.\n\n## Selection Criteria\n\nChoose passages that demonstrate:\n\n1. **Characteristic rhythm**: Sentence length variation patterns\n2. **Vocabulary choices**: Typical word selection\n3. **Tone markers**: How formality/informality is expressed\n4. **Structural preferences**: Paragraph and list usage\n\n## Anti-Selection Criteria\n\nAvoid passages that:\n\n- Are atypically long or short\n- Contain unusual formatting\n- Quote external sources\n- Are transitional/boilerplate\n- Contain code blocks (unless style includes code)\n\n## Passage Length\n\nOptimal exemplar length: **50-150 words**\n\n- Too short: Insufficient pattern demonstration\n- Too long: Dilutes key characteristics\n\n## Annotation Format\n\n```markdown\n### Exemplar: Technical Explanation\n\n**Source**: docs/architecture.md, lines 45-52\n**Word count**: 87\n**Demonstrates**: Concise technical explanation with grounded examples\n\n> The cache layer sits between the API and database. When a request\n> arrives, we check Redis first. Cache hits return in under 5ms;\n> misses fall through to Postgres, adding 50-200ms depending on\n> query complexity. We chose Redis over Memcached for its richer\n> data structures—sorted sets power our leaderboard feature.\n\n**Key characteristics**:\n- Short, direct sentences (avg 12 words)\n- Specific numbers (5ms, 50-200ms)\n- One em dash for aside\n- Trade-off explanation (\"chose X over Y because\")\n- No filler phrases\n- Technical but accessible\n```\n\n## Minimum Exemplar Set\n\nFor a complete style profile, collect at least:\n\n| Type | Purpose |\n|------|---------|\n| Explanation | How concepts are introduced |\n| Instruction | How steps are given |\n| Transition | How sections connect |\n\nFor narrative content, add:\n\n| Type | Purpose |\n|------|---------|\n| Description | Scene/object portrayal |\n| Dialogue | Character voice |\n| Action | Event pacing |\n\n## Usage in Generation\n\nWhen generating new content, present exemplars as reference:\n\n```\nWrite in a style similar to this passage:\n\n> [exemplar text]\n\nKey aspects to match:\n- Sentence length around X words\n- [Specific vocabulary preferences]\n- [Tone markers to include]\n- [Patterns to avoid]\n```"},{"path":"modules/feature-extraction.md","content":"---\nmodule: feature-extraction\ncategory: style-analysis\ndependencies: [Bash, Read]\nestimated_tokens: 400\n---\n\n# Feature Extraction Module\n\nQuantitative style metrics extraction from exemplar text.\n\n## Vocabulary Analysis\n\n```bash\n# Average word length\nawk '{for(i=1;i<=NF;i++){sum+=length($i);count++}}END{print sum/count}' file.md\n\n# Unique word ratio\nwords=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | wc -l)\nunique=$(tr '[:space:]' '\\n' < file.md | grep -v '^$' | sort -u | wc -l)\necho \"scale=2; $unique / $words\" | bc\n\n# Contraction count\ngrep -oE \"\\b\\w+'(t|s|d|ll|ve|re|m)\\b\" file.md | wc -l\n```\n\n## Sentence Analysis\n\n```python\nimport re\n\ndef analyze_sentences(text):\n    # Split on sentence boundaries\n    sentences = re.split(r'[.!?]+', text)\n    sentences = [s.strip() for s in sentences if s.strip()]\n\n    lengths = [len(s.split()) for s in sentences]\n\n    return {\n        'count': len(sentences),\n        'avg_length': sum(lengths) / len(lengths),\n        'min_length': min(lengths),\n        'max_length': max(lengths),\n        'std_dev': statistics.stdev(lengths) if len(lengths) > 1 else 0,\n        'questions': sum(1 for s in sentences if '?' in s),\n        'fragments': sum(1 for l in lengths if l < 5)\n    }\n```\n\n## Structural Analysis\n\n```bash\n# Paragraph lengths (sentences per paragraph)\nawk -v RS='\\n\\n' '{\n    gsub(/[.!?]/, \"&\\n\");\n    n = split($0, a, \"\\n\");\n    print n\n}' file.md\n\n# List ratio\nbullets=$(grep -c '^\\s*[-*]' file.md)\ntotal=$(wc -l < file.md)\necho \"scale=2; $bullets / $total\" | bc\n\n# Header depth\ngrep -E '^#{1,6}\\s' file.md | head -1 | grep -o '#' | wc -c\n```\n\n## Punctuation Profile\n\n```bash\n# Per 1000 words\nwords=$(wc -w < file.md)\n\nem_dashes=$(grep -o '—' file.md | wc -l)\nsemicolons=$(grep -o ';' file.md | wc -l)\nexclamations=$(grep -o '!' file.md | wc -l)\ncolons=$(grep -o ':' file.md | wc -l)\n\necho \"Em dashes: $((em_dashes * 1000 / words)) per 1000\"\necho \"Semicolons: $((semicolons * 1000 / words)) per 1000\"\n```\n\n## Output Format\n\n```yaml\nvocabulary:\n  avg_word_length: 5.2\n  unique_ratio: 0.42\n  contraction_rate: 3.5  # per 100 sentences\n\nsentences:\n  avg_length: 18.4\n  std_dev: 8.2\n  question_rate: 2.1  # per 100\n  fragment_rate: 1.5  # per 100\n\nstructure:\n  avg_paragraph_sentences: 4.2\n  list_ratio: 0.15\n  max_header_depth: 3\n\npunctuation:\n  em_dash_rate: 1.8  # per 1000 words\n  semicolon_rate: 0.5\n  exclamation_rate: 0.2\n```"},{"path":"modules/style-application.md","content":"---\nmodule: style-application\ncategory: writing-quality\ndependencies: [Write, Edit]\nestimated_tokens: 350\n---\n\n# Style Application Module\n\nApply learned style profiles to new content generation and editing.\n\n## Generation Prompting\n\nWhen generating new content with a style profile:\n\n```markdown\n## Style Guidelines\n\n**Voice**: [profile.voice.tone] with [profile.voice.perspective] perspective\n\n**Sentence targets**:\n- Average length: [profile.sentences.average_length] words\n- Vary between [min] and [max]\n- [Fragment guidance from profile]\n\n**Vocabulary**:\n- Prefer: [profile.vocabulary.preferred_terms]\n- Avoid: [profile.vocabulary.avoided_terms]\n- Contractions: [profile.vocabulary.contractions]\n\n**Structure**:\n- Paragraphs: [profile.structure.paragraphs]\n- Lists: [profile.structure.lists]\n\n**Reference exemplar**:\n> [Most relevant exemplar passage]\n\n**Anti-patterns** (will be checked by slop-detector):\n[profile.anti_patterns]\n```\n\n## Editing to Match Style\n\nWhen editing existing content to match a profile:\n\n### Step 1: Measure Current State\n\nExtract metrics from current content and compare to profile.\n\n| Metric | Current | Target | Gap |\n|--------|---------|--------|-----|\n| Avg sentence length | 24 | 18 | -6 |\n| Contraction rate | 0.5 | 3.5 | +3.0 |\n| List ratio | 0.45 | 0.15 | -0.30 |\n\n### Step 2: Prioritize Changes\n\n1. **High gap** metrics first\n2. **Anti-pattern** violations\n3. **Vocabulary** substitutions\n4. **Structural** adjustments\n\n### Step 3: Section-by-Section Editing\n\nFor each section:\n1. Show current metrics\n2. Propose specific changes\n3. Present exemplar for reference\n4. Wait for approval\n5. Apply changes\n6. Re-measure\n\n## Validation Loop\n\nAfter applying style:\n\n```\n1. Run slop-detector on output\n2. Re-extract metrics\n3. Compare to profile targets\n4. Flag remaining gaps > 20%\n5. Iterate if needed\n```\n\n## Style Drift Detection\n\nFor ongoing content:\n\n```bash\n# Compare new content metrics to profile\nnew_metrics=$(extract_metrics new-doc.md)\nprofile_metrics=$(cat .scribe/style-profile.yaml)\n\n# Alert if drift > threshold\nif [ $avg_sentence_diff -gt 5 ]; then\n    echo \"WARNING: Sentence length drifting from profile\"\nfi\n```\n\n## Integration Points\n\n| Tool | Integration |\n|------|-------------|\n| slop-detector | Validate anti-patterns |\n| doc-generator | Apply during generation |\n| pre-commit | Check style conformance |"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Extracts writing style patterns from exemplar text into a reusable profile Skill: style-learner Owner: athola Summary: Extracts writing style patterns from exemplar text into a reusable profile Tags: latest:1.9.19 Version history: v1.9.19 | 2026-08-26T13:22:10.842Z | user Release v1.9.19 v1.9.17 | 2026-07-30T05:42:06.379Z | user Release v1.9.17 v1.9.16 | 2026-07-14T19:58:55.224Z | user Release v1.9.16 v1.9.14 | 2026-06-30T18:06:33.094Z | user Release v1.9.14 v1.9.13 | 2026-06-27T16:24:16.44","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1087,"uniquenessScore":56,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T06:02:06.100Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-10T06:02:06.100Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T10:44:41.764Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}