scaffold go library

AI Community

Skill notes

1. Gather Project Information

If the user provided a project name in their request, use it as the project name and skip asking for it. Still ask for the remaining parameters (description, minimum Go version, example tests) unless already provided in the user's initial request. Ask the user for these parameters: Project name -- kebab-case, used as the module path and directory name (e.g., stipple) Short description -- one sentence, used in README, GoReleaser release header, and doc.go

2. Detect User Identity

Detect the user's GitHub username and full name for use in templates: If either command fails or produces no output, ask the user to provide the value. Use the GitHub username wherever templates reference GITHUB-USERNAME and the full name wherever they reference COPYRIGHT-HOLDER.

3. Verify the Target Directory

The project should be scaffolded in a directory named after the project. If the current directory is already named after the project and is empty (or nearly empty), use it. Otherwise, create a subdirectory. Derive PACKAGE-NAME from PROJECT-NAME by removing hyphens (e.g., my-lib becomes mylib). If the result looks awkward, confirm with the user. If the directory already contains Go files, warn the user before proceeding.

4. Initialize Git

Skip if already inside a git repository.

5. Initialize go.mod

Read ./references/go-mod.md for the canonical go mod init invocation. No dependencies to install -- Go libraries should start stdlib-only.

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
AI
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@tomevault-io · no license declared
Token usage
Lean
Setup complexity
Guided setup
External API key
Not required
Operating systems
Unspecified (assume cross-platform)
Runtime requirements
No explicit requirements detected
Detected file/system behavior
  • Read-only
  • Write / modify
Network behavior
Local-only
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

Output preview scaffold-go-library.preview
# 8. Generate Example Tests (optional)

- Use `package PACKAGE-NAME_test` (external test package)
- Import the package being tested
- Include a single `func Example()` with a basic usage demonstration
- Include an `// Output:` comment

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.