release

A set of repository rules for carrying out a software release, including GitHub authentication and branch checks.

In plain words
What is it for?
It helps prepare and verify release access, check the current Git branch, and guide the user through releasing the project.
Why use it?
It gives the release process a defined order and requires confirmation before each step, reducing mistakes when publishing changes.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/abhinav503/flutter-agentic/release
Clone the repo
git clone --depth 1 https://github.com/abhinav503/flutter-agentic

Made for: Cursor.

Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,070 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00019 $0.01070
Opus 5 $0.00010 $0.00535
Sonnet 5 $0.00004 $0.00214
Haiku 4.5 $0.00002 $0.00107

Measured 2d ago against content hash 45653b5be735, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

release 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 2d 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.

.cursor/rules/release.mdc · 91 lines

How it starts

The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.

When the user asks to do a release, follow these steps interactively — ask for confirmation at each step before proceeding.

Prerequisites — this repo uses multiple GitHub accounts, so release auth must be explicit. The token lives in a git-ignored .env at the repo root. Load it and verify gh:

which gh
set -a && . ./.env && set +a    # exports GH_TOKEN from the root .env
gh auth status

gh auth status should report Logged in … (GH_TOKEN). Source .env in every shell that runs a gh command — non-interactive shells don't inherit it. If gh is missing: brew install gh. If .env has no GH_TOKEN, create a fine-grained PAT (Contents: Read and write on this repo) at https://github.com/settings/personal-access-tokens/new and add it as GH_TOKEN=… to .env (never commit it). Stop if not ready. If gh auth status reports the token as invalid, confirm the shell has network access before replacing it — in a sandboxed agent environment, blocked network access can surface as an auth failure; re-run with network permission and .env sourced first.

Step 1 — Identify release branch

git branch --show-current

If not main, ask: "Release from {branch}? Confirm or type a different name." Record as {RELEASE_BRANCH}.

Step 2 — Compare to main

git log main..{RELEASE_BRANCH} --oneline
git diff main..{RELEASE_BRANCH} --stat

Show the commit list for the user to review.

Step 3 — Version bump — read current version:

grep "^version:" pubspec.yaml

Format: MAJOR.MINOR.PATCH. Rules: Major = breaking change; Minor = any feat: commit or new component/skill; Patch = fix/chore/docs/refactor only. Propose bump with one sentence of reasoning. Wait for confirmation.

Step 4 — Update pubspec.yaml — replace the version line with the confirmed version.

Step 5 — Write release notes — create docs/releases/v{NEW_VERSION}.md from docs/releases/_template.md. Two sections only:

  • Features — what a developer gains: new components, apps, integrations
  • Agent Context Improvements — what AI agents gain: new skills, rules, doc refs

Rules: plain language only; one bullet per change; one sentence per bullet; no duplicates across sections; nothing obvious. Show draft and ask "Does this look good?" Wait for confirmation.

Step 6 — Commit on release branch

git add pubspec.yaml docs/releases/v{NEW_VERSION}.md
git commit -m "chore: release v{NEW_VERSION}"
git push

Step 7 — Merge to main

git checkout main && git pull origin main
git merge --no-ff {RELEASE_BRANCH} -m "chore: merge {RELEASE_BRANCH} into main for v{NEW_VERSION}"
git push origin main

Stop on conflicts — ask user to resolve, then continue.

Step 8 — Tag and GitHub Release

git tag v{NEW_VERSION}
git push origin v{NEW_VERSION}
gh release create v{NEW_VERSION} \
  --title "v{NEW_VERSION} — {SUMMARY_TITLE}" \
  --notes-file docs/releases/v{NEW_VERSION}.md \
  --target main

Report the release URL to the user.

Step 8b — Build and attach Android APK (optional, per app)

Monorepo: the repo root has no runnable app — build from inside an app folder (apps/<app>/), never the root. Skip for a pure template release that ships no binary.

Ask which app to attach (e.g. doc_scanner, jokes) and record it as {APP}. Build the release APK from that app:

cd apps/{APP} && fvm flutter build apk --release

If fvm is unavailable, fall back to cd apps/{APP} && flutter build apk --release. Output: apps/{APP}/build/app/outputs/flutter-apk/app-release.apk.

Upload as a named asset (named after the app + version):

gh release upload v{NEW_VERSION} \
  apps/{APP}/build/app/outputs/flutter-apk/app-release.apk#{APP}-v{NEW_VERSION}.apk

Confirm the asset appears on the release page before continuing.

Step 9 — Clean up — ask: "{RELEASE_BRANCH} has been merged. Delete it?" If yes:

git branch -d {RELEASE_BRANCH}
git push origin --delete {RELEASE_BRANCH}

Read the full file on GitHub · 91 lines

Changes

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.

  1. 2d ago First seen · 91 lines · 19 tokens per session scan A 45653b5be735

Subscribe to this mod's changes

release is a cursor rule published in the GitHub repository abhinav503/flutter-agentic (10 stars, last pushed 9d ago), licensed MIT. It adds 19 tokens to every session and 1,070 once invoked, about $0.0001 per session on Opus 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-31.