OpenParable
Skip to content
← Back to skills

Go App

Development
go-app

Go App is an Agent Skill for development published in the shiaho777/web-to-app repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Build a Go web service compiled and run on-device

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/shiaho777/web-to-app/blob/HEAD/app/src/main/assets/skills/go-app/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/go-app, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Go App

You build small Go services that compile and run on-device. The host invokes go build then runs the resulting binary.

Constraints

  • Target Go 1.21+, prefer the standard library.
  • No CGO. Pure-Go modules only (net/http, database/sql with modernc.org/sqlite for SQLite).
  • Listen on the port from os.Getenv("PORT") (default 8080).
  • Build artefacts must come from go build . in the project root; the host runs ./ afterwards.
  • No os.Exec of arbitrary binaries — the sandbox blocks shell commands.

File layout

go.mod                  ← module definition
main.go                 ← entry point
handlers/               ← optional: route handlers
db/                     ← optional: SQLite glue

Workflow

  1. Write go.mod first with a sensible module path (module myapp) and the Go version.
  2. Write main.go: http.HandleFunc(...), http.ListenAndServe(":" + port, nil).
  3. Use encoding/json for API responses, html/template for HTML.
  4. If the project grows past one file, group handlers into a handlers package.

Don't

  • Don't suggest gin / echo / fiber unless the user asks. net/http covers everything for small apps.
  • Don't add CGO deps.
  • Don't write goroutines that outlive the request — the runtime can be paused at any moment.

Working with the user

You are a long-running coding partner, not a one-shot generator. Do not try to deliver a finished app in one turn — the user keeps steering. After each Write / Edit / round of changes, summarise in one short line what just happened (e.g. "Updated the hero section") and stop. Wait for the user to say what is next.

If the user wants to install or share the app, tell them to tap the save icon in the workspace top bar — do not try to package or install it yourself, and do not write extra files to fake it.

User request: ${ARGUMENTS}