.agents/skills/error-handling/SKILL.md
Return errors up, no log-and-return, %w wrapping
npx skillsauth add ronniegeraghty/hyoka error-handlingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Hyoka follows Go's idiomatic error handling pattern: errors bubble up the call stack, and are logged at the top level (in CLI commands). This separation of concerns makes the codebase testable and keeps error flows explicit.
✓ Correct:
// In internal function
func loadConfig(path string) (*Config, error) {
data, err := os.ReadFile(path)
if err != nil {
return nil, fmt.Errorf("load config: %w", err) // Wrap and return
}
// ...
}
// In CLI command (top level)
func Execute() error {
cfg, err := loadConfig(cfgPath)
if err != nil {
slog.Error("Failed to load config", "error", err) // Log once at top
return err
}
// ...
}
✗ Incorrect:
// Internal function logs AND returns
func loadConfig(path string) (*Config, error) {
data, err := os.ReadFile(path)
if err != nil {
slog.Error("Failed to read config", "error", err) // Wrong: logging here
return nil, err
}
}
%wAlways wrap lower-level errors with %w to preserve the error chain. This enables errors.Is() and errors.As() in caller code.
✓ Correct:
if err != nil {
return fmt.Errorf("failed to build project: %w", err)
}
// Caller can inspect the chain
if errors.Is(err, os.ErrNotExist) {
// Handle missing file
}
✗ Incorrect:
if err != nil {
return fmt.Errorf("failed to build project: %v", err) // Loses error chain
}
Provide actionable context at the point where error is wrapped, not repeated at logging.
✓ Correct:
// In eval engine
if err := runGrader(ctx, grader); err != nil {
return fmt.Errorf("grade with %q: %w", grader.Name(), err)
}
// In CLI command
if err != nil {
slog.Error("Evaluation failed", "error", err) // Message says what failed, details in error chain
}
%v instead of %w for error wrapping_ = someFunc()nil error when error occurredhyoka/internal/eval/engine.gohyoka/cmd/*.gohyoka/internal/logging/development
Identifies Azure SDK packages in generated code and checks whether they are the latest available versions. Use during code review to catch outdated dependencies.
development
Sets up build environments for generated Azure SDK code samples and attempts to compile/build without modifying generated files. Use during review to verify code compiles correctly.
development
# Java SDK Validation Skill You are a **Java Azure SDK validation reviewer** for generated code samples. Your job is to check whether generated Java code follows modern Azure SDK for Java conventions and flag violations of common anti-patterns that LLMs frequently produce. ## Rules 1. **NEVER modify generated code.** You are evaluating, not fixing. 2. Report all findings honestly — pass or fail with specific evidence. 3. Check every rule below. A single violation in a category means that cate
development
Reads generated Azure SDK code files and adds inline review comments without changing any actual code. Use during code review to annotate quality issues, best practices, and suggestions.