# Docs Data Type List Members

> Use when extracting and categorizing public members from a Scala data type for documentation completeness checks.

- Skill: `zio/docs-data-type-list-members` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add zio/docs-data-type-list-members`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zio/docs-data-type-list-members/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: zio (https://skillmd.com/u/zio)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/zio/docs-data-type-list-members

---


# List Data Type Members

Parses a Scala source file and prints public members of the named type, grouped into sections for easy auditing.

```bash
scala-cli ${CLAUDE_PLUGIN_ROOT}/skills/docs-data-type-list-members/extract-members.scala \
  -- <source-file> [<type-name>]
```

Run with `--help` for the full usage.

**Default text output sections** (each preceded by a header line ending in `===`):
- **Companion Object Members** — factory methods, utilities, and static operations
- **Public API** — instance methods on the type itself
- **Inherited Methods** — methods from parent classes/traits (when cross-file analysis is available)

Excludes private/protected members and internal helpers.

## JSON Output

For machine-readable output (e.g., when piping into other scripts or filtering with `jq`), pass `--json`:

```bash
scala-cli ${CLAUDE_PLUGIN_ROOT}/skills/docs-data-type-list-members/extract-members.scala \
  -- --json <source-file> [<type-name>] | jq '.publicApi'
```

The JSON schema is:

```json
{
  "sourceFile": "<path>",
  "typeName":   "<name> or null",
  "companion":  ["..."],
  "publicApi":  ["..."],
  "inherited":  []
}
```

**Exit codes:**

| Code | Meaning                                                          |
|------|------------------------------------------------------------------|
| `0`  | Success — at least one public member was extracted.              |
| `1`  | No public members found in the file or named type.               |
| `2`  | Invocation error (missing arguments, file not found).            |

Pipe the output into `/docs-report-method-coverage` to check whether all members appear in a reference doc.

