Agent skill
raven-dev
Raven development workflow for building, serving, testing, and debugging Swift WASM apps and Raven runtime changes.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/raven-dev
SKILL.md
Raven Development Skill
Use this skill when working on Raven examples, runtime rendering behavior, DOMBridge event handling, or WASM dev loops.
When To Use
- Build/test a Raven example app
- Reproduce browser-side rendering issues
- Debug DOM event handler wiring
- Validate a framework fix end-to-end in an example
Core Workflow
- Build phase (prefer app directory)
cd Examples/TodoApp
swift build --swift-sdk swift-6.2.3-RELEASE_wasm
- Serve phase (from the WASM UI package root, prefer Raven CLI dev server)
cd Examples/TodoApp
raven dev
- Validate in browser
- Open
http://localhost:8000/ - Check console for runtime errors
- Verify UI renders expected state
- Iterate quickly
- Use
python3 raven-dev.pyinExamples/TodoAppfor automatic rebuild/reload loops.
High-Value Debug Checks
- Browser cache mismatch:
- compare current WASM checksum against served file
- use versioned filenames/query params when needed
- DOM event handlers:
- avoid dynamic JS property access for handler registries
- prefer
JSClosurestorage in Swift dictionaries keyed by stable IDs
- Build scope:
- build from example app directory to avoid unrelated target/tooling failures
Safe DOMBridge Pattern
private var eventClosures: [UUID: JSClosure] = [:]
public func addEventListener(
element: JSObject,
event: String,
handlerID: UUID,
handler: @escaping @Sendable @MainActor () -> Void
) {
let jsClosure = JSClosure { _ in
Task { @MainActor in handler() }
return .undefined
}
eventClosures[handlerID] = jsClosure
_ = element.addEventListener!(event, jsClosure)
}
Definition of Done
- Repro steps documented
- Relevant tests/builds pass
- Browser console is clean for changed path
- Output behavior verified in example app
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?