first-req

first-req is a command for Claude Code from Joe-rq/harness-lab. It costs 40 tokens per session (861 once invoked), scanned A, original, MIT.

An interactive guide for creating a project's first REQ, or work request. It identifies common project types such as React, Python, Go, and Rust, then helps fill in the request.

In plain words
What is it for?
Use it to create and populate a first request for component work, API development, bug fixes, testing, refactoring, or similar tasks.
Why use it?
It reduces the setup work for new users by suggesting a suitable task template and acceptance checks based on the project type.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/joe-rq/harness-lab/first-req
Clone the repo
git clone --depth 1 https://github.com/Joe-rq/harness-lab

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for first-req

README.md
[![agentmods](https://agentmods.dev/badge/commands/joe-rq/harness-lab/first-req.svg)](https://agentmods.dev/commands/joe-rq/harness-lab/first-req)
Your own site
<a href="https://agentmods.dev/commands/joe-rq/harness-lab/first-req"><img src="https://agentmods.dev/badge/commands/joe-rq/harness-lab/first-req.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 861 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00040 $0.00861
Opus 5 $0.00020 $0.00430
Sonnet 5 $0.00008 $0.00172
Haiku 4.5 $0.00004 $0.00086

Measured 4d ago against content hash 3396d3665546, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

first-req scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/first-req.md · 94 lines

What it actually says

/first-req

目标

引导新用户快速创建第一个 REQ,降低接入摩擦。

前置检查

  1. 确认 requirements/ 目录存在。不存在 → 提示先运行 /harness-setup
  2. 确认 package.json 中有 req:create 脚本。不存在 → 提示先运行 /harness-setup

执行步骤

Step 1: 项目类型识别

通过以下信号自动识别项目类型:

信号 项目类型
存在 package.json + react 依赖 React
存在 package.json + next 依赖 Next.js
存在 package.json + vue 依赖 Vue
存在 pyproject.tomlsetup.py Python
存在 go.mod Go
存在 Cargo.toml Rust
以上都不匹配 Generic

Step 2: 用 AskUserQuestion 询问 REQ 主题

使用 AskUserQuestion 工具,提供 3 个推荐选项 + 自定义输入:

推荐选项根据项目类型生成

  • React/Next.js 项目:组件开发、状态管理、API 集成
  • Python 项目:数据处理、API 开发、测试覆盖
  • Go 项目:性能优化、并发处理、API 开发
  • Generic:Bug 修复、功能开发、代码重构

Step 3: 创建 REQ

根据用户选择的主题,运行:

npm run req:create -- --title "[用户选择的主题]"

Step 4: 自动填充 REQ 内容

创建完成后,自动读取生成的 REQ 文件,填充以下内容:

背景:基于项目类型和主题生成一段简短描述。

目标:根据主题类型推荐 2-3 个目标。

验收标准:根据主题类型推荐 2-3 个可验证的标准。

主题与字段映射

主题类型 推荐目标 推荐验收标准
组件开发 实现组件、编写测试、补充文档 组件可渲染、测试通过、Storybook 可用
Bug 修复 定位根因、实现修复、回归测试 Bug 不再复现、回归测试通过
API 开发 实现端点、参数校验、错误处理 API 可调通、4xx/5xx 处理正确
测试覆盖 识别未覆盖路径、编写测试 覆盖率提升至目标值
代码重构 消除重复、改善命名、保持行为 重构后测试仍通过

Step 5: 启动 REQ

提示用户确认 REQ 内容是否满意,然后运行:

npm run req:start -- --id [创建的 REQ ID] --phase implementation

输出

向导完成后,输出:

  1. 创建的 REQ ID 和文件路径
  2. REQ 当前状态
  3. 下一步建议:直接开始实施,或先补充更多细节

约束

  • 不跳过 req:createreq:start 的验证逻辑
  • 不自动填充颗粒度自检(由用户自己判断)
  • 如果 req:start 因内容不足被拒绝,提示用户补充后重试
  • 整个流程应在 5 分钟内完成(从运行命令到 REQ 进入 in-progress)
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 94 lines · 40 tokens per session scan A 3396d3665546

Subscribe to this mod's changes

first-req is a command published in the GitHub repository Joe-rq/harness-lab (20 stars, last pushed 22d ago), licensed MIT. It adds 40 tokens to every session and 861 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.