skills/ah-create-prd-adr/SKILL.md
Create a PRD and ADR from a feature description with the "ah" prefix. Use for "ah create prd adr", "ah create prd and adr", or "ah prd adr". Takes a feature description (any language), runs a short discovery interview, then generates a PRD at ~/.agents/prds/prd-<repo>-<feature>.md and an ADR at ~/.agents/adrs/adr-<repo>-<feature>.md (ADR uses the PRD as context). Output feeds directly into "ah create tasks".
npx skillsauth add arinhubcom/arinhub ah-create-prd-adrInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Transform a feature description into two paired planning artifacts in one run:
~/.agents/prds/prd-<repo>-<feature>.md~/.agents/adrs/adr-<repo>-<feature>.mdThe PRD captures what and why (requirements, user stories, success criteria); the ADR
captures how at the architecture level (chosen design, trade-offs, alternatives). The ADR
is generated second and reads the PRD for context, so the two stay aligned. The resulting pair
is what ah create tasks consumes next.
autonomous, fail fast with a
clear error).dark-mode-toggle). If not provided, derive it from the description.autonomous to run non-interactively. The discovery interview then
asks the user nothing -- answers are inferred from the description and repository and recorded as
a ## Discovery Assumptions section in the PRD. Overwrites happen without confirmation. Any
missing required input (description) fails fast with a clear error instead of prompting. The
skill also suppresses its own Step 4 user report (returns only artifact paths + status). Default
off (interactive). Always set by ah-workflow.Determine autonomy: if the user passed autonomous, set AUTONOMOUS=1, else AUTONOMOUS=0.
When AUTONOMOUS=1, never prompt the user anywhere in this skill.
Resolve the repo name and output paths:
REPO_NAME=$(basename -s .git "$(git remote get-url origin 2>/dev/null)")
# Fallback when the repo has no 'origin' remote:
[ -z "$REPO_NAME" ] && REPO_NAME=$(basename "$(git rev-parse --show-toplevel)")
mkdir -p ~/.agents/prds ~/.agents/adrs
PROGRESS_DIR=~/.agents/arinhub/progresses
source "<skill_dir>/scripts/progress.sh"
Translate the description to English (all document content is written in English). Keep
the English translation of the original wording verbatim for the **Original prompt:** line.
Derive a kebab-case <feature> slug from the description (2-5 words capturing the core
feature), unless the user supplied one. Lowercase, hyphen-separated, no special characters.
Compute the two paths and reuse them throughout:
PRD_PATH=~/.agents/prds/prd-${REPO_NAME}-${FEATURE}.mdADR_PATH=~/.agents/adrs/adr-${REPO_NAME}-${FEATURE}.mdInitialize the progress log (keyed by feature slug, since this skill has no branch yet):
PROGRESS_FILE="${PROGRESS_DIR}/progress-prd-adr-${REPO_NAME}-${FEATURE}.md"progress_init "${PROGRESS_FILE}" "${FEATURE}" "" ""Progress is a deterministic append-only log written by scripts/progress.sh (path resolved
relative to this SKILL.md's directory), not an LLM-maintained markdown file.
If a file already exists at either path, tell the user it will be overwritten and confirm
before continuing. When AUTONOMOUS=1, skip the confirmation and overwrite directly.
A description alone usually leaves gaps that make a PRD vague. The interview covers:
Interactive mode (AUTONOMOUS=0): Before drafting, ask the user 2-3 focused questions and
wait for the answers. Only ask what you genuinely cannot infer from the description and the
repository. If the description is already rich and specific, ask fewer questions rather than padding.
Autonomous mode (AUTONOMOUS=1): do NOT ask the user anything. Infer the answers from the
description and the repository, and record them as a ## Discovery Assumptions section in the PRD
(each topic, the inferred answer, and a one-line rationale) so a human can later review/override.
Read references/prd-template.md and write PRD_PATH following it exactly. The file must:
# PRD: <Title>.**Original prompt:** <English translation of the description> and a
--- divider, so the source intent is preserved at the top of the file.SC-01, SC-02, ...).
Avoid vague words like "fast", "easy", or "intuitive" -- attach numbers or observable
behavior instead.After writing it: progress_log "${PROGRESS_FILE}" 1 prd done "" "${PRD_PATH}".
Read the PRD you just wrote at PRD_PATH for context, then read references/adr-template.md
and write ADR_PATH following it exactly. The file must:
title: "ADR-NNNN: <Decision Title>", status: "Proposed",
date (use the current date, date +%F), authors, tags, supersedes, superseded_by.POS-001 /
NEG-001 coded bullets) -> Alternatives Considered (ALT-001, at least 2-3, with rejection
reasons) -> Implementation Notes (IMP-001) -> References (REF-001, linking the PRD).After writing it: progress_log "${PROGRESS_FILE}" 2 adr done "" "${ADR_PATH}".
Interactive mode (AUTONOMOUS=0): Print a short summary:
ah create tasks (which takes a PRD path, an ADR
path, and an issue number).Autonomous mode (AUTONOMOUS=1): skip the user-facing summary; return only the artifact paths
(PRD + ADR) and a one-line status to the caller.
Then mark the run complete: progress_done "${PROGRESS_FILE}" completed.
<repo>-<feature> slug
(prd-<repo>-<feature>.md / adr-<repo>-<feature>.md) so they are easy to pair.**Original prompt:** line carries the (translated) original wording.ah create tasks. (When AUTONOMOUS=1,
overwrite without confirming.)AUTONOMOUS=1,
fail fast with a clear error instead of asking.development
Use when: (1) building a skill/command that orchestrates other skills by spawning subagents, (2) a delegated sub-skill reads git working-tree state (e.g. `git branch --show-current`) instead of taking it as an argument, (3) a sub-skill is supposed to "reflect on this session" / capture session learnings (like revise-claude-md) but runs in a subagent, (4) base branch ends up wrong or a session-reflection step sees an empty/trivial context. Keywords: orchestrator, subagent isolated context, git branch --show-current, base branch checkout, revise-claude-md, this session.
development
Run the full ArinHub feature-development pipeline end-to-end with the "ah" prefix. Use for "ah workflow", "ah run workflow", "ah full workflow", a GitHub issue URL to take from issue to PR, or any request to run the whole ah pipeline at once. Takes a feature description + issue number + base branch, OR a GitHub issue URL (resolved via references/resolve-gh-issue.md). Sequentially launches subagents: ah-create-prd-adr -> ah-create-tasks -> ah-implement-tasks -> optional ah-check-qa verification -> ah-finalize-code (creates the PR), anchored with /goal and guarded by retry + escalation.
testing
Verify that a PR or local changes fully implement requirements from a linked GitHub issue, with the "ah" prefix. Use for "ah verify requirements coverage", "ah verify requirements coverage issue 42", "ah verify requirements coverage PR 123", or both ("PR 123, issue 42").
development
Submit a completed code review with line-specific comments and suggestions to a GitHub PR, with the "ah" prefix. Use for "ah submit code review 123".