Agent skill · openhands

github-agents-md-maintainer

Create an automation that keeps AGENTS.md current in one or more GitHub repositories. On a schedule - weekly by default - it clones the default branch, starts an OpenHands conversation that reads the repository and creates or updates AGENTS.md, and opens a pull request with the result.

What it needs

About 7k tokens when loaded.

What this skill does

AGENTS.md Maintainer Automation Create a cron automation that keeps each configured repository's AGENTS.md - the file an agent reads first when it starts work there - matching what the repository actually is. It is created when missing, updated when the repository has moved on, and left alone when it is still accurate. The automation script is deterministic: scheduling, the once-per-week claim, the clone, the branch, the commit, the push, the pull request, and the clone's removal are all handled in Python. The LLM is invoked only to read the repository and write the file. A week is one unit of work per repository, so a cron that fires more often than intended, a retried run, or a restarted service cannot open the same pull request twice. A repository whose previous pull request from this automation is still open is skipped, because a second one would edit the same file and reviewing it would tell you nothing the first did not. --- Prerequisites Required secret Verify that the following secret is set in OpenHands Settings -> Secrets: Secret name Token type Minimum permissions --- --- --- GITHUBPERSONALACCESSTOKEN Classic PAT repo GITHUBPERSONALACCESSTOKEN Fine-grained PAT Contents: Read and write, Metadata: Read, Pull requests: Read and write Contents write is required because the branch is pushed, and pull request write because the pull request is opened. No issue permission is needed: this automation never comments on an issue. Check with: If the token is missing or invalid, inform the user and stop. --- Setup Workflow Follow these steps in order. Step 1 - Verify GITHUBPERSONALACCESSTOKEN Run the curl check above. If absent: "GITHUBPERSONALACCESSTOKEN is not set. Please add it in OpenHands Settings -> Secrets." Stop. If the API returns {"message": "Bad credentials"}: tell the user the token is invalid and ask them to update it. Stop. Step 2 - Collect repositories Ask: "Which GitHub repositories should have their AGENTS.md maintained? (Format: owner/repo, e.g. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills openhands/github-agents-md-maintainer

View the source on GitHub

Browse the @skills marketplace