From req-skill
Use when the user wants to initialize or manage a per-product context workspace at docs/req-skill/, or when the user invokes /req-setup. Also activates when /req detects an uninitialized workspace and the user opts to run setup.
How this skill is triggered — by the user, by Claude, or both
Slash command
/req-skill:req-setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Announce at start:** "Using /req-setup to initialize or manage the workspace at `docs/req-skill/`."
Announce at start: "Using /req-setup to initialize or manage the workspace at docs/req-skill/."
/req-setup is treated as a free-form product hint used only to pre-fill the product name prompt in Step 3.templates/workspace/. Load each with Read at the start: product.md, glossary.md, decisions.md, references.md. If any is missing, abort: 「テンプレートが見つかりません。プラグインを再インストールしてください」.<target>/docs/req-skill/. Never write to CLAUDE.md or anywhere outside the allow-list.<!-- req-workspace:auto --> ... <!-- /req-workspace:auto --> marker regions.git add / git commit..tmp path first, then rename after all files succeed. On any failure, delete all .tmp files; never leave partial state.mcp__claude_ai_Notion__* or mcp__claude_ai_Google_Drive__* calls fail, surface an explicit error with the MCP identifier and fall back to URL-only. Never silent.{{placeholder}} syntax to the user. The {{foo}} notation in this SKILL.md is internal — used to describe template-substitution mechanics to the maintainer. User-facing prompts and reports must use the Japanese label only (e.g. 「プロダクト名」, never 「プロダクト名 ({{product_name}})」).Check if <CWD>/docs/req-skill/product.md exists.
Resolve absolute CWD via realpath. Apply temp detection (see spec #decision-5):
/tmp/, /var/folders/, or /private/tmp/:
$HOME/Documents/req-workspaces/<slug>/. If $HOME/Documents missing, fallback to $HOME/req-workspaces/<slug>/.<path> — 上書き / _2 で別名 / 中断」. Apply choice. For _2, increment numeric suffix until free.Store <target> for subsequent steps.
*.md under <target>/docs/ recursively.^([^:\n]{1,40}): (.+)$ (definition-list pattern), OR heading+first-line pairs where the heading is a single term.If scan yields zero candidates, proceed to Step 3 with note 「既存 docs/** から候補は見つかりませんでした。基本情報だけ伺います」. This is the α (minimal scaffold) degrade path.
Ask in sequence:
$ARGUMENTS if non-empty; if Step 1 already collected a slug, confirm it)Store answers for product.md substitution.
Ask: 「参考資料を追加しますか? 1 件ずつ URL / Notion / Google Drive URL / ローカルフォルダパスを渡してください。終わる時は『終わる』」.
Loop:
notion.so or notion.site → Notion URLdrive.google.com → Google Drive URLhttp:// or https:// → generic URLWebFetch, 10s timeout. On timeout: 「取得タイムアウト: — スキップ」, continue loop.mcp__claude_ai_Notion__notion-fetch. On MCP unavailable/error: emit 「Notion MCP (mcp__claude_ai_Notion__notion-fetch) 呼び出し失敗: 。URL のみ記録します」 and stage URL-only.mcp__claude_ai_Google_Drive__* (authenticate first if needed). On MCP unavailable/error: emit equivalent message and stage URL-only.ls then Read each *.md / *.txt.X-Amz-Signature=[A-Fa-f0-9]+ inside any URL.bearer\s+[A-Za-z0-9._\-]{20,} (only matches when followed by a substantial token).(api[_-]?key|secret|password|token|access[_-]?token|client[_-]?secret)\s*[:=]\s*['"]?[A-Za-z0-9._/+\-]{16,}['"]?.secret / password / token / bearer WITHOUT a value-shaped suffix do NOT match.[redacted: signed-url]. In Markdown image syntax , the substitution preserves alt text.<REDACTED> → Bearer <REDACTED>.<REDACTED>, preserve key name.<REDACTED> and [redacted: signed-url]).
references.md に追加しますか? (はい / 修正 / キャンセル)」
Build each workspace file by reading the corresponding template, replacing placeholders with staged content:
product.md: {{product_name}}, {{product_tagline}}, {{product_overview}}, {{stakeholders}} ← Step 3.glossary.md: {{glossary_entries}} ← staged terms from Step 2 as - <term>: <definition>.decisions.md: {{decision_entries}} ← staged decisions from Step 2 as ### <title>\n\n<body>.references.md: {{external_references}} ← staged references from Step 2 + Step 4 as - [<title>](<url>) — <summary> or - <url> (URL のみ記録).For each file:
<target>/docs/req-skill/<name>.md.tmp (create directories as needed).<target>/docs/req-skill/requirements/ if missing..tmp → final name..tmp files, abort with error message, no partial state.<target>/docs/req-skill/..gitignore reminder: 「docs/req-skill/ を git にコミットする場合は内容を確認してください。.gitignore への追加も検討を」 (non-blocking).git add / git commit.Print:
ワークスペース `<target>/docs/req-skill/` は既に存在します。何をしますか?
1. 参考資料を追加(URL / Notion / Google Drive / ローカルフォルダ)
2. `docs/**` を再スキャンして workspace ファイルを更新
3. 破損 / 変更されたテンプレを再生成(差分確認つき)
4. 中断
Wait for a numeric or equivalent selection.
glossary.md / decisions.md / references.md. For new candidates only, run the same per-item confirmation flow. Then go to merge.templates/workspace/*.md from the plugin. Parse existing workspace file to extract the current <!-- req-workspace:auto --> ... <!-- /req-workspace:auto --> region. Render a fresh auto region from current staged values (reuse existing file's substitutions). Compute diff of auto regions. Present: 「各ファイルの差分:\n\nこの差分で更新しますか? (はい / 個別選択 / 中断)」. Apply atomically (Step 5 atomic-write sub-procedure) on 「はい」, per-file on 「個別選択」, abort on 「中断」.<!-- req-workspace:auto --> ... <!-- /req-workspace:auto --> markers is never modified._2 / 中断 (matches existing /req convention)..tmp files and exit cleanly.<target>/docs/req-skill/.CLAUDE.md (even if the user asks; instruct them this skill is not authorized to touch it).templates/workspace/*.md during execution.Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
npx claudepluginhub wakuwaku-inc/req-skill --plugin req-skill