Skip to content

Commit 1eda865

Browse files
committed
docs: add readme-generator skill and project README
- Add readme-generator skill with templates, references, and validation scripts - Create comprehensive README.md with centered table-based structure - Document tech stack, features, CLI usage, and development workflow
1 parent bc64e5e commit 1eda865

7 files changed

Lines changed: 1898 additions & 0 deletions

File tree

Lines changed: 302 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,302 @@
1+
---
2+
name: readme-generator
3+
description: Generate professionally formatted README.md files following a specific centered table-based structure. Use when creating or reformatting README files for GitHub repositories, particularly for Ghost's projects across 48hour-solutions, Automotive-9, LLMTooling, MCDxAI, Orbital-8, Parallel-7, and GhostTypes organizations. Triggers include "create a readme", "reformat this readme", "update the readme", or any request to document a repository.
4+
---
5+
6+
# README Generator
7+
8+
This skill generates README.md files following a specific centered, table-based structure with strict formatting rules.
9+
10+
## Core Layout Structure
11+
12+
Every README follows this exact top section structure:
13+
14+
```markdown
15+
<div align="center">
16+
17+
# Project Title
18+
19+
![Icon](icon-url-here)
20+
_if icon available_
21+
22+
**One-line summary/tagline describing the project**
23+
24+
![Badge1](shield-url) ![Badge2](shield-url) ![Badge3](shield-url)
25+
26+
**Bold statement highlighting the core value proposition**
27+
28+
</div>
29+
```
30+
31+
## Strict Formatting Rules
32+
33+
### NEVER USE
34+
- ❌ Emojis (anywhere in the document)
35+
- ❌ Standalone bulleted lists (bullets within table cells are OK)
36+
- ❌ Horizontal rule separators (`---`) between sections
37+
38+
### ALWAYS USE
39+
- ✓ Centered layout for all elements except standalone code blocks
40+
- ✓ Tables for all feature lists, steps, workflows, and organized content
41+
- ✓ Markdown formatting within table cells
42+
- ✓ shields.io badges with appropriate colors matching the tech stack
43+
44+
### Special Rules for Code Blocks
45+
46+
**CRITICAL**: Markdown code blocks CANNOT be placed inside `<div align="center">` tags as it breaks GitHub rendering.
47+
48+
- If a code block is needed outside a table → place it WITHOUT center tags
49+
- All other elements → MUST be centered
50+
- Code blocks within table cells → perfectly fine
51+
52+
## Badge Generation
53+
54+
### Always Use shields.io
55+
56+
Format: `https://img.shields.io/badge/{LABEL}-{MESSAGE}-{COLOR}?style=flat`
57+
58+
### Color Selection Strategy
59+
60+
Match colors to the technology/library branding:
61+
- **Status badges**: `purple` for preview/beta, `brightgreen` for stable, `yellow` for experimental
62+
- **Minecraft**: `0ea5e9` (light blue)
63+
- **Fabric Loader**: `f59e0b` (amber)
64+
- **Java**: `orange` or `007396`
65+
- **Python**: `3776ab` or `yellow`
66+
- **TypeScript**: `3178c6`
67+
- **Node.js**: `339933`
68+
- **Vue**: `4fc08d`
69+
- **React**: `61dafb`
70+
71+
### Version Discovery Process
72+
73+
**REQUIRED**: Before generating badges, examine the codebase:
74+
75+
1. **JavaScript/TypeScript projects**: Check `package.json` for dependencies
76+
2. **Java projects**: Check `build.gradle`, `build.gradle.kts`, `pom.xml`
77+
3. **Python projects**: Check `pyproject.toml`, `requirements.txt`, `setup.py`
78+
4. **Other languages**: Look for standard dependency files
79+
80+
**If you cannot find version information → ASK before generating the README**
81+
82+
Use actual version numbers when found, or "latest" as fallback only if user confirms.
83+
84+
## Content Structure
85+
86+
All content sections use clean, centered tables with two columns:
87+
88+
```markdown
89+
<div align="center">
90+
91+
| Category/Label | Details/Description |
92+
| --- | --- |
93+
| **First Item** | Detailed information with **markdown** and `code` |
94+
| **Second Item** | More details • Sub-bullets OK here • Another point |
95+
96+
</div>
97+
```
98+
99+
### Standard Section Pattern
100+
101+
Follow this structure closely (based on meteor-client-webgui):
102+
103+
1. **Feature Highlights** - Key capabilities in table format
104+
2. **Quick Start** - Installation and setup steps in table format
105+
3. **Development Workflow** - Commands and development info in table format
106+
107+
### Table Design Guidelines
108+
109+
- **Left column**: Short, bold labels or categories (1-3 words)
110+
- **Right column**: Detailed information with full markdown support
111+
- **Within cells**: Use `` for sub-points, `**bold**` for emphasis, `` `code` `` for commands
112+
- **Multi-line content**: Perfectly fine within cells
113+
- **Code blocks in cells**: Use triple backticks with language identifier
114+
115+
### Formatting Lists Within Table Cells
116+
117+
**CRITICAL**: When adding lists or multi-line content within table cells, use these exact patterns for proper rendering:
118+
119+
**Numbered lists with line breaks:**
120+
```markdown
121+
| **Step** | 1. First action<br>2. Second action<br>3. Third action |
122+
```
123+
124+
**Indented bullets under numbered items:**
125+
```markdown
126+
| **Step** | 1. Main instruction<br>&nbsp;&nbsp;&nbsp;**Sub-item**: Detail<br>&nbsp;&nbsp;&nbsp;**Another**: More detail<br>2. Next step |
127+
```
128+
129+
**Simple bullet lists (inline):**
130+
```markdown
131+
| **Feature** | Main description • First point • Second point • Third point |
132+
```
133+
134+
**Multi-line bullet lists (each bullet on its own line):**
135+
```markdown
136+
| **Issue** | Problem description | • First solution item<br>• Second solution item<br>• Third solution item<br>• Fourth solution item |
137+
```
138+
139+
This renders as a clean vertical list within the cell, like:
140+
- • First solution item
141+
- • Second solution item
142+
- • Third solution item
143+
- • Fourth solution item
144+
145+
**Important notes:**
146+
- Use `<br>` for line breaks within cells (NOT actual newlines)
147+
- Use `&nbsp;&nbsp;&nbsp;•` for indented bullets (3 non-breaking spaces + bullet character)
148+
- Bold labels within bullets: `• **Label**: description`
149+
- For vertical lists, place `<br>` BETWEEN bullet items (after item, before next bullet)
150+
- The pattern MUST be exact or GitHub won't render it correctly
151+
152+
**Real-world example from troubleshooting table:**
153+
154+
```markdown
155+
| **Discovery Not Finding Printer** | Automatic discovery doesn't detect your printer | • Ensure printer is on the same network/subnet as Home Assistant<br>• Check firewall settings (UDP port 18007 must be open)<br>• Verify LAN mode is enabled on the printer<br>• Try manual configuration with IP address |
156+
```
157+
158+
This renders as a clean, readable vertical list in the Solutions column.
159+
160+
**Complex example with numbered steps and sub-bullets:**
161+
162+
```markdown
163+
| **Installation** | 1. Open **HACS** in Home Assistant<br>2. Click on **Integrations**<br>3. Add repository:<br>&nbsp;&nbsp;&nbsp;**URL**: `https://github.com/user/repo`<br>&nbsp;&nbsp;&nbsp;**Category**: `Integration`<br>4. Click **Download** |
164+
```
165+
166+
## Codebase Analysis Process
167+
168+
### When NO existing README exists
169+
170+
**REQUIRED**: Thoroughly analyze the codebase before writing:
171+
172+
1. **Identify the project type** (library, application, tool, addon, etc.)
173+
2. **Find the tech stack** (languages, frameworks, dependencies)
174+
3. **Discover features** by examining:
175+
- Main source files and their public APIs
176+
- Configuration files and what they configure
177+
- Build scripts and what they produce
178+
- Documentation comments in code
179+
- Example/test files showing usage
180+
4. **Extract version information** from dependency files
181+
5. **Identify setup requirements** (install steps, dependencies, system requirements)
182+
6. **Note any special considerations** (permissions, compatibility, known issues)
183+
184+
**Never guess or hallucinate features** - only document what's actually in the code.
185+
186+
### When existing README exists
187+
188+
**Default behavior**: Reformat to the centered table structure while preserving factual content
189+
190+
Process:
191+
1. Extract all factual information (features, versions, installation steps, etc.)
192+
2. Strip out emojis completely
193+
3. Convert bulleted lists to centered tables
194+
4. Reorganize into the standard section structure
195+
5. Update badge formatting to shields.io style
196+
6. Ensure all elements are properly centered (except standalone code blocks)
197+
7. Keep the same level of technical detail
198+
199+
**Exception**: If user says "rewrite" or indicates content changes needed, then also revise the content itself.
200+
201+
## Section Guidelines
202+
203+
### Features/Highlights Section
204+
205+
Format as a table with specific feature areas:
206+
207+
```markdown
208+
<div align="center">
209+
210+
| Capability | Details |
211+
| --- | --- |
212+
| **Feature Name** | Clear description of what it does and why it matters |
213+
| **Another Feature** | Technical details with code examples if needed |
214+
215+
</div>
216+
```
217+
218+
### Quick Start Section
219+
220+
Format as a table with numbered steps or clear categories:
221+
222+
```markdown
223+
<div align="center">
224+
225+
| Step | Instructions |
226+
| --- | --- |
227+
| **1. Requirements** | List dependencies • version requirements • system requirements |
228+
| **2. Installation** | Download, install, setup commands |
229+
| **3. First Run** | How to verify it works |
230+
231+
</div>
232+
```
233+
234+
### Development Workflow Section
235+
236+
Format as a table organizing by component or task:
237+
238+
```markdown
239+
<div align="center">
240+
241+
| Component | Commands / Actions |
242+
| --- | --- |
243+
| **Build** | `./gradlew build` – Compiles and packages |
244+
| **Test** | `npm test` – Runs test suite |
245+
| **Dev Server** | `npm run dev` – Hot reload on localhost:3000 |
246+
247+
</div>
248+
```
249+
250+
## Tone and Style
251+
252+
- **Professional and technical**: Direct, clear, factual
253+
- **No fluff**: Every sentence should provide value
254+
- **Scannable**: Users should quickly find what they need
255+
- **Complete but concise**: Include necessary details without verbosity
256+
257+
## Contributing Section
258+
259+
**DO NOT INCLUDE** a Contributing section unless explicitly requested.
260+
261+
Ghost adds this manually when needed.
262+
263+
## Example References
264+
265+
### Primary Reference: Home Assistant Integration
266+
267+
See `references/homeassistant-example.md` for a comprehensive, perfect example demonstrating:
268+
- Multi-column tables with rowspan for categorization
269+
- Section headers as centered H2 (`<h2>`) elements
270+
- Complex table cells with rich formatting (line breaks, bullets, bold, code)
271+
- Subsections within centered divs using H3
272+
- Varied table structures (2-column, 3-column, 4-column)
273+
- Code blocks properly placed outside center tags
274+
- Professional technical documentation for a real-world project
275+
276+
### Additional Reference
277+
278+
https://github.com/MCDxAI/meteor-client-webgui/blob/main/README.md
279+
280+
Study these examples closely for:
281+
- Exact centering approach
282+
- Table structure and formatting
283+
- Badge selection and colors
284+
- Section organization
285+
- Markdown within tables
286+
- Professional technical tone
287+
288+
## Validation Checklist
289+
290+
Before presenting the README, verify:
291+
292+
- [ ] All elements centered (except standalone code blocks)
293+
- [ ] Zero emojis anywhere
294+
- [ ] No standalone bulleted lists
295+
- [ ] No horizontal rule separators (`---`) between sections
296+
- [ ] All features/steps in table format
297+
- [ ] Lists within table cells use `<br>` and `&nbsp;&nbsp;&nbsp;•` formatting
298+
- [ ] Badges use shields.io with appropriate colors
299+
- [ ] Version numbers are real (from codebase) or confirmed with user
300+
- [ ] Code blocks outside tables are NOT in center tags
301+
- [ ] Professional, technical tone maintained
302+
- [ ] Contributing section NOT included

0 commit comments

Comments
 (0)