Skip to content

Commit 94b1eb7

Browse files
sarahshubwriter
andauthored
Agent-friendly concise style guide instructions (#59714)
Co-authored-by: hubwriter <hubwriter@github.com>
1 parent 14f1426 commit 94b1eb7

2 files changed

Lines changed: 107 additions & 0 deletions

File tree

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
applyTo: "content/**,data/**,**/*.md"
3+
---
4+
5+
# Concise style guide for docs.github.com
6+
7+
**When to use**: Any content editing, documentation writing, or Markdown file changes. This is a condensed version of the full style guide at `/content/contributing/style-guide-and-content-model/style-guide.md`. Use these rules for routine work. Only consult the full style guide if you encounter a style question not covered here.
8+
9+
For Liquid variable usage, reusables, linking conventions, bullet-list formatting, and parenthetical dashes, see `content.instructions.md` (loaded automatically alongside this file).
10+
11+
## Core principles
12+
13+
1. **Simplicity**: Keep guidelines and content easy to apply. Short paragraphs (1–3 sentences), tables for structured data, bullet lists for sets of items.
14+
2. **User-first**: Style decisions are based on what's best for the reader, not on grammar rules or stylistic preferences.
15+
3. **Clarity first**: Prioritize meaning and readability over rigid grammatical rules.
16+
4. **Use judgment**: When the style guide doesn't cover a case, consider the surrounding content and what the reader needs at that point, then make a decision that fits.
17+
18+
## Voice and tone
19+
20+
* Use clear, simple language approachable for a wide range of readers.
21+
* Use active voice whenever possible. Passive voice is acceptable when emphasizing the object of an action.
22+
* Avoid idioms, slang, and region-specific phrases.
23+
* Avoid ambiguous modal verbs ("may", "might", "should", "could") when an action is required. Use definitive verbs instead.
24+
* Refer to people as "people" or "users", not "customers."
25+
26+
## Headers
27+
28+
* Use sentence casing for all headers.
29+
* Headers must start at H2 (`##`). Do not skip header levels (for example, H2 to H4).
30+
* There must be text content between a header and its first subheader.
31+
* Each header at the same level on a page must be unique.
32+
33+
## Procedural steps
34+
35+
* Always use numbered lists for procedures.
36+
* Each step must include an instruction.
37+
* Give readers all prerequisites before the procedure, not within steps.
38+
39+
## Code blocks
40+
41+
* Keep lines to about 60 characters to avoid horizontal scrolling.
42+
* Specify the language after the opening code fence (for example, ` ```shell `, ` ```yaml `).
43+
* Use ALL CAPS for placeholder values that readers must replace (for example, `YOUR-REPOSITORY`). Explain what to replace placeholders with.
44+
* Do not use command prompts like `$` before commands.
45+
* If showing command output, comment it out so the command can be copied and run without modification.
46+
47+
## Alerts
48+
49+
* Use alerts sparingly—no consecutive alerts, no more than one per section.
50+
* Keep alerts concise (a couple of sentences max).
51+
* Use Markdown syntax: `> [!NOTE]`, `> [!TIP]`, `> [!WARNING]`, `> [!CAUTION]`, `> [!IMPORTANT]`.
52+
53+
## Links
54+
55+
* Use `[AUTOTITLE](/path/to/article)` for all internal links. Never hardcode article titles in link text.
56+
* Introduce links with "For more information, see" or "See" when context is clear.
57+
* Do not use inline links where words within a sentence are hyperlinked without additional context.
58+
* Do not include punctuation inside a hyperlink.
59+
* Do not repeat the same link more than once in the same article.
60+
61+
## Lists
62+
63+
* Use `*` (asterisks) for unordered lists, never `-` (hyphens).
64+
* Capitalize the first letter of each list item.
65+
* Use periods only if the item is a complete sentence.
66+
* Introduce lists with a descriptive sentence, not vague phrases like "the following" in isolation.
67+
68+
## Tables
69+
70+
* Use tables for tabular data (comparisons, options with multiple attributes). Do not use tables for simple lists.
71+
* Every cell must contain a value—use "None" or "Not applicable" for empty cells, not "N/A".
72+
* Left-align text columns. Center-align columns containing only icons.
73+
74+
## Emphasis
75+
76+
* Use **bold** for UI elements that can be interacted with, and for emphasis (sparingly, no more than five contiguous words).
77+
* Do not bold text that already has other formatting (for example, all-caps placeholders).
78+
79+
## Keyboard shortcuts
80+
81+
* Use `<kbd>` tags for each individual key: `<kbd>Ctrl</kbd>+<kbd>C</kbd>`.
82+
* Use `+` between key combinations with no spaces.
83+
* Use full words for Apple modifier keys (`Command`, `Option`, `Control`), not symbols.
84+
* Capitalize letter keys.
85+
86+
## Product names and variables
87+
88+
* Always use Liquid variables for product names—never hardcode them. Check `data/variables/product.yml` and `data/variables/copilot.yml`.
89+
* Product names are always singular (for example, "GitHub Actions helps" not "help").
90+
91+
## Word choice
92+
93+
| Use | Avoid |
94+
|---|---|
95+
| terminal | shell |
96+
| sign in | log in, login |
97+
| sign up | signup |
98+
| email | e-mail |
99+
| press (a key) | hit, tap |
100+
| type (in the UI) | enter (in the UI) |
101+
| enter (in the command line) | type (in the command line) |
102+
| repository | repo |
103+
| administrator | admin |

content/contributing/style-guide-and-content-model/style-guide.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ redirect_from:
99
- /contributing/writing-for-github-docs/style-guide
1010
---
1111

12+
<!--
13+
A condensed version of this style guide is available at `.github/instructions/style-guide-summary.instructions.md`, optimized for AI agents and quick reference. If you make significant changes to this full guide, update the summary file as well.
14+
-->
15+
1216
> [!NOTE]
1317
> These guidelines are specific to {% data variables.product.company_short %}'s documentation. For general style questions or guidance on topics not covered here, see the [Microsoft Style Guide](https://docs.microsoft.com/style-guide/welcome/). For markup specific to source content on docs.github.com, see [AUTOTITLE](/contributing/syntax-and-versioning-for-github-docs/using-markdown-and-liquid-in-github-docs). For any questions about the GitHub brand, see our [GitHub Brand Guide](https://brand.github.com).<!-- markdownlint-disable-line search-replace -->
1418

0 commit comments

Comments
 (0)