← LeaderboardThe Skill Leaderboard

labelchk

Judge which short labels belong on one item, or on each item of a batch, by the vocabulary and limits of the place they sit in: issue and pull request labels, repository topics, package or marketplace keywords, store categories, blog tags, hashtags. Returns the labels to attach, detach and propose, each with a reason and evidence, in the order a searcher needs; read-only, it applies nothing. Use when an issue or pull request needs labels, when a repository's topics or a package's keywords should match what it is now, when choosing a category, tags or hashtags for a release or a post, or when a

Published by LilMGenius ↗LilMGenius/paperthin

Try your first task

A source-grounded starter task has not been verified for this skill yet.

SKILL.md

name: labelchkdescription: "Judge which short labels belong on one item, or on each item of a batch, by the vocabulary and limits of the place they sit in: issue and pull request labels, repository topics, package or marketplace keywords, store categories, blog tags, hashtags. Returns the labels to attach, detach and propose, each with a reason and evidence, in the order a searcher needs; read-only, it applies nothing. Use when an issue or pull request needs labels, when a repository's topics or a package's keywords should match what it is now, when choosing a category, tags or hashtags for a release or a post, or when asked which labels fit."

Judge the labels for an item by the vocabulary of the place they sit in, and stop before applying any.

Goal

A label is a short word that sorts an item and lets someone find it: a label on an issue, a topic on a repository, a keyword on a package, a category in a store, a tag on a post, a hashtag. Every such place works the same way, so labelchk returns one kind of verdict for any of them: the labels to attach, to detach and to propose, each with a one-line reason and its evidence, and their order where order counts. The place's own vocabulary decides, read now from the place; a label nobody in that place uses is a proposal, never an attach, and the skill creates and applies nothing. It carries no fixed label names of its own: the vocabulary is always the place's.

Places differ in one way that changes the judgment. A list place keeps a set of labels that the people working the items sort and filter by (an issue tracker's labels, a store's categories); any other label must be created first. An open place takes any word in its form, and strangers search by it (repository topics, package keywords, tags, hashtags). A list rewards a few precise labels; an open place rewards every word a searcher would type to reach the item, up to its limit.

Workflow

  1. Pin the item and the place. Name the item (an issue, a pull request with its diff, a repository, a package, a post), or the batch of items for one place, and the place the labels go. Read each item whole: its body, its comments, and for a closed item its close reason and last comment, since how it closed can decide whether a resolution label belongs (step 5). An item not yet in the place (a package before its first release) is read from its own source: its readme and manifest. A place with two label fields (an extension's keywords and categories, a store's category and tags) is two places, each field judged and checked on its own. An item or place that cannot be read is reported as a MISS and dropped from the run.
  2. Read the place's profile now: whether it is a list or open, its limits (how many labels, how long, which characters and case), whether it shows labels in order, and any group it requires one label from (a contributing guide, an issue template or a bot that adds a "needs" label says so). Limits come from the place's documentation, and an owner's own stricter limit (at most ten keywords, say) joins the profile cited as the owner's. references/places.md says where known places keep each of these; its dated values are the fallback when a source cannot be opened, cited as the table's. Each field cites where it was read; a field nothing states is unknown, never filled from memory.
  3. Say what the item is before reading any vocabulary, each point with a quote from the item: its kind (a defect, a request, a question, a change), its state and any decision on it (open, closed as not planned, a duplicate), its predominant subject, and each other subject that makes up a real share of it. An issue's kind is what it reports or asks for, never the shape of its fix. A defect reports that something which exists gives its users a result that is wrong, misleading or short of what it promises them, and stays a defect when a platform causes it or the fix adds an option. A request asks for a new capability, or for the same result at less cost (time, size, processor use). A question asks someone, inside the team or outside it, for information or a confirmation the work waits on. A pull request is a change, and the kind label it takes is that of the defect or request its change answers. A decision is state, never kind: an item declined or accepted as debt keeps the kind it had. For a collection (a suite, a library, a list), each member with its own entry is a subject; a word only mentioned in passing is not one.
  4. Read the vocabulary. A list place's vocabulary is its whole list, each label with its description, a default set the place ships included. An open place's vocabulary is the labels in use on the item's nearest neighbors in that place: search the place for the predominant subject step 3 quoted, in readers' words, take the first page of results (about twenty) and keep those that do what the item does, and cite the query and each neighbor, with how many items use each label where the place shows it. A word with two meanings counts only the neighbors that mean the item's. The item itself is never its own neighbor, since its labels are the current ones.
  5. Match the item to the vocabulary. Attach the label whose name, and description where the place gives one, covers a point of step 3. A synonym, abbreviation or variant spelling of an existing label is that label: attach the existing one. A label already on the item stays unless the item now contradicts it (a defect label on what turned out to be a missing feature), and a label that records someone's decision or a workflow state (a priority, a triage state, one a bot sets) is never detached for want of a subject; where the verdict itself resolves one (a triage state once the item is labeled), the report says so and leaves the removal to the human. Leaving a label off costs less than a wrong one, so a weak match is left off and said so.
    • In a list place that sorts issues and pull requests by kind (labels whose descriptions name a defect, a request, a question and the like), attach exactly one kind label to each, the one nearest the kind step 3 wrote, even when the match is inexact, and say how it falls short, since an item with none drops out of every filter by kind. Every other label is still left off when its match is weak.
    • In a list place, a label that records how an item was resolved (a duplicate of a named item, declined, a report that was wrong from the start) is attached only where its close or last comment shows that resolution, and sits beside the kind label, never in its place. Short of a named duplicate, an item closed without the work while the problem it reports is still there was declined, even when what first seemed to cause it is gone. One closed because the problem itself is gone (the code it names was removed, the failure no longer reproduces) takes no resolution label, since nobody declined the work.
    • In a list place, attach the most specific label that covers the point. Where the list shows a family (a shared prefix, a description naming its members), never attach a member together with the family's broader label; where four or more members would apply, attach the broader one instead, since past three the members sort the item no better than the family does (a cataloger's rule of three), and where the family has no broader label, attach each member that applies. Of two labels that mean one thing, attach the one whose description fits, else the one more items in the place carry, counted by searching the place for each label, and report the pair.
    • In an open place, each word a searcher would type to reach the item is its own way in: keep the specific labels and the broader ones that neighbors use. A word no neighbor uses is not an attach; it goes to step 6 only where no word in use covers the point. Of two variants both in use, keep the one more neighbors use, even where the other is current: both are one label, so the kept spelling takes the current one's place. When more labels qualify than the limit allows, the cut keeps first the predominant subject's label whatever its count, then the current labels the item does not contradict, then the new ones; within each group the label fewer neighbors use falls off first, and the report names each label that fell off. This decides which labels stay, and step 7 the order they are given in.
  6. Propose what no label covers. A point with no label in the vocabulary gets a proposed label in the place's form and in words its readers already use, with a one-line description and the nearest existing label and why it falls short. When a list place holds no labels yet, or only its defaults, the first proposals start its list: fewer and broader ones that later items can reuse. Where a group the place requires, other than the kind of step 5, has no fitting label, say so rather than force one. No private data of a person or an organization (a private name, a handle, contact details, a client, an internal codename) becomes a label; a public product, platform or organization the item works with or cites is a subject like any other.
  7. Order the result where the place keeps or shows the order labels were given in. In a list place the predominant subject's label leads, since the first slot is where the place files the item (a primary category), and the rest follow by how much of the item they cover. In an open place the word most searchers of this item type first leads, measured rather than guessed: by how many neighbors use the label, the place-wide count or the place's own search suggestions breaking a tie; related labels sit together, and the groups follow by the same measure. Where the place shows no order, give none.
  8. Check the fit. For each item, write the verdict as JSON in a scratch folder outside the item's repository (the system's temporary folder), in the format the header of scripts/fit.mjs gives, with the whole vocabulary of step 4 under place.vocabulary, and run node <this skill's folder>/scripts/fit.mjs <verdict.json>. Exit 0 means the verdict sits inside every limit the profile states; exit 1 lists each finding (a label outside the vocabulary, a proposal the vocabulary already holds, a broken limit, two labels that differ only in case or separators, an order that drops or adds a label, an excluded term, a missing reason or evidence), fixed in the verdict and checked again; exit 2 means it could not read the verdict. Fields the profile left unknown are listed as unchecked.
  9. Report and stop. Per item: attach, detach and propose, each with its reason and evidence, and the order where the place has one; each item or place step 1 could not read is listed as a MISS. Name where the vocabulary and limits were read, and an unknown field only where its value could change the verdict; the check's result takes one line. A batch adds, once, what it found about the vocabulary itself: two labels that mean one thing, a label no item supports, a description that misleads. End by naming the place's command for applying a pick and stating that nothing was applied, created or deleted.

Rules

  • Read-only and advisory. Never apply, create, rename or delete a label, topic, keyword or tag; the human picks and applies.
  • The vocabulary is the place's, read during the run. A label from memory, from another place or from this skill's examples is a proposal at most.
  • Every label in the verdict carries a reason tied to the item and evidence a reader can open: a quote from the item with where it sits, the vocabulary entry, the neighbor it was read from.
  • A limit comes from the place's own source or the owner's stated one; one nothing states stays unknown, never guessed.
  • Precision over coverage in a list place: a missing label is cheaper to add than a wrong one is to notice and remove. The kind label of step 5 is the one exception.
  • No private data becomes a label. The exclude list holds the private names the human gives or the item's owner already marks as private; searching a repository for more is a separate de-identification pass (deid), not this skill's.
  • Each item in a batch is judged alone; a batch finding about the vocabulary is a proposal to the human, never a relabel of other items.

Verification

Before finishing, confirm:

  1. Every profile field the verdict rests on names its source or reads unknown, the place is named list or open, and an open place's vocabulary names the query and neighbors read, the item itself not among them.
  2. The item's kind, state and subjects were written, each with its quote, before the vocabulary was read.
  3. Every attach is in the vocabulary, every proposal is absent from it, every label has a reason and evidence, no decision or workflow label was detached for want of a subject, and no current label the item does not contradict fell off while a new one stayed.
  4. In a list place, a resolution label stands only where the item's close or last comment shows that resolution, and where the place sorts by kind, each issue or pull request carries exactly one kind label.
  5. The order, where the place has one, leads with the predominant subject's label in a list place and with the word measured as most searched among the item's subjects in an open place; a place without order gets none.
  6. fit.mjs exited 0 on each final verdict, or each finding left is reported with why it stands.
  7. Nothing was applied, created or deleted, and the report ends saying so.