skills/generate-overview/SKILL.md
Generate a stylized, self-contained HTML report for any Go codebase element — functions, packages, interfaces, structs, handlers, CLI commands, and more
npx skillsauth add mattdurham/bob bob:generate-overviewInstall 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.
You produce a single self-contained HTML file describing a Go codebase element. The report is modern, clean, and interactive — no external dependencies. You detect what the user is pointing at, choose the right report template, research thoroughly, then generate.
Ask the user what they want documented:
What should I generate a report for? Point me at something: a function, package, file, struct, interface, directory, handler, CLI command, etc.
The user may give you a function name, file path, package path, or description. Use your tools to resolve it to a concrete code element.
Detect the target type by examining what the user pointed at:
| Target Type | How to Detect |
|---|---|
| Function | User names a function; or you resolve to a func declaration |
| Interface | User names an interface; resolves to type X interface |
| Struct | User names a struct; resolves to type X struct |
| Package | User names a package or directory containing .go files with package declarations |
| File | User gives a specific .go file path |
| Directory | Path contains mixed files (not a single Go package) |
| HTTP Handler | Function signature matches (w http.ResponseWriter, r *http.Request) or returns http.Handler; or is registered with a router |
| CLI Command | Uses cobra.Command, flag.FlagSet, os.Args, or similar CLI framework patterns |
| Middleware | Function that wraps/returns http.Handler or http.HandlerFunc; or follows func(next http.Handler) http.Handler pattern |
| Config/Constants | User points at a const or var block, or a config struct |
| Protobuf/gRPC | .proto file, or Go file with generated gRPC service stubs |
| Makefile/Build | Makefile, Taskfile.yml, .goreleaser.yml, or similar |
Tell the user what you detected:
I see this is a [target type]:
[name]in[location]. Generating report...
If ambiguous, ask. Do NOT ask for a "depth level" — the target type determines the report format.
Gather everything needed for the report. Run these in parallel where possible.
grep for usage sites)Generate a single self-contained HTML file. All CSS and JS must be inline. No external resources, CDNs, or dependencies. The file must look great when opened in any browser.
Every report shares these design properties:
DESIGN TOKENS:
- Font stack: system-ui, -apple-system, "Segoe UI", sans-serif
- Mono font: "SF Mono", "Cascadia Code", "JetBrains Mono", "Fira Code", Consolas, monospace
- Base size: 15px body, 13px code
- Max width: 1200px centered, with sidebar where applicable
- Border radius: 8px cards, 6px code blocks, 4px inline code
- Shadows: subtle, using rgba(0,0,0,0.06) for light, rgba(0,0,0,0.3) for dark
COLOR PALETTE (light mode):
- Background: #ffffff page, #f8f9fb cards/sidebar, #f1f3f5 code blocks
- Text: #1a1a2e primary, #495057 secondary, #868e96 muted
- Accent: #4263eb primary actions/links, #748ffc hover
- Borders: #e9ecef default, #dee2e6 heavy
- Syntax: #d73a49 keywords, #6f42c1 types, #005cc5 functions, #032f62 strings, #6a737d comments
COLOR PALETTE (dark mode):
- Background: #1a1b26 page, #24283b cards/sidebar, #1e2030 code blocks
- Text: #c0caf5 primary, #9aa5ce secondary, #565f89 muted
- Accent: #7aa2f7 primary, #89b4fa hover
- Borders: #3b4261 default, #414868 heavy
- Syntax: #f7768e keywords, #bb9af7 types, #7aa2f7 functions, #9ece6a strings, #565f89 comments
INTERACTIVE FEATURES (include in every report):
- Dark/light mode toggle (top-right, respects prefers-color-scheme)
- Collapsible sections via <details>/<summary> with smooth animation
- Smooth scroll to anchors
- Copy button on all code blocks
- Keyboard shortcut: 't' to toggle theme, '/' to focus search (if search exists)
IMPORTANT — Source links everywhere: Every file path, function name, type name, line
number reference, and declaration in the report MUST be a clickable vscode://file/ link
(see the Source Links section below for format and styling). When a template says
"file:line link" or "linked" or "with line number", it means a vscode://file/ source link.
Do not render any file:line reference as plain text.
A line-by-line annotated walkthrough of a single function.
Layout: Single column, no sidebar.
Sections:
Layout: Two-column — main content + right sidebar listing all implementors.
Sections:
Layout: Single column with collapsible sections.
Sections:
NewX, MakeX, etc.):
Layout: Two-column — main content + left sidebar with navigation.
Sections:
Layout: Two-column — main content + right sidebar with structure outline.
Sections:
Layout: Single column with file tree.
Sections:
Layout: Single column, visually structured like API documentation.
Sections:
METHOD /path/to/endpointRequest → Auth → RateLimit → Logger → [Handler] → ResponseLayout: Single column, styled like a modern man page.
Sections:
Long field or doc comment.Layout: Single column with a visual flow diagram.
Sections:
┌─────────────┐
│ Request │
└──────┬──────┘
▼
┌─────────────┐
│ [Before] │ ← what this middleware does before calling next
│ Auth check │
└──────┬──────┘
▼
┌─────────────┐
│ next() │ ← inner handler
└──────┬──────┘
▼
┌─────────────┐
│ [After] │ ← what this middleware does after (if anything)
│ Log access │
└──────┬──────┘
▼
┌─────────────┐
│ Response │
└─────────────┘
Rendered as inline SVG.context.Context:
Layout: Single column, styled as a reference card.
Sections:
iota, show the enumeration with meaning of each value.Layout: Two-column — methods list in sidebar, details in main.
Sections:
→ unary→→ server streaming←→ bidirectionalLayout: Single column with visual dependency graph.
Sections:
All "jump to source" references in the report must be clickable links that open the file in the user's editor. Use absolute file paths resolved from the working directory.
Link format: Use vscode://file/{absolute_path}:{line}:{column} URIs.
/Users/joe/dev/project/pkg/auth/handler.go:42)vscode://file///Users/joe/dev/project/pkg/auth/handler.go:42:1Where to add source links:
pkg/auth/handler.go:42 → clickable)Styling for source links:
a.src-link {
font-family: var(--mono);
font-size: 0.85em;
color: var(--accent);
text-decoration: none;
border-bottom: 1px dashed var(--accent);
opacity: 0.8;
transition: opacity 0.15s;
}
a.src-link:hover {
opacity: 1;
border-bottom-style: solid;
}
Display the relative path as the link text (for readability) but use the absolute
path in the href URI. Add a small external-link icon (inline SVG, 12px) after each
source link to signal it opens an editor.
Write the HTML file to the current directory:
<target-name>-report.html (kebab-case)rate-limiter-report.html, auth-middleware-report.htmlOpen the report in the default browser:
open <filename> # macOS
xdg-open <filename> # Linux
Tell the user:
Report written to
<filename>and opened in your browser.
Do NOT print the HTML to the conversation. It's too long and not useful in terminal.
Before writing the file, verify your HTML meets these standards:
<style> tag (no external stylesheets)<script> tag (no external scripts)prefers-color-scheme<details>/<summary>vscode://file/ URIs with absolute paths<nav>, <main>, <article>, <section>, <aside>Apply these CSS classes to Go code tokens. Do NOT use an external library — apply classes during generation based on Go syntax:
| Token Type | CSS Class | Light Color | Dark Color |
|---|---|---|---|
| Keyword (func, type, if, return, etc.) | .kw | #d73a49 | #f7768e |
| Type name (string, int, error, custom) | .typ | #6f42c1 | #bb9af7 |
| Function name (in calls and declarations) | .fn | #005cc5 | #7aa2f7 |
| String literal | .str | #032f62 | #9ece6a |
| Number literal | .num | #005cc5 | #ff9e64 |
| Comment | .cmt | #6a737d | #565f89 |
| Operator / punctuation | .op | #d73a49 | #89ddff |
| Package / import path | .pkg | #e36209 | #ff9e64 |
Apply highlighting by wrapping tokens in <span class="XX">. For the annotated source
sections, combine with line-number gutters and annotation margins.
development
Team-based development workflow using experimental agent teams - INIT → WORKTREE → BRAINSTORM → PLAN → EXECUTE → REVIEW → COMPLETE
development
Implements code changes following plans and specifications
data-ai
Self-directed reviewer that claims completed tasks and reviews them incrementally
data-ai
Self-directed planner that claims a plan task (blocked by brainstorm), creates the implementation plan, and stays alive to answer questions from teammates