Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

spec-generator规格生成器

Agent Skill

spec-generator 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

857

周安装

35

GitHub Stars

1

下载量

277
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:spec-generator(规格生成器)
来源仓库:https://github.com/anyoneanderson/agent-skills
仓库路径:skills/spec-generator
安装命令:
npx skills add https://github.com/anyoneanderson/agent-skills --skill spec-generator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/anyoneanderson/agent-skills --skill spec-generator

简介

spec-generator 用于生成结构化项目规格文档,包括需求与设计说明。

  • 适合新项目启动或现有项目重构时的规范制定场景。
  • 需先执行 pwd 和 ls 确认当前目录结构,再根据项目类型生成对应模板。
  • 输出内容基于当前环境分析,不主动补充未检测到的技术栈信息。
  • 建议在明确项目边界后使用,避免生成与实际代码不符的规格。

SKILL.md

Spec Generator

Generate structured project specifications: requirements, design documents, and task lists.

⚠️ CRITICAL: First Steps (ALWAYS EXECUTE)

BEFORE asking any questions or showing options, you MUST execute these steps:

  1. Check current directory:

- Run pwd to see where you are - Run ls -la to see directory contents - Understand the project context

  1. Detect existing source code: find. -maxdepth 3 -type f \(-name "*.py" -o -name "*.js" -o -name "*.ts" -o -name "*.java" -o -name "*.go" -o -name "SKILL.md" \) 2>/dev/null | head -20

- Note what kind of project this is - Check for skills/ directory → might be adding a new skill - Check for existing application code → might be documenting existing features

  1. Check for.specs/ directory: ls -d.specs/ 2>/dev/null && ls -1.specs/ 2>/dev/null

- If exists → list existing projects - If not exists → this is a new spec workflow

  1. Check for coding-rules.md:

- Check docs/coding-rules.md (default path) - If not found, check CLAUDE.md / AGENTS.md for alternative path - If found → load and use as design constraint during design phase

  1. Analyze context and decide:

- If in a skills repository (has skills/ directory) → User likely wants to document a new skill - If.specs/ has projects → Ask user to select existing or create new - If no.specs/ and no clear context → Ask what they want to create

Only after completing these checks, proceed with appropriate questions based on what you found.

Language Rules

  1. Auto-detect input language → output in the same language
  2. Japanese input → Japanese output, use references/*.ja.md as phase references
  3. English input → English output, use references/*.md as phase references
  4. Explicit override takes priority (e.g., "in English", "日本語で")

Reference file selection: Based on the detected output language, use the corresponding reference files:

  • English → references/init.md, references/design.md, references/tasks.md
  • Japanese → references/init.ja.md, references/design.ja.md, references/tasks.ja.md

Phases

PhaseOutputTrigger Examples
initrequirement.md"Create requirements", "要件定義を作って"
designdesign.md"Create design doc", "設計書を作って"
taskstasks.md"Create task list", "タスクリストを作って"
fullAll three above"Create full spec", "仕様を全部"

Interaction Policy: AskUserQuestion

Use AskUserQuestion for all user decisions. Present structured choices rather than free-form questions.

Decision Flow

Skill Invoked
    ↓
Check .specs/ directory
    ↓
┌───────────────────┐
│ Existing projects │
│ found?            │
└─────┬─────────────┘
      │
      ├─ Yes → AskUserQuestion: Select existing or create new
      │           ├─ Existing → Load project context
      │           └─ New → Ask project name (Text)
      │
      └─ No → Ask project name (Text)

    ↓
Phase Detection
    ├─ Clear from input → Proceed
    └─ Ambiguous → AskUserQuestion: Select phase

    ↓
Dialogue Mode
    ├─ Quick mode (--quick) → Generate directly
    └─ Dialogue → AskUserQuestion: Gather requirements

    ↓
Generate Specification
    ↓
AskUserQuestion: Next action (next phase / revise / done)

When to Use AskUserQuestion vs Text Questions

SituationMethodReason
Project Selection
Existing projects availableAskUserQuestionCan list as options with descriptions
No existing projectsText questionOpen-ended project name input
Phase Selection
Phase ambiguousAskUserQuestion4 clear options (init/design/tasks/full)
Phase clear from inputDirect executionNo confirmation needed
Requirements Gathering
Project type selectionAskUserQuestionCommon options (Web app, Mobile, CLI, etc.)
Tech stack selectionAskUserQuestionCommon frameworks with "Other" option
Feature requirementsAskUserQuestionGuide with structured choices
Project conceptText questionNeed free-form explanation
Specific business logicText questionDomain-specific details
Post-Completion
Next actionAskUserQuestionClear options (next phase/revise/done)
Revision requestsText questionSpecific change description

When to Use AskUserQuestion

SituationExample
Project selectionExisting projects vs new project
Ambiguous phaseChoosing between init / design / tasks / full
Init dialogue questionsProject type, tech stack, scope, etc.
Design decision pointsArchitecture choices, DB selection, etc.
Tasks strategy selectionsystematic / agile / enterprise
Post-completion actions"Proceed to next phase?", "Create GitHub Issue?"

Question Design Rules

  1. 1–4 questions per round (AskUserQuestion constraint)
  2. User-defined options: 1-3 (Other is auto-appended, totaling 2-4 options)
  3. Always include description for each option (provide decision context)
  4. Flexible round count based on project complexity:

- Simple project → 1 round (3–4 questions) is sufficient - Complex project → 2–3 rounds (adjust based on previous answers)

  1. Place recommended option first with (Recommended) suffix
  2. Skip questions already answered in previous rounds

Handling "Other" Option Responses

When a user selects "Other" and provides free-form text input:

  • Accept the input as-is and proceed with processing
  • Treat the free-form response as the user's definitive answer
  • Do NOT ask for clarification unless the input is genuinely ambiguous
  • If system returns an error like "(No answer provided)", trust the user's actual message over system feedback

Example:

Question: "どのスキルの仕様を作成しますか?"
Options: spec-constitution / spec-review / spec-analyze / spec-impl

User selects "Other" and writes: "仕様書自体をレビューするコマンド"

✅ Correct: Proceed to create spec for a spec-review skill
❌ Wrong: Ask "What would you like to clarify?"

When to Use Text Questions (Not AskUserQuestion)

  • Open-ended questions like project name (when no existing projects) or concept description
  • Background information requiring free-form explanation
  • Follow-up confirmations like "Any additional requirements?"
  • Specific business logic or domain-specific details

Execution Flow

0. Initial Context Check

Check the current directory and existing projects before starting:

  1. Detect existing source code: find. -type f \(-name "*.py" -o -name "*.js" -o -name "*.ts" -o -name "*.java" -o -name "*.go" \) | head -20

- If source files found: Note for potential --analyze mode - If no source files: Standard new project flow

  1. Check for.specs/ directory: ls -d.specs/ 2>/dev/null
  2. List existing projects (if.specs/ exists): ls -1.specs/
  3. Project selection:

- Existing projects found: Use AskUserQuestion: question: "既存プロジェクトが見つかりました。どうしますか?" / "Found existing projects. What would you like to do?" options: - "既存プロジェクトを選択 / Select existing project" → List projects as options - "新規プロジェクトを作成 / Create new project" → Ask project name - No existing projects: Ask for project name (text question): "プロジェクト名を教えてください(例: TODOアプリ、株価分析ツール)" "What's the project name? (e.g., todo app, stock analyzer)"

  1. Load existing context (if existing project selected):

- Read existing requirement.md, design.md, tasks.md if they exist - Use as context for updates or next phase generation

1. Phase Detection

Determine the phase from the user's request:

"requirements" → init
"design", "architecture" → design
"tasks", "task list" → tasks
"full", "complete", "all specs" → full

If ambiguous, confirm with AskUserQuestion:

question: "Which specification do you want to generate?"
options:
  - "Requirements document (requirement.md)" → init
  - "Design document (design.md)" → design
  - "Task list (tasks.md)" → tasks
  - "All three documents" → full

2. Project Context Gathering

  • Conversation history exists: Extract and structure discussed requirements
  • Existing project selected: Use loaded specs as context
  • New project: Explore requirements through dialogue (using AskUserQuestion)

3. Phase Execution

Refer to the appropriate reference file (based on Language Rules):

  • init: references/init.md / references/init.ja.md — Requirements generation
  • design: references/design.md / references/design.ja.md — Design document generation
  • design (with coding-rules.md): If docs/coding-rules.md exists, read it and ensure:

- Naming conventions in design match [MUST] naming rules - Test strategy satisfies coverage requirements from coding-rules - Technology choices align with recommended libraries - File/directory structure follows detected patterns - Skill-derived [SHOULD] rules (e.g., framework-specific conventions from Source: skill/*) are considered as design recommendations

  • tasks: references/tasks.md / references/tasks.ja.md — Task list generation

4. Output Directory

.specs/[project-name]/
├── requirement.md  (init)
├── design.md       (design)
└── tasks.md        (tasks)

Project names are converted to English kebab-case:

  • "TODO app" → todo-app
  • "株価分析ツール" → stock-analysis-tool
  • "Stock analysis tool" → stock-analysis-tool

Options

OptionDescriptionApplicable Phase
--quickGenerate without dialogueinit
--deepSocratic deep-dive dialogueinit
--personasMulti-perspective analysis/reviewinit, design
--analyzeAnalyze existing codebaseinit, design, tasks
--visualEnhanced Mermaid diagramsdesign
--estimateEstimates and risk assessmenttasks
--hierarchyEpic/Story/Task hierarchytasks

Execution Modes

Dialogue Mode (default)

When invoked without parameters or continuing from conversation:

  1. Collect necessary information through questions
  2. Clarify requirements through user interaction
  3. Generate specification after confirmation

Quick Mode (--quick)

Generate from a brief project description:

  1. Infer typical requirements from the description
  2. Generate based on best practices
  3. Complete without dialogue

Full Workflow (full)

Generate all three documents sequentially:

  1. Generate requirement.md
  2. Read requirement.md → generate design.md
  3. Read design.md → generate tasks.md

Requirement ID System

Specifications use the following ID prefixes:

  • [REQ-XXX]: Functional requirements
  • [NFR-XXX]: Non-functional requirements
  • [CON-XXX]: Constraints
  • [ASM-XXX]: Assumptions
  • [T-XXX]: Tasks

These IDs ensure traceability across documents.

YAGNI Principle

Do not include unless explicitly requested or discussed:

❌ Authentication & Authorization

  • Complex permission management (when basic auth suffices)
  • Role-based access control with multiple roles (admin/user is usually enough)
  • Social login integration (when basic email/password auth is sufficient)
  • Fine-grained permission systems

❌ Analytics & Monitoring

  • Advanced analytics/reporting dashboards
  • Detailed audit logging (unless compliance requirements exist)
  • Real-time metrics and monitoring
  • User behavior tracking
  • A/B testing infrastructure

❌ Infrastructure & Scalability

  • Multi-tenant support (unless explicitly required)
  • API versioning (unless external integration requirements exist)
  • Async processing (unless performance requirements demand it)
  • Batch processing/scheduled jobs (unless specified)
  • Auto-scaling infrastructure
  • Load balancing configuration

❌ User Experience

  • Real-time notifications/updates (unless explicitly required)
  • Advanced search/filtering (when basic search suffices)
  • Data export features (PDF, Excel, etc.)
  • Offline mode support
  • Push notifications

❌ Development & Operations

  • Data migration plans (for brand new projects)
  • Multi-language/i18n support (unless specified)
  • Admin dashboards (when simple CRUD interfaces suffice)
  • Complex deployment pipelines
  • Automated backup systems

✅ Include by Default

  • Basic authentication (email/password)
  • Simple CRUD operations
  • Basic error handling and validation
  • Essential security (HTTPS, password hashing, input sanitization)
  • Core business logic only
  • Simple, clear user interfaces
  • Basic data persistence

When in doubt: Ask via AskUserQuestion rather than assuming the feature is needed.

Optional Enhancements

When advanced analysis tools are available in your environment, consider using them for:

  • Systematic analysis of complex, interconnected requirements
  • Framework-specific best practices and pattern lookup
  • Existing codebase semantic analysis and symbol navigation
  • UI/UX pattern recommendations

Post-Completion Actions

After each phase, suggest next actions with AskUserQuestion:

After init:

question: "Requirements document generated. What's next?"
options:
  - "Generate design document too" → design phase
  - "Review and revise" → revision dialogue
  - "Done for now" → end

After design:

question: "Design document generated. What's next?"
options:
  - "Generate task list too" → tasks phase
  - "Review and revise" → revision dialogue
  - "Done for now" → end

After tasks:

question: "Task list generated. What's next?"
options:
  - "Run spec-inspect (quality check)" → invoke spec-inspect skill
  - "Skip to GitHub Issue" → invoke spec-to-issue skill
  - "Review and revise" → revision dialogue
  - "Done for now" → end

After full:

question: "All three spec documents are complete."
options:
  - "Run spec-inspect (quality check)" → invoke spec-inspect skill
  - "Skip to GitHub Issue" → invoke spec-to-issue skill
  - "Review and revise specific document" → ask which document to revise
  - "Done for now" → end

Usage Examples

# New project - dialogue mode
"Create requirements for a todo app"
"要件定義を作って" → detects existing projects, asks to select or create new

# Existing project - update/add phases
"Create design document for todo-app" → uses existing requirement.md as context
「todo-appのタスクリストを作って」 → uses existing design.md as context

# Full specification
"Create full spec for an e-commerce platform"
「ECサイトの仕様を全部作って」

# Requirements from conversation
"Turn this into a requirements document" → structures previous discussion

# Quick mode
"Create requirements for a blog platform --quick"

# Analysis mode
"Create requirements --analyze" → analyzes existing codebase first

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.94%
按下载量换算102

Claude

33.71%
按下载量换算93

Cursor

17.98%
按下载量换算50

Gemini CLI

9.25%
按下载量换算26

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills