agentleFS
steveusteveu/skills/repo-init/SKILL.md

repo-init

Skill1 starsChanged 6 months agoMITView on GitHub

Apply a canonical issue-label set to a GitHub repo (six labels — bug, feature, refactor, chore, afk, hitl — with consistent colours and descriptions) and strip GitHub's OSS-community defaults. Use after creating a new repo, or to bring an existing repo's labels in line. Auto-detects the current repo, or accepts `owner/name` as an argument. Idempotent — safe to re-run.

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 0

    Distinctive

    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
  1. Very specific:

    Resolve target: If an argument was passed (owner/name), use it.

    line 57
  2. Very specific:

    Sibling check: Run gh repo view <owner>/.github >/dev/null 2>&1 — if absent, flag once that the owner has no .github repo and issue …

    line 60

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

repo-init

Apply a canonical issue-label set to a GitHub repo. This file is the source of truth — edit it to evolve the scheme, then re-run on affected repos to bring them in line.

Scope

  • Yes: issue labels (create/update the six canonical ones, remove the seven OSS defaults).
  • No: issue templates. Those flow automatically from the owner's .github repo and need no per-repo action.
  • No: repo creation itself. Run gh repo create first.

Usage

Inside a repo:

/repo-init

Target auto-detected via gh repo view.

Targeting another repo:

/repo-init owner/name

Canonical labels

NameColourDescription
bugd73a4aSomething isn't working
featurea2eeefA capability someone gains
refactorbfd4f2Internal quality — same behaviour, better shape
choreedededMechanical maintenance — deps, config, infra
afk0e8a16Agent can ship this end-to-end without human input
hitlfbca04Needs human judgement — architecture, design, or policy

Type vs workflow. bug / feature / refactor / chore are mutually-exclusive types — one per issue. afk / hitl are orthogonal, tagging who can pick up the issue.

OSS defaults to remove

GitHub ships every new repo with these. Mostly noise for small-team / agent-driven workflows:

  • documentation
  • duplicate
  • good first issue
  • help wanted
  • invalid
  • question
  • wontfix

Removing a label strips it from any existing issues that have it. For a brand-new repo there won't be any.

Process

  1. Resolve target. If an argument was passed (owner/name), use it. Otherwise: gh repo view --json nameWithOwner --jq .nameWithOwner from the current directory.
  2. Apply canonical labels. For each row in the table: gh label create <name> -R <repo> --color <hex> --description "<desc>" --force. The --force flag updates colour/description if the label already exists.
  3. Strip OSS defaults. For each: gh label delete <name> -R <repo> --yes. Ignore not-found errors (label may already be absent).
  4. Sibling check. Run gh repo view <owner>/.github >/dev/null 2>&1 — if absent, flag once that the owner has no .github repo and issue templates won't auto-populate. Don't create it; that's a separate decision.
  5. Summary. Print one line: target repo, count of labels set, count of labels removed.

Reference implementation

TARGET="${1:-$(gh repo view --json nameWithOwner --jq .nameWithOwner)}"
OWNER="${TARGET%%/*}"

CANONICAL=(
  "bug|d73a4a|Something isn't working"
  "feature|a2eeef|A capability someone gains"
  "refactor|bfd4f2|Internal quality — same behaviour, better shape"
  "chore|ededed|Mechanical maintenance — deps, config, infra"
  "afk|0e8a16|Agent can ship this end-to-end without human input"
  "hitl|fbca04|Needs human judgement — architecture, design, or policy"
)
DEFAULTS=(documentation duplicate "good first issue" "help wanted" invalid question wontfix)

set_count=0; rm_count=0
for line in "${CANONICAL[@]}"; do
  IFS='|' read -r name color desc <<< "$line"
  gh label create "$name" -R "$TARGET" --color "$color" --description "$desc" --force >/dev/null && ((set_count++))
done
for label in "${DEFAULTS[@]}"; do
  gh label delete "$label" -R "$TARGET" --yes >/dev/null 2>&1 && ((rm_count++))
done

gh repo view "$OWNER/.github" >/dev/null 2>&1 || \
  echo "Note: $OWNER has no .github repo — issue templates won't auto-populate."

echo "$TARGET: $set_count labels set, $rm_count removed."

Notes

  • Personal GitHub accounts have no org-level default-labels feature, so this skill is the only way to bootstrap them.
  • Organisations do have native default labels (Settings → Repository defaults → Labels), but keeping the spec in this file avoids splitting it between an org-settings UI and a tracked file.
  • The label scheme pairs with the AFK / HITL tag in tracer's vertical-slice template — applying the label promotes that body-level judgement into a board-filterable signal.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.