Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
boshu2 avatar

Doc

  • 1.4k installs
  • 416 repo stars
  • Updated August 5, 2026
  • boshu2/agentops

doc is an agentops skill that generates and validates repo docs, READMEs, and OSS documentation packs by mode.

About

The doc skill from boshu2 agentops generates and validates documentation for any project with mandatory execution, not description-only responses. Default mode handles API docs, code-maps, coverage, and validate commands detecting CODING, INFORMATIONAL, or OPS project types from package.json, pyproject.toml, go.mod, or Cargo.toml indicators. Commands include discover for undocumented public functions, coverage for docstring ratios, gen for feature-specific docs, and all for full gap remediation. Mode routing sends readme requests to --mode=readme following references/readme-craft.md interview generate council-validate flow, and oss requests to --mode=oss for CONTRIBUTING, CHANGELOG, and AGENTS.md scaffolding per references/oss-pack.md. Default steps classify project type, execute the requested command, and write structured markdown with purpose, parameters, returns, and examples for functions. Hexagonal role is supporting with wiki-knowledge-surface and code-complete practices. Output contract is documentation files with standards and council dependencies. Agents must run bash detection commands and produce files in docs directories rather than only advising workflows.

  • Must execute workflow; do not only describe documentation steps.
  • Default mode: discover, coverage, gen, validate for code and API docs.
  • --mode=readme runs gold-standard README interview and council validation.
  • --mode=oss scaffolds CONTRIBUTING, CHANGELOG, and AGENTS.md packs.
  • Detects CODING, INFORMATIONAL, or OPS project types before generating docs.

Doc by the numbers

  • 1,364 all-time installs (skills.sh)
  • +26 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #216 of 1,879 Documentation skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

doc capabilities & compatibility

Capabilities
project type detection · doc gap discovery · coverage reporting · readme mode routing · oss pack scaffolding
Use cases
documentation · planning
From the docs

What doc says it does

YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it.
SKILL.md
Generate and validate documentation for any project.
SKILL.md
npx skills add https://github.com/boshu2/agentops --skill doc

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.4k
repo stars416
Security audit3 / 3 scanners passed
Last updatedAugust 5, 2026
Repositoryboshu2/agentops

How do I discover doc gaps, generate API docs, or rewrite a gold-standard README for this repo?

Generate and validate repo docs, READMEs, and OSS doc packs with mode-based workflows.

Who is it for?

Teams needing executed doc generation rather than advisory-only documentation guidance.

Skip if: Skip when user only wants a quick prose explanation without repo file changes.

When should I use this skill?

User says doc, generate repo docs, rewrite README, or audit OSS documentation.

What you get

Written documentation files with coverage analysis and mode-appropriate validation.

  • documentation files
  • API references
  • operational runbooks

By the numbers

  • Uses agentops skill_api_version 1

Files

SKILL.mdMarkdownGitHub ↗

Doc Skill

YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it.

Generate and validate documentation for any project. --mode selects the artifact family — the default mode handles code/API docs and code-maps; --mode=readme generates a gold-standard README; --mode=oss scaffolds and audits the open-source doc pack.

Modes

--modeArtifactRead first
(default)API docs, code-maps, doc coverage/validatethis file
readmeGold-standard README (interview → generate → council-validate)references/readme-craft.md
ossOSS doc pack (CONTRIBUTING/CHANGELOG/AGENTS.md, audit + scaffold)references/oss-pack.md

Mode routing (absorbed skills):

You typedRuns
"readme", "rewrite the README", "validate the README"/doc --mode=readme [...]
"oss docs", "scaffold contributing", "audit OSS docs"/doc --mode=oss [...]

When invoked with --mode=readme or --mode=oss, read the corresponding reference above and follow its workflow verbatim. The default-mode steps below apply only when no mode (or the implied code-docs mode) is selected.

Execution Steps (default mode — code/API docs)

Given /doc [command] [target]:

Step 1: Detect Project Type

# Check for indicators
ls package.json pyproject.toml go.mod Cargo.toml 2>/dev/null

# Check for existing docs
ls -d docs/ doc/ documentation/ 2>/dev/null

Classify as:

  • CODING: Has source code, needs API docs
  • INFORMATIONAL: Primarily documentation (wiki, knowledge base)
  • OPS: Infrastructure, deployment, runbooks

Step 2: Execute Command

discover - Find undocumented features:

# Find public functions without docstrings (Python)
grep -r "^def " --include="*.py" | grep -v '"""' | head -20

# Find exported functions without comments (Go)
grep -r "^func [A-Z]" --include="*.go" | head -20

coverage - Check documentation coverage:

# Count documented vs undocumented
TOTAL=$(grep -r "^def \|^func \|^class " --include="*.py" --include="*.go" | wc -l)
DOCUMENTED=$(grep -r '"""' --include="*.py" | wc -l)
echo "Coverage: $DOCUMENTED / $TOTAL"

gen [feature] - Generate documentation: 1. Read the code for the feature 2. Understand what it does 3. Generate appropriate documentation 4. Write to docs/ directory

all - Update all documentation: 1. Run discover to find gaps 2. Generate docs for each undocumented feature 3. Validate existing docs are current

Step 3: Generate Documentation

When generating docs, include:

For Functions/Methods:

## function_name

**Purpose:** What it does

**Parameters:**
- `param1` (type): Description
- `param2` (type): Description

**Returns:** What it returns

**Example:**

result = function_name(arg1, arg2)


**Notes:** Any important caveats

For Classes:

## ClassName

**Purpose:** What this class represents

**Attributes:**
- `attr1`: Description
- `attr2`: Description

**Methods:**
- `method1()`: What it does
- `method2()`: What it does

**Usage:**

obj = ClassName() obj.method1()

Step 4: Create Code-Map (if requested)

Write to: docs/code-map/

# Code Map: <Project>

## Overview
<High-level architecture>

## Directory Structure

src/ ├── module1/ # Purpose ├── module2/ # Purpose └── utils/ # Shared utilities


## Key Components

### Module 1
- **Purpose:** What it does
- **Entry point:** `main.py`
- **Key files:** `handler.py`, `models.py`

### Module 2
...

## Data Flow
<How data moves through the system>

## Dependencies
<External dependencies and why>

Step 5: Validate Documentation

Check for:

  • Out-of-date docs (code changed, docs didn't)
  • Missing sections (no examples, no parameters)
  • Broken links
  • Inconsistent formatting

Step 6: Write Report

Write to: .agents/doc/YYYY-MM-DD-<target>.md

# Documentation Report: <Target>

**Date:** YYYY-MM-DD
**Project Type:** <CODING/INFORMATIONAL/OPS>

## Coverage
- Total documentable items: <count>
- Documented: <count>
- Coverage: <percentage>%

## Generated
- <list of docs generated>

## Gaps Found
- <undocumented item 1>
- <undocumented item 2>

## Validation Issues
- <issue 1>
- <issue 2>

## Next Steps
- [ ] Document remaining gaps
- [ ] Fix validation issues

Step 7: Report to User

Tell the user: 1. Documentation coverage percentage 2. Docs generated/updated 3. Gaps remaining 4. Location of report

Key Rules

  • Detect project type first - approach varies
  • Generate meaningful docs - not just stubs
  • Include examples - always show usage
  • Validate existing - docs can go stale
  • Write the report - track coverage over time

Commands Summary

CommandAction
discoverFind undocumented features
coverageCheck documentation coverage
gen [feature]Generate docs for specific feature
allUpdate all documentation
validateCheck docs match code

Examples

Generating API Documentation

User says: /doc gen authentication

What happens: 1. Agent detects project type by checking for package.json and finding Node.js project 2. Agent searches codebase for authentication-related functions using grep 3. Agent reads authentication module files to understand implementation 4. Agent generates documentation with purpose, parameters, returns, and usage examples 5. Agent writes to docs/api/authentication.md with code samples 6. Agent validates generated docs match actual function signatures

Result: Complete API documentation created for authentication module with working code examples.

Checking Documentation Coverage

User says: /doc coverage

What happens: 1. Agent detects Python project from pyproject.toml 2. Agent counts total functions/classes with grep -r "^def \|^class " 3. Agent counts documented items by searching for docstrings (""") 4. Agent calculates coverage: 45/67 items = 67% coverage 5. Agent writes report to .agents/doc/2026-02-13-coverage.md 6. Agent lists 22 undocumented functions as gaps

Result: Documentation coverage report shows 67% coverage with specific list of 22 functions needing docs.

Troubleshooting

ProblemCauseSolution
Coverage calculation inaccurateGrep pattern doesn't match all code stylesAdjust pattern for project conventions. For Python, check for async def and class methods. For Go, check both func and type definitions.
Generated docs lack examplesMissing context about typical usageRead existing tests to find usage patterns. Check README for code samples. Ask user for typical use case if unclear.
Discover command finds too many itemsLow existing documentation coveragePrioritize by running discover on specific subdirectories. Focus on public API first, internal utilities later. Use --limit to process in batches.
Validation shows docs out of syncCode changed after docs writtenRe-run gen command for affected features. Consider adding git hook to flag doc updates needed when code changes.

Reference Documents

  • references/doc.feature — Executable spec: detect project type, generate type-appropriate docs from the repo, validate existing docs against source (soc-qk4b)
  • references/readme.feature — Executable spec (--mode=readme): mode detection, problem-first lead, trust block near install, collapse-don't-delete depth, the council gate, anti-pattern detection (soc-qk4b)
  • references/oss-docs.feature — Executable spec (--mode=oss): audit existing/missing OSS docs, scaffold missing without overwrite, project-type-tailored (soc-qk4b)
  • references/readme-craft.md--mode=readme: the 8 gold-standard README patterns, interview, generation structure, council validation, anti-pattern table
  • references/oss-pack.md--mode=oss: audit + scaffold the OSS doc pack (CONTRIBUTING/CHANGELOG/AGENTS.md), project-type templates
  • references/oss-documentation-tiers.md — OSS doc tier definitions (core/standard/enhanced)
  • references/oss-project-types.md — Per-type OSS scaffolding templates (cli/operator/service/library/helm)
  • references/oss-beads-patterns.md — AGENTS.md beads-tracker patterns for OSS projects
  • references/generation-templates.md
  • references/prose-and-report-workmanship.md
  • references/project-types.md
  • references/validation-rules.md
  • references/de-slopify.md — Remove AI writing artifacts from docs
  • references/architecture-report.md — Generate technical architecture documents

Related skills

FAQ

What does default mode cover?

API docs, code-maps, discover, coverage, gen, and validate commands.

How do README requests route?

To /doc --mode=readme using references/readme-craft.md workflow.

Must the agent only describe steps?

No; YOU MUST EXECUTE THIS WORKFLOW per skill header.

Is Doc safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.