Homepage custom api widget

From edmundmiller/dotfiles · View interactive version

Homepage custom api widget is an AI agent skill from the GitHub repository edmundmiller/dotfiles. Maps API responses into Homepage customapi widgets, including dynamic-list. Use when configuring those widget mappings.

How to use this skill

Skill file

Homepage Custom API Widget

Use this skill to configure Homepage customapi widgets from an existing API response. Keep the process narrow: inspect the response shape, map fields once, and validate the YAML you change.

Core workflow

  1. Identify the response shape.

Capture whether the API returns an object, a root array, or an object containing an array. Treat that shape as the contract that drives the widget config.

  1. Choose the display mode.

Use block for scalar fields, list for paired rows, and dynamic-list for arrays of items.

  1. Map fields exactly once.

Use dot notation for nested object paths. Use array indexes only when the response is stable and the target is intentionally positional. Prefer the root-array form only when the API actually returns an array at the root.

  1. Keep transformations local.

Apply format, remap, scale, prefix, suffix, and date options on the mapping that needs them. Avoid helper data or extra widget layers when one mapping can express the value.

  1. Handle auth and request shape explicitly.

Set username, password, headers, method, and requestBody only when the API requires them. Keep secrets in environment variables or secret files; never hard-code tokens into the widget config.

  1. Verify the rendered contract.

Re-read the widget YAML after editing and confirm each mapping still points at a real field in the observed response. If the field shape changes, update the mapping before finishing.

Mapping rules

Common shapes

Good defaults

Additional resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.