noah-cursor 1.5.2 → 1.5.4
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/README.md
CHANGED
|
@@ -2,40 +2,131 @@
|
|
|
2
2
|
<img src="https://cdn.jsdelivr.net/npm/noah-cursor@latest/assets/noah-cursor-banner.png" alt="Noah Cursor" width="100%" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<p align="center">
|
|
6
|
+
<strong>The CLI for shipping Cursor setups that actually work.</strong><br />
|
|
7
|
+
Install battle-tested Skills, Rules, and workflows into any project — in one command.
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
<p align="center">
|
|
11
|
+
<a href="https://www.npmjs.com/package/noah-cursor"><img src="https://img.shields.io/npm/v/noah-cursor.svg" alt="npm version" /></a>
|
|
12
|
+
<a href="https://www.npmjs.com/package/noah-cursor"><img src="https://img.shields.io/npm/dm/noah-cursor.svg" alt="npm downloads" /></a>
|
|
13
|
+
<a href="LICENSE"><img src="https://img.shields.io/npm/l/noah-cursor.svg" alt="license" /></a>
|
|
14
|
+
<img src="https://img.shields.io/node/v/noah-cursor.svg" alt="node" />
|
|
15
|
+
<a href="https://www.buymeacoffee.com/itsmenoahpoli"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-FFDD00?style=flat&logo=buymeacoffee&logoColor=black" alt="Buy Me a Coffee" /></a>
|
|
16
|
+
</p>
|
|
6
17
|
|
|
7
18
|
```bash
|
|
8
|
-
npx noah-cursor add --skill
|
|
19
|
+
npx noah-cursor add --skill commit-push
|
|
9
20
|
```
|
|
10
21
|
|
|
11
|
-
|
|
22
|
+
Stop copy-pasting Cursor prompts between repos. **Noah Cursor** is a developer CLI + curated registry: reusable Skills, Rules, Prompts, MCP configs, and Presets that drop straight into `.cursor/` — no clone, no sign-in, no friction.
|
|
23
|
+
|
|
24
|
+
## Built for your stack
|
|
25
|
+
|
|
26
|
+
<p align="center">
|
|
27
|
+
<img src="https://skillicons.dev/icons?i=nodejs,typescript,react,nextjs,vue,nuxtjs,nestjs,laravel,php,git&perline=10" alt="Tech stack" />
|
|
28
|
+
</p>
|
|
29
|
+
|
|
30
|
+
<p align="center">
|
|
31
|
+
<img src="https://img.shields.io/badge/Cursor-000000?style=flat-square&logo=cursor&logoColor=white" alt="Cursor" />
|
|
32
|
+
<img src="https://img.shields.io/badge/Node.js-339933?style=flat-square&logo=nodedotjs&logoColor=white" alt="Node.js" />
|
|
33
|
+
<img src="https://img.shields.io/badge/TypeScript-3178C6?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript" />
|
|
34
|
+
<img src="https://img.shields.io/badge/React-61DAFB?style=flat-square&logo=react&logoColor=black" alt="React" />
|
|
35
|
+
<img src="https://img.shields.io/badge/Next.js-000000?style=flat-square&logo=nextdotjs&logoColor=white" alt="Next.js" />
|
|
36
|
+
<img src="https://img.shields.io/badge/Nuxt-00DC82?style=flat-square&logo=nuxt&logoColor=black" alt="Nuxt" />
|
|
37
|
+
<img src="https://img.shields.io/badge/NestJS-E0234E?style=flat-square&logo=nestjs&logoColor=white" alt="NestJS" />
|
|
38
|
+
<img src="https://img.shields.io/badge/Laravel-FF2D20?style=flat-square&logo=laravel&logoColor=white" alt="Laravel" />
|
|
39
|
+
</p>
|
|
40
|
+
|
|
41
|
+
Curated Skills & Rules for the stacks you already ship — React dashboards, Laravel APIs, Next/Nuxt marketing sites, NestJS, and Node.
|
|
42
|
+
|
|
43
|
+
## Why developers use it
|
|
44
|
+
|
|
45
|
+
| Pain | Noah Cursor |
|
|
46
|
+
| ---- | ----------- |
|
|
47
|
+
| Rebuilding the same Cursor setup on every project | One command installs a full workflow |
|
|
48
|
+
| Vague AI prompts that drift between teammates | Versioned Skills & Rules from a real registry |
|
|
49
|
+
| Hunting docs every time you switch stacks | Stack-specific rules for React, Laravel, Next, Nuxt |
|
|
50
|
+
| Manual QA loops with lint/doctor tools | Fix Skills that run → fix → verify |
|
|
51
|
+
|
|
52
|
+
Built for people who live in the terminal and want Cursor to feel like a product, not a blank slate.
|
|
53
|
+
|
|
54
|
+
## Demo
|
|
55
|
+
|
|
56
|
+
<p align="center">
|
|
57
|
+
<img src="https://cdn.jsdelivr.net/gh/itsmenoahpoli/noah-cursor@main/demos/noah-cursor.gif" alt="Noah Cursor CLI demo" width="100%" />
|
|
58
|
+
</p>
|
|
59
|
+
|
|
60
|
+
## Quick start
|
|
61
|
+
|
|
62
|
+
Requires **Node.js 20+**.
|
|
12
63
|
|
|
13
64
|
```bash
|
|
14
|
-
#
|
|
15
|
-
npx noah-cursor
|
|
65
|
+
# Try it instantly — no global install
|
|
66
|
+
npx noah-cursor browse
|
|
16
67
|
|
|
17
|
-
# Or install
|
|
68
|
+
# Or install once
|
|
18
69
|
npm install -g noah-cursor
|
|
70
|
+
noah-cursor browse
|
|
19
71
|
```
|
|
20
72
|
|
|
21
|
-
|
|
73
|
+
The registry ships inside the package. Nothing to clone. Nothing to authenticate.
|
|
74
|
+
|
|
75
|
+
### 30-second wins
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Ship cleaner commits every time
|
|
79
|
+
npx noah-cursor add --skill commit-push
|
|
80
|
+
|
|
81
|
+
# Auto-generate a solid project README
|
|
82
|
+
npx noah-cursor add --skill generate-readme
|
|
83
|
+
|
|
84
|
+
# React health pass: run doctor → fix → verify
|
|
85
|
+
npx noah-cursor add --skill react-doctor-fix
|
|
86
|
+
|
|
87
|
+
# Stack rules for a Laravel API + React dashboard
|
|
88
|
+
npx noah-cursor add --rule laravel-api --rule react-spa-dashboard
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## What you get
|
|
92
|
+
|
|
93
|
+
### Skills — agent workflows you can reuse
|
|
94
|
+
|
|
95
|
+
| Skill | What it does |
|
|
96
|
+
| ----- | ------------ |
|
|
97
|
+
| <img src="https://skillicons.dev/icons?i=git" alt="Git" width="20" height="20" /> `commit-push` | Stage, group by category, draft a clean commit, push |
|
|
98
|
+
| <img src="https://skillicons.dev/icons?i=md" alt="Docs" width="20" height="20" /> `generate-readme` | Generate README with stack, deps, prerequisites, setup |
|
|
99
|
+
| <img src="https://skillicons.dev/icons?i=react" alt="React" width="20" height="20" /> `react-doctor-fix` | Run react-doctor, fix findings, verify no regressions |
|
|
100
|
+
| <img src="https://skillicons.dev/icons?i=laravel" alt="Laravel" width="20" height="20" /> `larastan-fix` | Run Larastan on Laravel, fix, verify |
|
|
101
|
+
| <img src="https://skillicons.dev/icons?i=nestjs" alt="NestJS" width="20" height="20" /> `nestjs-knip-fix` | Knip on NestJS — unused code/deps out, features intact |
|
|
102
|
+
| <img src="https://skillicons.dev/icons?i=nodejs" alt="Node.js" width="20" height="20" /> `node-doctor-fix` | Bundled node-doctor (Knip + hygiene) for generic Node |
|
|
103
|
+
|
|
104
|
+
### Rules — stack guidance baked into Cursor
|
|
105
|
+
|
|
106
|
+
| Rule | For |
|
|
107
|
+
| ---- | --- |
|
|
108
|
+
| <img src="https://skillicons.dev/icons?i=react,laravel,nextjs,nuxtjs" alt="Stacks" height="20" /> `stack-architecture` | Choosing React SPA vs Laravel API vs Next/Nuxt marketing |
|
|
109
|
+
| <img src="https://skillicons.dev/icons?i=react" alt="React" width="20" height="20" /> `react-spa-dashboard` | React + TypeScript + TanStack Query dashboards |
|
|
110
|
+
| <img src="https://skillicons.dev/icons?i=laravel" alt="Laravel" width="20" height="20" /> `laravel-api` | Headless Laravel APIs (Sanctum-ready) |
|
|
111
|
+
| <img src="https://skillicons.dev/icons?i=nextjs" alt="Next.js" width="20" height="20" /> `nextjs-marketing` | Next.js App Router marketing / branding sites |
|
|
112
|
+
| <img src="https://skillicons.dev/icons?i=nuxtjs" alt="Nuxt" width="20" height="20" /> `nuxt-marketing` | Nuxt 3+ marketing / branding sites |
|
|
113
|
+
|
|
114
|
+
Prompts, MCP configs, and Presets are supported by the CLI — more shipping soon.
|
|
22
115
|
|
|
23
116
|
## Commands
|
|
24
117
|
|
|
25
|
-
| Command
|
|
26
|
-
|
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `search` | Search
|
|
30
|
-
| `list`
|
|
31
|
-
| `remove` |
|
|
32
|
-
| `update` | Re-fetch and update installed assets
|
|
33
|
-
| `doctor` | Diagnose environment health
|
|
118
|
+
| Command | Description |
|
|
119
|
+
| ------- | ----------- |
|
|
120
|
+
| `browse` | Interactive TUI — discover & install without memorizing ids |
|
|
121
|
+
| `add` | Install Skills, Rules, Prompts, MCP, or Presets |
|
|
122
|
+
| `search` | Search the registry |
|
|
123
|
+
| `list` | List registry or installed assets |
|
|
124
|
+
| `remove` | Uninstall an asset |
|
|
125
|
+
| `update` | Re-fetch and update installed assets |
|
|
126
|
+
| `doctor` | Diagnose environment health |
|
|
34
127
|
|
|
35
128
|
### browse
|
|
36
129
|
|
|
37
|
-
Interactive TUI for discovering assets without knowing their ids:
|
|
38
|
-
|
|
39
130
|
```bash
|
|
40
131
|
noah-cursor browse
|
|
41
132
|
noah-cursor browse --browse-skills
|
|
@@ -45,18 +136,12 @@ noah-cursor browse --browse-mcp
|
|
|
45
136
|
noah-cursor browse --browse-presets
|
|
46
137
|
```
|
|
47
138
|
|
|
48
|
-
```bash
|
|
49
|
-
npx noah-cursor browse
|
|
50
|
-
npx noah-cursor browse --browse-skills
|
|
51
|
-
```
|
|
52
|
-
|
|
53
139
|
Controls: ↑↓ navigate · Space select · A toggle all · I invert · Enter confirm · Esc cancel
|
|
54
140
|
|
|
55
141
|
### add
|
|
56
142
|
|
|
57
143
|
```bash
|
|
58
144
|
noah-cursor add
|
|
59
|
-
|
|
60
145
|
--skill <name>
|
|
61
146
|
--rule <name>
|
|
62
147
|
--prompt <name>
|
|
@@ -69,21 +154,18 @@ noah-cursor add
|
|
|
69
154
|
--verbose
|
|
70
155
|
```
|
|
71
156
|
|
|
72
|
-
Always installs from **Noah's bundled registry
|
|
73
|
-
|
|
74
|
-
Examples:
|
|
157
|
+
Always installs from **Noah's bundled registry**.
|
|
75
158
|
|
|
76
159
|
```bash
|
|
77
|
-
npx noah-cursor add --skill test
|
|
78
|
-
npx noah-cursor add --rule test
|
|
79
|
-
npx noah-cursor add --all
|
|
80
160
|
npx noah-cursor add --skill commit-push
|
|
161
|
+
npx noah-cursor add --rule nextjs-marketing
|
|
162
|
+
npx noah-cursor add --all
|
|
81
163
|
```
|
|
82
164
|
|
|
83
165
|
### search / list / remove / update / doctor
|
|
84
166
|
|
|
85
167
|
```bash
|
|
86
|
-
noah-cursor search
|
|
168
|
+
noah-cursor search doctor
|
|
87
169
|
noah-cursor list
|
|
88
170
|
noah-cursor list --installed
|
|
89
171
|
noah-cursor remove skill test --yes
|
|
@@ -91,7 +173,22 @@ noah-cursor update --yes
|
|
|
91
173
|
noah-cursor doctor
|
|
92
174
|
```
|
|
93
175
|
|
|
94
|
-
##
|
|
176
|
+
## How it works
|
|
177
|
+
|
|
178
|
+
Assets land in your project under `.cursor/`:
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
.cursor/
|
|
182
|
+
skills/
|
|
183
|
+
rules/
|
|
184
|
+
prompts/
|
|
185
|
+
mcp/
|
|
186
|
+
noah.json # tracks what you installed
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
`noah.json` keeps versions and registry metadata so `update` and `remove` stay reliable across machines and teammates.
|
|
190
|
+
|
|
191
|
+
## Build your own registry assets
|
|
95
192
|
|
|
96
193
|
This repo is both the **CLI** and the **registry**. At the project root:
|
|
97
194
|
|
|
@@ -104,19 +201,7 @@ mcp/
|
|
|
104
201
|
presets/
|
|
105
202
|
```
|
|
106
203
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
- **skill** `test`
|
|
110
|
-
- **skill** `commit-push`
|
|
111
|
-
- **skill** `react-doctor-fix` — run react-doctor, fix findings, verify no regressions
|
|
112
|
-
- **skill** `larastan-fix` — run Larastan on Laravel, fix findings, verify no regressions
|
|
113
|
-
- **skill** `nestjs-knip-fix` — run Knip on NestJS, fix unused code/deps, verify no regressions
|
|
114
|
-
- **skill** `node-doctor-fix` — bundled node-doctor (Knip + package hygiene) for generic Node
|
|
115
|
-
- **rule** `test`
|
|
116
|
-
|
|
117
|
-
Add curated Noah assets under those folders and register them in `manifest.json`. Presets are supported by the CLI but none are published in this registry yet.
|
|
118
|
-
|
|
119
|
-
### manifest.json
|
|
204
|
+
Add an asset folder, register it in `manifest.json`, ship. Each `id` maps to a folder under the matching directory (or set an explicit `path`).
|
|
120
205
|
|
|
121
206
|
```json
|
|
122
207
|
{
|
|
@@ -125,66 +210,60 @@ Add curated Noah assets under those folders and register them in `manifest.json`
|
|
|
125
210
|
"description": "My Cursor assets",
|
|
126
211
|
"skills": [
|
|
127
212
|
{
|
|
128
|
-
"id": "
|
|
213
|
+
"id": "my-workflow",
|
|
129
214
|
"version": "1.0.0",
|
|
130
|
-
"description": "
|
|
131
|
-
"tags": ["
|
|
132
|
-
}
|
|
133
|
-
],
|
|
134
|
-
"rules": [
|
|
135
|
-
{
|
|
136
|
-
"id": "test",
|
|
137
|
-
"version": "1.0.0",
|
|
138
|
-
"description": "Sample rule"
|
|
215
|
+
"description": "What this skill does",
|
|
216
|
+
"tags": ["git"]
|
|
139
217
|
}
|
|
140
218
|
],
|
|
219
|
+
"rules": [],
|
|
141
220
|
"prompts": [],
|
|
142
221
|
"mcp": [],
|
|
143
222
|
"presets": []
|
|
144
223
|
}
|
|
145
224
|
```
|
|
146
225
|
|
|
147
|
-
Each asset `id` maps to a folder under the matching directory (e.g. `skills/test/`), unless an explicit `path` is set.
|
|
148
|
-
|
|
149
|
-
## Installation targets
|
|
150
|
-
|
|
151
|
-
Assets are copied into your project:
|
|
152
|
-
|
|
153
|
-
```
|
|
154
|
-
.cursor/
|
|
155
|
-
skills/
|
|
156
|
-
rules/
|
|
157
|
-
prompts/
|
|
158
|
-
mcp/
|
|
159
|
-
noah.json
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### .cursor/noah.json
|
|
163
|
-
|
|
164
|
-
```json
|
|
165
|
-
{
|
|
166
|
-
"registry": "https://github.com/itsmenoahpoli/noah-cursor",
|
|
167
|
-
"installed": [
|
|
168
|
-
{
|
|
169
|
-
"type": "skill",
|
|
170
|
-
"id": "test",
|
|
171
|
-
"version": "1.0.0"
|
|
172
|
-
}
|
|
173
|
-
]
|
|
174
|
-
}
|
|
175
|
-
```
|
|
176
|
-
|
|
177
226
|
## Development
|
|
178
227
|
|
|
179
228
|
```bash
|
|
180
229
|
npm install
|
|
181
|
-
npm run build #
|
|
230
|
+
npm run build # TypeScript + bundle registry → dist
|
|
182
231
|
npm test
|
|
183
232
|
npm run dev -- doctor
|
|
184
233
|
```
|
|
185
234
|
|
|
186
|
-
`npm run build` copies `manifest.json` plus `skills/`, `rules/`, `prompts/`, `mcp/`, and `presets/` into `dist/noah-registry/` so published installs never need
|
|
235
|
+
`npm run build` copies `manifest.json` plus `skills/`, `rules/`, `prompts/`, `mcp/`, and `presets/` into `dist/noah-registry/` so published installs never need GitHub access.
|
|
236
|
+
|
|
237
|
+
## Contributing
|
|
238
|
+
|
|
239
|
+
Ideas for Skills, Rules, or MCP configs? Open an issue or PR. The best assets are ones you already use on real projects — share them so other developers can install them in one command.
|
|
240
|
+
|
|
241
|
+
## Feedback & requests
|
|
242
|
+
|
|
243
|
+
Have feedback, suggestions, or feature requests? I'd love to hear from you.
|
|
244
|
+
|
|
245
|
+
📧 **Email:** [patrickpolicarpio08@gmail.com](mailto:patrickpolicarpio08@gmail.com)
|
|
246
|
+
|
|
247
|
+
Whether it's a Skill you want added, a Rule for your stack, a bug report, or an idea to improve the CLI — send a note. Every message helps shape the product.
|
|
248
|
+
|
|
249
|
+
## Support
|
|
250
|
+
|
|
251
|
+
If Noah Cursor saves you time, consider buying me a coffee — it helps keep the CLI and registry maintained.
|
|
252
|
+
|
|
253
|
+
<p align="center">
|
|
254
|
+
<a href="https://www.buymeacoffee.com/itsmenoahpoli">
|
|
255
|
+
<img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" height="50" />
|
|
256
|
+
</a>
|
|
257
|
+
</p>
|
|
258
|
+
|
|
259
|
+
<p align="center">
|
|
260
|
+
<a href="https://www.buymeacoffee.com/itsmenoahpoli">
|
|
261
|
+
<img src="assets/qr-code.png" alt="Buy Me a Coffee QR code" width="220" />
|
|
262
|
+
</a>
|
|
263
|
+
<br />
|
|
264
|
+
<sub>Scan to support on Buy Me a Coffee</sub>
|
|
265
|
+
</p>
|
|
187
266
|
|
|
188
267
|
## License
|
|
189
268
|
|
|
190
|
-
MIT
|
|
269
|
+
MIT © [Noah Poli](https://github.com/itsmenoahpoli)
|
|
Binary file
|
|
@@ -39,6 +39,12 @@
|
|
|
39
39
|
"version": "1.0.0",
|
|
40
40
|
"description": "Run bundled node-doctor (Knip + hygiene), fix findings, verify features still work",
|
|
41
41
|
"tags": ["node", "knip", "doctor", "qa", "cli"]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "generate-readme",
|
|
45
|
+
"version": "1.0.0",
|
|
46
|
+
"description": "Generate a project README with stack, deps, prerequisites, and setup guide",
|
|
47
|
+
"tags": ["docs", "readme", "documentation", "setup"]
|
|
42
48
|
}
|
|
43
49
|
],
|
|
44
50
|
"rules": [
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: generate-readme
|
|
3
|
+
description: >-
|
|
4
|
+
Generates a project README with title, description, tech stack, dependencies,
|
|
5
|
+
prerequisites, installation, and setup guide from the real codebase. Use when
|
|
6
|
+
the user runs /generate-readme, asks for a project README, docs for setup, or
|
|
7
|
+
to rewrite/improve README.md.
|
|
8
|
+
disable-model-invocation: true
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# /generate-readme
|
|
12
|
+
|
|
13
|
+
Generate (or rewrite) a **project `README.md`** from the actual repository — not generic filler.
|
|
14
|
+
|
|
15
|
+
Infer title, description, tech stack, dependencies, prerequisites, and setup steps from real config and scripts. Prefer accuracy over marketing. Do not invent APIs, env vars, or commands that are not in the project.
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
Copy this checklist and track progress:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
README Progress:
|
|
23
|
+
- [ ] 1. Inspect project identity and stack
|
|
24
|
+
- [ ] 2. Collect prerequisites, deps, and scripts
|
|
25
|
+
- [ ] 3. Draft README from the template
|
|
26
|
+
- [ ] 4. Write README.md (preserve intentional extras)
|
|
27
|
+
- [ ] 5. Sanity-check commands and report
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### 1. Inspect project identity and stack
|
|
31
|
+
|
|
32
|
+
From the project root, gather facts (read only what exists):
|
|
33
|
+
|
|
34
|
+
| Source | Extract |
|
|
35
|
+
|--------|---------|
|
|
36
|
+
| `package.json` / `composer.json` / `pyproject.toml` / `go.mod` / `Cargo.toml` | name, description, version, scripts, engines, deps |
|
|
37
|
+
| `nest-cli.json`, `next.config.*`, `vite.config.*`, `angular.json`, `nuxt.config.*` | framework |
|
|
38
|
+
| `artisan`, `manage.py`, `Dockerfile`, `docker-compose*.yml` | runtime / services |
|
|
39
|
+
| `.env.example`, `.env.sample`, `*.env.example` | required env vars (names only — never real secrets) |
|
|
40
|
+
| existing `README.md` | keep badges, license links, or sections the user clearly wants |
|
|
41
|
+
|
|
42
|
+
Detect primary stack (examples): Node/TypeScript, NestJS, Next.js, React/Vite, Laravel/PHP, Python, Go, monorepo (list workspaces).
|
|
43
|
+
|
|
44
|
+
If the repo is empty or not a software project, stop and say so.
|
|
45
|
+
|
|
46
|
+
### 2. Collect prerequisites, deps, and scripts
|
|
47
|
+
|
|
48
|
+
Document:
|
|
49
|
+
|
|
50
|
+
1. **Prerequisites** — language/runtime versions (`engines`, `.nvmrc`, `.php-version`, `volta`, CI matrix), package managers, Docker/DB only if the project actually uses them.
|
|
51
|
+
2. **Dependencies** — summarize from lock/manifests: runtime vs dev; group by role (framework, DB, auth, UI). Do not dump every transitive package.
|
|
52
|
+
3. **Install / setup commands** — copy exact scripts from the package manager files (`npm ci`, `composer install`, `php artisan key:generate`, etc.). Prefer the package manager the repo already uses (lockfile wins: `pnpm-lock.yaml` → pnpm, `yarn.lock` → yarn, `bun.lock*` → bun, else npm / composer).
|
|
53
|
+
4. **Run / test / build** — from scripts: `dev`/`start`, `build`, `test`, `lint`.
|
|
54
|
+
5. **Optional** — migrations, seeders, queue workers, Storybook — only if present.
|
|
55
|
+
|
|
56
|
+
Never paste secrets from `.env`. Only document variable **names** from examples.
|
|
57
|
+
|
|
58
|
+
### 3. Draft README from the template
|
|
59
|
+
|
|
60
|
+
Use this structure unless the user asks for a different outline. Omit sections that do not apply (do not leave empty stubs).
|
|
61
|
+
|
|
62
|
+
```markdown
|
|
63
|
+
# <Project Title>
|
|
64
|
+
|
|
65
|
+
<One-paragraph description: what it is and who it is for.>
|
|
66
|
+
|
|
67
|
+
## Tech stack
|
|
68
|
+
|
|
69
|
+
- <Language / runtime>
|
|
70
|
+
- <Framework(s)>
|
|
71
|
+
- <Key libraries / services>
|
|
72
|
+
|
|
73
|
+
## Prerequisites
|
|
74
|
+
|
|
75
|
+
- <Tool> <version constraint if known>
|
|
76
|
+
- …
|
|
77
|
+
|
|
78
|
+
## Dependencies
|
|
79
|
+
|
|
80
|
+
### Runtime
|
|
81
|
+
- …
|
|
82
|
+
|
|
83
|
+
### Development
|
|
84
|
+
- …
|
|
85
|
+
|
|
86
|
+
## Installation
|
|
87
|
+
|
|
88
|
+
\`\`\`bash
|
|
89
|
+
# clone (if public URL known)
|
|
90
|
+
git clone <url>
|
|
91
|
+
cd <dir>
|
|
92
|
+
|
|
93
|
+
# install
|
|
94
|
+
<package-manager install>
|
|
95
|
+
\`\`\`
|
|
96
|
+
|
|
97
|
+
## Setup
|
|
98
|
+
|
|
99
|
+
1. Copy env example: `cp .env.example .env`
|
|
100
|
+
2. <configure env vars — list names>
|
|
101
|
+
3. <migrate / generate keys / link storage — only if applicable>
|
|
102
|
+
|
|
103
|
+
## Usage
|
|
104
|
+
|
|
105
|
+
\`\`\`bash
|
|
106
|
+
<dev server command>
|
|
107
|
+
\`\`\`
|
|
108
|
+
|
|
109
|
+
| Command | Description |
|
|
110
|
+
|---------|-------------|
|
|
111
|
+
| `…` | … |
|
|
112
|
+
|
|
113
|
+
## Project structure
|
|
114
|
+
|
|
115
|
+
\`\`\`text
|
|
116
|
+
<short tree of important top-level dirs only>
|
|
117
|
+
\`\`\`
|
|
118
|
+
|
|
119
|
+
## Testing
|
|
120
|
+
|
|
121
|
+
\`\`\`bash
|
|
122
|
+
<test command>
|
|
123
|
+
\`\`\`
|
|
124
|
+
|
|
125
|
+
## License
|
|
126
|
+
|
|
127
|
+
<from LICENSE / package.json, or omit if unknown>
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Rules:
|
|
131
|
+
|
|
132
|
+
- Title: human-readable (from package name or repo name); not a raw npm id unless that is the product name.
|
|
133
|
+
- Description: 1–3 sentences grounded in the codebase or existing README — no buzzword salad.
|
|
134
|
+
- Commands: fenced bash, copy-pasteable from repo root.
|
|
135
|
+
- Keep tone direct and concise (same bar as good open-source READMEs).
|
|
136
|
+
- Absolute image URLs only if the user wants a banner and a public host exists; do not break private-repo badges.
|
|
137
|
+
|
|
138
|
+
### 4. Write README.md
|
|
139
|
+
|
|
140
|
+
- Default path: `README.md` at repo root.
|
|
141
|
+
- If `README.md` already exists: **replace** with the generated doc unless the user asked to “update” or “append” — then merge carefully and keep custom sections (Changelog, Contributing, Security) when they look intentional.
|
|
142
|
+
- Do not commit or push unless the user asks.
|
|
143
|
+
- Do not delete `LICENSE` or other docs.
|
|
144
|
+
|
|
145
|
+
### 5. Sanity-check and report
|
|
146
|
+
|
|
147
|
+
Confirm every command in the README matches a real script or documented binary. Fix mismatches before finishing.
|
|
148
|
+
|
|
149
|
+
Report:
|
|
150
|
+
|
|
151
|
+
```markdown
|
|
152
|
+
## README generated
|
|
153
|
+
|
|
154
|
+
- Path: README.md
|
|
155
|
+
- Stack detected: <…>
|
|
156
|
+
- Sections included: <list>
|
|
157
|
+
- Skipped (N/A): <list>
|
|
158
|
+
- Follow-ups: <missing .env.example, unclear start script, etc.>
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Safety
|
|
162
|
+
|
|
163
|
+
- Never invent install steps for tools the project does not use.
|
|
164
|
+
- Never commit `.env` or secrets.
|
|
165
|
+
- Never overwrite a README with placeholder lorem ipsum.
|
|
166
|
+
- If multiple apps exist in a monorepo, either document the root workspace clearly or ask which package to document first (default: root + note workspaces).
|