setup-work-skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 1
- Forks
- 1
01 前言 Front Matter
- name
- setup-work-skills
- description
- Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
- disable-model-invocation
- true
02 资源文件 7
- 参考文档agents/openai.yaml146 B
- 参考文档domain.md2.0 KB
- 参考文档issue-tracker-github.md10.0 KB
- 参考文档issue-tracker-gitlab.md11.8 KB
- 参考文档issue-tracker-local.md3.1 KB
- 参考文档priority-rubric.md1.4 KB
- 参考文档triage-labels.md5.1 KB
03 SKILL.md 正文
Set Up Work Skills
Scaffold the per-repo configuration that the engineering skills assume:
- Issue tracker: where issues live (GitHub by default; local markdown is also supported out of the box)
- Labels: the Type, Theme, Repository, and Triage label vocabulary, written into the issue tracker config
- Domain docs: where
GLOSSARY.mdand ADRs live, and the consumer rules for reading them
This is a prompt-driven skill, not a deterministic script. Explore, present what you found, confirm with the user, then write.
Process
1. Explore
Look at the current repo to understand its starting state. Read whatever exists; don't assume:
git remote -vand.git/config: is this a GitHub repo? Which one?AGENTS.mdandCLAUDE.mdat the repo root: does either exist? Is there already an## Agent skillssection in either?GLOSSARY.mdandGLOSSARY-MAP.mdat the repo rootdocs/adr/and anysrc/*/docs/adr/directoriesdocs/agents/: does this skill's prior output already exist?.scratch/: a sign that a local-markdown issue tracker convention is already in use- Is the
triageskill installed? (atriageskill folder alongside this one, ortriagein your available skills.) This decides whether Section B runs at all. - Monorepo signals: a
pnpm-workspace.yaml, aworkspacesfield inpackage.json, or a populatedpackages/*with its ownsrc/. These are present only in a genuinely large multi-package repo; their absence means single-context, which is almost every repo.
2. Present findings and ask
Summarise what's present and what's missing. Then take the sections in order. One section, one answer, then the next.
Lead each section with the recommended answer so the user can accept it in a word. Give a one-line explainer only when the choice genuinely branches; skip the section entirely when exploration already settled it (Section B when triage isn't installed, Section C when there's no monorepo).
Section A: Issue tracker.
Explainer: The "issue tracker" is where issues live for this repo. Skills like
to-tickets,triage, andto-specread from and write to it. They need to know whether to callgh issue create, write a markdown file under.scratch/, or follow some other workflow you describe. Pick the place you actually track work for this repo.
Default posture: these skills were designed for GitHub. If a git remote points at GitHub, propose that. If a git remote points at GitLab (gitlab.com or a self-hosted host), propose GitLab. Otherwise (or if the user prefers), offer:
- GitHub: issues live in the repo's GitHub Issues (uses the
ghCLI) - GitLab: issues live in the repo's GitLab Issues (uses the
glabCLI) - Local markdown: issues live as files under
.scratch/<feature>/in this repo (good for solo projects or repos without a remote) - Other (Jira, Linear, etc.): ask the user to describe the workflow in one paragraph; the skill will record it as freeform prose
Record the choice in docs/agents/issue-tracker.md. The GitHub and GitLab templates carry a "PRs as a request surface" flag, defaulted off. Leave it off and don't raise it: a user who wants external PRs in the triage queue can flip the flag in the file later.
For GitHub or GitLab, ask which account will write triage artifacts and replace every <triage-login> or <triage-username> placeholder in the template with its login, including the one in the Lookup command. A GitHub App's login is <app-slug>[bot]. For a person, propose the signed-in login from gh api user --jq .login or the username field of glab api user.
Every template also carries a separate "Triage applies confident closures" flag, defaulted off. With it on, unattended triage closes a confident duplicate, or an already-implemented request as Won't fix, instead of recommending it. Leave it off and don't raise it. A freeform adapter without the flag reads as off.
Section B: Triage label vocabulary. Skip this section entirely if the triage skill isn't installed (exploration told you), since an uninstalled skill needs no labels.
If it is installed, add triage-labels.md as the ## Labels section of docs/agents/issue-tracker.md, without asking about anything but its Repository group list below. That section is the only place the repo defines its Type, Theme, and Repository labels; other skills and docs point to it. triage applies those exact strings, so there is no mapping to configure. Write no separate docs/agents/triage-labels.md, and when one exists, fold it into the section, moving its Repository rows into the list below, and delete it.
The Repository group list belongs to this repository, not to the file. Its table sits between the <!-- repository-group:start --> and <!-- repository-group:end --> markers, after the <!-- label-vocabulary:end --> marker:
- First run. When
docs/agents/issue-tracker.mdhas no## Labelssection, or its Repository group list still holds the<repository-slug>placeholder row after Repository rows are moved into it, replace that row inside therepository-groupmarkers with this repository's slug and a one-line definition, and show both in the step 3 draft. When the list already holds the slug, drop the placeholder row instead. Add or remove rows only between therepository-groupmarkers, and keep the header and separator. The slug is the repository name fromgit remote(skillsforpatinaproject/skills). Use it only when it matches^[A-Za-z0-9][A-Za-z0-9._-]*$, and write it as a literal label, never as part of a command. Whengit remotegives no name or the name does not match, ask for a slug that matches the pattern. - Re-run. When the section exists, replace only the text between the
<!-- label-vocabulary:start -->and<!-- label-vocabulary:end -->markers with the file's, and keep the section's existing Repository group list. When the section holds exactly one<!-- repository-group:start -->line and one<!-- repository-group:end -->line, in that order and after the<!-- label-vocabulary:end -->marker, keep the text between them as the repository wrote it, and keep the lead-in paragraph. When the section has norepository-groupmarkers, has only one of them, repeats one, has them in the wrong order, or has them before thelabel-vocabularyend marker, remove every strayrepository-groupmarker line. Then find the paragraph that starts with Repository group after thelabel-vocabularyend marker, and wrap the first contiguous| Label | Definition |table after that paragraph in therepository-groupstart and end markers. When no such table exists, create the list from the file's, markers included. When the old marked region still holds Repository table rows, or the section has nolabel-vocabularymarkers and holds a Repository table, move those rows inside therepository-groupmarkers before you replace the vocabulary, so no label is lost. Never add a row whose label is already there. A section with nolabel-vocabularymarkers takes the file's text in full, with the moved rows added inside the file'srepository-groupmarkers. Keep the rest of a marked section as the repository wrote it, including the text before thelabel-vocabularystart marker, the Triage table, and everything after that table. When the section has no Triage table, add the file's after therepository-groupend marker, or after thelabel-vocabularyend marker when the section has no list.
In the step 3 draft, show every Repository row moved from an old region, an unmarked section, or a folded docs/agents/triage-labels.md, with its definition. Point out each one whose label is not this repository's slug, so the user can drop rows for repositories this tracker does not hold. Leave out each row whose label does not match the slug pattern, and name it in the draft. Write every moved label and definition as literal text, never as part of a command. Name each Repository group list the re-run repaired or created.
Also add priority-rubric.md as-is, without asking, as the ## Priority rubric section of docs/agents/issue-tracker.md. triage assigns priority from that section. When the section already exists, leave it unchanged.
Section C: Domain docs. Default to single-context (one GLOSSARY.md + docs/adr/ at the repo root). This fits almost every repo; write it without asking.
Offer multi-context (a root GLOSSARY-MAP.md pointing to per-context GLOSSARY.md files) only when exploration found monorepo signals. Then confirm which layout they want.
3. Confirm and edit
Show the user a draft of:
- The
## Agent skillsblock to add to whichever ofCLAUDE.md/AGENTS.mdis being edited (see step 4 for selection rules) - The contents of
docs/agents/issue-tracker.md(with its## Labelsand## Priority rubricsections only whentriageis installed) anddocs/agents/domain.md
On a re-run of a marked section, the draft's ## Labels section keeps its text outside the marked region as the repository wrote it, apart from the repository-group marker and Repository group changes above and a Triage table added where the section had none.
Let them edit before writing.
4. Write
Pick the file to edit:
- If
CLAUDE.mdexists, edit it. - Else if
AGENTS.mdexists, edit it. - If neither exists, ask the user which one to create; don't pick for them.
Never create AGENTS.md when CLAUDE.md already exists (or vice versa); always edit the one that's already there.
If an ## Agent skills block already exists in the chosen file, update its contents in-place rather than appending a duplicate. Don't overwrite user edits to the surrounding sections.
The block:
## Agent skills
### Issue tracker
[one-line summary of where issues are tracked]. See `docs/agents/issue-tracker.md`.
### Triage labels
[one-line summary of the Type, Theme, Repository, and Triage label vocabulary]. See `docs/agents/issue-tracker.md` → **Labels**.
### Domain docs
[one-line summary of layout: "single-context" or "multi-context"]. See `docs/agents/domain.md`.
Include the ### Triage labels sub-block, and the ## Labels section, only when triage is installed and Section B ran. When it isn't, both are omitted.
Then write the docs files using the seed templates in this skill folder as a starting point:
- issue-tracker-github.md: GitHub issue tracker
- issue-tracker-gitlab.md: GitLab issue tracker
- issue-tracker-local.md: local-markdown issue tracker
- triage-labels.md: the
## Labelssection ofdocs/agents/issue-tracker.md(only iftriageis installed) - priority-rubric.md: the
## Priority rubricsection ofdocs/agents/issue-tracker.md(only iftriageis installed) - domain.md: domain doc consumer rules + layout
For "other" issue trackers, write docs/agents/issue-tracker.md from scratch using the user's description.
Every docs/agents/issue-tracker.md defines an ## Attach an artifact section, because triage and to-spec stop without one. For another tracker, ask where artifacts live and record the same location, line order, lookup, and save rules the templates give. When the file already exists without that section, add the one from the matching template.
5. Done
Tell the user the setup is complete and which engineering skills will now read from these files. Mention they can edit docs/agents/*.md directly later; re-running this skill is only necessary if they want to switch issue trackers, restart from scratch, or add a missing ## Priority rubric or ## Attach an artifact section.
04 同仓库更多 Skills
grilling
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
social
When the user wants help creating, scheduling, or optimizing social media content for LinkedIn, Twitter/X, Instagram, TikTok, Facebook, or other platforms, or wants to do social listening and engagement triage. Also use when the user mentions 'LinkedIn post,' 'Twitter thread,' 'social media,' 'content calendar,' 'social scheduling,' 'engagement,' 'viral content,' 'what should I post,' 'repurpose this content,' 'tweet ideas,' 'LinkedIn carousel,' 'social media strategy,' 'grow my following,' 'TikTok video,' 'Reels,' 'Shorts,' 'video script,' 'video hook,' 'short-form video,' 'create a reel,' 'social listening,' 'brand mentions,' 'competitor monitoring,' 'top posts to comment on,' 'find people asking for,' 'carousel,' 'slide-by-slide,' or 'document post.' Use this for social media content creation, repurposing, scheduling, short-form video scripting, and social listening. For broader content strategy, see content-strategy. For paid ads, see ad-creative. For earned media, see public-relations.
code-review
Review the changes since a fixed point (commit, branch, tag, or merge-base) along five axes: Standards (does the code follow this repo's documented coding standards?), Spec (does the code match what the originating issue/spec asked for?), Evidence (does each claim in the pull request have evidence that shows it?), Bugs (does the changed code have logic errors, unhandled states, races, or regressions?), and Security (does the change open injection, auth, secret, input, or CI workflow holes?). Runs the reviews in parallel sub-agents, tags every finding Important, Nit, or Pre-existing, and reports them side by side with what blocks merge. Given an earlier reviewed head and its findings, it reviews only the newer commits, rechecks the earlier findings, and never repeats one. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X".
writing-for-pstack
Write or tighten an operator prompt for a patina-mode run. Use when the operator asks to write, revise, or review a prompt that will be passed to patina-mode.
writing-for-agents
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
wizard
Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.