architecting-solutions

charon-fan/agent-playbook · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/charon-fan/agent-playbook --skill architecting-solutions
0 commentsdiscussion
summary

Analyzes requirements and creates detailed PRD documents for software implementation.

skill.md

Architecting Solutions

Analyzes requirements and creates detailed PRD documents for software implementation.

Description

Use this skill when you need to:

  • Create PRD documents
  • Design software solutions
  • Analyze requirements
  • Specify features
  • Document technical plans
  • Plan refactoring or migration

Installation

This skill is typically installed globally at ~/.claude/skills/architecting-solutions/.

How It Works

The skill guides Claude through a structured workflow:

  1. Clarify requirements - Ask targeted questions to understand the problem
  2. Analyze context - Review existing codebase for patterns and constraints
  3. Design solution - Propose architecture with trade-offs considered
  4. Generate PRD - Output markdown PRD to {PROJECT_ROOT}/docs/ directory

IMPORTANT: Always write PRD to the project's docs/ folder, never to plan files or hidden locations.

Workflow

Copy this checklist and track progress:

Requirements Analysis:
- [ ] Step 1: Clarify user intent and success criteria
- [ ] Step 2: Identify constraints (tech stack, timeline, resources)
- [ ] Step 3: Analyze existing codebase patterns
- [ ] Step 4: Research best practices (if needed)
- [ ] Step 5: Design solution architecture
- [ ] Step 6: Generate PRD document (must be in {PROJECT_ROOT}/docs/)
- [ ] Step 7: Validate with user

Step 1: Clarify Requirements

Ask these questions to understand the problem:

Core Understanding

  • Problem Statement: What problem are we solving? What is the current pain point?
  • Success Criteria: How do we know this is successful? Be specific.
  • Target Users: Who will use this feature? What are their goals?

For Refactoring/Migration:

  • Why Refactor?: What's wrong with current implementation? Be specific.
  • Breaking Changes: What will break? What needs migration?
  • Rollback Plan: How do we revert if something goes wrong?

Step 2: Identify Constraints

  • Technical Constraints: Existing tech stack, architecture patterns, dependencies
  • Time Constraints: Any deadlines or phases?
  • Resource Constraints: Team size, expertise availability
  • Business Constraints: Budget, external dependencies, third-party APIs

Step 3: Analyze Existing Codebase

# Find similar patterns in the codebase
grep -r "related_keyword" packages/ --include="*.ts" --include="*.tsx"

# Find relevant directory structures
find packages/ -type d -name "*keyword*"

# Check existing patterns
ls -la packages/kit/src/views/similar-feature/

Critical for Refactoring:

  • Find ALL consumers of the code being changed
  • Identify ALL state/data flows
  • Trace ALL entry points and exit points
  • Look for existing mechanisms that might solve the problem already
# Find all imports/usages of a module
grep -r "useFeatureContext" packages/ --include="*.ts" --include="*.tsx"
grep -r "refreshSignalRef" packages/ --include="*.ts" --include="*.tsx"

CRITICAL: Before proposing a refactoring, ask:

  1. Is there an existing mechanism that can be extended?
  2. What's the simplest possible solution?
  3. Can we solve this with minimal changes?
  4. Does my solution actually connect the dots? (e.g., empty callbacks won't work)

Look for:

  • Architectural patterns: How are similar features implemented?
  • State management: What state solution is used? (Jotai, Redux, Context, Refs)
  • Component patterns: How are components organized?
  • API patterns: How are API calls structured?
  • Type definitions: Where are types defined?

Step 4: Research Best Practices

For unfamiliar domains, search for best practices.

Step 5: Design Solution Architecture

CRITICAL: Consider Multiple Solutions

Before settling on a solution, ALWAYS present multiple options:

  1. Minimal Change Solution - What's the absolute smallest change that could work?
  2. Medium Effort Solution - Balanced approach with some refactoring
  3. Comprehensive Solution - Full architectural overhaul

Example:

Problem: Data doesn't refresh after operation

Option 1 (Minimal): Hook into existing pending request count decrease
  - Changes: 1-2 files
  - Risk: Low
  - Selected: ✓

Option 2 (Medium): Add refresh callback through existing shared context
  - Changes: 3-5 files
  - Risk: Medium

Option 3 (Comprehensive): Migrate to a centralized state-store pattern
  - Changes: 10+ files, new atoms/actions
  - Risk: High
  - Time: 2-3 days

Ask user BEFORE writing PRD:

  • Which option do you prefer?
  • Are you open to larger refactoring?
  • What's your tolerance for change?

Architecture Design Principles

  1. Simplicity First: Choose the simplest solution that meets requirements
  2. Progressive Enhancement: Start with MVP, extend iteratively
  3. Separation of Concerns: UI, logic, and data should be separated
  4. Reusability: Design components that can be reused
  5. Testability: Design for easy testing

Document Trade-offs

For each major decision, document:

Option Pros Cons Selected
Approach A Pro1, Pro2 Con1
Approach B Pro1 Con1, Con2

Step 6: Generate PRD Document

IMPORTANT: Always write PRD to the project's docs/ directory, never to plan files or hidden locations.

Output location: {PROJECT_ROOT}/docs/{feature-name}-prd.md

Example:

  • If project root is /Users/user/my-project/, write to /Users/user/my-project/docs/feature-name-prd.md
  • Use kebab-case for filename: data-refresh-logic-refactoring-prd.md

Step 7: Validate with User

Before finalizing:

  1. Review success criteria - Do they align with user goals?
  2. Check constraints - Are all constraints addressed?
  3. Verify completeness - Can another agent implement from this PRD?
  4. Confirm with user - Get explicit approval before finalizing

PRD Quality Checklist

Content Quality

  • Problem statement is clear and specific
  • Success criteria are measurable
  • Functional requirements are unambiguous
  • Non-functional requirements are specified
  • Constraints are documented
  • Trade-offs are explained

Implementation Readiness

  • Architecture is clearly defined
  • File structure is specified
  • API contracts are defined (if applicable)
  • Data models are specified
  • Edge cases are considered
  • Testing approach is outlined

Agent-Friendliness

  • Another agent can implement without clarification
  • Code examples are provided where helpful
  • File paths use forward slashes
  • Existing code references are accurate

Root Cause Analysis Checklist (CRITICAL)

For bugs and refresh issues, ALWAYS verify:

  • Existing mechanism already exists - Does a working solution exist elsewhere?
  • Why existing solution doesn't work - Timing? Scope? Not connected?
  • Each hook/component instance is independent - They don't share state unless explicitly connected
  • Callback chain is complete - Trace from trigger to effect, every link must work
  • Empty callbacks are called - If onRefresh is provided, is it actually implemented?
  • Polling/refresh timing - What are the intervals? When do they fire?

Common Root Cause Mistakes:

  • Assuming hooks share state (they don't - each instance is independent)
  • Empty callback implementations that do nothing
  • Not tracing the full call chain from trigger to effect
  • Not understanding when events fire (e.g., revalidateOnFocus requires actual focus change)

Migration Scope Completeness

  • ALL existing state is accounted for: List every piece of state being migrated

    • What states are being migrated? (e.g., items, summary, isLoading, filters, pendingRequests)
    • What's the migration strategy for each? (direct move / transform / deprecate)
  • ALL consumers are identified: Find every file that uses the code being changed

    # Must run: grep -r "import.*ModuleName" packages/
    # Must run: grep -r "useHookName" packages/
    
  • Provider usage points are covered: Every file using the Provider is updated

    • Root Provider → Mirror Provider migration
    • All pages/components using the provider

State/Data Flow Validation

  • No orphaned state: Every piece of state has a clear source and consumer
  • No dead state: Every new state/state variable has a defined purpose and consumer
  • No undefined references: All imports/references resolve to existing code
  • Complete call chain documented: From trigger → callback → effect, show every step
  • All related operations covered: If module has Create/Edit/Delete/Import/Export, test all of them

React/Hook Rules Compliance

  • No conditional hooks: Never call hooks conditionally (e.g., isAdvancedMode ? useHook() : null)

    • Hooks MUST be called at the top level, unconditionally
    • If conditional logic is needed, use early return or conditional rendering
  • Ref usage is correct: If using ref pattern, access via .current

    • Check: useFeatureActions().current not useFeatureActions()

Provider Pattern Completeness

  • Root Provider is defined: Main Provider component exists
  • Mirror Provider is defined: Mirror Provider for modal/overlay contexts exists
  • All usage points wrapped: Every page/component using the provider is wrapped
    # Must verify: Each page that uses the context has the Provider wrapper
    

Auto-mount/System Integration

  • Enum registration: Added to appropriate enum (e.g., EContextStoreNames)
  • Switch case registration: Added to auto-mount switch statement
  • Store initialization: Store initialization logic is complete
  • No duplicate registrations: Verify no conflicts with existing entries

Backward Compatibility

  • Existing consumers work: Code using the old pattern still works during migration
  • Migration path is clear: How do consumers migrate to the new pattern?
  • Deprecation timeline: When is the old pattern removed?

Code Examples

  • Before/After comparisons: Show code changes clearly
  • Type definitions are accurate: TypeScript types match the implementation
  • Import paths are correct: All imports use correct workspace paths

Common Anti-Patterns to Avoid

Anti-Pattern Better Approach
"Optimize the code" "Reduce render time from 100ms to 16ms by memoizing expensive calculations"
"Make it faster" "Implement caching to reduce API calls from 5 to 1 per session"
"Clean up the code" "Extract duplicate logic into shared utility functions"
"Fix the bug" "Handle null case in getUserById when user doesn't exist"
"Refactor the state layer" "Migrate from Context+Ref to a centralized store: "
Over-engineering Start with simplest solution, extend only if needed

Over-Engineering Warning (Critical Lesson)

The Problem with Jumping to Complex Solutions

Real Case Study:

  • PRD Proposed: Full shared state-store migration (10+ files, 2-3 days)
  • Actual Solution: Hook into existing pending request count decrease (1-2 files, 1 hour)
  • Lesson: Always look for the simplest solution first

Signs You Might Be Over-Engineering

  • ❌ Proposing new patterns when existing ones could work
  • ❌ Creating new state management before exhausting current options
  • ❌ Multiple new files when one file change could suffice
  • ❌ "Best practice" justification without considering practicality

Questions to Ask Before Writing PRD

  1. Is there an existing mechanism that does 80% of what we need?
  2. Can we extend/modify existing code instead of creating new patterns?
  3. What's the absolute minimum change to solve THIS problem?
  4. Does the user actually want a major refactor?
  5. Does my solution's callback actually do something? (Empty callbacks are bugs!)
  6. Have I traced the complete call chain? (Trigger → ... → Effect)

When Comprehensive Solutions ARE Appropriate

  • Current architecture is fundamentally broken
  • Technical debt is blocking all new features
  • Team has explicitly decided to modernize
  • Problem will recur if not properly addressed

Key: Comprehensive solutions should be a CHOICE, not the DEFAULT.


Patterns for Common Scenarios

New Feature Implementation

1. Read similar feature implementations
2. Identify reusable patterns
3. Design component hierarchy
4. Define state management approach
5. Specify API integration points
6. List all new files to create
7. List all existing files to modify

Refactoring Existing Code

1. Analyze current implementation
2. Find ALL consumers (grep -r imports)
3. Identify pain points and technical debt
4. PROPOSE MULTIPLE SOLUTIONS (minimal → comprehensive)
5. GET USER APPROVAL on approach
6. Plan migration strategy (phased vs big-bang)
7. Define rollback approach
8. List migration checklist

# CRITICAL: Start with the simplest solution!
# Only propose comprehensive refactoring if user explicitly wants it.

Bug Fix Investigation

1. Understand expected vs actual behavior
2. Locate root cause in code
3. Identify affected areas
4. Design fix approach
5. Specify testing for regression prevention

Reference Materials

  • PRD Template: Look at existing PRDs in the project's docs/ folder
  • Similar Implementations: Reference similar features/modules in the codebase

Tips for Effective PRDs

  1. Be Specific: "Improve performance" → "Reduce API response time from 2s to 500ms"
  2. Show Context: Explain why a decision was made, not just what was decided
  3. Include Examples: Show code snippets for complex patterns
  4. Think About Edge Cases: What happens when API fails? User has no data?
  5. Consider Migration: For refactoring, how do we move from A to B safely?
how to use architecting-solutions

How to use architecting-solutions on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add architecting-solutions
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/charon-fan/agent-playbook --skill architecting-solutions

The skills CLI fetches architecting-solutions from GitHub repository charon-fan/agent-playbook and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/architecting-solutions

Reload or restart Cursor to activate architecting-solutions. Access the skill through slash commands (e.g., /architecting-solutions) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.654 reviews
  • Sakura Kapoor· Dec 28, 2024

    Solid pick for teams standardizing on skills: architecting-solutions is focused, and the summary matches what you get after install.

  • Michael Yang· Dec 24, 2024

    Registry listing for architecting-solutions matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Ganesh Mohane· Dec 16, 2024

    Solid pick for teams standardizing on skills: architecting-solutions is focused, and the summary matches what you get after install.

  • Kabir Huang· Dec 12, 2024

    I recommend architecting-solutions for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Sakura Sharma· Nov 19, 2024

    We added architecting-solutions from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Yash Thakker· Nov 15, 2024

    architecting-solutions is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Sakshi Patil· Nov 7, 2024

    We added architecting-solutions from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Diya Desai· Nov 3, 2024

    Keeps context tight: architecting-solutions is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Kabir Zhang· Nov 3, 2024

    architecting-solutions reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Chaitanya Patil· Oct 26, 2024

    architecting-solutions fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

showing 1-10 of 54

1 / 6