Skip to content

drobins25/craft / skills/refine-chunk

refine-chunk

Verified

This skill should be used when validate-chunk reports errors or failures, when the user asks to "fix these errors", "resolve validation issues", "refine this chunk", or when specific build, lint, or type errors need surgical fixes. Makes precise, targeted edits to resolve specific validation issues without over-engineering.

FileKindSize
SKILL.mdskill md6.3 KB
references/output-templates.mdmarkdown1.5 KB
references/refinement-patterns.mdmarkdown1.7 KB

references/output-templates.md

View on GitHub
# Refinement Output Templates

Report formats for refinement outcomes. The orchestrator parses these to track fix patterns.

---

## Simple Fix
```markdown
## Fix Applied

**Error:** Property 'onSubmit' is missing
**File:** `LoginForm.tsx:42`

**Change:**
```diff
- <Form>
+ <Form onSubmit={handleSubmit}>
```

>>> HAND BACK TO validate-chunk: Refinement complete. Re-validate this chunk now.
```

---

## Multiple Fixes
```markdown
## Fixes Applied

### Fix 1: Missing prop
**File:** `LoginForm.tsx:42`
Added onSubmit to Form component

### Fix 2: Unused import
**File:** `LoginForm.tsx:3`
Removed unused useState import

### Fix 3: Missing dependency
**File:** `LoginForm.tsx:28`
Added 'email' to useEffect dependencies

---

>>> HAND BACK TO validate-chunk: Refinement complete. Re-validate this chunk now.
```

---

## Complex Fix (Needs Review)
```markdown
## Fix Required — Review Needed

**Error:** Type 'User | null' is not assignable to type 'User'

**Analysis:**
The `useUser` hook can return null (user not logged in), but
the component assumes user is always present.

**Options:**

1. **Add null check** (safest)
   ```typescript
   if (!user) return <LoginPrompt />
   ```

2. **Assert non-null** (if we know user exists)
   ```typescript
   const user = useUser()!
   ```

3. **Optional chaining** (partial fix)
   ```typescript
   {user?.name}
   ```

My recommendation: **Option 1** — add proper null check with redirect.

Which approach?
- Option 1 (recommended)
- Option 2
- Option 3
- Let me think about it
```
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall