Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Designs technical solutions and architecture. Use when user says "design solution", "architecture design", "technical design", or "方案设计" WITHOUT mentioning PRD. For PRD-specific work, use prd-planner skill instead.
.claude/skills/architecting-solutions/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 43% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 95% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 183% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 180% | 0% |
| case-18 | ✗→✓ | ▲ Improved | 155% | 0% |
Analyzes requirements and creates technical solution documents for software implementation.
Use this skill when you need to:
Install through apb skills add ./skills/architecting-solutions --scope global --target all --link when possible.
The skill guides Claude through a structured workflow:
{PROJECT_ROOT}/docs/IMPORTANT: Use prd-planner when the user asks for a PRD. This skill writes non-PRD architecture and solution artifacts to the project's docs/ folder.
Copy this checklist and track progress:
Requirements Analysis:
- [ ] Step 1: Clarify user intent and success criteria
- [ ] Step 2: Identify constraints (tech stack, timeline, resources)
- [ ] Step 3: Analyze existing codebase patterns
- [ ] Step 4: Research best practices (if needed)
- [ ] Step 5: Design solution architecture
- [ ] Step 6: Generate solution document (must be in {PROJECT_ROOT}/docs/)
- [ ] Step 7: Validate with userAsk these questions to understand the problem:
bash# Find similar patterns in the codebase grep -r "related_keyword" src/ --include="*.ts" --include="*.tsx" # Find relevant directory structures find . -type d -name "*keyword*" # Check existing patterns find src -maxdepth 4 -type d -name '*similar*'
Critical for Refactoring:
bash# Find all imports/usages of a module grep -r "existing-interface" src/ --include="*.ts" --include="*.tsx" grep -r "related-event" src/ --include="*.ts" --include="*.tsx"
CRITICAL: Before proposing a refactoring, ask:
Look for:
For unfamiliar domains, search for best practices.
Before settling on a solution, ALWAYS present multiple options:
Example:
Problem: Data doesn't refresh after operation
Option 1 (Minimal): Hook into existing pending request count decrease
- Changes: 1-2 files
- Risk: Low
- Selected: ✓
Option 2 (Medium): Add refresh callback through existing shared context
- Changes: 3-5 files
- Risk: Medium
Option 3 (Comprehensive): Migrate to a centralized state-store pattern
- Changes: 10+ files, new atoms/actions
- Risk: High
- Time: 2-3 daysAsk user BEFORE writing the solution document:
For each major decision, document:
| Option | Pros | Cons | Selected | |--------|------|------|----------| | Approach A | Pro1, Pro2 | Con1 | ✓ | | Approach B | Pro1 | Con1, Con2 | |
IMPORTANT: Always write the solution document to the project's docs/ directory, never to plan files or hidden locations. Use prd-planner instead when the requested artifact is a PRD.
Output location: {PROJECT_ROOT}/docs/{feature-name}-solution.md
Example:
/Users/user/my-project/, write to /Users/user/my-project/docs/feature-name-solution.mddata-refresh-logic-refactoring-solution.mdBefore finalizing:
For bugs, state, refresh, or lifecycle issues, verify:
Common mistakes include assuming separate instances share state, leaving inert callbacks, checking only the first link in a chain, and confusing an event's registration with proof that it fired.
bash rg -n "ModuleName|PublicInterfaceName" .
| Anti-Pattern | Better Approach | |--------------|-----------------| | "Optimize the code" | "Reduce render time from 100ms to 16ms by memoizing expensive calculations" | | "Make it faster" | "Implement caching to reduce API calls from 5 to 1 per session" | | "Clean up the code" | "Extract duplicate logic into shared utility functions" | | "Fix the bug" | "Handle null case in getUserById when user doesn't exist" | | "Refactor the state layer" | "Migrate from Context+Ref to a centralized store: <detailed state list and migration strategy>" | | Over-engineering | Start with simplest solution, extend only if needed |
Illustrative lesson: A request to refresh after an operation completes may need only an existing completion signal, not a new shared state subsystem. Trace the current lifecycle before proposing a broader abstraction.
Key: Comprehensive solutions should be a CHOICE, not the DEFAULT.
1. Read similar feature implementations
2. Identify reusable patterns
3. Design component hierarchy
4. Define state management approach
5. Specify API integration points
6. List all new files to create
7. List all existing files to modify1. Analyze current implementation
2. Find ALL consumers (grep -r imports)
3. Identify pain points and technical debt
4. PROPOSE MULTIPLE SOLUTIONS (minimal → comprehensive)
5. GET USER APPROVAL on approach
6. Plan migration strategy (phased vs big-bang)
7. Define rollback approach
8. List migration checklist
# CRITICAL: Start with the simplest solution!
# Only propose comprehensive refactoring if user explicitly wants it.1. Understand expected vs actual behavior
2. Locate root cause in code
3. Identify affected areas
4. Design fix approach
5. Specify testing for regression preventiondocs/ folder| Wrong | Correct | Why | |-------|---------|-----| | "Shared state" | "Each instance polls independently" | Hooks don't share state unless explicitly connected | | "Pending changes" | "Pending count decreases" | Code checks !isPending && prevIsPending (true→false) | | "Triggers refresh" | "Calls navigation.goBack() which triggers..." | Show the complete chain |
Bad: "onRefresh triggers data refresh" Good:
onRefresh() → navigation.goBack() → Dashboard focused
→ usePromiseResult (revalidateOnFocus: true) fires
→ refreshItems() → handleRefresh()
→ fetchItems() + refreshSummary() + refreshMetrics()Include file paths and line numbers for each step!
If module has 5 operations (Create/Edit/Delete/Import/Export), test all 5. Don't just test the 2 you're focused on.
Draw out the timeline:
0s ---- Modal opens, user starts Edit
10s ---- Action submitted, pending: 0→1
15s ---- Modal closes
└─ Dashboard hook last polled at 5s
└─ Next poll at 35s (25s away!) ❌This shows WHY it doesn't work.
| Mistake | Example | Fix | |---------|---------|-----| | Empty callback | onRefresh: () => {} | Implement actual logic or remove | | Incomplete root cause | "It doesn't refresh" | Explain WHY: timing/scope/disconnected | | Missing call chain | "Somehow triggers refresh" | Document every step with file:line | | Incomplete testing | Only test Create/Edit | Also test Delete/Import/Export | | Assumptions as facts | "revalidateOnFocus fires on modal close" | Verify: only fires on actual focus change | | Wrong trigger condition | "Pending changes" | Code shows: !isPending && prevIsPending (decreases) |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-04 | fail→pass | 27,139 | 12,955 | -52% | 1 | 1 | 0% | 3,656 | 5,228 | +43% | 0 | 0 | — |
case-21 | pass→pass | 22,514 | 18,511 | -18% | 1 | 1 | 0% | 2,415 | 5,868 | +143% | 0 | 0 | — |
case-01 | fail→fail | 50,671 | 15,343 | -70% | 1 | 1 | 0% | 8,245 | 4,171 | -49% | 0 | 0 | — |
case-02 | fail→fail | 48,957 | 17,692 | -64% | 1 | 1 | 0% | 7,588 | 4,378 | -42% | 0 | 0 | — |
case-03 | fail→fail | 68,712 | 15,328 | -78% | 1 | 1 | 0% | 3,782 | 4,172 | +10% | 0 | 0 | — |
case-05 | fail→fail | 15,580 | 17,680 | +13% | 1 | 1 | 0% | 243 | 4,378 | +1702% | 0 | 0 | — |
case-06 | fail→fail | 28,300 | 18,561 | -34% | 1 | 1 | 0% | 5,147 | 4,303 | -16% | 0 | 0 | — |
case-07 | fail→fail | 13,296 | 16,253 | +22% | 1 | 1 | 0% | 1,329 | 4,760 | +258% | 0 | 0 | — |
case-08 | fail→fail | 20,406 | 12,291 | -40% | 1 | 1 | 0% | 3,344 | 4,276 | +28% | 0 | 0 | — |
case-14 | fail→fail | 18,270 | 11,141 | -39% | 1 | 1 | 0% | 2,517 | 4,186 | +66% | 0 | 0 | — |
case-09 | fail→fail | 48,115 | 11,190 | -77% | 1 | 1 | 0% | 8,234 | 4,174 | -49% | 0 | 0 | — |
case-10 | pass→fail | 19,802 | 15,984 | -19% | 1 | 1 | 0% | 2,346 | 4,192 | +79% | 0 | 0 | — |
case-11 | fail→pass | 18,695 | 15,517 | -17% | 1 | 1 | 0% | 2,854 | 5,569 | +95% | 0 | 0 | — |
case-12 | pass→pass | 24,506 | 23,053 | -6% | 1 | 1 | 0% | 2,522 | 6,772 | +169% | 0 | 0 | — |
case-13 | fail→pass | 11,889 | 8,068 | -32% | 1 | 1 | 0% | 1,550 | 4,388 | +183% | 0 | 0 | — |
case-15 | fail→pass | 14,647 | 25,053 | +71% | 1 | 1 | 0% | 2,486 | 6,971 | +180% | 0 | 0 | — |
case-16 | pass→pass | 15,675 | 24,632 | +57% | 1 | 1 | 0% | 2,423 | 5,701 | +135% | 0 | 0 | — |
case-17 | pass→pass | 20,064 | 14,955 | -25% | 1 | 1 | 0% | 2,373 | 6,189 | +161% | 0 | 0 | — |
case-18 | fail→pass | 23,477 | 14,914 | -36% | 1 | 1 | 0% | 2,440 | 6,231 | +155% | 0 | 0 | — |
case-19 | pass→pass | 22,634 | 18,842 | -17% | 1 | 1 | 0% | 2,903 | 6,126 | +111% | 0 | 0 | — |
case-20 | fail→fail | 21,691 | 17,591 | -19% | 1 | 1 | 0% | 2,643 | 4,434 | +68% | 0 | 0 | — |
case-22 | fail→fail | 18,251 | 20,928 | +15% | 1 | 1 | 0% | 2,415 | 6,308 | +161% | 0 | 0 | — |
case-23 | pass→pass | 19,249 | 21,752 | +13% | 1 | 1 | 0% | 2,367 | 6,465 | +173% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 12 counted toward the lift figure. The other 11 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +17 percentage points is the difference between those two pass rates over the 12 comparable cases. 3 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 8/2/2026 | 0% |
| gemini-3.6-flash | verified | 7/24/2026 | +32% |
Other measured skills in the registry, with their headline benchmark lift.