Cli doc maintainer

From sunholo-data/ailang · View interactive version

Cli doc maintainer is an AI agent skill from the GitHub repository sunholo-data/ailang. Maintain AILANG CLI help as single source of truth. Use when: adding new commands, adding environment variables, updating command behavior, auditing CLI documentation, ensuring help.go matches codebase implementation, improving CLI discoverability for AIs.

How to use this skill

Skill file

CLI Documentation Maintainer

Ensure AILANG CLI help system (ailang --help) remains the authoritative, accurate, and complete source of truth for all CLI features. Critical for AI discoverability in external repositories where AGENTS.md isn't available.

Quick Start

Most common usage:

# User says: "I added a new command, update the help"
# This skill will:
# 1. Audit help.go against main.go for missing commands
# 2. Check environment variables usage
# 3. Suggest improvements to help text
# 4. Validate all documented features exist
# 5. Update help.go with new content

When to Use This Skill

Invoke this skill when:

Available Scripts

`scripts/audit_commands.sh`

Compare commands in main.go against help.go to find undocumented commands.

Usage:

scripts/audit_commands.sh

Output:

`scripts/audit_env_vars.sh`

Find environment variables used in codebase and compare against help.go documentation.

Usage:

scripts/audit_env_vars.sh

Output:

`scripts/suggest_improvements.sh`

Analyze help text organization and suggest improvements.

Usage:

scripts/suggest_improvements.sh

Output:

Workflow

1. Audit Phase

Run audit scripts to identify discrepancies:

# Check commands
.Codex/skills/cli-doc-maintainer/scripts/audit_commands.sh

# Check environment variables
.Codex/skills/cli-doc-maintainer/scripts/audit_env_vars.sh

2. Analysis Phase

For each discrepancy found:

3. Update Phase

Update cmd/ailang/help.go:

4. Validation Phase

# Rebuild binary
make quick-install

# Test help output
ailang --help

# Test specific command help
ailang <command> --help

# Verify examples work
# (copy examples from help and test them)

5. Documentation Phase

Update supporting documentation:

Resources

CLI Documentation Best Practices

See resources/best_practices.md for:

Help Text Template

See resources/help_template.md for:

Progressive Disclosure

This skill loads information progressively:

  1. Always loaded: This SKILL.md file (YAML frontmatter + workflow overview)
  2. Execute as needed: Scripts in scripts/ (audit, validate)
  3. Load on demand: resources/best_practices.md, resources/help_template.md

Design Principles

  1. CLI as Source of Truth: Help text is THE authoritative reference
  2. AI-First: Optimize for discoverability by AIs in external repos
  3. Progressive Disclosure: Main help scannable, detailed help via subcommands
  4. Practical Examples: Every major command has a working example
  5. Accurate: Zero stale documentation - audit regularly

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.