cercano-document

Generate Go doc comments for exported symbols using local AI.

8|1|Updated Nov 23, 2025
One-click install
npx skills add https://github.com/bryancostanich/Cercano --skill cercano-document
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cercano-document
Source: https://github.com/bryancostanich/Cercano/tree/main/plugins/skills/cercano-document
Command: npx skills add https://github.com/bryancostanich/Cercano --skill cercano-document

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate Go documentation comments for exported symbols directly in source files using a local AI workflow, preserving data privacy by not sending code to external services.

Core Features & Use Cases

  • Generate doc comments for all exported Go symbols (functions, methods, types, interfaces, constants) within a file or project.
  • Write the generated comments back to the source file with correct formatting, while validating with gofmt and backing up originals.
  • Use dry_run to preview changes without writing, enabling safe iteration.

Quick Start

Document a Go source file by providing the file_path and optional dry_run flag to cercano_document.

Frequently Asked Questions about cercano-document

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Go doc comments for exported symbols using local AI?

Generate Go doc comments locally by running the cercano_document tool across project source files. It uses go/ast parsing to identify exported symbols and writes validated comments back to the file, ensuring code privacy without external services.

Can I preview generated Go documentation comments before writing them to the source file?

Yes, you can preview generated Go doc comments safely by using the dry_run flag. This option allows you to iterate and review the proposed documentation changes without modifying the original source files.

Do I need an Ollama server to generate Go documentation comments locally?

Yes, local Go documentation generation requires a Cercano server connected to Ollama. This setup ensures the AI processing remains entirely local, preserving data privacy by never sending your code to external services.

What is the best way to batch document exported Go functions and types in a project?

Batch document exported Go functions, methods, and types by targeting the entire project directory. The tool applies go/ast-based parsing to insert comments safely and validates formatting with gofmt before backing up originals.

Does local Go documentation generation work with gofmt formatting?

Yes, local Go documentation generation validates all inserted comments with gofmt. This ensures the generated doc comments maintain correct formatting and comply with standard Go source file conventions.