commit
Create git commits with user approval and no Claude attribution
**Read-only quality check - determines if refactor is needed.**
$ npx -y skills add dcouple/Pane --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/mediumContext preview
What this command does when you run it.
**Read-only quality check - determines if refactor is needed.**
**Read-only quality check - determines if refactor is needed.**
Safe to run anytime. Reports issues without modifying files.
Analyzes changed files against codebase patterns and provides a quality score with actionable recommendations.
git diff main --name-status git diff main --numstat git diff main --stat
**Determine:**
**Select pattern level:**
**Read changed files and check patterns from:**
**Study exemplar files:**
**Check for patterns based on classification:**
**Universal (always):**
**Architecture (Medium+):**
**Organization (Large+):**
**How to detect late imports:**
Scan each file line-by-line. After line 40, check for:
**When to flag as critical:**
**Root cause diagnosis:** 1. Check if the late import is inside a constructor → Likely circular dependency 2. Check if the late import is conditional → Architectural smell (dependency should be injected) 3. Provide fix: Reference `apps/api/src/bootstrap/services.ts` for proper dependency injection pattern
**Output:**
# Refactor Check Report
## 📊 Classification
- Size: Medium (7 files, 342 lines)
- Type: New Feature
- Complexity: Moderate
- Patterns Applied: Universal + Architecture + Documentation
## 🎯 Quality Score: 6/10
## 🔍 Issues Found
### Critical (Must Fix)
- [file:line] Relative import: import { X } from '../../utils'
→ Fix: Use @/ path alias
→ Auto-fixable: Yes
- [file:45] Late import: require('@/shared/services/notification.service')
→ Root cause: Circular dependency - service loaded inside constructor
→ Fix: Use constructor injection (see apps/api/src/bootstrap/services.ts)
→ Auto-fixable: No
- [file:line] Controller has business logic
→ Fix: Move to service
→ Auto-fixable: No
### Warnings (Should Fix)
- [file:line] Missing file documentation
→ Fix: Add top comment explaining purpose
→ Auto-fixable: No
- [file:line] Hook not using TanStack Query
→ Fix: Use useQuery for server state
→ Auto-fixable: No
### Info (Nice to Have)
- [file:line] Function is 85 lines (consider splitting)
→ Suggestion: Extract helper functions
## 📈 Pattern Compliance
✓ Import conventions: 2 issues (auto-fixable)
✗ Controller-service: 1 violation (manual fix)
✓ BaseService usage: Correct
✗ File documentation: 3 files missing (manual fix)
✓ TanStack Query: Mostly correct
## ✅ Auto-Fixable Issues: 2
- Convert relative imports to @/ aliases
- Remove unused imports
## ⚠️ Manual Fixes Required: 4
- Move business logic to service
- Add file documentation (3 files)
## 💡 Recommendations
1. Run `/refactor-apply --auto-only` to fix imports
2. Manually move business logic from controller to service
3. Add file-level documentation to new files
4. Re-run `/refactor-check` to verify improvements
## 🎓 References
Similar patterns to study:
- Controller pattern: apps/api/src/modules/feed/controllers/feed.controller.ts
- Service pattern: apps/api/src/modules/feed/services/feed.service.ts
Documentation:
- Backend patterns: apps/api/CLAUDE.md
- Frontend patterns: apps/webapp/CLAUDE.mdBefore detailed analysis, show user what patterns apply:
📊 Change Classification: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Size: Medium (7 files, 342 lines) Type: New Feature Complexity: Moderate Layers: Backend + Frontend 📋 Patterns to Check: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ✓ Universal (imports, errors) ✓ Architecture (controller-service, hooks) ✓ Documentation (new files) ✗ Complex organization (not required) Analyzing...
These are verified from your codebase and always enforced:
1. **Zero relative imports** - Any `../` is a bug 2. **No late imports** - `import`/`require()` after line 40 indicates architectural debt (circular dependencies, missing constructor injection) 3. **authenticatedHandler in controllers** - No try/catch blocks 4. **BaseService for DB services** - Provides this.db 5. **TanStack Query for server state** - No direct API calls in components 6. **Thin pages + orchestration hooks** - Pages are JSX only 7. **Underscore-prefix locality** - Loc
Repo: dcouple/Pane
Create git commits with user approval and no Claude attribution
You are tasked with creating detailed implementation plans through an interactive, iterative process. You should be skeptical, thorough, and work…
Generate comprehensive PR descriptions following repository templates
You are tasked with implementing an approved technical plan from `thoughts/shared/plans/`. These plans contain phases with specific changes and success…
Iterate on existing implementation plans with thorough research and updates
You are tasked with conducting comprehensive research across the codebase to answer user questions. You will spawn one or more parallel sub-agents to perform…