بنقرة واحدة
plan-mode
Structured decomposition skill for complex development tasks. Outputs step-by-step plans before execution.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Structured decomposition skill for complex development tasks. Outputs step-by-step plans before execution.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Performance and security audit for code quality. Checks memory leaks, OOM risks, startup speed, ANR, lag, and security vulnerabilities. Auto-triggered by proactive-correction agent.
Initialize AI coding assistance framework for this project. Scans source code, generates customized rules based on actual project structure, and creates comprehensive references documentation. Use when setting up a new project or re-initializing after major changes.
Bootstrap AI coding assistance into ANY project. Supports 4 AI tools — Claude Code, Qoder, Codex, OpenCode. All tools share EXACTLY the same split-file architecture (rules/skills/agents/hooks/references loaded on-demand). Only the entry file name and config directory name differ.
{{t "code_review.description"}}
{{t "plan_mode.description"}}
代码生成后的自动化审查技能。对新增/修改的代码执行项目规范合规检查。
| name | plan_mode |
| description | Structured decomposition skill for complex development tasks. Outputs step-by-step plans before execution. |
Trigger conditions (any one):
- Involves collaboration across 2+ modules
- Requires modifying 3+ files
- User explicitly requests "plan first / plan / decompose task"
Skip conditions: Single-file simple modifications, user says "just do it", pure Q&A.
## Execution Plan
**Task**: [One-sentence description]
**Involved modules**: [Module list]
**Estimated files to modify**: [N]
**Rules/skills to load**: [List]
### Step Decomposition
| # | Action | Target file/location | Dependency | Checkpoint |
|---|--------|---------------------|-----------|------------|
| 1 | ... | ... | None | ... |
### Risks
### Completion Criteria
## Execution Plan
**Task**: New page route at [path]
**Involved modules**: app/ + components/ + lib/
**Estimated files to modify**: 2-5
**Rules/skills to load**: project_rule + code_review + proactive-correction
### Step Decomposition
| # | Action | Target file/location | Dependency | Checkpoint |
|---|--------|---------------------|-----------|------------|
| 1 | Create page directory under `app/` | `app/[segment]/page.tsx` | None | Directory structure correct |
| 2 | Implement page as Server Component with data fetching | `app/[segment]/page.tsx` | None | Async data fetch returns expected shape |
| 3 | Create reusable components if needed | `components/[Name].tsx` | None | Client Components only if interactive |
| 4 | Add `loading.tsx` if data fetch is slow | `app/[segment]/loading.tsx` | Step 2 | Suspense boundary wraps content |
| 5 | Add `error.tsx` for error handling | `app/[segment]/error.tsx` | Step 2 | Error boundary catches fetch errors |
| 6 | Add metadata export or `generateMetadata()` | `app/[segment]/page.tsx` | Step 2 | SEO metadata present |
### Risks
- Server/Client boundary violations (using hooks in Server Components)
- Missing error/loading states for async operations
### Completion Criteria
- Page renders correctly at the expected URL
- No `'use client'` on layout.tsx
- loading.tsx and error.tsx present for async routes
- Metadata API used for SEO
## Execution Plan
**Task**: New API route handler
**Involved modules**: app/api/
**Estimated files to modify**: 1-3
**Rules/skills to load**: project_rule + code_review
### Step Decomposition
| # | Action | Target file/location | Dependency | Checkpoint |
|---|--------|---------------------|-----------|------------|
| 1 | Create route directory under `app/api/` | `app/api/[segment]/route.ts` | None | Directory structure correct |
| 2 | Implement HTTP method handlers | `app/api/[segment]/route.ts` | Step 1 | Each handler returns `NextResponse` |
| 3 | Add input validation (zod) | `app/api/[segment]/route.ts` | Step 2 | Invalid input returns 400 |
| 4 | Add error handling with proper status codes | `app/api/[segment]/route.ts` | Step 2 | Errors return structured JSON |
### Risks
- Hardcoded API base URLs in client code
- Missing input validation on POST/PUT
- Leaking server-only secrets in responses
### Completion Criteria
- All HTTP methods return proper `NextResponse.json()`
- Input validation present for write operations
- Error responses include meaningful status codes
## Execution Plan
**Task**: New shared UI component
**Involved modules**: components/ + lib/
**Estimated files to modify**: 1-3
**Rules/skills to load**: project_rule + code_review
### Step Decomposition
| # | Action | Target file/location | Dependency | Checkpoint |
|---|--------|---------------------|-----------|------------|
| 1 | Create component file | `components/[Name].tsx` | None | PascalCase naming |
| 2 | Add `'use client'` only if interactive | `components/[Name].tsx` | Step 1 | Directive only if needed |
| 3 | Define TypeScript props interface | `components/[Name].tsx` | Step 1 | Props fully typed (no `any`) |
| 4 | Add styles (Tailwind or CSS Module) | Component file | Step 1 | Styles are scoped |
| 5 | Export component | `components/[Name].tsx` | Steps 1-3 | Default or barrel export |
### Risks
- Unnecessary `'use client'` increasing client bundle
- Missing TypeScript types for props
### Completion Criteria
- Component renders correctly in isolation
- `'use client'` only present if needed
- Props are fully typed
## Execution Plan
**Task**: Add Server Action for data mutation
**Involved modules**: app/ + lib/ + components/
**Estimated files to modify**: 2-4
**Rules/skills to load**: project_rule + code_review
### Step Decomposition
| # | Action | Target file/location | Dependency | Checkpoint |
|---|--------|---------------------|-----------|------------|
| 1 | Create Server Action | `lib/actions/[name].ts` | None | File starts with `'use server'` |
| 2 | Implement action with input validation | `lib/actions/[name].ts` | Step 1 | Zod schema validates input |
| 3 | Add `revalidatePath` after mutation | `lib/actions/[name].ts` | Step 2 | Cache revalidation present |
| 4 | Wire action to form/component | `components/[Form].tsx` | Step 3 | Form calls action via `action` prop |
### Risks
- Missing revalidation after mutation (stale data)
- No error handling in Server Action
### Completion Criteria
- Mutation persists data correctly
- UI updates reflect the mutation without full page reload
- Error states are handled and displayed
proactive-correction agent for dimension 2 scanproactive-correction for dimension 2+3 scan| Task Scenario | Additional Rules to Load |
|---|---|
| New page | project_rule + proactive-correction |
| New API route | project_rule + proactive-correction |
| New Server Action | project_rule + proactive-correction |
| Post-code generation | Auto-trigger code_review |
| Performance optimization | project_rule + code_review + proactive-correction |