Skip to main content

AGENTS.md Generator (agentsgen)

Generate repo instructions, preserve handwritten rules, and catch stale command references in pull requests.

CI PyPI License: MIT

Start in one minute

Requires Python 3.11+ and pipx. Run inside your repository:

pipx install agentsgen
agentsgen init . --defaults --autodetect
agentsgen check . --ci

Creates .agentsgen.json, AGENTS.md, and RUNBOOK.md (plus starter prompts). Review the detected commands in .agentsgen.json before committing. No API key is required for these commands.

Already have handwritten instructions? The original stays unchanged and proposals appear in AGENTS.generated.md / RUNBOOK.generated.md. Review and copy the sections you want into your original file, retaining their markers. Until then, check reports the unmanaged document; it does not silently adopt it.

See what it catches

package.json: remove scripts.test
AGENTS.md:    still recommends npm test
agentsgen check . --ci
→ DRIFT (exit 1)

The JSON report identifies the missing script and asks you to review .agentsgen.json. The checker reads files; it never runs your project commands.

Three reproducible demos cover handwritten preservation, stale-command detection, and repeatable setup without a README.

Safe updates

agentsgen update . --dry-run --print-diff
agentsgen update .
agentsgen check . --report

Only AGENTSGEN marker sections are regenerated. Text outside them stays yours. Missing files are created; existing files without markers get generated siblings. Update config when your toolchain changes; fix cannot infer your intended replacement command.

Add a pull-request guard

name: Agent instructions
on: [push, pull_request]
permissions:
  contents: read
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: markoblogo/AGENTS.md_generator/.github/actions/agentsgen-guard@v0.5.0

For immutable dependencies, pin the action to the reviewed release commit SHA. Advanced guard options include optional pack checks and PR comments.

Optional context bundle

agentsgen pack . --autodetect
agentsgen check . --pack-check --ci

The bundle provides command manifests and on-demand documents under docs/ai/. Use --all only when you want pack and README snippet validation too. Without README.md, aggregate snippet checks are explicitly skipped.

What is verified

Check Scope
Core documents Required markers and generated sections agree with config
Commands Root npm/pnpm/yarn script references and literal Make targets exist
Config paths Concrete configured paths exist
Optional pack/snippets Generated output matches current inputs

Compound commands, custom executables, dynamic Make targets, and patterns are reported as not verified. Existence does not prove that a command succeeds. Run your actual tests separately. check --format json includes warning details. The readiness score is a heuristic, not a measure of AI task quality.

Use alone or with SET

One repository: install agentsgen directly; SET is optional. Workflow orchestration: SET adds presets, repo-local planning configuration, and reviewable workflow exports. The supported release pair is agentsgen 0.5.0 + SET 0.3.0. See the integration guide.

abvx-agent-skills supplies reusable workflows; it is not installed or required by this CLI.

Documentation and contributions

Report a bug with the package version, a minimal repo fixture, the command, and expected/actual output. Remove secrets before sharing a fixture.

Contributor setup: python3 -m venv .venv, activate it, then pip install -e ".[dev]". Run pytest -q, ruff check ., ruff format --check ., and mypy src.

Metadata

Release files for agentsgen 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentsgen 0.5.0
File Size Uploaded
agentsgen-0.5.0.tar.gz 124.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentsgen 0.5.0
File Interpreter ABI Platform
agentsgen-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 265.4 kB

Release files / agentsgen-0.5.0.tar.gz

Download URL agentsgen-0.5.0.tar.gz
Size 124.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ee84be5422faac7df8d0812d047eeee3dc684e0bfbcc2df1a59dca2a9812c1b7
BLAKE2b-256 checksum
How to use checksums
337796b507b828455895aa3fbad9af70dafce7fa716e59ccbc62b84fb5afa40a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 7, 2026.

Transparency log

Release files / agentsgen-0.5.0-py3-none-any.whl

Download URL agentsgen-0.5.0-py3-none-any.whl
Size 141.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bd8c73bc1a89069af866e5a50e043e5938118d54ceb5e55c8ae60bd8a3809a3
BLAKE2b-256 checksum
How to use checksums
9c397f655c938395bae9b75d9641eb7974e2717cafe4012bec725e6a14bc2731
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 7, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.1

2 release files

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page