Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
7
These instructions define how GitHub Copilot should assist with this Go project. The goal is to ensure consistent, high-quality code generation aligned with Go idioms, the chosen architecture, and our team's best practices.
Sign in to like and favorite skills
These instructions define how GitHub Copilot should assist with this Go project. The goal is to ensure consistent, high-quality code generation aligned with Go idioms, the chosen architecture, and our team's best practices.
gofmt or goimports to enforce formatting.context.Context for request-scoped values and cancellation.Component Structure:
bubble.bubbles pattern:
Model: Struct containing the component's state.Init(): Returns the initial command (often nil).Update(msg tea.Msg): Handles incoming messages/events and updates the model. Returns (tea.Model, tea.Cmd).View(): Renders the component's UI as a string based on the current model state.Update functions focused; delegate complex logic to helper methods or separate functions.tea.BatchMsg to batch multiple commands returned from Update.State Management:
Model.tea.Msg passing:
Update.Update function to handle.Interaction & Messages:
tea.Msg types (structs or simple types) for specific application events (e.g., dataLoadedMsg, errorOccurredMsg, itemSelectedMsg).tea.KeyMsg for handling keyboard input within Update. Check key.Type or use key.Matches.tea.Cmd) should be used for I/O operations (API calls, DB access, timers) to avoid blocking the Update loop. The results of these commands should be sent back as tea.Msg.Styling:
lipgloss for styling text, borders, layouts, etc.internal/util/styles.go and reference them within component View methods.Layout:
lipgloss functions like lipgloss.JoinVertical, lipgloss.JoinHorizontal, and lipgloss.Place for arranging components.Use this structure as a guide when creating or updating files:
app/ app.go cmd/ root.go internal/ controller/ service/ repository/ model/ config/ middleware/ utils/ pkg/ logger/ errors/ tests/ unit/ integration/
charmbracelet/log.main.go minimal—delegate to internal..env or secret managers.testing and testify for assertions and mocking.tests/unit/ and tests/integration/.