SKILL.md
SKILL.mdBrowse 3 files
2,675 tokens
10,859 bytes
Token encoding: o200k_base
Snapshot 5b913e7
1---2name: create-paperclip-bundled-skill3description: >4 Turn an idea, tweet, or task into a skill in the Paperclip skills catalog5 (packages/skills-catalog). Use when asked to FIND or MAKE a skill and publish6 it as a bundled/optional catalog skill: research prior art, reference or7 author it, add examples, regenerate the manifest, open a PR.8---9 10# Create a Paperclip Bundled Skill11 12Take source material — a tweet, a task description, a blog post, "make a skill13that does X" — and land it as a skill in the Paperclip skills catalog14(`packages/skills-catalog/`), delivered as a reviewed PR. The catalog is the15shelf every Paperclip company browses and installs from, so the bar is: correct16metadata, useful instructions, worked examples, and a clean validation run.17 18The core rule is **FIND before MAKE**: if a good skill already exists (in the19catalog, in this repo, or published on GitHub), reference or adapt it instead20of writing a duplicate from scratch.21 22## When to use23 24- A human sends a tweet/link/idea and asks for it to become a Paperclip skill.25- A task asks to bundle an existing repo skill into the catalog.26- A task asks to add an external published skill to the catalog.27 28## When not to use29 30- The skill is company-private (belongs in that company's library via the31 Skills UI/API, not the shipped catalog).32- You only need a repo-internal agent skill for working on Paperclip itself —33 that goes in `.agents/skills/` or `skills/`, with no catalog machinery.34 35## Step 0 — Capture the source material36 37Understand exactly what the skill should teach before writing anything.38 39**Tweets / X links.** Use the `xc` CLI (X API client). Paperclip engineering40agent environments ship it preinstalled and pre-authenticated; it is not a41tool you install or mint credentials for yourself. Check availability before42relying on it:43 44```sh45command -v xc && xc whoami # on PATH and authenticated? if not, use the fallback below46```47 48```sh49xc get <post-url-or-id> --json # the post itself (conversation_id, author)50xc search 'conversation_id:<id>' --archive --json # rest of the thread (>7 days old needs --archive)51xc user <username> # author context52xc search '<topic keywords>' -n 30 # related discussion53```54 55If `xc` is not on PATH, is unauthenticated, or the account lacks read access56(the check above fails for any reason), delegate the57fetch to a teammate with X/Twitter access (e.g. the Content Strategist agent)58via a child issue: give them the URL and ask for full text of the post + thread59+ any linked content.60 61**Other sources.** Fetch linked articles/READMEs directly. Record the source62URL — it goes in the skill body or PR description as attribution.63 64Distill: what is the repeatable procedure? What inputs does it take? What does65"done" look like? If the source is just an aspiration ("agents should write66better commit messages"), you are authoring the procedure yourself — say so in67the PR.68 69## Step 1 — FIND: search for an existing skill70 71Search in this order; stop when you have a clear winner.72 731. **Already in the catalog?** Avoid duplicates (duplicate slugs fail the74 build):75 ```sh76 grep -i '<topic>' packages/skills-catalog/generated/catalog.json77 ls packages/skills-catalog/catalog/{bundled,optional}/*/78 ```792. **Already in this repo?** Check `.agents/skills/`, `skills/`, and issue80 history (`gh search issues` / Paperclip board) for prior work on the topic.813. **Published on GitHub?** Skills are conventionally a directory with a82 `SKILL.md`:83 ```sh84 gh search code --filename SKILL.md "<topic>" --limit 2085 gh search repos "<topic> skill" --limit 2086 ```87 Also check known collections (e.g. `anthropics/skills`) and do a web search88 for `<topic> agent skill SKILL.md`.89 90Judge candidates by: does the SKILL.md actually contain the procedure (not a91stub)? Is it maintained? What does it bundle (scripts raise the trust level)?92Is the license compatible with redistribution? Then pick a path:93 94- **Good external skill exists** → add it as an **external reference**95 (Step 2A). It stays attributed to and pinned at the upstream repo.96- **Partial match** → author a local skill (Step 2B) that adapts the idea;97 credit the source with a link in the SKILL.md body.98- **Nothing usable** → author a new local skill (Step 2B).99 100## Step 2 — Choose kind, category, and slug101 102- **kind**: default to `optional`. Use `bundled` only when the skill should103 ship to every Paperclip company by default — that needs explicit human/board104 direction, not your judgment call.105- **category**: reuse an existing directory when one fits (`browser`,106 `content`, `docs`, `finance`, `paperclip-operations`, `product`, `quality`,107 `research`, `software-development`). New categories are allowed but must be108 lowercase kebab-case slugs.109- **slug**: lowercase kebab-case (`^[a-z0-9]+(-[a-z0-9]+)*$`), unique across110 the whole catalog (both kinds).111 112The skill lives at113`packages/skills-catalog/catalog/<kind>/<category>/<slug>/` and its canonical114key is `paperclipai/<kind>/<category>/<slug>`.115 116## Step 2A — External reference path (`catalog-ref.json`)117 118The directory contains **only** `catalog-ref.json` (a directory with both119`catalog-ref.json` and `SKILL.md` fails the build). The manifest builder120fetches the pinned files from GitHub at build time and inventories them.121 122```sh123# Pin the exact commit for the chosen ref (tag or branch)124gh api repos/<owner>/<repo>/commits/<ref> --jq .sha125```126 127```json128{129 "source": {130 "type": "github",131 "hostname": "github.com",132 "owner": "<owner>",133 "repo": "<repo>",134 "ref": "<tag-or-branch>",135 "commit": "<40-char sha from above>",136 "path": "<dir inside the repo containing SKILL.md, or ''>"137 },138 "files": ["SKILL.md", "references/**", "scripts/run.py"],139 "defaultInstall": false,140 "recommendedForRoles": ["researcher"],141 "requires": ["python3"],142 "tags": ["topic", "keywords"]143}144```145 146Rules the builder enforces:147 148- `files` entries are exact relative paths or `dir/**` globs; `SKILL.md` must149 be included and must have frontmatter with `name` and `description`.150- If the upstream frontmatter declares `key`/`slug`, they must match the151 catalog placement — otherwise pick a matching slug or use the local path.152- `commit` must be a full 40-hex SHA; every listed file must be ≤ 1 MiB.153- `recommendedForRoles`, `requires`, `tags` live in the JSON (there is no154 local SKILL.md to carry them).155 156See `catalog/optional/research/last30days/catalog-ref.json` for the live157example, and `examples/external-reference.md` next to this skill.158 159## Step 2B — Author a local catalog skill160 161Layout:162 163```164catalog/<kind>/<category>/<slug>/165├── SKILL.md # required entrypoint166├── examples/ # 1–2 worked examples (Step 3)167├── references/ # optional deep-dive docs168├── scripts/ # optional — raises trust level, avoid unless needed169└── assets/ # optional templates/images170```171 172`SKILL.md` frontmatter (all validated by the builder):173 174```markdown175---176name: <slug>177description: >178 40–300 chars. Routing logic, not marketing: what it does, when to use it,179 when not to.180key: paperclipai/<kind>/<category>/<slug>181recommendedForRoles:182 - engineer # non-empty; used for staffing suggestions183tags:184 - topic # non-empty; used for browse/search185---186```187 188Optional frontmatter: `defaultInstall: true` (only for skills every new189company should get), `requires: [node, python3, ...]` for runtime deps.190 191Body: follow `docs/guides/agent-developer/writing-a-skill.md` — "When to use"192/ "When not to use" sections, concrete commands over prose, supporting detail193in `references/`. If the skill came from a tweet or external source, link it194in the body for attribution.195 196Trust level is derived from files, not declared: any `scripts/` file makes the197skill `scripts_executables` (install becomes audit-gated and you must extend198the `scriptBearing` expectation in `src/shipped-catalog.test.ts`); `assets/`199or non-markdown files make it `assets`; markdown-only skills stay200`markdown_only`. Prefer markdown-only.201 202## Step 3 — Write 1–2 worked examples203 204Create `examples/` inside the skill directory with one or two markdown files,205each a complete input → application → output walkthrough (realistic input, the206skill's steps applied, the finished artifact). These ship with the skill so207installers can judge it before running it, and they keep the trust level at208`markdown_only` because they are `.md` files.209 210Name them by scenario, e.g. `examples/rewrite-release-note.md`.211 212## Step 4 — Regenerate the manifest and update tests213 214Never hand-edit `generated/catalog.json`; it is deterministic build output.215 216```sh217pnpm --filter @paperclipai/skills-catalog build:manifest # regenerates generated/catalog.json218pnpm --filter @paperclipai/skills-catalog validate # must report no errors219```220 221(External references need network access to GitHub during these steps.)222 223Then update `packages/skills-catalog/src/shipped-catalog.test.ts`:224 225- add the new key to `EXPECTED_BUNDLED_KEYS` or `EXPECTED_OPTIONAL_KEYS`226 (alphabetical order);227- if the skill bears scripts, add it to the `scriptBearing` expectation.228 229```sh230pnpm --filter @paperclipai/skills-catalog test231```232 233The test suite also enforces the ≤300-char frontmatter description budget234across the repo and the ≥40-char description / non-empty roles+tags rules for235every catalog skill.236 237## Step 5 — Open the PR238 239Follow the `prepare-paperclip-pr` skill (`.agents/skills/prepare-paperclip-pr/`)240against `paperclipai/paperclip` master. The diff should contain exactly:241 2421. the new skill directory (SKILL.md + examples/ + supporting files, **or**243 catalog-ref.json),2442. the regenerated `generated/catalog.json`,2453. the `shipped-catalog.test.ts` expectation update.246 247In the PR body: link the source material (tweet URL, upstream repo), state248whether this is a new skill / adaptation / external reference, and note the249trust level. Reference PR #10410 (simplified-english) as the shape of a250minimal optional-skill PR.251 252## Gotchas253 254- `generated/catalog.json` staleness is a validation error — always rerun255 `build:manifest` after any file change inside the skill directory (the256 inventory carries per-file sha256 hashes).257- Duplicate `slug` across bundled *and* optional fails the build, not just258 duplicate keys.259- Symlinks inside a skill directory must resolve within it; directory260 symlinks are rejected — copy files in.261- The `bundled` kind and `defaultInstall` are independent axes; don't set262 `defaultInstall: true` casually on optional skills.263- For external references the builder fetches from GitHub on every manifest264 build; a moved/deleted upstream breaks the build, which is why `commit` is265 pinned — prefer upstream tags for `ref`.266 Discovery context
Discovered by repository scan. No exact path reference found in the snapshot’s root AGENTS.md.