원클릭으로
writing-readmes
Writing and maintaining package READMEs
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Writing and maintaining package READMEs
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Coding patterns and conventions (package design, types, DI, docs)
Creating a new package in the monorepo
Running CI locally with Dagger
Debugging (source maps, cache, test failures)
DevContainer runtimes, CLI tools, and version parity with Dagger
Installing a package dependency
| name | writing-readmes |
| description | Writing and maintaining package READMEs |
Reference:
../../../AGENTS.mdExample:../../../tools/haywire/README.md·../../../apps/juniper/README.md
Every published package needs a README that serves two audiences simultaneously:
README.md — How to use the package. Should not justify the package's existence or compare it to alternatives. Focus on guiding an active user.
WHY-<PACKAGE>.md — Why this package exists, the problem it solves, motivation, design decisions, comparison to alternatives. Especialy useful for more complicated packages that may have existing alternatives. Link from README when relevant.
Rule: If a section answers "why does this exist?" rather than "how do I use it?", it belongs in WHY-<PACKAGE>.md.
See ../../../tools/haywire/WHY-HAYWIRE.md as the reference example.
<div style="text-align:center">
# Package Name
One-sentence description of what it does.
[](https://www.npmjs.com/package/<npm-name>)
[](LICENSE)
</div>
## Contents
- [Install](#install)
- [Example](#example)
- [Usage](#usage)
- [API](#api)
- [Also See](#also-see) ← only if cross-references exist
## Install
\`\`\`sh
npm i <package-name>
\`\`\`
## Example
\`\`\`ts
// Minimal, runnable, copy-pasteable example
\`\`\`
## Usage
Brief description of module system (ESM/CJS), import patterns, and any constraints.
## API
### `functionName(param1, param2?, options?)`
Brief description of what it does.
**Parameters**
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `param1` | `string` | — | Required. What it does. |
| `param2` | `number` | `0` | Optional. What it does. |
| `options` | `Options` | `{}` | Optional. |
**Returns** `ReturnType` — description of what is returned.
**Throws** `ErrorType` — when it throws (if applicable).
\`\`\`ts
// Example
const result = functionName('hello', 42);
\`\`\`
#### Options
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `check` | `boolean` | `false` | If `true`, validates without writing. |
---
### `ClassName`
Description of the class.
#### `new ClassName(options)`
Constructor parameters.
#### `.methodName(param): ReturnType`
Method description.
## Also See
- [`other-package`](https://example.com/link-to-other-package) — brief description of relationship
Use the actual TypeScript signature but simplified for readability:
### `findImport(fileNames, options?)` ← use this
### `findImport(fileNames: string[], options?: FindImportOptions): Promise<unknown>` ← too verbose for header
Always include a table for functions with 2+ parameters or any complex options:
| Parameter | Type | Default | Description |
|---|---|---|---|
name | string | — | Required fields use — as default |
timeout | number | 5000 | Optional fields show their default |
options | Options | {} | Complex options get their own sub-table |
— in default column, or say "Required." in description)### `ClassName`
Brief description.
#### Constructor: `new ClassName(dep1, dep2)`
Constructor docs.
#### `.methodName(params): ReturnType`
Method docs.
#### `.propertyName: Type`
Property docs.
Export types used by the API should be documented inline where first used, or in a dedicated ## Types section for complex types.
If a function can throw, document it:
**Throws** `TypeError` — if `param` is not a string.
Create WHY-<PACKAGE>.md when:
Do NOT create a WHY file for:
When the API changes:
### headerWhen reading this skill to write a README: