中文 EN

Goal Workflow Usage Guide

AI-driven development workflow — from PRD to shipped code

github.com/smallnest/goal-workflow

Usage Guide — Six-step closed-loop development workflow: Plan, Design, Break Down, Implement, Review, Ship.

Contents

1. Overview

Goal Workflow is a collection of AI-driven development workflow skills built for Claude Code / Codex. It breaks down the complete software development lifecycle into standardized steps, each driven by a dedicated Skill.

It enables AI agents to act like experienced engineers — from understanding requirements, breaking down tasks, writing code, reviewing quality, to final submission and merge — autonomously completing the entire process. You just describe the feature idea, and the workflow handles the rest.

/prd

Requirements document generation + Issue breakdown

  • Clarifying questions → structured PRD
  • Decomposed into independently implementable Issues
  • Supports GitHub / Local / iCafe

/prd-to-spec

PRD to technical design SPEC

  • PRD requirements → architecture + API + data model
  • Error handling + security + performance strategies
  • Issue mapping + implementation plan

/to-issues

Break PRD/SPEC into Issue cards

  • User Stories → implementable Issues
  • Supports GitHub / Local / iCafe
  • Standalone — does not depend on /prd

/goal

Pick a card for end-to-end implementation

  • Pick an Issue, implement it
  • Complete one feature per session
  • Claude Code or Codex

/review-it

Automated code review and repair

  • Detect uncommitted changes or branch diff
  • Findings → iterative fixes
  • Until review passes

/ship-it

Commit → PR → Merge → Close

  • Commit linked to Issue number
  • Squash merge + delete branch
  • Add implementation summary and close card

/humanize-it

Iterative de-AI text rewriting

  • Auto-select best humanization strategy
  • Three-path skill iteration until target met
  • Up to 42 rounds of intelligent switching

/listenhub-tts

ListenHub text-to-speech

  • Quick synthesis / multi-voice / long text
  • Voice list to choose from, default Xiaoman
  • Supports AI polishing for long text

/insight-diagram

UML and architecture diagram generator

  • Analyze codebase structure
  • UML / architecture diagrams / flowcharts
  • Rendered as HTML+SVG

/refactor

Expert-level code refactoring

  • 22 code smell detections
  • 40+ refactoring techniques (Fowler catalog)
  • Five-phase safety protocol

/modern-go

Go code modernization

  • 35+ gofix-style transformation rules
  • Full coverage Go 1.0 to 1.26+
  • Auto-detect version + safety guard

/note-it

Implementation notes

  • Design decisions / deviations / tradeoffs
  • Tracking open questions
  • Saved as HTML in docs/

/code-to-spec

Reverse-generate project SPEC

  • Analyze code, config, tests, structure
  • Generate 12-chapter complete SPEC
  • Supports multi-level deep analysis

/smell

Architecture smell detection

  • 8 categories: architecture, coupling, cohesion, design, code, testing, naming, complexity
  • 50+ anti-patterns and bad smells detected
  • Detailed markdown report with refactoring roadmap

2. Installation

Install all skills in one command via the npx skills CLI:

# Install all skills from this repository
npx skills add smallnest/goal-workflow

# Or install a specific skill
npx skills add smallnest/goal-workflow --skill prd
npx skills add smallnest/goal-workflow --skill prd-to-spec
npx skills add smallnest/goal-workflow --skill to-issues
npx skills add smallnest/goal-workflow --skill review-it
npx skills add smallnest/goal-workflow --skill ship-it
npx skills add smallnest/goal-workflow --skill humanize-it
npx skills add smallnest/goal-workflow --skill listenhub-tts
npx skills add smallnest/goal-workflow --skill insight-diagram
npx skills add smallnest/goal-workflow --skill refactor
npx skills add smallnest/goal-workflow --skill modern-go
npx skills add smallnest/goal-workflow --skill note-it
npx skills add smallnest/goal-workflow --skill code-to-spec
npx skills add smallnest/goal-workflow --skill smell

# Global install (available for all projects)
npx skills add smallnest/goal-workflow -g

# Install to a specific agent
npx skills add smallnest/goal-workflow -a claude-code

Prerequisites

ToolPurposeInstall
ghGitHub CLI (Issue/PR operations)brew install gh && gh auth login
claudeClaude Code CLInpm install -g @anthropic-ai/claude-code
npxnpm package runnerBundled with Node.js
Tip: After installation, type /prd, /prd-to-spec, /to-issues, /review-it, /ship-it, /refactor, /modern-go, /note-it, /code-to-spec, /humanize-it, /listenhub-tts, /insight-diagram, /smell in Claude Code to directly invoke the corresponding skill.

3. Workflow Overview

Six-step closed loop, from requirements to delivery:

Goal Workflow Infographic
1 /prd
1.5 /prd-to-spec
1.6 /to-issues
2 /goal
3 /review-it
4 /ship-it
Step 1: /prd Describe feature idea Clarify questions Generate PRD Output: PRD 1.5: /prd-to-spec Read PRD Technical clarification Generate SPEC Output: SPEC (opt) 1.6: /to-issues Read PRD/SPEC Break into Issues Create cards Output: Issues Step 2: /goal Select Issue End-to-end implementation Run tests Output: Code Step 3: /review-it Auto review Verify findings Iterative fixes Output: ✓ Review Step 4: /ship-it Commit + Push Create PR Merge + Close Output: Shipped
StepCommandInputOutput
1. Plan /prd Feature description / product idea PRD document + Issue cards
1.5 Design /prd-to-spec PRD document Technical SPEC (optional)
1.6 Break Down /to-issues PRD / SPEC document Issue cards
2. Implement /goal An Issue card Runnable code implementation
3. Review /review-it Code changes (dirty / branch) Clean code that passes review
4. Ship /ship-it Reviewed code Merged PR + Closed Issue

4. Step 1: /prd — Requirements Planning

/prd transforms a vague feature idea into a structured product requirements document and breaks it down into independently implementable Issue cards.

How to Invoke

# Type directly in Claude Code
/prd Add a priority feature to our task management system

# Or use trigger phrases
Write PRD for: User registration with email and phone support
Requirements analysis: Add rate limiting capability to the API

Workflow

Output Example

# Generated Issue list
📋 Generated 4 Issues from PRD:

#1: Add priority field to database (backend, high)
#2: Display priority indicator (frontend, high) — depends on #1
#3: Add priority selector (frontend, medium) — depends on #1
#4: Filter tasks by priority (frontend, medium) — depends on #1, #2
Tip: Each Issue should be sized for an agent to complete within a single session. If a User Story is too large (5+ acceptance criteria or cross full-stack), it will be automatically split.

5. Step 1.5: /prd-to-spec — PRD to Technical SPEC

/prd-to-spec transforms a product requirements document (PRD) into an implementable technical design SPEC. PRD says "what to build"; SPEC says "how to build it".

How to Invoke

# Type directly in Claude Code
/prd-to-spec tasks/prd-priority-system.md

# Or use trigger phrases
PRD to design: Convert priority PRD to technical plan
Technical spec: Generate SPEC based on prd-user-auth.md

PRD → SPEC Mapping

PRD ElementSPEC ChapterTransformation
User StoriesBusiness Logic + Test MappingStories → algorithms + test cases
Functional RequirementsAPI Design + Business LogicFR → endpoints + implementation logic
Acceptance CriteriaTesting StrategyCriteria → concrete test scenarios
Non-GoalsOpen QuestionsExplicitly scoped exclusions
Technical ConsiderationsArchitecture + PerformanceConstraints → design decisions

SPEC Output Structure (11 Chapters)

#ChapterContent
1SummaryScope, PRD reference, design decision summary
2ArchitectureSystem context, component design, file structure
3Data ModelSchema changes, entity definitions, migration plan
4API DesignEndpoint table, request/response schema, error responses
5Business LogicCore algorithms, validation rules, state machines, edge cases
6Error HandlingError classification, retry strategies, degradation plan
7SecurityAuthentication/authorization, input validation, data protection
8PerformanceExpected load, optimization strategies, database considerations
9Testing StrategyUnit/integration/E2E tests + acceptance criteria mapping
10Implementation PlanImplementation phases, Issue mapping, incremental delivery
11Open Questions & RisksUnresolved questions, technical risks, assumptions

Workflow

Note: /prd-to-spec is an optional step. For most small to medium features, the Functional Requirements and Acceptance Criteria in the PRD are sufficient for the AI agent to make autonomous technical decisions during the /goal phase — the agent automatically analyzes the codebase, understands the architecture, and chooses the right implementation path without needing a pre-written SPEC. Consider running /prd-to-spec only in the following scenarios:
  • Multiple people or agents developing in parallel, needing shared technical conventions
  • Large changes spanning multiple services/modules, where architecture decisions have broad impact
  • Team has compliance or review process requiring design documents
  • PRD is vague and needs upfront technical detail to reduce interpretation variance

6. Step 1.6: /to-issues — Break Down into Issues

/to-issues breaks down a PRD and/or SPEC into independently implementable Issues and creates them on your chosen platform. It can be used standalone — no need to run /prd first.

How to Invoke

# Type directly in Claude Code
/to-issues

# Or use trigger phrases
Create issues for: Create Issues from prd-user-auth.md
Break down issues: Break down implementable cards from SPEC
Generate cards: Break PRD and SPEC together into Issues

Input Sources

OptionDescription
Auto-detectScan tasks/ directory, list available PRDs and SPECs
Specify PRDBreak down based only on PRD's User Stories
Specify SPECUse SPEC's Issue Mapping chapter as primary guidance
PRD + SPEC(Recommended) PRD provides requirements, SPEC provides technical conventions — most complete Issues

Creation Platforms

PlatformToolDescription
GitHubgh issue createRequires gh CLI authentication
LocalMarkdown filesSaved to .autoresearch/issues/ or custom directory
Baidu iCafeicafe-cliRequires iCafe space parameters

Workflow

Note: /to-issues is the key bridge from requirements to implementation. It can be used independently — even if you didn't use /prd to generate a PRD, as long as you have a requirements document (or even pasted text), you can break it down into Issues.

7. Step 2: /goal — Feature Implementation

/goal is Claude Code's built-in goal-driven development mode. Pick an Issue card and the agent understands the acceptance criteria and implements end-to-end.

Usage

# Claude Code: specify GitHub Issue number
/goal #42

# Claude Code: specify local Issue file
/goal tasks/issues/issue-001-add-priority-field.md

# Codex: use --goal flag
codex --goal "Implement issue #42: Add priority field to database"

Agent Behavior

Note: /goal is a built-in feature of Claude Code and is not included in this skill package. It naturally integrates with this workflow — the Issue format generated by /prd is exactly what /goal expects as input.

8. Step 3: /review-it — Code Review

/review-it performs automated review before committing, discovering potential issues and iteratively fixing them until the review passes.

How to Invoke

# Review uncommitted changes (default mode)
/review-it

# Review entire branch vs main
/review-it --mode branch

# Review + tests in parallel
/review-it --parallel-tests "npm test"

Review Principles

PrincipleDescription
AdvisoryReview results are suggestions, not blindly applied
VerifyEvery finding is verified by reading real code paths
Reject noiseReject impractical edge cases, speculative risks, excessive refactoring
IterateRe-review after fixes until no actionable findings remain
MinimalPrefer small fixes; avoid unnecessary large refactors

Review Modes

Working Tree StateModeAction
Uncommitted changeslocalDirect /review
Committed not pushedbranchgit diff origin/main...HEAD + review
Pushed / PRbranchSame as above, auto-detect PR base
Clean working treeskipNo review needed
Tip: /review-it supports Claude Code, Codex, OpenCode, and DeepSeek TUI, automatically adapting to each agent's review commands.

9. Step 4: /ship-it — Commit and Ship

/ship-it is the standard closing workflow after implementation is complete: commit code, create PR, merge, add implementation summary, close Issue.

How to Invoke

# Invoke in Claude Code
/ship-it

# Or use trigger phrases
Submit code
Create PR and merge

Complete Flow

# Step 1: Commit code (link Issue)
git add <related files>
git commit -m "Add priority field to database (#42)"

# Step 2: Push branch
git push -u origin feat/issue-42-priority-field

# Step 3: Create PR (body includes Closes #42)
gh pr create --title "Add priority field" \
  --body "Closes #42 ..."

# Step 4: Merge
gh pr merge --squash --delete-branch

# Step 5: Close Issue (if not auto-closed)
gh issue close 42 --reason completed

Error Handling

ScenarioHandling
CI checks failedCheck failure reason, fix and append commit then push
Merge conflictRebase origin/main, resolve conflicts then force push
Branch protectionConfirm required reviews are satisfied
Issue not auto-closedConfirm PR body contains Closes #N, or close manually
Note: /ship-it depends on the gh CLI. Make sure you've authenticated with gh auth login.

10. Bonus: /humanize-it — De-AI Text Rewriting

/humanize-it rewrites specified documents to remove AI-generated feel. It automatically selects the most appropriate humanization strategy based on document type, iterating until the result meets quality standards.

How to Invoke

# Type directly in Claude Code
/humanize-it docs/architecture.md

# Or use trigger phrases
De-AI: Rewrite this document in natural language
Reduce AIGC: humanize docs/blog-draft.md

Sub-Skill Capability Matrix

SkillBest ForStyle
humanizer-zhGeneral text, blogs, copywritingNatural, warm, opinionated
humanize-chineseGeneral + academic + long-form textMulti-style (Zhihu/Xiaohongshu/academic/literary etc.)
technical-writingTechnical docs, architecture docs, review draftsPlain, rigorous, defensible

Automatic Strategy Selection

Document TypePriority Strategy Order
Technical documentationtechnical-writinghumanizer-zhhumanize-chinese
Academic paperhumanize-chinese (academic) → humanizer-zhtechnical-writing
General texthumanizer-zhhumanize-chinesetechnical-writing
Long-form text (≥1500 chars)humanize-chinese (longform) → humanizer-zhtechnical-writing

Iteration Mechanism

Tip: You can specify preferences when invoking, such as "keep academic style", "make it more conversational", "don't make technical docs too casual" — rewriting will prioritize corresponding strategies.

11. Bonus: /listenhub-tts — Text to Speech

/listenhub-tts converts text to speech using the ListenHub API. Supports three synthesis modes, covering everything from short text to long-form content.

How to Invoke

# Type directly in Claude Code
/listenhub-tts Convert this text to speech

# Or use trigger phrases
Speech synthesis: Read README.md aloud
Generate audio: Read this article in Xiaoman's voice

Three Synthesis Modes

ModeAPIBest ForCharacteristics
Quick Synthesis/v1/ttsShort text (< 1000 chars), single voiceLow latency, returns MP3 binary stream
Multi-Voice Script/v1/speechMulti-voice dialogue, podcastsDifferent voices alternating narration
Long-Form Streaming/v1/flow-speech/episodesLong text (> 1000 chars)Async synthesis, supports AI polishing

Voice Selection

ScenarioBehavior
User specified voiceUse the specified speakerId directly
User did not specify voiceCall API to get voice list, present for user selection
Default voicechat-girl-105-cn (Xiaoman dxqqq)

Prerequisites

ConfigDescription
LISTENHUB_API_KEYListenHub API key, set as environment variable
Tip: Long-form mode supports AI polishing (aiPolish), which can automatically optimize text for spoken delivery before synthesis, making the narration more natural.

12. Bonus: /insight-diagram — UML and Architecture Diagrams

/insight-diagram generates UML diagrams, architecture diagrams, and flowcharts for any project. After analyzing the codebase, it lets users choose which diagram types to generate, renders them as HTML+SVG, and saves to the docs/ directory.

How to Invoke

# Type directly in Claude Code
/insight-diagram

# Or use trigger phrases
Generate architecture diagram: Analyze project structure and generate architecture diagram
Draw flowchart: Draw call flow diagram for this module
Generate UML: Generate class diagram and sequence diagram

Supported Diagram Types

A total of 17 diagram types, divided into structural and behavioral categories:

Structural Diagrams (Static)

#Diagram TypeFocus
1System Architecture Diagram ★Component relationships, global perspective (non-UML, most common)
2Class DiagramDefining classes, attributes, operations, and relationships
3Object DiagramObject instances and their relationships at a specific moment
4Component DiagramSystem components and their dependencies
5Deployment DiagramPhysical hardware, nodes, and software deployment
6Package DiagramGrouping model elements for organization
7Composite Structure DiagramInternal structure of a class
8Profile DiagramExtending UML metamodel, custom stereotypes

Behavioral Diagrams (Dynamic)

#Diagram TypeFocus
9Flowchart ★Main flow and branches (non-UML, most common)
10Use Case DiagramSystem functionality from user perspective
11Activity DiagramProcess flow or steps
12State Machine DiagramState transitions over an object's lifecycle
13Sequence DiagramObject interactions over time
14Communication DiagramFocus on organizational relationships between objects
15Timing DiagramFocus on timing constraints of state changes
16Interaction Overview DiagramCombines activity and sequence diagrams
17Swimlane DiagramCross-component/role responsibility flow (activity diagram variant)

★ Indicates most commonly used diagram types. Default recommended combination: Architecture Diagram + Sequence Diagram + Flowchart.

Workflow

Tip: You can specify a focus area when invoking, such as "only look at src/services/ directory" or "focus on the database layer", to generate more targeted results.

13. Bonus: /refactor — Expert-Level Code Refactoring

/refactor provides expert-level code refactoring based on Martin Fowler's complete catalog from Refactoring 2nd Edition. By identifying code smells and applying proven refactoring techniques, it improves code maintainability, readability, and structure without changing external behavior.

How to Invoke

# Type directly in Claude Code
/refactor

# Or use trigger phrases
Refactor: Refactor UserManager class, it's too large
Code smell: This function has Feature Envy, fix it
Extract method: Break this long method into smaller functions

Code Smell Catalog

Identifies 22 code smells, organized into five categories:

CategorySmellsPrimary Refactoring
BloatersLong MethodExtract Method, Replace Temp with Query
Large ClassExtract Class, Extract Subclass
Primitive ObsessionReplace Data Value with Object
Long Parameter ListIntroduce Parameter Object
Data ClumpsExtract Class
OO AbusersSwitch StatementsReplace Conditional with Polymorphism
Temporary FieldExtract Class, Introduce Null Object
Refused BequestReplace Inheritance with Delegation
Alternative Classes with Different InterfacesRename Method, Extract Superclass
Change PreventersDivergent ChangeExtract Class
Shotgun SurgeryMove Method, Move Field
Parallel Inheritance HierarchiesMove Method, Move Field
DispensablesComments (code self-explanatory)Extract Method, Rename Variable
Duplicate CodeExtract Method, Pull Up Method
Lazy ClassInline Class, Collapse Hierarchy
Data ClassMove Method, Encapsulate Field
Dead CodeDelete (Git history has record)
Speculative GeneralityInline Class, Remove Parameter
CouplersFeature EnvyMove Method
Inappropriate IntimacyMove Method, Move Field
Message ChainsHide Delegate
Middle ManRemove Middle Man
Incomplete Library ClassIntroduce Foreign Method

Refactoring Techniques Catalog

40+ refactoring techniques in 6 categories, each with mechanical steps and comparison examples:

CategoryCountRepresentative Techniques
Composing Methods9Extract Method, Inline Method, Extract Variable, Replace Temp with Query, Substitute Algorithm
Moving Features7Move Method, Move Field, Extract Class, Inline Class, Hide Delegate
Organizing Data13Replace Data Value with Object, Encapsulate Field, Replace Type Code with Subclasses, Replace Magic Number
Simplifying Conditionals8Decompose Conditional, Guard Clauses, Replace Conditional with Polymorphism, Introduce Null Object
Method Calls13Rename Method, Separate Query from Modifier, Introduce Parameter Object, Replace Error Code with Exception
Generalization9Pull Up Method, Push Down Method, Extract Interface, Form Template Method, Replace Inheritance with Delegation

Safety Protocol

Language-Specific Guides

LanguageKey Recommendations
Javafinal locals, IDE auto-refactor, Records, Sealed Classes
TypeScriptDestructuring reduces params, prefer const, Union Types replace type codes, ?. eliminates null checks
PythonType Hints, dataclasses, @property, Context Managers
GoSmall interfaces, named return values, table-driven tests, early returns eliminate nesting
RustResult/Option replace error codes and null, Pattern Matching, From trait, Derive macros
Tip: For each refactoring, simply tell the AI "This class has this smell, please fix it with the corresponding refactoring technique" — AI will follow the safety protocol step by step, committing at each step.

14. Bonus: /modern-go — Go Code Modernization

/modern-go automatically upgrades Go code to modern idioms and APIs, similar to go fix. It scans go.mod to detect the Go version, then batch-applies version-appropriate transformation rules to Go source files, covering 35+ rules from Go 1.0 through 1.26+.

How to Invoke

# Type directly in Claude Code
/modern-go

# Or use trigger phrases
Modernize: Modernize this project's Go code
Upgrade Go code: Update to Go 1.22 idioms
Gofix: Scan pkg/ directory and apply transformations

Workflow

Transformation Rule Catalog (by Go Version)

VersionRulesExample (Before → After)
1.0+time.Sincetime.Now().Sub(start)time.Since(start)
1.8+time.Untildeadline.Sub(time.Now())time.Until(deadline)
1.10+strings.BuilderLoop s += itemstrings.Builder
1.13+errors.Iserr == io.EOFerrors.Is(err, io.EOF)
1.18+any, strings.Cut, bytes.Cutinterface{}any, Index+slice → Cut
1.19+fmt.Appendf, type-safe atomicsappend(buf, fmt.Sprintf(...)...)fmt.Appendf
1.20+strings.Clone, CutPrefix/CutSuffix, errors.Joinstring([]byte(s))strings.Clone(s)
1.21+min/max, clear, slices/maps packagesManual loops → slices.Contains, maps.Clone etc.
1.22+range over int, cmp.Or, reflect.TypeForfor i:=0;i<n;i++for i:=range n
1.23+Iterator helpers, SplitSeq/FieldsSeqfor _,p:=range strings.Split(s,sep)SplitSeq
1.24+t.Context(), omitzero, b.Loop()Test context.Background()t.Context()
1.25+wg.Go()wg.Add(1); go func(){defer wg.Done();fn()}()wg.Go(fn)
1.26+new(expr), errors.AsTypev:=42; &vnew(42)

Safety Rules

Tip: You can specify scope when invoking, such as /modern-go pkg/ to only transform the pkg/ directory, or /modern-go main.go to only transform a single file.

15. Bonus: /note-it — Implementation Notes

/note-it generates a structured implementation note for the current Issue after code implementation and review, recording design decisions, deviations, tradeoffs, and open questions. Output is saved as HTML in the docs/ directory.

How to Invoke

# Type directly in Claude Code
/note-it

# Or use trigger phrases
Record notes: Generate implementation notes for Issue #42
Implementation notes: Record decisions and deviations from this implementation

Note Contents

CategoryFocusExample
Design DecisionsChoices made where spec was ambiguous and rationaleWhy interface polymorphism instead of switch
DeviationsIntentional deviations from spec and reasonsRationale for simplifying error handling strategy
TradeoffsAlternatives considered and tradeoff analysisInline vs. extract function choice
Open QuestionsItems needing confirmation or modificationWhether performance assumptions need benchmark validation

Output

Positioning

/note-it sits between /review-it and /ship-it in the workflow, serving as the final checkpoint before submission — ensuring implementation intent is fully documented for future maintainers to understand the decision logic behind the code.

Tip: Even without deviations from spec, recording design decisions and tradeoffs is valuable — when revisiting the code 6 months later, these notes explain "why it was done this way" better than code comments alone.

16. Bonus: /code-to-spec — Reverse-Generate SPEC

/code-to-spec analyzes an existing project's code, configuration, tests, and structure, then reverse-generates a complete SPEC document. The output can be used for project reconstruction, onboarding new team members, or comparing actual implementation against intended design.

How to Invoke

# Type directly in Claude Code
/code-to-spec

# Or use trigger phrases
Generate design doc: Analyze current project and generate SPEC
Reverse spec: Reverse engineer this project's specification
Generate SPEC document: Generate technical SPEC for src/ directory

Analysis Depth

LevelContentBest For
OverviewArchitecture + tech stack + core featuresQuick project understanding, ~5 minutes
Standard (default)+ API contracts + data model + config + dependenciesComprehensive project understanding
Deep+ Internal module interactions + error handling + test coveragePreparing for refactoring or rewrite

SPEC Document Structure (12 Chapters)

#ChapterContent
1OverviewPurpose, core features, architectural style
2Tech StackLanguage, framework, database, build, test, deployment
3Project StructureDirectory tree + responsibilities per directory
4Data ModelCore entities, fields, relationships, state transitions
5API SurfaceEndpoint/command/function table + request/response schema
6ConfigurationEnvironment variables, config files, feature flags
7External DependenciesThird-party services, infrastructure, failure impact
8Business RulesInvariants, validation rules, business logic constraints
9Non-FunctionalPerformance, security, error handling patterns
10Testing StrategyTest framework, coverage patterns
11Known GapsUncertainties, assumptions, untested areas
12AppendixDependency graph, local environment setup steps

Workflow

Tip: For large projects (>500 files), it's recommended to first use Overview depth for a quick bird's-eye view, then use Deep depth on modules of interest.

17. Bonus: /smell — Architecture Smell Detection

/smell analyzes a codebase for architectural anti-patterns, code smells, and algorithmic complexity hotspots. It produces a detailed markdown report with severity levels, evidence, and a refactoring roadmap.

How to Invoke

# Type directly in Claude Code
/smell

# Or use trigger phrases
Code smell analysis: find code smells in this project
Architecture audit: detect architecture anti-patterns
Complexity scan: analyze code complexity and find hotspots

Detection Categories (8 Categories, 50+ Smells)

CategoryExamples
ArchitectureBig Ball of Mud, Distributed Monolith, Anemic Domain Model, CQRS Overuse, Violated Layer Boundaries
CouplingCircular Dependencies, Content Coupling, Common Coupling (Global State), Stamp Coupling
CohesionGod Object, Shotgun Surgery, Feature Envy, Data Clumps
DesignLeaky Abstractions, Static Cling, Service Locator Abuse, SOLID Violations
CodeDuplicated Code, Long Method, Primitive Obsession, Magic Numbers, Dead Code
TestingZero Test Coverage, Test-Implementation Coupling, Flaky Tests
NamingVague Names, Inconsistent Naming Conventions
ComplexityNested Loops (O(n^2)), N+1 Queries, Repeated Linear Scan, Sort-in-Loop, Render Recompute

Report Structure

Tip: For quick checks, ask for "critical only" mode. Scope can be the full project, a specific module, or only recently changed files.

18. Supported Platforms

Goal Workflow skills can be used across multiple AI Coding Agents:

Agent/prd/prd-to-spec/to-issues/goal/review-it/note-it/ship-it/refactor/modern-go/code-to-spec/smell/humanize-it/listenhub-tts/insight-diagram
Claude Code✓ (Built-in)
Codex✓ (--goal)
OpenCode
DeepSeek TUI

Issue Creation Platforms

PlatformToolDescription
GitHubgh issue createRequires gh CLI authentication
LocalMarkdown filesSaved to local directory
Baidu iCafeicafe-cliRequires iCafe space parameters

19. FAQ

Q: Do I have to use all steps in order?

No. Each Skill is independent and can be used standalone. For example, if you already have Issues, you can start directly from /goal; if code is already written, you can use /review-it directly. But going through the full workflow yields the best results.

Q: Where does /goal come from? Why isn't it in the skills directory?

/goal is a built-in feature of Claude Code and doesn't require separate installation. The Issue format generated by this workflow's /prd perfectly matches what /goal expects as input.

Q: Can I use this in non-GitHub projects?

Yes. /prd supports saving Issues as local Markdown files or creating them in Baidu iCafe. /review-it only needs a local git repository. /ship-it currently depends on GitHub (gh CLI).

Q: How is /review-it different from manual code review?

/review-it is automated self-review, catching obvious issues before submission. It doesn't replace team code review, but rather improves code quality before PR creation, reducing the low-level issues reviewers need to point out.

Q: How big should an Issue be?

Each Issue should represent work an agent can complete in a single session — typically 1-3 files of changes with clear acceptance criteria. /prd automatically breaks down at this granularity, but you can adjust before confirming.

Q: How do I use this with Codex?

When installing via npx skills add, choose -a codex. In Codex, use codex --goal "..." instead of /goal. /review-it works universally across agents.

Q: Is /prd-to-spec required? When can I skip it?

Not required. /prd-to-spec is an optional step. PRD says "what to do"; SPEC says "how to do it". The distinction: an AI agent executing /goal inherently possesses the "how" capability — it automatically analyzes the codebase, understands existing architecture and conventions, and makes reasonable technical decisions during implementation. In other words, the AI agent is a living SPEC engine — it doesn't need it drawn on paper first.

Most small to medium features work perfectly fine with just PRD → /goal. The following scenarios justify the extra step of /prd-to-spec:

If your project is single-developer, feature boundaries are clear, and the agent already reliably understands the project structure, skipping /prd-to-spec is entirely reasonable — and often more efficient. Treat it as an optional tool in your toolkit — bring it out only when needed.

Q: Where does the 42 iteration limit in /humanize-it come from?

The number 42 isn't due to any special iteration requirement, but a geek culture tribute to the classic sci-fi novel The Hitchhiker's Guide to the Galaxy. In the book, a supercomputer computes for 7.5 million years and arrives at "the Answer to the Ultimate Question of Life, the Universe, and Everything" — which is 42. In programming circles, this number is popular for two reasons:

In practice, most documents reach quality standards within 3-5 iterations. The core of iteration is intelligent strategy switching — when one rewriting approach plateaus, it automatically switches to another. The three strategies complement each other to cover different types of AI traces.

Q: Does /humanize-it support English documents?

Currently, the three sub-skills of /humanize-it are primarily optimized for Chinese text. humanizer-zh's pattern detection rules partially work for English as well, but rewriting effects are best for Chinese.

Q: How do I get an API Key for /listenhub-tts?

Go to listenhub.ai to register and get an API Key, then set it as an environment variable: export LISTENHUB_API_KEY=your_key.

Q: What languages does /listenhub-tts support?

ListenHub supports voices for multiple languages including Chinese (zh) and English (en). When calling the voice list API, you can filter with the ?language=zh parameter.

Q: What diagram types does /insight-diagram support?

/insight-diagram supports 17 diagram types, including system architecture diagrams, 14 UML diagrams (class, object, component, deployment, package, composite structure, profile, use case, activity, state machine, sequence, communication, timing, interaction overview), flowcharts, and swimlane diagrams. Output is in HTML+SVG format, saved to the docs/ directory. Applicable to any software project.