plugins/style-guides/skills/style-guide-patterns/SKILL.md
# Style Guide Patterns ## The 10-Rule Principle A style guide with 100 rules is a style guide no one reads. A style guide with 10 high-impact rules, automated by Vale, will actually be followed. Before writing any rule, answer: "Is this in the base guide already (Google, Microsoft)?" If yes, do not duplicate it. Link to it. Write only the rules where you differ or extend. The 10 most impactful rules for most technical teams: 1. Person (second vs. third) 2. Tense (present vs. future) 3. Voice
npx skillsauth add hermeticormus/librecopy-claude-code plugins/style-guides/skills/style-guide-patternsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A style guide with 100 rules is a style guide no one reads. A style guide with 10 high-impact rules, automated by Vale, will actually be followed.
Before writing any rule, answer: "Is this in the base guide already (Google, Microsoft)?" If yes, do not duplicate it. Link to it. Write only the rules where you differ or extend.
The 10 most impactful rules for most technical teams:
Every rule needs a concrete example from your domain. Abstract rules are ignored:
# Bad rule: too abstract
Use active voice.
# Good rule: with domain-specific example
Use active voice.
Do: "The SDK throws `AuthenticationError` when the token expires."
Don't: "An `AuthenticationError` is thrown when the token has expired."
Why: Active voice identifies the actor (the SDK), which is what developers
need to know when debugging.
Automated: `.vale/styles/Custom/ActiveVoice.yml` (error level)
A terminology decision needs three things to stick:
# .vale/styles/Custom/Terminology.yml
extends: substitution
message: "Use '%s' instead of '%s'"
level: warning
action:
name: replace
swap:
"(?i)login": "sign in"
"(?i)log in": "sign in"
"(?i)whitelist": "allowlist"
"(?i)blacklist": "blocklist"
"(?i)sanity check": "quick check"
The (?i) makes the pattern case-insensitive. Test with vale sync && vale docs/.
Most style guides document voice OR tone, not both. Document both explicitly:
## Voice (Never Changes)
Our voice is: **clear, direct, technically honest**.
- Clear: We eliminate ambiguity before it reaches the reader.
- Direct: We say what we mean without hedging or softening.
- Technically honest: We acknowledge limitations, tradeoffs, and failures.
## Tone (Varies by Context)
The same voice sounds different depending on context:
| Situation | Tone Adjustment | Example |
|-----------|----------------|---------|
| Tutorial | Encouraging | "You've connected to the database. Let's add your first query." |
| Error message | Empathetic + actionable | "Your API key has expired. Generate a new one in your dashboard." |
| API reference | Neutral, precise | "Returns 404 if the resource does not exist." |
| Breaking change | Direct, solution-focused | "This method is removed in v3. Use `client.connect()` instead." |
| Security advisory | Urgent, no softening | "Update immediately. Versions 2.0–2.3 are vulnerable." |
"Be inclusive" is not enforceable. Specific term substitutions are:
## Inclusive Language
These are not suggestions -- they are required replacements with automated enforcement.
| Avoid | Use | Automated |
|-------|-----|-----------|
| blacklist / whitelist | blocklist / allowlist | Yes (Vale substitution) |
| master / slave | primary / replica | Yes (Vale existence) |
| sanity check | quick check, confidence check | Yes (Vale substitution) |
| guys (plural) | everyone, folks, team | Yes (Vale existence) |
| dummy (value) | example, placeholder | Yes (Vale substitution) |
| he/she (generic) | they | Yes (Vale substitution) |
For words without automated enforcement, add to PR review checklist.
Vale's built-in readability rules:
# .vale.ini addition for reading level
[*.md]
BasedOnStyles = Vale, Google, Custom
Vale.Readability = YES # Flesch-Kincaid score
Or use a custom rule:
# .vale/styles/Custom/ReadingLevel.yml
extends: script
message: "Reading level (grade %s) exceeds target (%s) for audience: end-user"
level: warning
script: |
local grade = flesch_kincaid(doc)
local target = 8 -- Grade 8 for end-user docs
return grade > target, grade, target
# Bad: principle without example
Use the active voice in all documentation.
# Good: principle + example pair
Use active voice.
Do: "The function returns the user object."
Don't: "The user object is returned by the function."
Why: Active voice reveals the subject, which matters in technical explanation.
A guide with 100 rules signals the author wanted to demonstrate thoroughness rather than change behavior. Rules beyond the top 10 will not be read. Provide a "quick reference" of 10 rules + link to the base guide for comprehensive coverage.
A rule without automation is a rule that relies entirely on reviewer memory. For every rule, decide:
Waiting for a perfect guide before sharing it means no guide ever ships. Start with 5 rules and a Vale config. Add rules as you encounter real inconsistencies in code review.
tools
# User Doc Patterns > Patterns for writing clear, accessible end-user documentation. ## Knowledge Base ### User Documentation vs Developer Documentation | User Docs | Developer Docs | |-----------|---------------| | Task-oriented ("How do I...") | Concept-oriented ("How does it work...") | | Plain language | Technical language | | Screenshots and visual aids | Code examples | | Step-by-step procedures | API references | | Feature names and UI labels | Function signatures and parameters | | A
tools
# Tutorial Structures > Pedagogical patterns and frameworks for creating effective technical tutorials. ## Knowledge Base ### The Tutorial Spectrum Tutorials exist on a spectrum between two extremes: | Recipe | Concept Guide | |--------|--------------| | "Do exactly this" | "Understand this idea" | | Step-by-step | Explanation-heavy | | Fast to complete | Deep understanding | | Low retention | High retention | The best tutorials blend both: steps for doing, explanations for understanding.
tools
# Tutorial Patterns ## Tutorial vs. How-to Guide: The Critical Distinction Before writing, identify which document is actually needed: | Tutorial | How-to Guide | |----------|-------------| | "Build a REST API in Node.js" | "Add JWT authentication to your Express API" | | For someone new to this | For someone who knows the domain | | Explains why each step is done | Steps are efficient, minimal explanation | | Has checkpoints, explores | Numbered steps, no detours | | Learner reaches a comple
tools
# Tech Blogging Patterns ## The Developer Reading Pattern Developers do not read technical posts linearly. They scan in this order: 1. Headline (is this relevant to me?) 2. Code blocks (is this real code I can use?) 3. Headers (what does this cover?) 4. First paragraph (what's the point?) 5. Key takeaways / conclusion (is it worth reading fully?) Design for scanning first, reading second. Put real code within the first 25% of the post. ## The Before/After Pattern The contrast between a pain