Skip to content
Skills Library
Programming · Automation

start-issue

/start-issue

Full environment setup when starting work on a GitHub issue. Creates a feature branch from origin/development, swaps persistence.xml to local JNDI settings, assigns the issue, and guides project board setup. Use when beginning work on any new issue: "start issue 20408", "/start-issue 20408", or "prepare env for issue 20408".

Repository
hmis ↗
Licence
GPL-3.0
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

GPL-3.0, otwarta.

What it does and when to use it

Full environment setup when starting work on a GitHub issue. Creates a feature branch from origin/development, swaps persistence.xml to local JNDI settings, assigns the issue, and guides project board setup. Use when beginning work on any new issue: "start issue 20408", "/start-issue 20408", or "prepare env for issue 20408".

Triggers from the description

start issue 20408prepare env for issue 20408

Arguments

/start-issue <issue-number> [short-description] [local-jndi-name]
Original author description

Full environment setup when starting work on a GitHub issue. Creates a feature branch from origin/development, swaps persistence.xml to local JNDI settings, assigns the issue, and guides project board setup. Use when beginning work on any new issue: "start issue 20408", "/start-issue 20408", or "prepare env for issue 20408".

How it works

  1. Arguments
  2. Step 1 — Fetch Issue Title
  3. Step 2 — Create Feature Branch from development
  4. Step 3 — Set persistence.xml to Local JNDI
  5. Step 4 — Assign Issue on GitHub
  6. Step 5 — Project Board (CareCode: HMIS Board)
  7. Step 6 — Summary
  8. Reference
Original SKILL.md headings · 127 lines, 768 words
SKILL.md preview
---
name: start-issue
description: >
  Full environment setup when starting work on a GitHub issue. Creates a feature
  branch from origin/development, swaps persistence.xml to local JNDI settings,
  assigns the issue, and guides project board setup. Use when beginning work on
  any new issue: "start issue 20408", "/start-issue 20408", or "prepare env for issue 20408".
disable-model-invocation: false
allowed-tools: Bash, Read, Edit, Grep
argument-hint: "<issue-number> [short-description] [local-jndi-name]"
---

# Start Issue Workflow

Prepare the local development environment to fix a GitHub issue.

## Arguments

- `$0` — Issue number (required, e.g. `20408`)
- `$1` — Short kebab-case description (optional; derive from issue title if omitted)
- `$2` — Local JNDI datasource name (optional; read from `persistence_for_local_testing.xml` if omitted)

## Step 1 — Fetch Issue Title

```bash
gh issue view $0 --repo hmislk/hmis --json title,body --jq '.title'
```

Use the title to derive a short kebab-case description if `$1` is not provided.
Branch name format: `$0-<short-description>` (all lowercase, hyphens only).

## Step 2 — Create Feature Branch from development

```bash
git fetch origin
git checkout -b $0-<description> origin/development
git push -u origin $0-<description>
```

**Rule**: ALWAYS base on `origin/development`, never on `master`.

> ⚠️ **Check current branch first.** If `git branch --show-current` shows `master`, DO NOT proceed with uncommitted changes present — those changes will be carried onto the new branch and their ancestry will include `master`, causing PR conflicts. Instead, stash the changes (`git stash`), create the branch cleanly, then pop the stash (`git stash pop`).

## Step 3 — Set persistence.xml to Local JNDI

Read the local JNDI name from:
`src/main/resources/META-INF/persistence_for_local_testing.xml`

Look for the `<jta-data-source>` values — use those exact names.

Then update `src/main/resources/META-INF/persistence.xml`:
- Replace `${JDBC_DATASOURCE}` → the local main JNDI (e.g. `jdbc/ruhunu`)
- Replace `${JDBC_AUDIT_DATASOURCE}` → the local audit JNDI (e.g. `jdbc/ruhunuAudit`)

**Do NOT commit this change.** It stays local only. Before any push, revert to placeholders.
**Remember these JNDI names** — after every push they must be restored immediately so the
developer can test without any manual step.

## Step 4 — Assign Issue on GitHub

```bash
gh issue edit $0 --repo hmislk/hmis --add-assignee buddhika75
```

If the command fails with a scope error, inform the user that they need to run:
```
! gh auth refresh -s project
```

## Step 5 — Project Board (CareCode: HMIS Board)

Make sure the issue is on project #11, set **Status = In Progress**, then **read the status
back**. All three steps are mandatory: the update call's success response returns only the
item ID, not the new value, so it is not proof that the change was saved. Issue #24105 was
reported as "In Progress" from that response alone, but the board still showed Backlog.

The issue is often **already on the board**: the "Item added to project" automation puts new
issues in Backlog. `addProjectV2ItemById` handles both cases. If the issue is already on the
board, it returns the existing item instead of adding a duplicate.

```bash
# 1. Issue node ID
ISSUE_NODE=$(gh api repos/hmislk/hmis/issues/$0 --jq '.node_id')

# 2. Add to project #11, or get the existing item, and capture the item ID
ITEM_ID=$(gh api graphql -f query='
mutation($p:ID!,$c:ID!){ addProjectV2ItemById(input:{projectId:$p,contentId:$c}){ item{ id } } }' \
  -f p=PVT_kwDOAHw-zs4ApMln -f c="$ISSUE_NODE" --jq '.data.addProjectV2ItemById.item.id')

# 3. Set Status = In Progress
gh api graphql -f query='
mutation($p:ID!,$i:ID!){ updateProjectV2ItemFieldValue(input:{
  projectId:$p, itemId:$i,
  fieldId:"PVTSSF_lADOAHw-zs4ApMlnzggpN3k",
  value:{singleSelectOptionId:"47fc9ee4"} }){ projectV2Item{ id } } }' \
  -f p=PVT_kwDOAHw-zs4ApMln -f i="$ITEM_ID"

# 4. READ BACK: this output is the only thing that may be reported as the board status
gh api graphql -f query='
query($i:ID!){ node(id:$i){ ... on ProjectV2Item{
  fieldValueByName(name:"Status"){ ... on ProjectV2ItemFieldSingleSelectValue{ name updatedAt } } } } }' \
  -f i="$ITEM_ID" --jq '.data.node.fieldValueByName'
```

IDs, verified 2026-10-01: project `PVT_kwDOAHw-zs4ApMln`, Status field
`PVTSSF_lADOAHw-zs4ApMlnzggpN3k`, "In Progress" option `47fc9ee4`. If a mutation fails with
an unknown or invalid ID error, re-query them:
`gh api graphql -f query='query{organization(login:"hmislk"){projectV2(number:11){id field(name:"Status"){... on ProjectV2SingleSelectField{id options{id name}}}}}}'`

**If step 4 does not print `"name":"In Progress"`**, do not retry silently and do not report
success. Tell the user that the automated status change did not stick, show what the board
actually holds, and ask them to set it manually at https://github.com/orgs/hmislk/projects/11.

If the token lacks the `project` scope (error: INSUFFICIENT_SCOPES), tell the user:

> **Action required**: Your GitHub token lacks the `project` scope for board automation.
> Please add the issue to the board manually:
> https://github.com/orgs/hmislk/projects/11
> Set **Status = In Progress**.
>
> To enable automation in future, run: `! gh auth refresh -s project`

## Step 6 — Summary

Report what was done:
- Branch name created and pushed
- persistence.xml local JNDI set to (name)
- Issue assigned to buddhika75
- Project board status: quote the value read back in Step 5 step 4, or say that a manual
  change is needed. Never report the status from the update call's success response alone.

Remind the user: **persistence.xml must be reverted to `${JDBC_DATASOURCE}` before any git push.**
Check it directly (or let `commit-code` catch it — it verifies persistence.xml when staged).

## Reference

See [start-issue-workflow.md](../../../developer_docs/git/start-issue-workflow.md) for full details.

Versions

RepositoryScoreLicence
This page · hmislk/hmis100GPL-3.0
gopherguides/gopher-ai90MIT
devcules/devcules90Apache-2.0
sejas/ai-code-skills90MIT

Database snapshot: 13.11.2026 · package version 859a8381b4cf (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100git-branch-create
    Create a new git branch using a conventional naming scheme. Use when the user asks to create a branch, start a new branch, /git-branch-create, or signals they are beginning a discrete piece of work - "start work on X", "spin up a branch for Y", "let's start Z". Boundary: a…
  • 100pick-up-issue
    This skill should be used when the user asks to "pick up an issue", "work on issue #X", "claim issue", "start working on issue", "take this issue", "I'll work on this", or needs to take ownership of a GitHub issue before starting work.
  • 100start
    Begins a new piece of work in the ai-agent-skills repository. Two modes: EXISTING ISSUE (user provides a GitHub issue number or URL — fetches it, cuts the correct branch) and NEW ISSUE (user describes what needs doing — classifies as feature or bug, drafts a structured…
  • 90start-work
    Use when someone wants to work on something in claude-session-restore ("let's do #12", "pick up the restore bug", "make it work on macOS", "fix Y"), before any code or docs change. Finds or creates the issue, reads the code and the APIs it touches, decides whether it needs a…
  • 90start-work
    Use when someone wants to work on something in claude-sticky ("let's do #12", "pick up the pane bug", "add a kind of item", "fix Y"), before any code or docs change. Finds or creates the issue, reads the code and the APIs it touches, decides whether it needs a plan, writes the…
  • 90create-branch
    Use when creating a branch, starting work on an issue, or checking out a new feature branch. Validates branch naming and links to GitHub issues automatically.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.