agentleFS
kbuleonkbuleon/agent-memory-powers/.agents/skills/create-work-item/SKILL.md

create-work-item

Skill1 starsChanged 33 days agoMITView on GitHub

Use when the user asks to create a new work item or ticket for this project, or invokes /create-work-item <title>. Allocates the next ticket number, writes docs/10-work-items/<PREFIX>-<nnnn>-<slug>.md with its front matter, and updates the folder index.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. atomicinnovation/accelerator★ 34same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the command fails — missing file, invalid JSON, empty prefix — stop and tell the user.

    line 22
  2. Very specific:

    Keep the printed value as <slug>.

    line 69
  3. Very specific:

    If slug is empty — a title such as "???", "— :" or only spaces — stop and ask for another title.

    line 74
  4. Very specific:

    If docs/10-work-items/<PREFIX>-<nnnn>-<slug>.md already exists, stop and say so.

    line 79
  5. Distinctive:

    Never overwrite a work item.

    line 80

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Create a work item

Creates one numbered work item in docs/10-work-items/. Renumbers nothing, rewrites no existing ticket, touches no status. Creating is this skill's only verb.

The title is the command's argument. If it is missing, ask for it before anything else.

1. Read the prefix

Shell state does not survive from one command to the next: each block below therefore sets its own variable instead of relying on an inheritance that does not exist.

prefix=$(node -e "const s=JSON.parse(require('fs').readFileSync('docs/work-items-settings.json','utf8')); if(!s.prefix) throw new Error('empty prefix'); process.stdout.write(s.prefix)")
test -n "$prefix" || { echo "unreadable settings or empty prefix — aborting"; exit 1; }

If the command fails — missing file, invalid JSON, empty prefix — stop and tell the user. Never fall back to a default value: a misnamed ticket would go unnoticed.

2. Compute the next number

Set prefix again (block 1) before using it: this is a new block, with no inherited state.

prefix=$(node -e "const s=JSON.parse(require('fs').readFileSync('docs/work-items-settings.json','utf8')); if(!s.prefix) throw new Error('empty prefix'); process.stdout.write(s.prefix)")
test -n "$prefix" || { echo "unreadable settings or empty prefix — aborting"; exit 1; }

last=$(ls docs/10-work-items/ | sed -nE "s/^${prefix}-0*([0-9]+)-.*/\1/p" | sort -n | tail -1)

if [ -z "$last" ]; then
  if ls docs/10-work-items/ | grep -q "^${prefix}-"; then
    echo "empty scan although ${prefix}-* tickets exist — anomaly, aborting"; exit 1
  fi
  number=1
else
  number=$((last + 1))
fi
printf '%04d' "$number"

The pattern reads ([0-9]+) and never ([0-9]{4}): a fixed-width read would stop seeing tickets written with another width — such as older three-digit ones — and start again from 1, overwriting them.

A scan that returns nothing while docs/10-work-items/ already contains <prefix>-* files is an anomaly, not an empty repository — in that case, stop. Falling back to 1 only applies to a folder that truly has no ticket with this prefix. Otherwise, the highest number found plus one.

The block prints the number on four digits: keep it as <nnnn>.

3. Reduce the title to a slug

title is the argument received by the command (see above). Set it with a quoted heredoc, in the same block as the slug, never by pasting the title between quotes: the quoted 'TITLE' delimiter keeps ', ", $ and backticks literal, whatever the title contains.

title=$(cat <<'TITLE'
<the title, exactly as typed>
TITLE
)
slug=$(node -e "process.stdout.write(process.argv[1].normalize('NFD').replace(/[\u0300-\u036f]/g,'').toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-+|-+$/g,''))" "$title")
test -n "$slug" || { echo "title cannot be reduced to a slug — ask for another title — aborting"; exit 1; }
echo "$slug"

Keep the printed value as <slug>.

Accents stripped, lowercase, everything else turned into dashes, repeated dashes collapsed, edge dashes trimmed. The diacritics range is written with the \u0300-\u036f escapes, never as raw characters: raw bytes would silently survive an editor normalization or a non-UTF-8 pipeline.

If slug is empty — a title such as "???", "— :" or only spaces — stop and ask for another title. An empty slug would produce a <PREFIX>-<nnnn>-.md file.

4. Refuse to overwrite

If docs/10-work-items/<PREFIX>-<nnnn>-<slug>.md already exists, stop and say so. Never overwrite a work item.

5. Write the file

The file contains the front matter and nothing else — no # heading, no document outline. The body belongs to the author, and a template that has to be erased is worse than nothing.

---
id: <PREFIX>-<nnnn>
title: "The title as typed, unchanged"
status: new
superpowers-class: 
tags: []
---

title is always in straight double quotes: a title containing ": " breaks YAML parsing if it is not. Inside the quotes, escape each \ as \\ and each " as \", as the Jira import does. Apart from that escaping, the title is kept exactly as typed, without rewording.

status: new always. The possible values are draft, new, deferred, in-progress, review, done, canceled — but creation sets only one.

superpowers-class: possible values are spike, bounded, architectural. Left empty at creation.

6. Update the index

In docs/10-work-items/README.md, add an entry after the neighboring entries: the file name in backticks, an em dash, then the title — the body is still empty at this point. For example:

- `AMP-0001-fix-login-timeout-on-slow-networks.md` — Fix login timeout on slow networks

7. Announce

State the path created, and nothing more.

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.