@ner076/prd-toolkit
v0.1.5
Published
AI-powered PRD toolkit: guided discovery + auto-dev ready PRD generation for Claude Code and Opencode
Maintainers
Readme
@ner076/prd-toolkit
AI-powered PRD toolkit — guided discovery + auto-dev ready PRD generation for Claude Code and Opencode.
Turn a fuzzy product idea into a PRD that AI coding agents can implement without going off-rails.
What you get
Two skills, one install:
prd-discovery— guided 8-phase discovery session (Express / Guided / Deep modes) that captures features, sub-features, dependencies, data model, business rules, and granular design tokens. Outputs a structureddiscovery-output.md.prd-generator— transforms the discovery output into a 16-section PRD with API contracts, data schemas, screen specs, state machines, test scenarios, and a full traceability matrix.
Install
One command, auto-detects your environment:
npx @ner076/prd-toolkit installOr be explicit:
# Both targets, user-wide
npx @ner076/prd-toolkit install --target=all --scope=user
# Only Opencode, non-interactive
npx @ner076/prd-toolkit install --target=opencode -y
# Preview without writing
npx @ner076/prd-toolkit install --dryRunInstall locations
| Target | Scope | Location |
|--------|-------|----------|
| Claude Code | user | ~/.claude/skills/<name>/SKILL.md |
| Claude Code | project | ./.claude/skills/<name>/SKILL.md |
| Opencode | user | ~/.config/opencode/command/<name>.md |
| Opencode | project | ./.opencode/command/<name>.md |
Default scope is project so you don't pollute global config.
Usage
In Claude Code
$ cd my-product
$ claude
> jalankan prd-discovery, gua mau bikin aplikasi XClaude Code will auto-load the prd-discovery skill and start the guided session.
In Opencode
$ opencode
> /prd-discoveryThe command runs the same discovery workflow as a subtask.
Chained workflow
1. /prd-discovery → produces discovery-output.md
2. /prd-generator → produces PRD-<slug>.md
3. Feed PRD to your AI coding agent for auto-implementationCommand reference
npx @ner076/prd-toolkit <command> [flags]
Commands:
install Install skills to target environment(s)
uninstall Remove installed skills (tracked via manifest)
update Re-install to pick up latest version
list Show installed skills across all targets
doctor Diagnose environment & install health
help Show help
Flags:
--target=<t> claude-code | opencode | all | auto (default: auto)
--scope=<s> user | project (default: project)
-y, --yes Skip confirmation prompts
-f, --force Overwrite existing files
--dryRun Preview without writing
-v, --version Print versionDesign
Why a toolkit, not just skill files?
- One-command install works across environments
- Format transformation — source of truth is one
SKILL.md, adapters handle target-specific formatting - Manifest-based uninstall — clean removal without touching unrelated files
- Environment detection — no manual "where do I put this?" hunt
Architecture
prd-toolkit/
├── bin/prd-toolkit.js # CLI entry
├── src/
│ ├── install.js # orchestrator
│ ├── uninstall.js
│ ├── list.js
│ ├── doctor.js
│ ├── detect.js # env detection
│ ├── help.js
│ ├── version.js
│ └── adapters/
│ ├── claude-code.js # copies SKILL.md verbatim
│ └── opencode.js # transforms frontmatter for command format
└── skills/
├── prd-discovery/SKILL.md
└── prd-generator/SKILL.mdSource SKILL.md files use Claude Code frontmatter (name, description). The Opencode adapter transforms this into command-style frontmatter (description, agent, subtask) while preserving the body verbatim.
Requirements
- Node.js 18+ (uses native
parseArgs) - At least one of: Claude Code CLI, Opencode CLI
Publishing (maintainer notes)
This package publishes to npm under @ner076. To release:
# Bump version
npm version patch|minor|major
# Push tag — CI publishes automatically
git push --follow-tagsCI runs on Node 18/20/22 across Ubuntu, macOS, and Windows. Publish requires an npm access token stored as NPM_TOKEN in GitHub Actions secrets.
License
MIT © Bagas
