@grimoire-cc/cli 0.6.3 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/logs.d.ts.map +1 -1
- package/dist/commands/logs.js +2 -2
- package/dist/commands/logs.js.map +1 -1
- package/dist/static/log-viewer.html +946 -690
- package/dist/static/static/log-viewer.html +946 -690
- package/package.json +1 -1
- package/packs/dev-pack/agents/gr.code-reviewer.md +286 -0
- package/packs/dev-pack/agents/gr.tdd-specialist.md +44 -0
- package/packs/dev-pack/grimoire.json +55 -0
- package/packs/dev-pack/skills/gr.tdd-specialist/SKILL.md +247 -0
- package/packs/dev-pack/skills/gr.tdd-specialist/reference/anti-patterns.md +166 -0
- package/packs/dev-pack/skills/gr.tdd-specialist/reference/language-frameworks.md +388 -0
- package/packs/dev-pack/skills/gr.tdd-specialist/reference/tdd-workflow-patterns.md +135 -0
- package/packs/docs-pack/grimoire.json +30 -0
- package/packs/docs-pack/skills/gr.business-logic-docs/SKILL.md +141 -0
- package/packs/docs-pack/skills/gr.business-logic-docs/references/tier2-template.md +74 -0
- package/packs/essentials-pack/agents/gr.fact-checker.md +202 -0
- package/packs/essentials-pack/grimoire.json +12 -0
- package/packs/meta-pack/grimoire.json +72 -0
- package/packs/meta-pack/skills/gr.context-file-guide/SKILL.md +201 -0
- package/packs/meta-pack/skills/gr.context-file-guide/scripts/validate-context-file.sh +29 -0
- package/packs/meta-pack/skills/gr.readme-guide/SKILL.md +362 -0
- package/packs/meta-pack/skills/gr.skill-developer/SKILL.md +321 -0
- package/packs/meta-pack/skills/gr.skill-developer/examples/brand-guidelines.md +94 -0
- package/packs/meta-pack/skills/gr.skill-developer/examples/financial-analysis.md +85 -0
- package/packs/meta-pack/skills/gr.skill-developer/reference/best-practices.md +410 -0
- package/packs/meta-pack/skills/gr.skill-developer/reference/file-organization.md +452 -0
- package/packs/meta-pack/skills/gr.skill-developer/reference/patterns.md +459 -0
- package/packs/meta-pack/skills/gr.skill-developer/reference/yaml-spec.md +214 -0
- package/packs/meta-pack/skills/gr.skill-developer/scripts/create-skill.sh +210 -0
- package/packs/meta-pack/skills/gr.skill-developer/scripts/validate-skill.py +520 -0
- package/packs/meta-pack/skills/gr.skill-developer/templates/basic-skill.md +94 -0
- package/packs/meta-pack/skills/gr.skill-developer/templates/domain-skill.md +108 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grimoire:context-file-guide
|
|
3
|
+
description: "Best practices for writing CLAUDE.md project context files. Use when creating, reviewing, or improving CLAUDE.md files for Claude Code projects."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# CLAUDE.md Best Practices Guide
|
|
7
|
+
|
|
8
|
+
This skill provides best practices for writing effective CLAUDE.md files that give Claude Code the right context about your project.
|
|
9
|
+
|
|
10
|
+
## What is CLAUDE.md?
|
|
11
|
+
|
|
12
|
+
CLAUDE.md is a special file that Claude Code automatically reads when starting a conversation. It provides project-specific context, conventions, and instructions that help Claude understand your codebase and work more effectively.
|
|
13
|
+
|
|
14
|
+
## File Locations
|
|
15
|
+
|
|
16
|
+
Claude Code reads CLAUDE.md files from multiple locations (in order of precedence):
|
|
17
|
+
|
|
18
|
+
1. **Project root**: `./CLAUDE.md` - Primary project context
|
|
19
|
+
2. **Parent directories**: `../CLAUDE.md` - Shared context for monorepos
|
|
20
|
+
3. **Home directory**: `~/.claude/CLAUDE.md` - Personal global preferences
|
|
21
|
+
|
|
22
|
+
All found files are concatenated, so use each level appropriately.
|
|
23
|
+
|
|
24
|
+
## Recommended Structure
|
|
25
|
+
|
|
26
|
+
Use this battle-tested structure:
|
|
27
|
+
|
|
28
|
+
```markdown
|
|
29
|
+
# Project: {Project Name}
|
|
30
|
+
|
|
31
|
+
## Tech Stack
|
|
32
|
+
- Backend: {frameworks, runtime, database}
|
|
33
|
+
- Frontend: {frameworks, language, styling}
|
|
34
|
+
- Testing: {test frameworks}
|
|
35
|
+
|
|
36
|
+
## Commands
|
|
37
|
+
- {command}: {description}
|
|
38
|
+
- {command}: {description}
|
|
39
|
+
- {command}: {description}
|
|
40
|
+
|
|
41
|
+
## Code Conventions
|
|
42
|
+
- {convention 1}
|
|
43
|
+
- {convention 2}
|
|
44
|
+
- {convention 3}
|
|
45
|
+
|
|
46
|
+
## Architecture
|
|
47
|
+
- {pattern}: {brief description}
|
|
48
|
+
- {routes/structure}: {pattern}
|
|
49
|
+
- See {doc reference} for details
|
|
50
|
+
|
|
51
|
+
## Workflow
|
|
52
|
+
- {pre-commit steps}
|
|
53
|
+
- {development approach}
|
|
54
|
+
- {commit guidelines}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Example
|
|
58
|
+
|
|
59
|
+
```markdown
|
|
60
|
+
# Project: E-commerce API
|
|
61
|
+
|
|
62
|
+
## Tech Stack
|
|
63
|
+
- Backend: .NET 8, Entity Framework Core 8, PostgreSQL
|
|
64
|
+
- Frontend: Vue 3 Composition API, TypeScript, Tailwind CSS
|
|
65
|
+
- Testing: xUnit, Playwright, Vue Test Utils
|
|
66
|
+
|
|
67
|
+
## Commands
|
|
68
|
+
- dotnet build: Build backend
|
|
69
|
+
- dotnet test --filter "Category=Unit": Run unit tests
|
|
70
|
+
- pnpm dev: Start frontend dev server
|
|
71
|
+
- pnpm test:unit: Run Vue tests
|
|
72
|
+
|
|
73
|
+
## Code Conventions
|
|
74
|
+
- Use records for DTOs and value objects
|
|
75
|
+
- Prefer async/await with ConfigureAwait(false)
|
|
76
|
+
- Use Composition API with <script setup> in Vue
|
|
77
|
+
- Name test files *.spec.ts (frontend) or *Tests.cs (backend)
|
|
78
|
+
|
|
79
|
+
## Architecture
|
|
80
|
+
- Clean Architecture: Adapters → Application → Domain
|
|
81
|
+
- API routes: /api/v1/{resource}
|
|
82
|
+
- See docs/architecture.md for detailed diagrams
|
|
83
|
+
|
|
84
|
+
## Workflow
|
|
85
|
+
- Run dotnet format and pnpm lint before committing
|
|
86
|
+
- Write tests before implementation (TDD)
|
|
87
|
+
- One logical change per commit
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Section Guidelines
|
|
91
|
+
|
|
92
|
+
### Tech Stack
|
|
93
|
+
- List primary technologies with versions
|
|
94
|
+
- Group by concern (backend, frontend, testing, infrastructure)
|
|
95
|
+
- Include database, ORM, and major libraries
|
|
96
|
+
|
|
97
|
+
### Commands
|
|
98
|
+
- Use format: `command: description`
|
|
99
|
+
- Include build, test, lint, and dev commands
|
|
100
|
+
- Add flags for common variations (e.g., unit vs integration tests)
|
|
101
|
+
|
|
102
|
+
### Code Conventions
|
|
103
|
+
- Focus on project-specific patterns
|
|
104
|
+
- Include naming conventions for files and code
|
|
105
|
+
- Note any non-obvious practices
|
|
106
|
+
|
|
107
|
+
### Architecture
|
|
108
|
+
- Name the architectural pattern
|
|
109
|
+
- Describe layer organization
|
|
110
|
+
- Reference detailed documentation if it exists
|
|
111
|
+
|
|
112
|
+
### Workflow
|
|
113
|
+
- Pre-commit checklist items
|
|
114
|
+
- Development methodology (TDD, etc.)
|
|
115
|
+
- Commit message guidelines
|
|
116
|
+
|
|
117
|
+
## Best Practices
|
|
118
|
+
|
|
119
|
+
### Keep It Concise
|
|
120
|
+
- **Maximum 100 lines** - anything longer should use imports
|
|
121
|
+
- Aim for 30-60 lines for most projects
|
|
122
|
+
- Focus on frequently-needed information
|
|
123
|
+
- Update as project evolves
|
|
124
|
+
|
|
125
|
+
### Be Specific and Actionable
|
|
126
|
+
```markdown
|
|
127
|
+
# Good
|
|
128
|
+
- dotnet test --filter "Category=Unit": Run unit tests
|
|
129
|
+
|
|
130
|
+
# Bad
|
|
131
|
+
- Tests are important
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Include Context That Saves Time
|
|
135
|
+
- Explain non-obvious architectural decisions
|
|
136
|
+
- Document project-specific terminology
|
|
137
|
+
- Note any unusual patterns or exceptions
|
|
138
|
+
|
|
139
|
+
## Advanced Context Management
|
|
140
|
+
|
|
141
|
+
Use imports for detailed context without bloating CLAUDE.md. The `@docs/file.md` syntax pulls in additional files when Claude needs them.
|
|
142
|
+
|
|
143
|
+
### Memory Bank Structure
|
|
144
|
+
|
|
145
|
+
For complex projects, create a docs folder with specialized context files:
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
docs/
|
|
149
|
+
├── architecture.md # System design decisions
|
|
150
|
+
├── api-conventions.md # REST patterns, error handling
|
|
151
|
+
├── testing-guide.md # Test patterns and fixtures
|
|
152
|
+
└── plan.md # Current implementation checklist
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Using Imports
|
|
156
|
+
|
|
157
|
+
Reference these files in CLAUDE.md with the `@` syntax:
|
|
158
|
+
|
|
159
|
+
```markdown
|
|
160
|
+
## Architecture
|
|
161
|
+
- Clean Architecture: Adapters → Application → Domain
|
|
162
|
+
- @docs/architecture.md for detailed diagrams
|
|
163
|
+
|
|
164
|
+
## API Design
|
|
165
|
+
- @docs/api-conventions.md
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
This keeps the main CLAUDE.md lean while providing deep context on demand.
|
|
169
|
+
|
|
170
|
+
## Validation
|
|
171
|
+
|
|
172
|
+
Validate your CLAUDE.md meets the 100-line limit:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
./scripts/validate-context-file.sh CLAUDE.md
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
The script checks line count and suggests using imports if the file is too long.
|
|
179
|
+
|
|
180
|
+
## Anti-Patterns to Avoid
|
|
181
|
+
|
|
182
|
+
1. **Too verbose**: Don't include entire documentation
|
|
183
|
+
2. **Too generic**: Avoid boilerplate that applies to any project
|
|
184
|
+
3. **Outdated**: Remove references to deleted files/features
|
|
185
|
+
4. **Instruction overload**: Don't micromanage every decision
|
|
186
|
+
5. **Security information**: Never include secrets or credentials
|
|
187
|
+
|
|
188
|
+
## When to Update CLAUDE.md
|
|
189
|
+
|
|
190
|
+
- Adding new major dependencies
|
|
191
|
+
- Changing build or test commands
|
|
192
|
+
- Introducing new architectural patterns
|
|
193
|
+
- After significant refactoring
|
|
194
|
+
- When onboarding reveals missing context
|
|
195
|
+
|
|
196
|
+
## Limitations
|
|
197
|
+
|
|
198
|
+
- CLAUDE.md is read at conversation start (not refreshed mid-conversation)
|
|
199
|
+
- Very large files may impact context window efficiency
|
|
200
|
+
- Cannot include executable code or scripts
|
|
201
|
+
- Content is shared with Claude - avoid sensitive information
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Validates CLAUDE.md files meet size requirements.
|
|
3
|
+
|
|
4
|
+
MAX_LINES=100
|
|
5
|
+
|
|
6
|
+
validate() {
|
|
7
|
+
local file_path="$1"
|
|
8
|
+
|
|
9
|
+
if [ ! -f "$file_path" ]; then
|
|
10
|
+
echo "Error: File not found: $file_path"
|
|
11
|
+
return 1
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
local line_count
|
|
15
|
+
line_count=$(wc -l < "$file_path" | tr -d ' ')
|
|
16
|
+
|
|
17
|
+
if [ "$line_count" -gt "$MAX_LINES" ]; then
|
|
18
|
+
echo -e "\033[0;31m✗ $file_path has $line_count lines (max: $MAX_LINES)\033[0m"
|
|
19
|
+
echo " Consider moving detailed content to docs/ and using @imports"
|
|
20
|
+
return 1
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
echo -e "\033[0;32m✓ $file_path has $line_count lines (max: $MAX_LINES)\033[0m"
|
|
24
|
+
return 0
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
file_path="${1:-CLAUDE.md}"
|
|
28
|
+
validate "$file_path"
|
|
29
|
+
exit $?
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grimoire:readme-guide
|
|
3
|
+
description: "Create and review README files following industry best practices. Use for writing new READMEs, improving existing ones, checking README quality, or adding badges. Triggers: readme, documentation, project docs, repository documentation, getting started guide, shields badges."
|
|
4
|
+
user_invocable: true
|
|
5
|
+
disable-model-invocation: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# README Guide
|
|
9
|
+
|
|
10
|
+
Create professional README files that help users understand, install, and use your project. This skill synthesizes best practices from [Make a README](https://www.makeareadme.com/), [Standard Readme](https://github.com/RichardLitt/standard-readme), [Google's Style Guide](https://google.github.io/styleguide/docguide/READMEs.html), and community standards.
|
|
11
|
+
|
|
12
|
+
## Capabilities
|
|
13
|
+
|
|
14
|
+
- **Create READMEs**: Generate complete README files for any project type
|
|
15
|
+
- **Review READMEs**: Analyze existing READMEs against best practices
|
|
16
|
+
- **Section guidance**: Recommend sections based on project type
|
|
17
|
+
- **Badge selection**: Suggest appropriate badges using Shields.io
|
|
18
|
+
- **Format optimization**: Ensure proper markdown structure
|
|
19
|
+
|
|
20
|
+
## File Requirements
|
|
21
|
+
|
|
22
|
+
Per [Google's Style Guide](https://google.github.io/styleguide/docguide/READMEs.html):
|
|
23
|
+
- File must be named `README.md` (case-sensitive)
|
|
24
|
+
- Place in top-level directory of your codebase
|
|
25
|
+
- Every package directory should have an up-to-date README
|
|
26
|
+
|
|
27
|
+
## Section Structure
|
|
28
|
+
|
|
29
|
+
Based on [Standard Readme specification](https://github.com/RichardLitt/standard-readme/blob/main/spec.md), sections must appear in this order:
|
|
30
|
+
|
|
31
|
+
### Required Sections
|
|
32
|
+
|
|
33
|
+
| Section | Requirements |
|
|
34
|
+
|---------|-------------|
|
|
35
|
+
| **Title** | Must match repository/package name |
|
|
36
|
+
| **Description** | 1-3 sentences, under 120 characters for short version |
|
|
37
|
+
| **Installation** | Code block showing install command |
|
|
38
|
+
| **Usage** | Basic example with expected output |
|
|
39
|
+
| **License** | SPDX identifier, owner, link to LICENSE file |
|
|
40
|
+
|
|
41
|
+
### Recommended Sections
|
|
42
|
+
|
|
43
|
+
| Section | When to Include |
|
|
44
|
+
|---------|-----------------|
|
|
45
|
+
| **Badges** | Always for public projects |
|
|
46
|
+
| **Table of Contents** | Required if README exceeds 100 lines |
|
|
47
|
+
| **Features/Highlights** | When project has multiple capabilities |
|
|
48
|
+
| **Prerequisites** | When dependencies exist beyond package manager |
|
|
49
|
+
| **Configuration** | When env vars or config files needed |
|
|
50
|
+
| **API Reference** | For libraries, or link to full docs |
|
|
51
|
+
| **Contributing** | For open source projects |
|
|
52
|
+
| **Changelog** | Link to CHANGELOG.md |
|
|
53
|
+
| **Acknowledgments** | Credits for contributors, inspiration |
|
|
54
|
+
|
|
55
|
+
## How to Use
|
|
56
|
+
|
|
57
|
+
### Creating a New README
|
|
58
|
+
|
|
59
|
+
1. **Provide project details**:
|
|
60
|
+
- Project name and purpose
|
|
61
|
+
- Target audience
|
|
62
|
+
- Language/framework
|
|
63
|
+
- Installation method
|
|
64
|
+
- Basic usage example
|
|
65
|
+
|
|
66
|
+
2. **I'll generate a README with**:
|
|
67
|
+
- Appropriate sections for your project type
|
|
68
|
+
- Proper markdown formatting
|
|
69
|
+
- Placeholder badges you can customize
|
|
70
|
+
- Code blocks with syntax highlighting
|
|
71
|
+
|
|
72
|
+
### Reviewing an Existing README
|
|
73
|
+
|
|
74
|
+
1. Share your README content or file path
|
|
75
|
+
2. I'll analyze against this checklist:
|
|
76
|
+
- [ ] Clear, accurate title matching repo name
|
|
77
|
+
- [ ] Description explains what AND why
|
|
78
|
+
- [ ] Installation instructions are complete
|
|
79
|
+
- [ ] Usage example is runnable
|
|
80
|
+
- [ ] All code examples tested
|
|
81
|
+
- [ ] License specified
|
|
82
|
+
- [ ] Links all work
|
|
83
|
+
- [ ] No placeholder text remaining
|
|
84
|
+
- [ ] TOC present if >100 lines
|
|
85
|
+
|
|
86
|
+
## Badge Guidelines
|
|
87
|
+
|
|
88
|
+
Based on [Shields.io best practices](https://daily.dev/blog/readme-badges-github-best-practices):
|
|
89
|
+
|
|
90
|
+
### Quantity & Placement
|
|
91
|
+
- Use **2-4 key badges** at top of README
|
|
92
|
+
- Place less critical badges lower or in tables
|
|
93
|
+
- Avoid "badge saturation"
|
|
94
|
+
|
|
95
|
+
### Recommended Badges
|
|
96
|
+
|
|
97
|
+
```markdown
|
|
98
|
+
[](...)
|
|
99
|
+
[](...)
|
|
100
|
+
[](...)
|
|
101
|
+
[](LICENSE)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Badge Categories
|
|
105
|
+
|
|
106
|
+
| Category | Examples |
|
|
107
|
+
|----------|----------|
|
|
108
|
+
| **CI/Build** | GitHub Actions, CircleCI, Travis |
|
|
109
|
+
| **Quality** | Codecov, Code Climate, SonarCloud |
|
|
110
|
+
| **Package** | npm, PyPI, crates.io version |
|
|
111
|
+
| **License** | MIT, Apache 2.0, GPL |
|
|
112
|
+
| **Activity** | Last commit, contributors, stars |
|
|
113
|
+
|
|
114
|
+
### Best Practices
|
|
115
|
+
- Get all badges from [Shields.io](https://shields.io/) for consistent styling
|
|
116
|
+
- Keep badges current and accurate
|
|
117
|
+
- Remove badges when they no longer apply
|
|
118
|
+
- Use GitHub Actions to auto-update badges
|
|
119
|
+
|
|
120
|
+
## Project-Type Templates
|
|
121
|
+
|
|
122
|
+
### Library/Package
|
|
123
|
+
|
|
124
|
+
```markdown
|
|
125
|
+
# package-name
|
|
126
|
+
|
|
127
|
+
[](...)
|
|
128
|
+
[](...)
|
|
129
|
+
[](LICENSE)
|
|
130
|
+
|
|
131
|
+
Brief description of what this library does.
|
|
132
|
+
|
|
133
|
+
## Installation
|
|
134
|
+
|
|
135
|
+
npm install package-name
|
|
136
|
+
|
|
137
|
+
## Usage
|
|
138
|
+
|
|
139
|
+
import { feature } from 'package-name';
|
|
140
|
+
|
|
141
|
+
const result = feature.process(data);
|
|
142
|
+
console.log(result);
|
|
143
|
+
|
|
144
|
+
## API
|
|
145
|
+
|
|
146
|
+
### `functionName(param: Type): ReturnType`
|
|
147
|
+
|
|
148
|
+
Description of what it does.
|
|
149
|
+
|
|
150
|
+
## Contributing
|
|
151
|
+
|
|
152
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
153
|
+
|
|
154
|
+
## License
|
|
155
|
+
|
|
156
|
+
MIT - see [LICENSE](LICENSE)
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### CLI Tool
|
|
160
|
+
|
|
161
|
+
```markdown
|
|
162
|
+
# tool-name
|
|
163
|
+
|
|
164
|
+
One-line description of the CLI.
|
|
165
|
+
|
|
166
|
+
## Installation
|
|
167
|
+
|
|
168
|
+
brew install tool-name
|
|
169
|
+
# or
|
|
170
|
+
npm install -g tool-name
|
|
171
|
+
|
|
172
|
+
## Usage
|
|
173
|
+
|
|
174
|
+
tool-name <command> [options]
|
|
175
|
+
|
|
176
|
+
### Commands
|
|
177
|
+
|
|
178
|
+
| Command | Description |
|
|
179
|
+
|---------|-------------|
|
|
180
|
+
| `init` | Initialize new project |
|
|
181
|
+
| `build` | Build for production |
|
|
182
|
+
| `deploy` | Deploy to server |
|
|
183
|
+
|
|
184
|
+
### Examples
|
|
185
|
+
|
|
186
|
+
# Initialize with defaults
|
|
187
|
+
tool-name init my-project
|
|
188
|
+
|
|
189
|
+
# Build with verbose output
|
|
190
|
+
tool-name build --verbose
|
|
191
|
+
|
|
192
|
+
## Configuration
|
|
193
|
+
|
|
194
|
+
Create `.toolrc` in project root:
|
|
195
|
+
|
|
196
|
+
{
|
|
197
|
+
"outputDir": "dist",
|
|
198
|
+
"minify": true
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
## License
|
|
202
|
+
|
|
203
|
+
MIT
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Web Application
|
|
207
|
+
|
|
208
|
+
```markdown
|
|
209
|
+
# App Name
|
|
210
|
+
|
|
211
|
+
Brief description and what problem it solves.
|
|
212
|
+
|
|
213
|
+

|
|
214
|
+
|
|
215
|
+
## Features
|
|
216
|
+
|
|
217
|
+
- Feature one with brief explanation
|
|
218
|
+
- Feature two with brief explanation
|
|
219
|
+
- Feature three with brief explanation
|
|
220
|
+
|
|
221
|
+
## Getting Started
|
|
222
|
+
|
|
223
|
+
### Prerequisites
|
|
224
|
+
|
|
225
|
+
- Node.js 18+
|
|
226
|
+
- PostgreSQL 14+
|
|
227
|
+
|
|
228
|
+
### Installation
|
|
229
|
+
|
|
230
|
+
git clone https://github.com/user/repo.git
|
|
231
|
+
cd repo
|
|
232
|
+
npm install
|
|
233
|
+
cp .env.example .env
|
|
234
|
+
npm run dev
|
|
235
|
+
|
|
236
|
+
Open http://localhost:3000
|
|
237
|
+
|
|
238
|
+
## Environment Variables
|
|
239
|
+
|
|
240
|
+
| Variable | Description | Required |
|
|
241
|
+
|----------|-------------|----------|
|
|
242
|
+
| `DATABASE_URL` | PostgreSQL connection | Yes |
|
|
243
|
+
| `JWT_SECRET` | Auth token secret | Yes |
|
|
244
|
+
| `PORT` | Server port | No (default: 3000) |
|
|
245
|
+
|
|
246
|
+
## Deployment
|
|
247
|
+
|
|
248
|
+
See [deployment guide](docs/deployment.md).
|
|
249
|
+
|
|
250
|
+
## Contributing
|
|
251
|
+
|
|
252
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
253
|
+
|
|
254
|
+
## License
|
|
255
|
+
|
|
256
|
+
MIT
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## Writing Guidelines
|
|
260
|
+
|
|
261
|
+
### Title & Description
|
|
262
|
+
|
|
263
|
+
Per [Make a README](https://www.makeareadme.com/):
|
|
264
|
+
- Title should be self-explanatory
|
|
265
|
+
- Description explains what it does AND provides context
|
|
266
|
+
- Keep short description under 120 characters
|
|
267
|
+
|
|
268
|
+
**Good:**
|
|
269
|
+
```markdown
|
|
270
|
+
# fast-csv
|
|
271
|
+
|
|
272
|
+
Fast CSV parser and formatter for Node.js.
|
|
273
|
+
|
|
274
|
+
Stream-based CSV processing for large datasets without loading everything into memory. Supports custom delimiters, headers, and transformations.
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
**Avoid:**
|
|
278
|
+
```markdown
|
|
279
|
+
# My Project
|
|
280
|
+
|
|
281
|
+
A project that does stuff.
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Code Examples
|
|
285
|
+
|
|
286
|
+
- Always use syntax highlighting (```js, ```python)
|
|
287
|
+
- Show complete, runnable examples
|
|
288
|
+
- Include expected output when helpful
|
|
289
|
+
- Start simple, then show advanced usage
|
|
290
|
+
|
|
291
|
+
### Installation Section
|
|
292
|
+
|
|
293
|
+
Per [Standard Readme](https://github.com/RichardLitt/standard-readme):
|
|
294
|
+
- Show one-liner using relevant package manager
|
|
295
|
+
- Include prerequisites if any
|
|
296
|
+
- Platform-specific instructions when needed
|
|
297
|
+
|
|
298
|
+
### Table of Contents
|
|
299
|
+
|
|
300
|
+
Required when README exceeds 100 lines. Must link to all sections:
|
|
301
|
+
|
|
302
|
+
```markdown
|
|
303
|
+
## Table of Contents
|
|
304
|
+
|
|
305
|
+
- [Installation](#installation)
|
|
306
|
+
- [Usage](#usage)
|
|
307
|
+
- [API](#api)
|
|
308
|
+
- [Contributing](#contributing)
|
|
309
|
+
- [License](#license)
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
## Common Mistakes
|
|
313
|
+
|
|
314
|
+
From [community guidelines](https://tilburgsciencehub.com/topics/collaborate-share/share-your-work/content-creation/readme-best-practices/):
|
|
315
|
+
|
|
316
|
+
- **Walls of text**: Break up with headers, bullets, spacing
|
|
317
|
+
- **Missing install steps**: If someone can't run it, they leave
|
|
318
|
+
- **Inconsistent formatting**: Same style for all code blocks
|
|
319
|
+
- **Outdated info**: Old scripts/commands cause confusion
|
|
320
|
+
- **No formatting**: Raw text looks unprofessional
|
|
321
|
+
- **Jumping heading levels**: Don't go from ## to #####
|
|
322
|
+
|
|
323
|
+
## Key Principles
|
|
324
|
+
|
|
325
|
+
1. **Lead with value** - Users should understand what they get in 10 seconds
|
|
326
|
+
2. **Show, don't tell** - Code examples > descriptions
|
|
327
|
+
3. **Test your examples** - Run every code snippet before publishing
|
|
328
|
+
4. **Too long > too short** - Link to detailed docs rather than cutting content
|
|
329
|
+
5. **Keep it current** - Outdated docs are worse than no docs
|
|
330
|
+
6. **Progressive disclosure** - Overview in README, details in linked docs
|
|
331
|
+
|
|
332
|
+
## Example Usage
|
|
333
|
+
|
|
334
|
+
**Creating:**
|
|
335
|
+
- "Create a README for my Python CLI that converts images to ASCII"
|
|
336
|
+
- "I need a README for my React component library"
|
|
337
|
+
- "Help me write documentation for my REST API"
|
|
338
|
+
|
|
339
|
+
**Reviewing:**
|
|
340
|
+
- "Review my README and suggest improvements"
|
|
341
|
+
- "What sections am I missing?"
|
|
342
|
+
- "Is my installation section clear enough?"
|
|
343
|
+
|
|
344
|
+
**Badges:**
|
|
345
|
+
- "What badges should I add to my npm package?"
|
|
346
|
+
- "Help me set up CI badges for my GitHub Actions workflow"
|
|
347
|
+
|
|
348
|
+
## Limitations
|
|
349
|
+
|
|
350
|
+
- Cannot verify if installation instructions actually work
|
|
351
|
+
- Badge URLs require your specific repo/package info
|
|
352
|
+
- Cannot auto-generate code examples without understanding your codebase
|
|
353
|
+
- Screenshots/GIFs must be provided by you
|
|
354
|
+
|
|
355
|
+
## Sources
|
|
356
|
+
|
|
357
|
+
- [Make a README](https://www.makeareadme.com/) - Comprehensive README guide
|
|
358
|
+
- [Standard Readme](https://github.com/RichardLitt/standard-readme) - Formal specification
|
|
359
|
+
- [Google Style Guide](https://google.github.io/styleguide/docguide/READMEs.html) - Corporate standards
|
|
360
|
+
- [Best-README-Template](https://github.com/othneildrew/Best-README-Template) - Popular template
|
|
361
|
+
- [Shields.io](https://shields.io/) - Badge generation
|
|
362
|
+
- [PyOpenSci Guide](https://www.pyopensci.org/python-package-guide/documentation/repository-files/readme-file-best-practices.html) - Python-specific practices
|