# Prime Gnadd

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-alexhagemeister-gnadd-prime-gnadd`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [AlexHagemeister](https://agentstack.voostack.com/s/alexhagemeister)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [AlexHagemeister](https://github.com/AlexHagemeister)
- **Source:** https://github.com/AlexHagemeister/gnadd/tree/main/skills/prime-gnadd

## Install

```sh
agentstack add skill-alexhagemeister-gnadd-prime-gnadd
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Prime

Orient a new chat session with the project's current state. This is read-only: do not create, edit, stage, commit, stash, or delete files.

## Auto-Invocation Gate

If this skill was auto-selected from context rather than explicitly invoked with `/prime-gnadd`, stop before running commands. Briefly explain why a repo snapshot appears useful and ask: "Run `/prime-gnadd` now?" Proceed only after confirmation.

## GNADD Invariants

- `prime-gnadd` gives spatial awareness and momentum; it does not load implementation context speculatively.
- GitHub is the system of record, so open issues, open PRs, recent merged PRs, branches, and commits are the working state.
- Surface local `main` divergence and stashes prominently, but do not fix them here; this skill is read-only.
- For broader workflow or file-hygiene guidance, use `help-gnadd`.

## Mechanics

Git state classification runs through the bundled script — `gnadd.sh` in this skill's directory (the directory containing this SKILL.md). If the script is missing, stop and tell the user to reinstall the GNADD skills (`npx skills update -g -y`); do not reconstruct its logic from raw git commands.

## Commands

Run the state snapshot first:

```bash
bash "/gnadd.sh" state
```

It fetches (`git fetch --prune` — updates remote-tracking refs only, touching no working files, so it honors the read-only contract) and reports: current branch, detached HEAD, tree clean/dirty, stash count, active issue number, and the main classification (`synced` / `behind` / `diverged`, with the divergent commits listed when dangerous). If the repo has no remote it reports `remote=none` — note that and move on.

Then gather orientation context:

```bash
tree -L 2 -I 'node_modules|__pycache__|.git|dist|build|.next|.venv|coverage|target|vendor|.pytest_cache|*.egg-info'
git log --oneline -15
git branch --list
```

If `tree` is not installed, use `find . -maxdepth 2 -type d -not -path './.git*' -not -path './node_modules*'` instead.

Then check GitHub CLI auth:

```bash
gh auth status
```

**If `gh` is unavailable or unauthenticated:** do not abort. Report the local snapshot anyway — it contains the safety-relevant signals (divergence, stashes, dirty tree) — and note that issue/PR context was skipped; suggest `gh auth login`.

When auth is confirmed:

```bash
gh issue list --state open
gh pr list --state open
gh pr list --state merged --limit 10
```

If `state` reported an active issue N (`issue=`), also run:

```bash
gh issue view 
```

## Interpretation

### Project Shape

Use the tree output to identify the top-level layout: where source, config, tests, docs, and scripts appear to live. Keep this shallow. Do not inspect files unless the user asks.

### Recent Git History

Use `git log --oneline -15` to infer the recent trajectory — active areas, development focus, recently completed themes. Avoid over-explaining individual commits.

### Current State

From the `state` output, report:

- Active branch and whether the working tree is clean.
- Other local branches that may indicate in-progress work.
- **`main_state=behind`:** normal and safe — origin has commits local main lacks. Say so plainly: "local `main` is N commits behind origin; it will sync on the next `/start-issue-gnadd`."
- **`main_state=diverged` (dangerous):** local `main` holds commits origin lacks. **Flag it as the first line of the summary**, recommend resolving before any new work, and point at the sanctioned recovery path: `gnadd.sh doctor` diagnoses it and `doctor --rescue-main ` performs the lossless fix. Do not fix it from this skill.
- **Stashes:** if `stashes` is nonzero, surface it — invisible saved work, easy to abandon.

### Open Issues

Summarize pending work from `gh issue list`. Group by label when present; keep issue titles and numbers visible.

### Open PRs

Surface work in flight. Flag PRs awaiting review — a PR sitting open is either waiting on you to review/merge or waiting on feedback.

### Recent Completions

Summarize the last ~10 merged PRs. Highlight momentum, not every detail.

### Active Issue

Only when on an `issue-/` branch: summarize the issue's problem, desired outcome, and subtasks. Do not fetch referenced issues or artifacts automatically.

## Output Format

```markdown
## Project Shape

## Current State

## Recent Activity

## Open Work

## In Flight

## Recently Shipped

## Active Issue

```

Keep the summary short enough to use as quick working context.

## Closing Guidance

Offer a brief next-step nudge only when orientation completed successfully — not when the skill halted mid-run.

**Skip** when blockers were surfaced in the summary (diverged `main`, stashes, dirty tree on the wrong branch). Nudge toward resolving those first — for a diverged main, that means `gnadd.sh doctor` — not advancing the happy-path loop.

**Infer one primary suggestion** from repo state, plus at least one alternative when ambiguous:

1. Open PR awaiting review → review or merge before starting new work.
2. On `issue-/*` with a dirty tree → `/commit-gnadd` or continue implementation.
3. On `issue-/*`, clean → continue that issue's work.
4. On clean `main` with open issues → `/start-issue-gnadd ` on the most actionable issue.
5. No open issues → `/new-issue-gnadd`.

Keep it to a sentence or two with invitational options. Do not restate the full GNADD workflow.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [AlexHagemeister](https://github.com/AlexHagemeister)
- **Source:** [AlexHagemeister/gnadd](https://github.com/AlexHagemeister/gnadd)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-alexhagemeister-gnadd-prime-gnadd
- Seller: https://agentstack.voostack.com/s/alexhagemeister
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
