Skip to content
Back to skills

Start Task

ASecurity

Bootstrap a task into a synced feature branch — one shot, zero confirmations. An optional first word names the platform ('gh', 'jira', 'local'); otherwise detects the source from the args: GitHub issue ('#100', 'issue 100', 'gh issue 100', or bare '100'), Jira key ('PROJ-42'), or a local spec file path; ad-hoc conversation otherwise. Fetches the task, derives {type}/{number}/{slug}, syncs the default branch, creates and pushes the branch, and writes specs/context/<id>.md. '--context-only' (Gi...

  • 44 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 19, 2026
ai-agentspythonbashgitdocumentation

Works with

  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 28, 2026

npx -y skills add foyzulkarim/skills --skill start-task --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Start Task?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Start Task
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/foyzulkarim-start-task/badge)](https://www.skillsdirectory.com/skills/foyzulkarim-start-task)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: start-task
description: "Bootstrap a task into a synced feature branch — one shot, zero confirmations. An optional first word names the platform ('gh', 'jira', 'local'); otherwise detects the source from the args: GitHub issue ('#100', 'issue 100', 'gh issue 100', or bare '100'), Jira key ('PROJ-42'), or a local spec file path; ad-hoc conversation otherwise. Fetches the task, derives {type}/{number}/{slug}, syncs the default branch, creates and pushes the branch, and writes specs/context/<id>.md. '--context-only' (GitHub or Jira) only writes specs/context/<id>.md on the current branch — no git steps, no commit. Use only when the user explicitly asks to start a task, create a work branch, or fetch a ticket into specs — never trigger automatically."
model: inherit
color: cyan
---

# Start-Task

Turn a task reference into a synced feature branch named
`{type}/{number}/{slug}` plus a context file at `specs/context/<id>.md`.
Zero confirmations on the happy path: detect → fetch → derive → execute → report.

## 1. Detect the source (no bash)

**Platform word** — if the first arg is `gh`/`github`, `jira`, or `local`, use
that source and skip detection. The rest of the args must match that source's
pattern below; if they do not, hard-stop with the expected form (e.g.
`Usage: /start-task jira PROJ-123`). Never fall through to another source.

With no platform word, match the args in this order:

1. **Jira** — `[A-Z]+-\d+` (e.g. `PROJ-42`)
2. **GitHub issue** — a numeric token, stripping any of `github`, `gh`, `issue`, `issues`, `#`
3. **Local spec** — a path ending in `.md`, `.txt`, `.yaml`, `.yml`, or `.json`. Reject any path containing `..` — it can point outside the repository: hard-stop with `Usage: /start-task local <path inside the repository>`
4. **Ad-hoc** — nothing matched: ask once (a single question) for the task type, title, and identifier, then skip to step 3

## Context-only mode (`--context-only`)

Use it when the branch already exists and the developer only wants the ticket
in `specs/context/`. Remove `--context-only` from the args, then detect the
source as in step 1. Only GitHub and Jira support it; for any other source,
hard-stop with `--context-only needs a GitHub issue or a Jira key`.

Skip steps 2–4 and run the script once (1 bash call):

```bash
bash {base_directory}/gh-start-task.sh <ISSUE_NUM> --context-only
bash {base_directory}/jira-start-task.sh <KEY> --context-only
```

The script writes `specs/context/<ID>.md` on the current branch and stops. It
does not check the working tree, change branch, commit, or push. If the file
exists, the script replaces it with fresh data but keeps the developer's text
below the notes marker in both modes. Keep this marker when editing the file.
For a legacy file, preserve everything below the first `## Notes` heading.
If there is no heading, keep the entire previous file under Notes. Non-zero exit → hard-stop,
print stderr verbatim. Then report:

```
Task:    <ID> — <TITLE>
Context: specs/context/<ID>.md (not committed)
```

## 2. Fetch (1 bash call)

**GitHub:**

```bash
gh issue view <ISSUE_NUM> --json title,labels --jq '{title: .title, labels: [.labels[].name]}'
```

**Jira:**

```bash
which acli && acli jira workitem view <KEY> --fields summary,issuetype
```

Extract summary and issue type. If `acli` is missing, hard-stop: the developer
chose Jira; do not degrade to ad-hoc.

**Local spec:** read the file; extract title and scope. The identifier is the
developer-provided one or the filename stem.

On any fetch failure, hard-stop and print the error verbatim — no retries, no
paraphrasing, no follow-up questions.

## 3. Derive TYPE and SLUG (no bash)

**TYPE** — from GitHub labels (first match wins) or from the task's nature:

| Signal | TYPE |
|---|---|
| `bug`, `fix`, `hotfix` | `fix` |
| `enhancement`, `feature` | `feat` |
| `refactor` | `refactor` |
| `docs`, `documentation` | `docs` |
| `test`, `tests` | `test` |
| `ci`, `github-actions` | `ci` |
| `chore`, `deps`, `dependencies` | `chore` |
| _(no match)_ | `feat` |

For Jira, map the issue type instead (first match wins):

| Issue type | TYPE |
|---|---|
| `Bug` | `fix` |
| `Refactor`, `Improvement` | `refactor` |
| `Documentation`, `Doc` | `docs` |
| `Test`, `Tests` | `test` |
| `Technical Debt`, `Chore`, `Task` | `chore` |
| _(no match — incl. `Story`, `Feature`, `Epic`)_ | `feat` |

**SLUG** — from the title: lower-case; drop articles, prepositions, and helper
verbs; keep the core action verb + object nouns; 2–4 words; hyphenated; only
`[a-z0-9-]`.

Examples: "Add user authentication to the login form" → `add-user-auth`;
"Fix null pointer in payment processing flow" → `fix-null-pointer-payment`.

## 4. Execute

**GitHub / Jira** (1 bash call) — the script syncs the default branch, creates
the branch, writes **and commits** the context file on it, then pushes:

```bash
bash {base_directory}/gh-start-task.sh <ISSUE_NUM> <TYPE> <SLUG>
bash {base_directory}/jira-start-task.sh <KEY> <TYPE> <SLUG>
```

The Jira script fetches the full issue (status, assignee, reporter, priority,
labels, URL, description, comments) into the context file; it converts the
description and comments to Markdown with the bundled `adf-to-md.py` when
`python3` is available. Use the plain-text issue and comment list if conversion fails.
Stop before writing context if either field cannot be retrieved.

The scripts reject an id, a key, or a type that is not valid before any step
(GitHub id: digits only; Jira key: as Jira writes it, e.g. `PROJ-42`; type:
lower-case letters, digits, and `-`).

Non-zero exit → hard-stop. Print stderr verbatim: it has the script's line,
git's own error text, and the state that stays (the current branch, and what
exists only locally). Do not run git to repair the state. It fails on a dirty
working tree (tracked changes) by design — never stash or discard for the developer.

**Local / ad-hoc** — do the same steps manually:

```bash
git status --porcelain            # any output → hard-stop: uncommitted changes
git fetch origin <default> && git checkout <default> && git pull origin <default>
git checkout -b <TYPE>/<ID>/<SLUG> && git push -u origin <TYPE>/<ID>/<SLUG>
```

If the branch already exists locally, switch to it instead of creating it.
Then write `specs/context/<ID>.md` with: identifier, title, type, source,
relevant details (description, acceptance criteria), and today's date. If the
file exists, update it in place — don't overwrite wholesale.

## 5. Report (no bash)

```
Branch: <TYPE>/<ID>/<SLUG>
Task:   <ID> — <TITLE>
Context: specs/context/<ID>.md

Next:
  /plan-requirements   — capture WHAT and WHY
  /plan-architecture   — design the solution
  /implement           — start coding
```

## You Must NOT

- Ask for confirmation on the happy path — ad-hoc's single intake question is the only interactive moment
- Stash, discard, or commit the developer's pre-existing uncommitted changes — hard-stop instead (the GitHub and Jira scripts committing the context file *they just generated* is the one sanctioned exception)
- Commit, push, or change branch in context-only mode — it writes one file and stops
- Push to `main`/`master`, or use `--force` on any push
- Paraphrase errors — print them verbatim so the developer gets the exact actionable message
- Fall back to ad-hoc when a chosen CLI tool is missing — fail clearly
- Trigger automatically — this skill is opt-in

Files in this skill

  • SKILL.md4.3 KB
  • gh-start-task.sh6.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.