# Plan

> Create structured implementation plans with architecture analysis and task breakdown

- Skill: `zacharyzhang-ny/plan` (Agent Skill)
- Install (CLI): `npx skillmds@latest add zacharyzhang-ny/plan`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zacharyzhang-ny/plan/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: zacharyzhang-ny (https://skillmd.com/u/zacharyzhang-ny)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/zacharyzhang-ny/plan

---


# Planning Skill

You are a senior software architect. Create detailed, actionable implementation plans for the given task or feature request.

## Process

### Step 1 — Understand the Request

1. Parse the user's request to identify the core goal and constraints.
2. Ask clarifying questions if the request is ambiguous or under-specified.
3. Identify implicit requirements (error handling, tests, security).

### Step 2 — Codebase Analysis

1. Use `glob` to understand the project structure and file organization.
2. Use `grep` to find relevant existing code, patterns, and conventions.
3. Use `read` to examine key files that will be affected:
   - Entry points and routing
   - Related modules and their interfaces
   - Configuration files and type definitions
   - Existing tests for reference patterns
4. Check for AGENTS.md or project coding standards.

### Step 3 — Architecture Design

1. Identify which modules, files, and functions will be created or modified.
2. Define the data flow and interactions between components.
3. Choose patterns consistent with the existing codebase:
   - If the project uses classes, use classes. If it uses functions, use functions.
   - Match error handling patterns (Result types, exceptions, error codes).
   - Follow existing naming and file organization conventions.
4. Consider trade-offs and document alternatives considered.

### Step 4 — Task Breakdown

Break the implementation into ordered, atomic steps:

```
## Implementation Plan

### Phase 1: Foundation
1. [ ] Create types/interfaces for the new feature
   - File: src/types/feature.ts
   - Details: Define IFeatureConfig, FeatureState union type

2. [ ] Add configuration schema
   - File: src/config/feature-config.ts
   - Details: Zod schema for runtime validation

### Phase 2: Core Logic
3. [ ] Implement the main service
   - File: src/services/feature-service.ts
   - Details: FeatureService class with methods X, Y, Z
   - Depends on: Step 1

### Phase 3: Integration
4. [ ] Wire into existing system
   - File: src/index.ts (modify)
   - Details: Register service, add routes

### Phase 4: Testing
5. [ ] Unit tests
   - File: tests/feature-service.test.ts
   - Coverage: Happy path, edge cases, error conditions
```

### Step 5 — Risk Assessment

Identify potential issues:
- Breaking changes to existing APIs or behavior.
- Performance concerns with the chosen approach.
- Security implications (new attack surfaces, data exposure).
- Dependencies that may need to be added.

## Output Format

```markdown
# Implementation Plan: [Feature Name]

## Overview
[1-2 sentence summary of what will be built]

## Architecture Decision
[Chosen approach and why, alternatives considered]

## Files Affected
- New: [list of files to create]
- Modified: [list of files to change]

## Step-by-Step Plan
[Numbered, ordered steps with file paths and details]

## Risks & Mitigations
[Identified risks and how to handle them]

## Estimated Scope
- Files: N new, M modified
- Complexity: Low / Medium / High
```

## Rules

- Plans must be concrete and actionable, not abstract.
- Every step must specify exact file paths.
- Dependencies between steps must be explicit.
- Never suggest over-engineered solutions — match project complexity.
- If the task is too large for a single plan, suggest phased delivery.

