# Generate Repository Documentation

Repository documentation often misses setup steps, architecture context, and cross-service dependencies. This skill analyzes a codebase and produces structured docs for README, API, architecture, contributing, and integrations.

## Install

```bash
npx skillstore add astrabit-cpt/repo-docs
```

## Metadata

- - Slug: astrabit-cpt-repo-docs
- - Version: 1.0.0
- - Author: AstraBit-CPT
- - GitHub username: AstraBit-CPT
- - License: MIT
- - Repository: https://github.com/AstraBit-CPT/astrabit-docs/tree/master/.claude/skills/repo-docs
- - Ref: master
- - Supported tools: Claude, Codex, Claude Code
- - Risk level: low
- - Risk factors: scripts, filesystem, external\_commands
- - Quality score: 80
- - Quality tier: silver
- - Public page: https://skillstore.pages.dev/skills/astrabit-cpt-repo-docs
- - Manifest: https://skillstore.pages.dev/api/skills/astrabit-cpt-repo-docs/manifest

## Capabilities

- Analyzes repository structure, source directories, configuration files, documentation files, and CI/CD indicators.
- Detects common languages, frameworks, build tools, testing tools, and package managers from file patterns.
- Finds potential cross-repository integration points such as internal packages, HTTP clients, gRPC, Kafka, and database clients.
- Provides templates for README, API documentation, architecture notes, contributing guides, and integration maps.
- Documents upstream dependencies, downstream consumers, sibling repositories, external services, and communication protocols.
- Supports updates to existing documentation while preserving local formatting and voice.

## Use Cases

- Create onboarding documentation: Generate a clear README and CONTRIBUTING guide for engineers joining an existing project.
- Map service dependencies: Identify upstream services, downstream consumers, shared packages, and communication protocols across repositories.
- Refresh stale project docs: Compare current code structure with existing documentation and update missing setup, architecture, and API details.

## Prompt Templates

### Generate a README

```
Generate a README for this repository. Include setup, usage, project structure, related repositories, and links to deeper docs.
```

### Create contributor docs

```
Create a CONTRIBUTING guide for this repo. Include prerequisites, local setup, tests, code style, pull request steps, and related repositories.
```

### Document architecture and integrations

```
Analyze this repository and write ARCHITECTURE.md and INTEGRATIONS.md. Focus on components, data flow, upstream dependencies, downstream consumers, and external services.
```

### Audit and update existing docs

```
Review the existing docs against the current codebase. Identify stale sections, missing integration points, and setup gaps, then update the documentation with concise changes.
```

## Limitations

- Detection is based on file patterns and regular expressions, not deep semantic code analysis.
- The helper scripts read local repository files and should be run only on repositories approved for analysis.
- Generated documentation still needs human review for factual accuracy, security wording, and ownership details.
- The skill references references/best-practices.md, but that file is not included in this package.

## Best Practices

- Run the analysis on a clean local checkout so generated documentation reflects the current repository state.
- Review detected integration points with service owners before publishing dependency or ownership claims.
- Keep generated examples short, verified, and tied to real commands or source files from the repository.

## Anti Patterns

- Do not publish generated docs without checking setup commands, links, and service names.
- Do not run the helper scripts on repositories that contain sensitive data outside the documentation scope.
- Do not treat regex-detected integrations as confirmed dependencies without human validation.

## Security Audit

- - Safe to publish: true
- - Audited at: 2026-06-28T11:50:26.891\+00:00
- - Summary: Static analysis reported many high and critical alerts, but review found they are mostly markdown templates, grep examples, and regex strings rather than active malicious behavior. The package includes Python helper scripts that recursively read local repository files for documentation analysis, so users should run it only on repositories they intend to document. No prompt injection attempt, credential exfiltration, unauthorized network request, or destructive action was found.

## Stats

- - Views: 197
- - Downloads: 9
- - Favorites: 1
- - Popularity score: 0
