跳到正文
FunCoding

搜索

搜索文档、Skill 和 MCP

writing-workflow-skills

Use when adding a new workflow skill to pi-thinkrail-workflow, changing an existing workflow skill's role, trigger, handoff, or structure, or checking a workflow skill against the workflow system's rules. Not for authoring general-purpose skills outside this package.

文档与办公513packages/pi-thinkrail-workflow/skills/writing-workflow-skills/SKILL.md

安装

把这段话发给 Claude Code、Codex 或 Cursor。智能体会先检查安全性,你确认后才安装。

读取 https://funcoding.ai/skills/jetbrains/thinkrail/writing-workflow-skills/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

Writing Workflow Skills

The authoring checklist for workflow skills in packages/pi-thinkrail-workflow. It carries the what to do; every why — the concept model, the three roles, the meta-rules cited as "(rule N)" below — lives once in the workflow-system spec beside this directory, skills/SPEC.md. Read that spec first; where this checklist and that spec disagree, the spec wins.

Workspace guard. This checklist edits packages/pi-thinkrail-workflow in the thinkrail repo. If that package is not in the current workspace (a ThinkRail-managed project, where these skills are a read-only staged cache), the family cannot be extended from here: say so in one line and stop — the terminal state for foreign workspaces.

Design (before writing)

  • Read skills/SPEC.md: concept model, the three roles, meta-rules 1–15.
  • Scope the skill to one externally reachable workflow — or, for a concept, one topic (rule 1). Internal forks, branches, stages, and shared tails are sibling docs, planned with the choice rules in the doc (or spine) before the fork; a doc is promoted to its own skill when it needs independent addressability (an external caller, a genuine self-trigger, or a direct entry point such as a /skill: command seed) — never for shape or size alone.
  • Pick the role (rule 2): router (classification rules + handoffs, nothing else), worker (one phase's steps), or concept (one topic's reusable rules/mental model — no steps, no handoffs).
  • For a concept: confirm a second skill needs it (rule 3) — reference detail with a single consumer stays a sibling file, not a concept skill.
  • Pick the ending (rule 6): a router ends by naming what runs next; a worker ends with a fixed successor, back to its caller, or a declared terminal state — an internally forking worker ends by naming the sibling doc that continues the flow, with the terminal state declared in the doc where the flow ends; a concept has no ending at all — it writes no ending section, control simply returns to its reader. Know the exact wording before writing the body.
  • If the change reshapes the system itself — a new role, a new meta-rule, a changed entry model or topology — stop: update skills/SPEC.md first, then come back here (rule 13).

Write

  • Name the skill verb-first, active voice, kebab-case (rule 15): a gerund for process skills, the topic for a concept — name the work or the insight, never the artifact or a role. Directory name = frontmatter name.
  • Create skills/<name>/SKILL.md with frontmatter name + description. Nothing else changes — package.json's pi.skills already points at ./skills.
  • description = triggering conditions only, "Use when …" (plus a "Not for …" negative trigger if the boundary is confusable) — never a summary of the steps (rule 5). Skills are reached by routing; a self-trigger description is for unmistakable triggers only (rule 4).
  • Keep every file under ~150 lines (rule 3) — the SKILL.md spine and each sibling doc. Internal workflow nodes (branches, stages, shared tails) and heavy reference material live in sibling docs inside skills/<name>/, named in the exact step that hands to them; the spine carries the doc map, and each internal-node doc opens with a one-line contract (entry state, what it saves, where control goes next).
  • Say each thing once (rule 7): cross-reference other skills by name; never inline another skill's steps, never force-load its files.
  • Put gates where discipline matters, matching the form to the failure (rule 11): prohibitions + red flags for discipline violations, positive recipes for output shape.
  • Durable output goes to the spec graph (rule 8). If the workflow needs ephemeral working files — resume state, scratch plans — declare them (rule 9): name their shape in the skill and put them in the workspace's gitignored .thinkrail/context/ (the home for every temp doc), consume/delete them when the work lands, and promote anything durable to specs before cleanup.
  • End the body by naming the ending chosen in Design (rule 6) — a concept skips this: no ending section.

Register (rule 12)

  • Add one routing line in the router that owns the new skill: the root router (skills/choosing-a-workflow/SKILL.md) by default, or the nearest sub-router when the skill is a branch under an already-routed workflow (fractal routing). Exception (rule 4): a skill outside any router's work classification — self-trigger-only skills and concept skills — skips the router line; that's a designed property of the skill, never a size call, and it is instead named in skills/SPEC.md's family table as outside the routing table.
  • Add or update the skill's row in skills/SPEC.md's Workflow family table, including its Routed from entry (which router routes to it — or that it sits outside the routing table).
  • Nothing else should have changed shape — if it did, revisit rule 13 in Design.

Verify by use (rule 14 — currently suspended)

  • Rule 14 is a known limitation today, not a done-gate (see skills/SPEC.md). When practical, still run a real request through the new or changed skill and watch it flow: the router (or the description) triggers it, the body is followed, the ending fires as designed. For a concept: a referencing skill (or its self-trigger) loads it and its rules are applied.
  • Either way, keep the family-table row honest: unverified by use until a run has been observed; update the row when one has.

Red flags — stop and fix

  • The description mentions any step of the workflow.
  • The name is noun-first or names an artifact/role instead of the work (rule 15).
  • The body of a router or worker ends without naming a successor or terminal state.
  • A concept skill contains steps, routing, a handoff, or an ending section.
  • The same rules are copied into two skills instead of extracted into a concept (rule 7).
  • A step restates another skill's (or skills/SPEC.md's) content instead of pointing at it.
  • An internal node that nothing outside the skill reaches was made its own skill (or given frontmatter) — internal nodes are sibling docs, not skills (rule 1).
  • "Too small to need a router line / family-table row." Every skill registers (rule 12); skipping the router line is only for self-trigger-only skills and concept skills per rule 4 — size is never the reason.
  • Calling a skill verified without a real request observed flowing through it — rule 14 is suspended as a done-gate, but an unobserved skill is still unverified by use, never "verified".

Done (terminal state)

This checklist ends here — no successor skill. Done means: skills/<name>/SKILL.md exists and passes the checks above, and the router line and family-table row are in place — the row honestly marked unverified by use until a real request has been observed flowing through the skill (rule 14, currently suspended as a done-gate).

相似的 Skill

pdf
anthropics/skills180k

pdf

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.

文档与办公

discernment-nudge
anthropics/skills180k

discernment-nudge

After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format.

文档与办公

doc-coauthoring
anthropics/skills180k

doc-coauthoring

Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.

文档与办公

docx
anthropics/skills180k

docx

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

文档与办公

pptx
anthropics/skills180k

pptx

Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.

文档与办公

canvas-design
anthropics/skills180k

canvas-design

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

文档与办公