npm package: @q01/claude-skill-create-mockdataprovider
Description: Q01 Mock Data Provider generation skill for Claude Code
Latest version: 1.0.0

# @q01/claude-skill-create-mockdataprovider

Q01 Mock Data Provider generation skill for Claude Code.

This package installs a Claude Code skill that guides the generation of mock data providers for Q01 platform microservices. Mock data providers enable deterministic, repeatable, and realistic test data generation for development and testing workflows.

## Installation

```bash
npx @q01/claude-skill-create-mockdataprovider install
```

## Commands

```bash
# Install the skill into Claude Code
npx @q01/claude-skill-create-mockdataprovider install

# Update an existing installation
npx @q01/claude-skill-create-mockdataprovider update

# Remove the skill from Claude Code
npx @q01/claude-skill-create-mockdataprovider uninstall

# Check installation health
npx @q01/claude-skill-create-mockdataprovider doctor
```

### install

Copies all skill files into `~/.claude/skills/q01-create-mockdataprovider/`, installs the `/create-mockdataprovider` command into `~/.claude/commands/q01-create-mockdataprovider/`, and appends the skill reference block to `~/.claude/CLAUDE.md` (using sentinel comments to track the block). Creates backups of existing files before overwriting.

### update

Reinstalls all skill files while preserving the original `installedAt` timestamp. Updates the CLAUDE.md block if it has changed. Creates a backup of the existing skill directory before updating.

### uninstall

Removes all installed skill files, the commands directory, the sentinel block from CLAUDE.md, and the manifest. Leaves the skill directory in place if other files remain.

### doctor

Verifies the installation is healthy: checks that all expected files exist, the manifest is consistent, the CLAUDE.md sentinel block is present, and the installed version matches the package version. Exits with code 0 if everything is OK, 1 if problems are found.

## Environment Variables

| Variable | Description |
|---|---|
| `Q01_CLAUDE_SKILL_TARGET` | Override the default `~/.claude` target directory. Useful for testing or custom installations. |

## Local Testing

```bash
npm test
```

The test suite uses a temporary directory (via `Q01_CLAUDE_SKILL_TARGET`) to run install/update/uninstall/doctor cycles without touching your real `~/.claude` directory.

## Project Structure

```
bin/
  cli.js                    # CLI entry point

src/
  index.js                  # Programmatic API re-exports
  commands/
    install.js              # Install command
    update.js               # Update command
    uninstall.js            # Uninstall command
    doctor.js               # Doctor (health check) command
  lib/
    logger.js               # Minimal ANSI color logger
    paths.js                # Path resolution (supports Q01_CLAUDE_SKILL_TARGET)
    fs-utils.js             # File system utilities (zero dependencies)
    backup.js               # Backup helpers
    manifest.js             # Manifest read/write

skill/                      # Skill files distributed with the package
  SKILL.md
  CUSTOM_CLAUDE.md
  commands/
    create-mockdataprovider.md
  contract/
    coreapi.rules.md
    coreapi.openapi.yaml
  docs/
    playbook.md
    examples.md
    snippets/
      go_get_list_resty.md
      go_get_single_resty.md
      go_post_bulk_resty.md

test/
  run-tests.js              # Test suite

commands/                   # Source command (not distributed)
  create-mockdataprovider.md

contract/                   # Source contract files (not distributed)
  coreapi.rules.md
  coreapi.openapi.yaml

docs/                       # Source documentation (not distributed)
  playbook.md
  examples.md
  snippets/
    go_get_list_resty.md
    go_get_single_resty.md
    go_post_bulk_resty.md
```

## Usage in Claude Code

After installation, use the `/create-mockdataprovider` command in Claude Code to start a guided workflow for generating mock data providers. Claude will verify the microservice compatibility, collect entity definitions, validate the input against the schema, generate realistic mock data, and verify the final result following the skill's rules and conventions.

Esempio di utilizzo:

/create-mockdataprovider
Genera un mock data provider per il microservizio corrente, con entità User, Order, Product.