ngit
Skill368 starsChanged 14 days agoMITView on GitHub
ngit makes git clone, fetch, and push work with nostr:// URLs and adds a CLI for pull requests, issues, membership, CI results, releases, OCI containers, and nsites. Repository state (which commit each ref points to) is published as signed Nostr events and is the source of truth; git objects live on ordinary git servers, so servers are interchangeable. A grasp server bundles a relay and a git server and creates the repository automatically when an announcement lists it. Explanation: https://ngit.dev/how-it-works
- Pipes a download into a shell
- Commits and pushes
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- android-cliSkill
- android-cliSkill
- ngitSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
This skill documents ngit v3: Run ngit --version first; the commands here need 3.0.0 or later.
- Very specific: line 63
Never construct a NIP-05 address (user@domain).
- Distinctive: line 109
Read the bundled reference before performing that slice of work.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ngit — Nostr Plugin for Git
ngit makes git clone, fetch, and push work with nostr:// URLs and adds a
CLI for pull requests, issues, membership, CI results, releases, OCI containers,
and nsites. Repository state (which commit each ref points to) is published as
signed Nostr events and is the source of truth; git objects live on ordinary git
servers, so servers are interchangeable. A grasp server bundles a relay and a
git server and creates the repository automatically when an announcement lists
it. Explanation: https://ngit.dev/how-it-works
Where to look
- This skill documents ngit v3. Run
ngit --versionfirst; the commands here need 3.0.0 or later. If ngit is missing or older, report that and offer an install or update:curl -fsSL https://ngit.dev/install.sh | bashinstalls or replacesngitandgit-remote-nostr, andngit updateworks on v3 or later. Other methods: https://ngit.dev/install ngit <command> --helpis the authority for the installed version's flags and defaults.- https://ngit.dev holds the guides. Any page is available as raw Markdown
at
https://ngit.dev/markdown/<route>.md; the index is https://ngit.dev/llms.txt. Web UI: https://gitworkshop.dev
Rules
- Preserve user and repository choices. Examples here show syntax, not policy. Carry through the selected signer, target, hosting, CI, and replication settings; do not add gates, waits, workflow edits, or configuration changes that the task or repository did not choose.
- PR branches MUST start with
pr/(e.g.pr/my-feature). Any other branch name is a plain push and never creates a PR. - Read ngit output with
--json. It is a global option and works at any position. Stdout is exactly one JSON document; progress and diagnostics go to stderr.gitcommands have no--json. Top-levelcommand_statusisokfor exit 0 anderrorotherwise; it never describes a nested domain result (ngit ci status --jsonreportsokwithci.conclusion: "failure"unless a gate was requested). - ngit repository commands normally refresh data from Nostr relays—including
PRs, issues, comments, statuses, and CI—unless given
--offline, and git commands contacting anostr://remote refresh that data too, so use--offlinewhere supported for subsequent ngit commands when the required data is already cached and newer state is unnecessary. - Identifiers.
<ID|nevent>acceptsnevent1…, a 64-char hex ID, or a unique hex prefix with an optional#(quote it:'#deadbeef'). JSONidandreply_tofields are alreadynevent1…; container publication instead returns a raw-hexevent_idplus the repositorynaddr. Reference events inside--bodytext asnostr:nevent1…ornostr:naddr1…, never as raw hex. Never construct a NIP-05 address (user@domain); usenpub1…unless a NIP-05 address was given to you. - Multiline text.
ngitoptions such as--bodyand--descriptionaccept real newlines:--body "$(cat note.md)". Git push options cannot carry newlines: write literal\nin a short inline-o description=…, and never convert a file into a push option (open the PR withngit sendinstead). - Signers.
--signer <alias|npub|profile-name>selects a stored identity for onengitcommand;git -c nostr.signer=<alias|npub|profile-name> push …does the same for one git command. Neither changes the configured login. Never export or pass an nsec merely to switch between configured accounts. - CI. A successful push says nothing about CI. Nostr CI runs workflows from
.ngit/act/workflows/; another provider's directory is not evidence. When CI matters, query the exact commit or PR withngit ci status <target> --jsonand readci.stateandci.conclusion, notcommand_status. - Target repository. With several
nostr://remotes, pass global--repo <REMOTE|NADDR|NOSTR-URL>; a configured remote name, an naddr, and a nostr:// URL are all accepted. Without it ngit infers the target from config and branch tracking and fails rather than guesses. Before a signing command, check thetarget repository: <naddr> (source: …)line on stderr.
Detecting a nostr repo
git remote -v | grep -q 'nostr://' # primary check, no cache needed
ngit repo --json --offline # full metadata when neededngit repo always exits 0, and is_nostr_repo: false can be a cold-cache false
negative: if a remote shows nostr://, run git fetch origin and retry. The
output includes the roster (members, lead_source, lead_path,
pending_actions, health); read reference/repositories.md before changing
membership or hosting.
nostr:// URLs
nostr://<npub>/<identifier>
nostr://<npub>/<relay-hint>/<identifier> # relay-hint is a bare domain, e.g. relay.ngit.dev
nostr://<user>@<domain>/<identifier> # NIP-05, only when explicitly provided
nostr://<domain>/<repository-path> # NIP-AD: the full /path is sent URL-encoded to /.well-known/nostr.json?path=Standard git commands accept these URLs directly.
Task index
Read the bundled reference before performing that slice of work; the guide adds tutorials and background.
| Task | Bundled reference | ngit.dev guide |
| Publish, clone, host repositories; maintainers, moderators | reference/repositories.md | /repositories, /maintainers |
| Open, update, stack, review, merge PRs | reference/prs.md | /pull-requests |
| Issues | reference/issues.md | /issues |
| CI results, trust, workflows, ngit in CI jobs | reference/ci.md | /ci, /ci/workflows/ |
| Accounts, login, signers, secrets | reference/accounts.md | /accounts |
| Sync, global flags, git config | reference/sync-config.md | /configuration, /troubleshooting |
| Publish nsites (static sites) | reference/nsites.md | /releases/nsites |
| Publish OCI containers | reference/containers.md | /releases |
| Software releases | ngit release --help | /releases |
| Automation contract, machine-readable docs | this file | /agents/ |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

