drobins25/craft / skills/refine-chunk
refine-chunk
VerifiedThis 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 6.3 KB |
| references/output-templates.md | markdown | 1.5 KB |
| references/refinement-patterns.md | markdown | 1.7 KB |
references/refinement-patterns.md
View on GitHub# Refinement Patterns Catalog
Common validation errors and their surgical fixes, organized by error type.
---
## TypeScript Errors
**Missing prop:**
```diff
- <Component />
+ <Component requiredProp={value} />
```
**Wrong type:**
```diff
- const count: string = 5
+ const count: number = 5
```
**Missing return type:**
```diff
- function getData() {
+ function getData(): Promise<User[]> {
return fetch('/api/users')
}
```
**Null safety:**
```diff
- user.name.toUpperCase()
+ user?.name?.toUpperCase() ?? ''
```
---
## Lint Errors
**Unused import:**
```diff
- import { unused, used } from 'package'
+ import { used } from 'package'
```
**Missing dependency:**
```diff
useEffect(() => {
fetchData(id)
- }, [])
+ }, [id])
```
**Prefer const:**
```diff
- let value = 'constant'
+ const value = 'constant'
```
---
## Build Errors
**Missing module (wrong import path):**
```diff
- import { helper } from './utils/helpr'
+ import { helper } from './utils/helper'
```
**Missing module (package not installed):** installing a package is a shell step, and refine-chunk runs no commands. Report it with the Complex Fix (Needs Review) template, naming the package and the install command, so the person can run the install before validate-chunk re-validates.
**Export issue:**
```diff
// In source file
- function helper() { ... }
+ export function helper() { ... }
```
---
## Test Failures
**Assertion mismatch:**
```diff
- expect(result).toBe('old value')
+ expect(result).toBe('new value')
```
**Async timing:**
```diff
- expect(screen.getByText('loaded')).toBeInTheDocument()
+ await waitFor(() => {
+ expect(screen.getByText('loaded')).toBeInTheDocument()
+ })
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 471k | Updated | Claude CodeCodex | Verified | Install |
| 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: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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 available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |