prompt-enhancer
npx skills add https://github.com/bear2u/my-skills --skill prompt-enhancer
Agent 安装分布
Skill 文档
Prompt Enhancer
Transform brief development requests into clear, detailed requirements by analyzing project context. Present the enhanced requirements to the user for confirmation before implementation.
When to Use This Skill
Use this skill when:
- User provides a brief development request like “ë¡ê·¸ì¸ ê¸°ë¥ ë§ë¤ì´ì¤”, “API ì¶ê°í´ì¤”
- Request lacks specific implementation details
- User uploads project files or mentions “the project”
- Task requires understanding project architecture
Core Workflow
Step 1: Analyze Project Context
Check for uploaded files:
view /mnt/user-data/uploads
Gather key information:
- Project structure and organization
- Technology stack (package.json, pubspec.yaml, requirements.txt, etc.)
- Existing patterns (state management, API calls, routing)
- Code conventions (naming, file structure)
- Similar existing features
Step 2: Extract Request Intent
From the user’s brief request, identify:
- Feature type: New feature, bug fix, refactoring, API integration
- Scope: Single screen, full flow, backend + frontend
- Dependencies: Related features or systems
Step 3: Build Enhanced Requirements
Create a structured requirement document with:
# [기ë¥ëª
] 구í ì구ì¬í
## ð íë¡ì í¸ ì»¨í
ì¤í¸
- Framework: [detected framework and version]
- Architecture: [detected pattern]
- State Management: [detected library]
- Key Libraries: [list relevant dependencies]
## ð¯ 구í ë²ì
### 주ì 기ë¥
1. [Main feature 1]
2. [Main feature 2]
3. [Main feature 3]
### íì¼ êµ¬ì¡°
[Expected file structure based on project]
## ð ìì¸ ì구ì¬í
### 1. [Layer/Component Name]
- **ìì¹**: [File path]
- **목ì **: [What it does]
- **구í ë´ì©**:
- [Specific requirement 1]
- [Specific requirement 2]
- **기존 í¨í´ ë°ë¥´ê¸°**: [Reference to existing pattern]
### 2. [Next Layer/Component]
...
## â
ì±ê³µ 기ì¤
- [ ] [Acceptance criteria 1]
- [ ] [Acceptance criteria 2]
- [ ] [Acceptance criteria 3]
- [ ] 기존 ì½ë ì¤íì¼ ë° ìí¤í
ì² ì¼ê´ì± ì ì§
- [ ] 모ë 주ì 기ë¥ì ëí í
ì¤í¸ ìì±
## ð íì¸ ì¬í
- [Any questions or clarifications needed]
- [Assumptions made]
---
ì´ ì구ì¬íì¼ë¡ ì§íí ê¹ì? ìì ì´ íìí ë¶ë¶ì´ ìë¤ë©´ ë§ìí´ì£¼ì¸ì.
Step 4: Present to User
Important: After creating the enhanced requirements, present them to the user and ask for confirmation:
ì ì구ì¬íì ë¶ìí´ì ì 리íìµëë¤.
ì´ëë¡ ì§íí´ë ë ê¹ì?
ìì íê±°ë ì¶ê°í ë´ì©ì´ ìì¼ë©´ ë§ìí´ì£¼ì¸ì!
Do NOT implement until the user confirms. The goal is to clarify requirements first.
Analysis Patterns by Stack
Flutter Projects
Detect: pubspec.yaml, lib/ directory
Key context to gather:
- State management (Riverpod, Bloc, Provider, GetX)
- Architecture (Clean Architecture, MVVM, MVC)
- Navigation (go_router, auto_route, Navigator)
- Network (Dio, http)
- Local storage (Hive, SharedPreferences, SQLite)
Enhanced requirements should include:
## 구í ë²ì
### Presentation Layer
- íë©´: lib/presentation/[feature]/[screen]_screen.dart
- ìí: [StateNotifier/Bloc/Controller] with [state pattern]
- ìì ¯: ì¬ì¬ì© ê°ë¥í ì»´í¬ëí¸
### Domain Layer
- Entity: lib/domain/entities/[name].dart
- UseCase: lib/domain/usecases/[action]_usecase.dart
- Repository Interface: lib/domain/repositories/
### Data Layer
- Model: lib/data/models/[name]_model.dart (fromJson/toJson)
- Repository Implementation: lib/data/repositories/
- DataSource: lib/data/datasources/
### Navigation
- Route: [route path]
- Navigation method: [context.go/push based on router]
## ì±ê³µ 기ì¤
â
[State management]ë¡ ìí ê´ë¦¬
â
[Existing widget] ì¤íì¼ ì¼ê´ì± ì ì§
â
API ìëµ ìë¬ ì²ë¦¬
â
ë¡ë© ìí íì
â
Widget test ìì±
Next.js/React Projects
Detect: package.json with “next” or “react”
Key context to gather:
- Next.js version (App Router vs Pages Router)
- State management (Zustand, Redux, Context)
- Styling (Tailwind, CSS Modules, styled-components)
- API approach (Next.js API routes, external API)
- TypeScript usage
Enhanced requirements should include:
## 구í ë²ì
### UI Components
- ì»´í¬ëí¸: [path]/[ComponentName].tsx
- Props interface: [existing pattern]
- Styling: [Tailwind classes/CSS modules]
### State Management
- Store: [existing state structure]
- Actions: [action naming convention]
### API Layer
- Endpoint: [app/api or external]
- Method: [GET/POST/PUT/DELETE]
- Response type: [TypeScript interface]
### Routing
- Route: [app/[route] or pages/[route]]
- Dynamic segments: [if needed]
## ì±ê³µ 기ì¤
â
TypeScript íì
ìì ì±
â
[Existing components] ì¬ì¬ì©
â
ë°ìí ëìì¸ (모ë°ì¼/ë°ì¤í¬í±)
â
SEO ìµì í (ë©íë°ì´í°)
â
Unit test + Integration test
Python (Django/FastAPI) Projects
Detect: requirements.txt, manage.py, main.py
Key context to gather:
- Framework (Django, FastAPI, Flask)
- ORM (SQLAlchemy, Django ORM, Tortoise)
- Authentication approach
- API documentation (OpenAPI/Swagger)
Enhanced requirements should include:
## 구í ë²ì
### Models/Schema
- Model: [app]/models.py or schemas/[name].py
- Fields: [field definitions with types]
- Relationships: [ForeignKey/relationships]
### Views/Endpoints
- Route: [path]
- Method: [HTTP method]
- Request/Response schema: [Pydantic models]
### Business Logic
- Service: [if applicable]
- Validation: [input validation]
### Database
- Migration: [migration command]
## ì±ê³µ 기ì¤
â
API documentation ìë ìì±
â
Request validation
â
Error handling with proper status codes
â
Unit test + Integration test
â
[Authentication] ì ì©
Example Enhancement
User input:
ë¡ê·¸ì¸ ê¸°ë¥ êµ¬íí´ì¤
Skill output:
# ë¡ê·¸ì¸ ê¸°ë¥ êµ¬í ì구ì¬í
## ð íë¡ì í¸ ì»¨í
ì¤í¸
- Framework: Flutter 3.16.0 with null safety
- Architecture: Clean Architecture
- State Management: Riverpod (StateNotifier pattern)
- Network: Dio 5.3.0
- Storage: flutter_secure_storage
- Navigation: go_router
## ð¯ 구í ë²ì
### 주ì 기ë¥
1. ì´ë©ì¼/ë¹ë°ë²í¸ ë¡ê·¸ì¸ í¼
2. JWT í í° ê¸°ë° ì¸ì¦
3. ë¡ê·¸ì¸ ì±ê³µ ì í íë©´ ì´ë
4. ìë¬ ì²ë¦¬ ë° ì¬ì©ì í¼ëë°±
### íì¼ êµ¬ì¡°
lib/ âââ presentation/ â âââ auth/ â âââ login_screen.dart â âââ login_notifier.dart â âââ login_state.dart âââ domain/ â âââ entities/user.dart â âââ usecases/login_usecase.dart â âââ repositories/auth_repository.dart âââ data/ âââ models/ â âââ user_model.dart â âââ login_response.dart âââ repositories/auth_repository_impl.dart âââ datasources/auth_remote_datasource.dart
## ð ìì¸ ì구ì¬í
### 1. Presentation Layer - ë¡ê·¸ì¸ íë©´
- **ìì¹**: lib/presentation/auth/login_screen.dart
- **목ì **: ì¬ì©ì ë¡ê·¸ì¸ UI ì ê³µ
- **구í ë´ì©**:
- ConsumerStatefulWidget ì¬ì©
- Email TextFormField (ì´ë©ì¼ íì ê²ì¦)
- Password TextFormField (8ì ì´ì, obscureText)
- ë¡ê·¸ì¸ PrimaryButton
- íìê°ì
ë§í¬
- ë¡ë© ìí ì ì¤ë²ë ì´ íì
- **기존 í¨í´ ë°ë¥´ê¸°**: core/widgets/custom_text_field.dart ì¤íì¼ ì¬ì©
### 2. State Management
- **ìì¹**: lib/presentation/auth/login_notifier.dart
- **목ì **: ë¡ê·¸ì¸ ìí ê´ë¦¬
- **구í ë´ì©**:
- StateNotifier<LoginState> ìì
- login(email, password) ë©ìë
- ì±ê³µ ì í í° ì ì¥ í ìí ì
ë°ì´í¸
- ìë¬ ì ìë¬ ë©ìì§ ìí ì¤ì
- **기존 í¨í´ ë°ë¥´ê¸°**: ë¤ë¥¸ notifierë¤ê³¼ ëì¼í í¨í´
### 3. Domain Layer - ìí°í°
- **ìì¹**: lib/domain/entities/user.dart
- **목ì **: ì¬ì©ì ëë©ì¸ 모ë¸
- **구í ë´ì©**:
- Freezedë¡ ë¶ë³ í´ëì¤ ìì±
- id, email, name, profileImageUrl íë
- **기존 í¨í´ ë°ë¥´ê¸°**: ë¤ë¥¸ entityë¤ê³¼ ëì¼í 구조
### 4. Domain Layer - UseCase
- **ìì¹**: lib/domain/usecases/login_usecase.dart
- **목ì **: ë¡ê·¸ì¸ ë¹ì¦ëì¤ ë¡ì§
- **구í ë´ì©**:
- call(LoginParams) ë©ìë
- Either<Failure, User> ë°í
- repository ìì¡´ì± ì£¼ì
- **기존 í¨í´ ë°ë¥´ê¸°**: ë¨ì¼ ì±
ì UseCase í¨í´
### 5. Data Layer - API íµì
- **ìì¹**: lib/data/datasources/auth_remote_datasource.dart
- **목ì **: ë¡ê·¸ì¸ API í¸ì¶
- **구í ë´ì©**:
- POST /api/auth/login
- Request: {"email": string, "password": string}
- Response: LoginResponse (accessToken, refreshToken, user)
- Dio instance ì¬ì¬ì©
- **기존 í¨í´ ë°ë¥´ê¸°**: 기존 datasourceë¤ì ìë¬ ì²ë¦¬ ë°©ì
### 6. Data Layer - Repository 구í
- **ìì¹**: lib/data/repositories/auth_repository_impl.dart
- **목ì **: Repository ì¸í°íì´ì¤ 구í
- **구í ë´ì©**:
- login ë©ìë 구í
- í í° ì ì¥ (TokenStorage ì¬ì©)
- DioException ì²ë¦¬
- UserModelì User entityë¡ ë³í
- **기존 í¨í´ ë°ë¥´ê¸°**: try-catch-Either í¨í´
### 7. Navigation ì¤ì
- **ìì¹**: lib/core/router/app_router.dart
- **목ì **: ë¡ê·¸ì¸ ë¼ì°í¸ ì¶ê°
- **구í ë´ì©**:
- /login ë¼ì°í¸ ì¶ê°
- ë¡ê·¸ì¸ ì±ê³µ ì /homeì¼ë¡ 리ë¤ì´ë í¸
- ì¸ì¦ ê°ë ë¡ì§
- **기존 í¨í´ ë°ë¥´ê¸°**: 기존 go_router ì¤ì ë°©ì
## â
ì±ê³µ 기ì¤
- [ ] ì¬ì©ìê° ì´ë©ì¼ê³¼ ë¹ë°ë²í¸ ì
ë ¥
- [ ] ë¡ê·¸ì¸ ë²í¼ í´ë¦ ì API í¸ì¶
- [ ] ì±ê³µ ì í í° ì ì¥ ë° í íë©´ ì´ë
- [ ] ì¤í¨ ì ì ì í ìë¬ ë©ìì§ íì (SnackBar)
- [ ] ë¡ë© ì¤ ë²í¼ ë¹íì±í ë° ë¡ë© ì¸ëì¼ì´í°
- [ ] ì´ë©ì¼ íì ë° ë¹ë°ë²í¸ ê¸¸ì´ ê²ì¦
- [ ] 기존 ì½ë ì¤íì¼ ë° ìí¤í
ì² ì¼ê´ì± ì ì§
- [ ] Widget test ìì± (ë¡ê·¸ì¸ íë©´)
- [ ] Repository test ìì± (mock API)
- [ ] UseCase test ìì±
## ð íì¸ ì¬í
- API ìëí¬ì¸í¸ 주ìê° `https://api.example.com`ì´ ë§ëì?
- í í° ë§ë£ ì ìë ê°±ì 기ë¥ì´ íìíê°ì?
- ìì
ë¡ê·¸ì¸(구ê¸, ì í ë±)ë í¨ê» 구íí ê¹ì?
- "ë¹ë°ë²í¸ 찾기" 기ë¥ì´ íìíê°ì?
---
ì ì구ì¬íì¼ë¡ ì§íí ê¹ì? ìì ì´ íìí ë¶ë¶ì´ ìë¤ë©´ ë§ìí´ì£¼ì¸ì!
Tips for Effective Enhancement
Always Ask for Clarification
If the project context is unclear or insufficient:
íë¡ì í¸ íì¼ì ì
ë¡ëí´ì£¼ìë©´ ë ì íí ì구ì¬íì ë§ë¤ ì ììµëë¤.
ëë ë¤ì ì 보를 ìë ¤ì£¼ì¸ì:
- ì¬ì© ì¤ì¸ íë ììí¬
- ìí ê´ë¦¬ ë¼ì´ë¸ë¬ë¦¬
- 기존 íë¡ì í¸ êµ¬ì¡°
Include Visual Examples
When helpful, mention existing screens/components:
기존 ProfileScreenê³¼ ì ì¬í ë ì´ììì¼ë¡ 구í
- AppBar ì¤íì¼ ëì¼
- TextFormField ëìì¸ ì¬ì¬ì©
- PrimaryButton ì»´í¬ëí¸ ì¬ì©
Highlight Dependencies
## ð ì°ê´ 기ë¥
- UserRepository: ì¬ì©ì ì ë³´ ì¡°íì ì¬ì¬ì©
- TokenStorage: 기존 í í° ì ì¥ ë¡ì§ íì©
- ErrorHandler: ê³µíµ ìë¬ ì²ë¦¬ ì ì©
Reference Files
For detailed patterns:
- Enhancement patterns: references/enhancement-patterns.md
- Framework guides: references/framework-guides.md