gnhf is an orchestrator that repeatedly directs coding agents to make, document, and commit small changes toward a stated objective. Developers use it to keep agent work running in a Git repository while they are away, with retries, rollback on failure, and a run summary. The catalogue includes its agent skill and instructions for operating the loop.
Borrowing it
Nothing to install: this file belongs to kunchenguid/gnhf. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/kunchenguid/gnhf/main/AGENTS.mdgit clone --depth 1 https://github.com/kunchenguid/gnhfWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/kunchenguid/gnhf/agents-md)<a href="https://agentmods.dev/instructions/kunchenguid/gnhf/agents-md"><img src="https://agentmods.dev/badge/instructions/kunchenguid/gnhf/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/kunchenguid/gnhf/agents-md"><img src="https://agentmods.dev/badge/instructions/kunchenguid/gnhf/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00923 | $0.00923 |
| Opus 5.5 | $0.00369 | $0.00369 |
| Sonnet 5.5 | $0.00185 | $0.00185 |
| Haiku 4.5 | $0.00092 | $0.00092 |
Grade A, and why
gnhf AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 29d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
This file provides guidance to agents when working with code in this repository.
Project
gnhf ("good night, have fun") is a CLI that runs a coding agent in a loop inside a git repo, committing each successful iteration.
User-facing behavior (run modes, failure/rollback, usage-limit waits, worktrees, sleep prevention, agents) is owned by the README; test feature or scope decisions against VISION.md.
Target: Node 20+, published to npm as a bundled ESM CLI (dist/cli.mjs) with optional agent-facing skills under skills/.
Commands
package.json scripts are the source of truth; CONTRIBUTING.md documents them, single-test invocation, the e2e prior-build requirement, and the CI matrix. Keep all CI jobs green.
Releases are automated via release-please; never hand-edit CHANGELOG.md or .release-please-manifest.json.
Code map
src/cli.ts: entry point - flags, config, stdin/worktree/resume setup, shutdown and exit summary.src/core/run.ts:.gnhf/runs/<runId>/metadata (kept local via.git/info/exclude).src/core/orchestrator.ts: the iteration loop, commit/rollback, backoff, usage-limit waits, andRunLimits.src/renderer.ts: alt-screen TUI driven by orchestrator events;--mockdrives it offline viasrc/mock-orchestrator.ts.src/core/agents/: one module per agent implementingAgentintypes.ts, picked byfactory.ts. Start fromstream-utils.tsfor streaming and process lifecycle, and useparseAgentOutputto validate a new native agent's output.src/core/config.ts:~/.gnhf/config.ymlloading; CLI flags override config.
Invariants
- Any flag gnhf controls must be listed in
isReservedAgentArg(src/core/config.ts) so user arg overrides cannot shadow it. - Runtime-only flags (
--max-iterations,--max-tokens,--max-rate-limit-wait,--stop-when) are never persisted to config;--stop-whenis persisted per run for resume. - All git calls go through
execFileSyncwith explicit argv insrc/core/git.ts; add agit.injection.test.tscase whenever new user input flows into git args. - Worktree preservation (README "Worktree Mode") must hold on every exit path, including the
process.on("exit")fallback and the force-exit timeout. - A sleep inhibitor that fails to start or confirm must never abort a run.
- Raw ACP command specs are redacted to
acp:custom/customin debug logs, errors, and telemetry. providerResumeWaitin the orchestrator is the single owner of what a provider-reported reset time is worth.- Telemetry (
src/core/telemetry.ts) sends one pageview at start and onerunevent at the end - never per-iteration, and nevercwd, branch slug, prompt content, or anything identifying a user or repo. User-facing telemetry docs cover only theGNHF_TELEMETRY=0opt-out and that data is anonymous.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 29d ago Changed · -27 lines · -2,379 tokens per session 18f25da78124
- 1mo ago Changed · +111 tokens per session 14a46765d262
- 1mo ago First seen · 76 lines · 3,191 tokens per session scan A 188cd068aa3e
gnhf AGENTS.md is an instructions file published in the GitHub repository kunchenguid/gnhf (4,225 stars, last pushed 22d ago), licensed MIT. It adds 923 tokens to every session, about $0.0037 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.