medz/spry/spry-debugging

Claude Code and agent skill by medz/spry

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Debugging playbooks for Spry applications — 404s, route mismatches, middleware ordering, error chains, OpenAPI generation, client generation, build/runtime errors. MCP-first when the Spry MCP server is connected. Use when debugging any Spry application issue.

Install

npx vskill@latest install medz/spry/spry-debugging

SKILL.md

Spry Debugging Guide

Debugging playbooks for common Spry application issues. When the Spry MCP server is connected, always prefer MCP tools over source-only inspection.

MCP-First Debugging

When spry mcp is connected, use these tools first:

ProblemStart With
404 / wrong routespry.explain_route with method + path
Middleware not runningspry.list_middleware then spry.explain_route
Config not taking effectspry.get_config
Route not discoveredspry.list_routes
OpenAPI issuesspry.get_openapi_status
Client gen issuesspry.get_client_status
General orientationspry.get_project_info

Only fall back to source reading when MCP tools don't provide enough detail.

Playbook: 404 Not Found

Step 1: Check route discovery
  • MCP: spry.list_routes — is the expected route listed?
  • Manual: Look in .spry/src/app.dart for the generated route map.
Step 2: Check route matching
  • MCP: spry.explain_route(method: "GET", path: "/the/path") — does it match?
  • Manual: Compare route file pattern against request path.
Step 3: Common causes
  • Wrong file name: routes/users.get.dart matches GET /users, not POST.
  • Missing handler export: Every route file must export a correctly typed top-level handler; filename suffixes select the HTTP method.
  • Trailing slash: /users/ vs /users — check case sensitivity setting.
  • Param syntax: [id] matches exactly one segment; [...id] matches zero or more.
  • Regex constraint too strict: [id([0-9]+)] won't match alphabetic IDs.
Step 4: Fallback check

If no route matches, a root routes/[...].dart supplies the fallback. routes/index.dart handles / only.

See route debugging details for advanced cases.

Playbook: Middleware Not Running

  1. MCP: spry.list_middleware — is the filesystem middleware listed?
  2. MCP: spry.explain_route — check the filesystem middleware_chain. Middleware inside defineHandler(middleware: ...) or other handler wrappers requires inspecting the handler source.
  3. Check scope: Scoped middleware in routes/admin/_middleware.dart applies to /admin/** only.
  4. Check ordering: Middleware runs global → scoped-general → scoped-specific → handler. If a middleware returns without calling next(), later middleware won't run.
  5. Check method restriction: _middleware.post.dart only applies to POST. Rename to _middleware.dart for all methods.

Playbook: Error Handler Issues

  1. MCP: spry.list_error_handlers — is the handler listed?
  2. Check chain: Error handlers chain scoped-specific → scoped-general. If a route handler re-throws, the next error handler gets a chance. Scoped error handlers do not catch errors thrown by outer middleware.
  3. Unhandled errors: HTTPError converts to Response automatically. Other errors propagate to the runtime.

Playbook: OpenAPI Generation

  1. MCP: spry.get_openapi_status
  2. Verify openapi is configured in spry.config.dart
  3. Check <publicDir>/<output.path> (default public/openapi.json for route output), or the configured root-relative local path
  4. Run spry build to regenerate

Playbook: Client Generation

  1. MCP: spry.get_client_status
  2. Run spry build client to regenerate
  3. Output is in the configured pkgDir (default .spry/client)

Playbook: Build / Runtime Errors

  1. Run spry build and read the error output
  2. MCP: spry.get_config — verify target, directories, settings
  3. Inspect .spry/ for generated files
  4. For JS targets: ensure dart compile js succeeds
  5. For Cloudflare: verify wrangler.toml exists or is configured

Quick Reference

bash
dart analyze # static analysis
dart test # run tests
spry build # build for configured target
spry serve # dev server with watch + hot reload
spry mcp # start MCP server for AI tools

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/medz/spry/spry-debugging/badge)](https://verified-skill.com/skills/medz/spry/spry-debugging)

Something wrong with this skill or its page? Tell us.