Repoctx banner
SrIruma SrIruma

Repoctx

Testing community

Description

Keep your AI coding-agent context files (AGENTS.md, CLAUDE.md) truthful. Scans a repository, extracts real build/test commands and module structure, and regenerates or audits the factual sections of context files.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

repoctx

[![Go Version](https://img.shields.io/github/go-mod/go-version/SrIruma/repoctx)](https://go.dev/doc/install) [![CI](https://img.shields.io/github/actions/workflow/status/SrIruma/repoctx/ci.yml)](https://github.com/SrIruma/repoctx/actions) [![Release](https://img.shields.io/github/v/release/SrIruma/repoctx)](https://github.com/SrIruma/repoctx/releases) [![Downloads](https://img.shields.io/github/downloads/SrIruma/repoctx/total)](https://github.com/SrIruma/repoctx/releases) [![License](https://img.shields.io/github/license/SrIruma/repoctx)](LICENSE)

**Status:** pre-1.0 (0.x), active development. The machine contract (docs/contract.md) is documented but deliberately not frozen while the tool is validated in real use — validation against real repositories is part of the test suite, see [Validation](docs/validation.md). Feedback and issues are welcome.

repoctx keeps your AI coding-agent context files (`AGENTS.md`, `CLAUDE.md`) truthful. It scans a repository, extracts facts from the real code — build/test commands, module structure, dependencies — and uses them to regenerate the factual sections of your context files, preserving anything a human wrote.

![repoctx demo](docs/demo.gif)

Why

Context files rot. A README mentions a `make release` target that no longer exists; `AGENTS.md` lists `backend/` as a path that was renamed months ago. Agents read those files and act on stale information. repoctx is the source of truth for everything that can be derived from the repository itself.

Install

go install github.com/SrIruma/repoctx/cmd/repoctx@latest

Or build from source:

make build   # -> bin/repoctx
make install # -> $GOBIN/repoctx

Commands

Command Description
repoctx info [dir] Detect manifests and extract facts from a repository. Manifests that fail to parse are kept in the report with a ! warning (and an errors field in --json).
repoctx generate [dir] Regenerate the code-derived