Loading...
Loading...
Generate comprehensive implementation tutorial documents with deep background, context, rationale, and step-by-step milestones. Use when the user wants to learn by building—creating detailed guides instead of making direct code changes. Triggers on requests like "create a tutorial for", "implementation guide", "teach me how to implement", or explicit /tutorial invocation.
npx skill4agent add petekp/claude-code-setup tutorial-writingprivate/tutorials/# [Feature Name] Implementation Guide
> A step-by-step tutorial for implementing [feature] in [project name].
> Estimated implementation time: [X milestones, ~Y hours of focused work]
## Overview
[2-3 paragraphs explaining what we're building and why. Include the user-facing value and technical motivation. This should excite the reader about what they'll learn.]
## Background & Context
[Deep dive into the surrounding systems. Teach the reader about:
- How the relevant parts of the codebase work today
- Historical context if relevant (why things are the way they are)
- Key abstractions they need to understand
- Reference specific files: "The current implementation lives in `src/features/auth/` (see especially `auth-provider.tsx:45-120`)"]
## Technical Landscape
[Map out the territory:
- Relevant existing components/modules
- Data flow and state management patterns used here
- API contracts and type definitions
- External dependencies involved
- Constraints and gotchas to be aware of]
## Design Rationale
[Explain the approach we're taking and WHY:
- What alternatives were considered?
- Why is this approach better for THIS codebase?
- What tradeoffs are we making?
- How does this align with project conventions?]
## Implementation Milestones
[The core of the tutorial. Each milestone should be:
- Small enough to complete in one sitting
- Verifiable—you can SEE it works before moving on
- Buildable—each milestone builds on the previous]
### Milestone 1: [Foundation/Setup]
**Objective**: [What we're accomplishing]
**Why this first**: [Rationale for ordering]
**Files to create/modify**:
- `path/to/file.ts` - [what changes and why]
- `path/to/other.ts` - [what changes and why]
**Implementation approach**:
[Detailed explanation of WHAT to build, not copy-paste code. Describe:
- The structure and key functions needed
- How it connects to existing code
- Patterns to follow from similar implementations
- Edge cases to handle]
**Verification**:
- [ ] [Specific test to run or behavior to observe]
- [ ] [Another verification step]
**Checkpoint**: After this milestone, you should be able to [specific observable behavior].
---
### Milestone 2: [Core Functionality]
[Same structure as above...]
---
### Milestone 3: [Integration]
[Same structure...]
---
### Milestone N: [Polish & Edge Cases]
[Final milestone often handles:
- Error states and edge cases
- Loading states and UX polish
- Documentation and types cleanup]
## Testing Strategy
[How to thoroughly test this feature:
- Unit test approach and key test cases
- Integration test considerations
- Manual testing checklist
- Edge cases that MUST be tested]
## Risks & Mitigations
[What could go wrong?
- Technical risks (performance, compatibility, etc.)
- UX risks (confusing behavior, accessibility issues)
- Maintenance risks (technical debt, future conflicts)
- How to mitigate or monitor each]
## Going Further
[Optional extensions beyond the core implementation:
- Nice-to-have improvements
- Future enhancements to consider
- Related features this enables]
## References
[Specific pointers for the implementer:
- Key files: `path/to/file.ts:123` - description
- Related PRs or issues if known
- External documentation links
- Similar implementations in the codebase to reference]/tutorial Add dark mode support to the component library
/tutorial Implement real-time notifications using WebSockets
/tutorial Refactor the data fetching layer to use React Query
/tutorial Add comprehensive error boundaries throughout the app