[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69BXMREYNEVHE276GFTMFBZ":3,"skill-same:01M69BXMREYNEVHE276GFTMFBZ":64},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":36,"linkOnly":37,"markdownContent":38,"markdownBody":39,"frontMatter":40,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":17,"ownerHtmlUrl":46,"ownerBlogUrl":47,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M69BXMREYNEVHE276GFTMFBZ","paperclip-dev","Paperclip 本地实例开发运维","Develop and operate a local Paperclip instance — start and stop servers, pull updates from master, run builds and tests, manage worktrees, back up databases, and diagnose problems. Use whenever you need to work on the Paperclip codebase itself or keep a running instance healthy.","开发并运维本地 Paperclip 实例——启动和停止服务器、从 master 拉取更新、运行构建和测试、管理工作树、备份数据库以及诊断问题。当你需要在 Paperclip 代码库本身上工作，或需要保持运行中的实例健康时使用。","microsoft\u002Famplifier-app-paperclip","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69BVQW2AS8MMMYW9A4DSSHW",1,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-app-paperclip\u002Fblob\u002Fmain\u002Fskills\u002Fpaperclip-dev\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSTR9G4A4GZ0VB2DFN9490","开发环境与工具链管理","SCENARIO","使用场景",[31,32,33,34,35],"dev","paperclip","paperclip dev","diagnose","run","2026-11-10 10:12:30",false,"---\nname: paperclip-dev\nrequired: false\ndescription: >\n  Develop and operate a local Paperclip instance — start and stop servers,\n  pull updates from master, run builds and tests, manage worktrees, back up\n  databases, and diagnose problems. Use whenever you need to work on the\n  Paperclip codebase itself or keep a running instance healthy.\n---\n\n# Paperclip Dev\n\nThis skill covers the day-to-day workflows for developing and operating a local Paperclip instance. It assumes you are working inside the Paperclip repo checkout with `origin` pointing to `git@github.com:paperclipai\u002Fpaperclip.git`.\n\n> **OPEN SOURCE HYGIENE:** This repository is public-facing. Treat anything you push to `origin` as publishable. Never commit or push secrets, API keys, tokens, private logs, PII, customer data, or machine-local configuration that should stay private. Keep git history tidy as well: avoid pushing throwaway branches, noisy checkpoint commits, or speculative work that does not need to be shared upstream.\n\n> **MANDATORY:** Before running any CLI command, building, testing, or managing worktrees, you MUST read `doc\u002FDEVELOPING.md` in the Paperclip repo. It is the canonical reference for all `paperclipai` CLI commands, their options, build\u002Ftest workflows, database operations, worktree management, and diagnostics. Do NOT guess at flags or options — read the doc first.\n\n## Quick Command Reference\n\nThese are the most common commands. For full option tables and details, see `doc\u002FDEVELOPING.md`.\n\n| Task | Command |\n|------|---------|\n| Start server (first time or normal) | `npx paperclipai run` |\n| Dev mode with hot reload | `pnpm dev` |\n| Stop dev server | `pnpm dev:stop` |\n| Build | `pnpm build` |\n| Type-check | `pnpm typecheck` |\n| Run tests | `pnpm test` |\n| Run migrations | `pnpm db:migrate` |\n| Regenerate Drizzle client | `pnpm db:generate` |\n| Back up database | `npx paperclipai db:backup` |\n| Health check | `npx paperclipai doctor --repair` |\n| Print env vars | `npx paperclipai env` |\n| Trigger agent heartbeat | `npx paperclipai heartbeat run --agent-id \u003Cid>` |\n| Install agent skills locally | `npx paperclipai agent local-cli \u003Cagent> --company-id \u003Cid>` |\n\n## Pulling from Master\n\n```bash\ngit fetch origin && git pull origin master\npnpm install && pnpm build\n```\n\nIf schema changes landed, also run `pnpm db:generate && pnpm db:migrate`.\n\n## Worktrees\n\nPaperclip worktrees combine git worktrees with isolated Paperclip instances — each gets its own database, server port, and environment seeded from the primary instance.\n\n> **MANDATORY:** Before creating or managing worktrees, you MUST read the \"Worktree-local Instances\" and \"Worktree CLI Reference\" sections in `doc\u002FDEVELOPING.md`. That is the canonical reference for all worktree commands, their options, seed modes, and environment variables.\n\n### When to Use Worktrees\n\n- Starting a feature branch that needs its own Paperclip environment\n- Running parallel agent work without cross-contaminating the primary instance\n- Testing Paperclip changes in isolation before merging\n\n### Command Overview\n\nThe CLI has two tiers (see `doc\u002FDEVELOPING.md` for full option tables):\n\n| Command | Purpose |\n|---------|---------|\n| `worktree:make \u003Cname>` | Create worktree + isolated instance in one step |\n| `worktree:list` | List worktrees and their Paperclip status |\n| `worktree:merge-history` | Preview\u002Fimport issue history between worktrees |\n| `worktree:cleanup \u003Cname>` | Remove worktree, branch, and instance data |\n| `worktree init` | Bootstrap instance inside existing worktree |\n| `worktree env` | Print shell exports for worktree instance |\n| `worktree reseed` | Refresh worktree DB from another instance |\n| `worktree repair` | Fix broken\u002Fmissing worktree instance metadata |\n\n### Typical Workflow\n\n```bash\n# 1. Create a worktree for a feature\nnpx paperclipai worktree:make my-feature --start-point origin\u002Fmain\n\n# 2. Move into the worktree (path printed by worktree:make) and source the environment\ncd \u003Cworktree-path>\neval \"$(npx paperclipai worktree env)\"\n\n# 3. Start the isolated Paperclip server\nnpx paperclipai run\n\n# 4. Do your work\n\n# 5. When done, merge history back if needed\nnpx paperclipai worktree:merge-history --from paperclip-my-feature --to current --apply\n\n# 6. Clean up\nnpx paperclipai worktree:cleanup my-feature\n```\n\n## Forks — Prefer Pushing to a User Fork\n\nIf the user has a personal fork of `paperclipai\u002Fpaperclip` configured as a git remote, push your feature branches to **that fork** instead of creating branches on the main repo. This keeps the upstream branch list clean and matches the standard open-source contribution flow.\n\n### Detect a fork remote\n\nBefore pushing or creating a PR, list remotes and check for one that points at a non-`paperclipai` GitHub fork:\n\n```bash\ngit remote -v\n```\n\nTreat any remote whose URL points to `github.com:\u003Cuser>\u002Fpaperclip` (or `github.com\u002F\u003Cuser>\u002Fpaperclip.git`) as the user's fork. Common names are `fork`, `\u003Cusername>`, or `myfork`. The remote named `origin` or `upstream` that points at `paperclipai\u002Fpaperclip` is the canonical upstream — do not push feature branches there if a fork exists.\n\n### Pushing to the fork\n\n```bash\n# Push the current branch to the user's fork and set upstream\ngit push -u \u003Cfork-remote> HEAD\n```\n\nThen create the PR from the fork branch:\n\n```bash\ngh pr create --repo paperclipai\u002Fpaperclip --head \u003Cfork-owner>:\u003Cbranch-name> ...\n```\n\n`gh pr create` usually figures out the head ref automatically when run from a branch tracking the fork; the explicit `--head \u003Cowner>:\u003Cbranch>` form is the reliable fallback when it does not.\n\n### When no fork exists\n\nIf `git remote -v` shows only `paperclipai\u002Fpaperclip` remotes (no user fork), fall back to pushing branches to `origin` as before. Do NOT create a fork on the user's behalf — ask first.\n\n### Keeping the fork up to date\n\nThe canonical remote that points at `paperclipai\u002Fpaperclip` may be named `origin` **or** `upstream` depending on how the user set up the repo. Detect it the same way as in the \"Detect a fork remote\" step, then fetch and push from\u002Fwith that remote so the sync works under either convention:\n\n```bash\nUPSTREAM_REMOTE=$(git remote -v | awk '\u002Fpaperclipai\\\u002Fpaperclip.*\\(fetch\\)\u002F{print $1; exit}')\ngit fetch \"$UPSTREAM_REMOTE\"\ngit push \u003Cfork-remote> \"${UPSTREAM_REMOTE}\u002Fmaster:master\"\n```\n\n## Pull Requests\n\n> **MANDATORY PRE-FLIGHT:** Before creating ANY pull request, you MUST read the canonical source files listed below. Do NOT run `gh pr create` until you have read these files and verified your PR body matches every required section.\n\n### Step 1 — Read the canonical files\n\nYou MUST read all three of these files before creating a PR:\n\n1. **`.github\u002FPULL_REQUEST_TEMPLATE.md`** — the required PR body structure\n2. **`CONTRIBUTING.md`** — contribution conventions, PR requirements, and thinking-path examples\n3. **`.github\u002Fworkflows\u002Fpr.yml`** — CI checks that gate merge\n\n### Step 2 — Validate your PR body against this checklist\n\nAfter reading the template, verify your `--body` includes every one of these sections (names must match exactly):\n\n- [ ] `## Thinking Path` — blockquote style, 5-8 reasoning steps\n- [ ] `## What Changed` — bullet list of concrete changes\n- [ ] `## Verification` — how a reviewer confirms this works\n- [ ] `## Risks` — what could go wrong\n- [ ] `## Model Used` — provider, model ID, version, capabilities\n- [ ] `## Checklist` — copied from the template, items checked off\n\nIf any section is missing or empty, do NOT submit the PR. Go back and fill it in.\n\n### Step 3 — Create the PR\n\nOnly after completing Steps 1 and 2, run `gh pr create`. Use the template contents as the structure for `--body` — do not write a freeform summary.\n\n## Hard Rules — Do NOT Bypass\n\nThese rules exist because agents have caused real damage by improvising around CLI failures. Follow them exactly.\n\n1. **CLI is the only interface to worktrees and databases.** All worktree and database operations MUST go through `npx paperclipai` \u002F `pnpm paperclipai` commands. You MUST NOT:\n   - Run `pg_dump`, `pg_restore`, `psql`, `createdb`, `dropdb`, or any raw postgres commands\n   - Manually set `DATABASE_URL` to point a worktree server at another instance's database\n   - Run `rm -rf` on any `.paperclip\u002F`, `.paperclip-worktrees\u002F`, or `db\u002F` directory\n   - Directly manipulate embedded postgres data directories\n   - Kill postgres processes by PID\n\n2. **If a CLI command fails, stop and report.** Do NOT attempt workarounds. If `worktree:make`, `worktree reseed`, `worktree init`, `worktree:cleanup`, or any other `paperclipai` command fails:\n   - Report the exact error message in your task comment\n   - Set the task to `blocked`\n   - Suggest running `npx paperclipai doctor --repair` or recreating the worktree from scratch\n   - Do NOT try to manually replicate what the CLI does\n\n3. **Never share databases between instances.** Each worktree instance gets its own isolated database. Never override `DATABASE_URL` to point one instance at another's database. This destroys isolation and can corrupt production data.\n\n4. **Starting a dev server in a worktree requires setup first.** The correct sequence is:\n   ```bash\n   # If the worktree already exists but has no running instance:\n   cd \u003Cworktree-path>\n   eval \"$(npx paperclipai worktree env)\"\n   pnpm install && pnpm build\n   npx paperclipai run          # or pnpm dev\n\n   # If the worktree needs a fresh database:\n   npx paperclipai worktree reseed --seed-mode full\n\n   # If the worktree is broken beyond repair:\n   npx paperclipai worktree:cleanup \u003Cname>\n   npx paperclipai worktree:make \u003Cname> --seed-mode full\n   ```\n   If any step fails, follow rule 2 — stop and report.\n\n5. **Seeding is a CLI operation.** When asked to seed a worktree database from the main instance, use `worktree reseed` or recreate with `worktree:make --seed-mode full`. Read `doc\u002FDEVELOPING.md` for the full option tables. Never attempt manual database copying.\n\n## Persistent Dev Servers (for Manual Testing)\n\nWhen an agent needs to start a dev server that outlives the current heartbeat — for example, so a human or QA agent can manually test against it — the server process **must** be launched in a detached session. A process started directly from a heartbeat shell is killed when the heartbeat exits.\n\n### Use `tmux` for persistent servers\n\n```bash\n# 1. cd into the worktree (or main repo) and source the environment\ncd \u003Cworktree-path>\neval \"$(npx paperclipai worktree env)\"   # skip if using the primary instance\n\n# 2. Start the dev server in a named, detached tmux session\ntmux new-session -d -s \u003Csession-name> 'pnpm dev'\n\n# Example with a descriptive name:\ntmux new-session -d -s auth-fix-3102 'pnpm dev'\n```\n\n### Managing the session\n\n| Task | Command |\n|------|---------|\n| Check if the session is alive | `tmux has-session -t \u003Csession-name> 2>\u002Fdev\u002Fnull && echo running` |\n| View server output | `tmux capture-pane -t \u003Csession-name> -p` |\n| Kill the session | `tmux kill-session -t \u003Csession-name>` |\n| List all tmux sessions | `tmux list-sessions` |\n\n### Verifying the server is reachable\n\nAfter launching, confirm the port is listening before reporting success:\n\n```bash\n# Wait briefly for startup, then verify\nsleep 3\ncurl -sf http:\u002F\u002F127.0.0.1:\u003Cport>\u002Fapi\u002Fhealth && echo \"Server is up\"\nlsof -nP -iTCP:\u003Cport> -sTCP:LISTEN\n```\n\n### Key rules\n\n1. **Always use `tmux` (or equivalent)** when a dev server needs to stay running after the heartbeat ends. A server started directly from the agent shell will die when the heartbeat exits, even if it appeared healthy moments before.\n2. **Name the session descriptively** — include the worktree name and port (e.g., `auth-fix-3102`).\n3. **Verify the server is listening** before reporting the URL to anyone.\n4. **Do not use `nohup` or `&` alone** — these are unreliable for agent shells that may have their entire process group killed.\n5. **Clean up when done** — kill the tmux session when the testing is complete.\n\n## Common Mistakes\n\n| Mistake | Fix |\n|---------|-----|\n| Server won't start | Run `npx paperclipai doctor --repair` to diagnose and auto-fix |\n| Forgetting to source worktree env | Run `eval \"$(npx paperclipai worktree env)\"` after cd-ing into the worktree |\n| Stale dependencies after pull | Run `pnpm install && pnpm build` after pulling |\n| Schema out of date after pull | Run `pnpm db:generate && pnpm db:migrate` |\n| Reseeding while target DB is running | Stop the target server first, or use `--allow-live-target` |\n| Cleaning up with unmerged commits | Merge or push first, or use `--force` if intentionally discarding |\n| Running agents against wrong instance | Verify `PAPERCLIP_API_URL` points to the correct port |\n| CLI command fails | Do NOT work around it — report the error and block (see Hard Rules above) |\n| Agent tries manual postgres operations | NEVER do this — all DB ops go through the CLI (see Hard Rules above) |\n| Dev server dies between heartbeats | Launch in a detached `tmux` session — see \"Persistent Dev Servers\" above |\n| Pushed feature branch to `paperclipai\u002Fpaperclip` when a fork exists | Push to the user's fork remote instead — see \"Forks\" above |\n","# Paperclip Dev\n\nThis skill covers the day-to-day workflows for developing and operating a local Paperclip instance. It assumes you are working inside the Paperclip repo checkout with `origin` pointing to `git@github.com:paperclipai\u002Fpaperclip.git`.\n\n> **OPEN SOURCE HYGIENE:** This repository is public-facing. Treat anything you push to `origin` as publishable. Never commit or push secrets, API keys, tokens, private logs, PII, customer data, or machine-local configuration that should stay private. Keep git history tidy as well: avoid pushing throwaway branches, noisy checkpoint commits, or speculative work that does not need to be shared upstream.\n\n> **MANDATORY:** Before running any CLI command, building, testing, or managing worktrees, you MUST read `doc\u002FDEVELOPING.md` in the Paperclip repo. It is the canonical reference for all `paperclipai` CLI commands, their options, build\u002Ftest workflows, database operations, worktree management, and diagnostics. Do NOT guess at flags or options — read the doc first.\n\n## Quick Command Reference\n\nThese are the most common commands. For full option tables and details, see `doc\u002FDEVELOPING.md`.\n\n| Task | Command |\n|------|---------|\n| Start server (first time or normal) | `npx paperclipai run` |\n| Dev mode with hot reload | `pnpm dev` |\n| Stop dev server | `pnpm dev:stop` |\n| Build | `pnpm build` |\n| Type-check | `pnpm typecheck` |\n| Run tests | `pnpm test` |\n| Run migrations | `pnpm db:migrate` |\n| Regenerate Drizzle client | `pnpm db:generate` |\n| Back up database | `npx paperclipai db:backup` |\n| Health check | `npx paperclipai doctor --repair` |\n| Print env vars | `npx paperclipai env` |\n| Trigger agent heartbeat | `npx paperclipai heartbeat run --agent-id \u003Cid>` |\n| Install agent skills locally | `npx paperclipai agent local-cli \u003Cagent> --company-id \u003Cid>` |\n\n## Pulling from Master\n\n```bash\ngit fetch origin && git pull origin master\npnpm install && pnpm build\n```\n\nIf schema changes landed, also run `pnpm db:generate && pnpm db:migrate`.\n\n## Worktrees\n\nPaperclip worktrees combine git worktrees with isolated Paperclip instances — each gets its own database, server port, and environment seeded from the primary instance.\n\n> **MANDATORY:** Before creating or managing worktrees, you MUST read the \"Worktree-local Instances\" and \"Worktree CLI Reference\" sections in `doc\u002FDEVELOPING.md`. That is the canonical reference for all worktree commands, their options, seed modes, and environment variables.\n\n### When to Use Worktrees\n\n- Starting a feature branch that needs its own Paperclip environment\n- Running parallel agent work without cross-contaminating the primary instance\n- Testing Paperclip changes in isolation before merging\n\n### Command Overview\n\nThe CLI has two tiers (see `doc\u002FDEVELOPING.md` for full option tables):\n\n| Command | Purpose |\n|---------|---------|\n| `worktree:make \u003Cname>` | Create worktree + isolated instance in one step |\n| `worktree:list` | List worktrees and their Paperclip status |\n| `worktree:merge-history` | Preview\u002Fimport issue history between worktrees |\n| `worktree:cleanup \u003Cname>` | Remove worktree, branch, and instance data |\n| `worktree init` | Bootstrap instance inside existing worktree |\n| `worktree env` | Print shell exports for worktree instance |\n| `worktree reseed` | Refresh worktree DB from another instance |\n| `worktree repair` | Fix broken\u002Fmissing worktree instance metadata |\n\n### Typical Workflow\n\n```bash\n# 1. Create a worktree for a feature\nnpx paperclipai worktree:make my-feature --start-point origin\u002Fmain\n\n# 2. Move into the worktree (path printed by worktree:make) and source the environment\ncd \u003Cworktree-path>\neval \"$(npx paperclipai worktree env)\"\n\n# 3. Start the isolated Paperclip server\nnpx paperclipai run\n\n# 4. Do your work\n\n# 5. When done, merge history back if needed\nnpx paperclipai worktree:merge-history --from paperclip-my-feature --to current --apply\n\n# 6. Clean up\nnpx paperclipai worktree:cleanup my-feature\n```\n\n## Forks — Prefer Pushing to a User Fork\n\nIf the user has a personal fork of `paperclipai\u002Fpaperclip` configured as a git remote, push your feature branches to **that fork** instead of creating branches on the main repo. This keeps the upstream branch list clean and matches the standard open-source contribution flow.\n\n### Detect a fork remote\n\nBefore pushing or creating a PR, list remotes and check for one that points at a non-`paperclipai` GitHub fork:\n\n```bash\ngit remote -v\n```\n\nTreat any remote whose URL points to `github.com:\u003Cuser>\u002Fpaperclip` (or `github.com\u002F\u003Cuser>\u002Fpaperclip.git`) as the user's fork. Common names are `fork`, `\u003Cusername>`, or `myfork`. The remote named `origin` or `upstream` that points at `paperclipai\u002Fpaperclip` is the canonical upstream — do not push feature branches there if a fork exists.\n\n### Pushing to the fork\n\n```bash\n# Push the current branch to the user's fork and set upstream\ngit push -u \u003Cfork-remote> HEAD\n```\n\nThen create the PR from the fork branch:\n\n```bash\ngh pr create --repo paperclipai\u002Fpaperclip --head \u003Cfork-owner>:\u003Cbranch-name> ...\n```\n\n`gh pr create` usually figures out the head ref automatically when run from a branch tracking the fork; the explicit `--head \u003Cowner>:\u003Cbranch>` form is the reliable fallback when it does not.\n\n### When no fork exists\n\nIf `git remote -v` shows only `paperclipai\u002Fpaperclip` remotes (no user fork), fall back to pushing branches to `origin` as before. Do NOT create a fork on the user's behalf — ask first.\n\n### Keeping the fork up to date\n\nThe canonical remote that points at `paperclipai\u002Fpaperclip` may be named `origin` **or** `upstream` depending on how the user set up the repo. Detect it the same way as in the \"Detect a fork remote\" step, then fetch and push from\u002Fwith that remote so the sync works under either convention:\n\n```bash\nUPSTREAM_REMOTE=$(git remote -v | awk '\u002Fpaperclipai\\\u002Fpaperclip.*\\(fetch\\)\u002F{print $1; exit}')\ngit fetch \"$UPSTREAM_REMOTE\"\ngit push \u003Cfork-remote> \"${UPSTREAM_REMOTE}\u002Fmaster:master\"\n```\n\n## Pull Requests\n\n> **MANDATORY PRE-FLIGHT:** Before creating ANY pull request, you MUST read the canonical source files listed below. Do NOT run `gh pr create` until you have read these files and verified your PR body matches every required section.\n\n### Step 1 — Read the canonical files\n\nYou MUST read all three of these files before creating a PR:\n\n1. **`.github\u002FPULL_REQUEST_TEMPLATE.md`** — the required PR body structure\n2. **`CONTRIBUTING.md`** — contribution conventions, PR requirements, and thinking-path examples\n3. **`.github\u002Fworkflows\u002Fpr.yml`** — CI checks that gate merge\n\n### Step 2 — Validate your PR body against this checklist\n\nAfter reading the template, verify your `--body` includes every one of these sections (names must match exactly):\n\n- [ ] `## Thinking Path` — blockquote style, 5-8 reasoning steps\n- [ ] `## What Changed` — bullet list of concrete changes\n- [ ] `## Verification` — how a reviewer confirms this works\n- [ ] `## Risks` — what could go wrong\n- [ ] `## Model Used` — provider, model ID, version, capabilities\n- [ ] `## Checklist` — copied from the template, items checked off\n\nIf any section is missing or empty, do NOT submit the PR. Go back and fill it in.\n\n### Step 3 — Create the PR\n\nOnly after completing Steps 1 and 2, run `gh pr create`. Use the template contents as the structure for `--body` — do not write a freeform summary.\n\n## Hard Rules — Do NOT Bypass\n\nThese rules exist because agents have caused real damage by improvising around CLI failures. Follow them exactly.\n\n1. **CLI is the only interface to worktrees and databases.** All worktree and database operations MUST go through `npx paperclipai` \u002F `pnpm paperclipai` commands. You MUST NOT:\n   - Run `pg_dump`, `pg_restore`, `psql`, `createdb`, `dropdb`, or any raw postgres commands\n   - Manually set `DATABASE_URL` to point a worktree server at another instance's database\n   - Run `rm -rf` on any `.paperclip\u002F`, `.paperclip-worktrees\u002F`, or `db\u002F` directory\n   - Directly manipulate embedded postgres data directories\n   - Kill postgres processes by PID\n\n2. **If a CLI command fails, stop and report.** Do NOT attempt workarounds. If `worktree:make`, `worktree reseed`, `worktree init`, `worktree:cleanup`, or any other `paperclipai` command fails:\n   - Report the exact error message in your task comment\n   - Set the task to `blocked`\n   - Suggest running `npx paperclipai doctor --repair` or recreating the worktree from scratch\n   - Do NOT try to manually replicate what the CLI does\n\n3. **Never share databases between instances.** Each worktree instance gets its own isolated database. Never override `DATABASE_URL` to point one instance at another's database. This destroys isolation and can corrupt production data.\n\n4. **Starting a dev server in a worktree requires setup first.** The correct sequence is:\n   ```bash\n   # If the worktree already exists but has no running instance:\n   cd \u003Cworktree-path>\n   eval \"$(npx paperclipai worktree env)\"\n   pnpm install && pnpm build\n   npx paperclipai run          # or pnpm dev\n\n   # If the worktree needs a fresh database:\n   npx paperclipai worktree reseed --seed-mode full\n\n   # If the worktree is broken beyond repair:\n   npx paperclipai worktree:cleanup \u003Cname>\n   npx paperclipai worktree:make \u003Cname> --seed-mode full\n   ```\n   If any step fails, follow rule 2 — stop and report.\n\n5. **Seeding is a CLI operation.** When asked to seed a worktree database from the main instance, use `worktree reseed` or recreate with `worktree:make --seed-mode full`. Read `doc\u002FDEVELOPING.md` for the full option tables. Never attempt manual database copying.\n\n## Persistent Dev Servers (for Manual Testing)\n\nWhen an agent needs to start a dev server that outlives the current heartbeat — for example, so a human or QA agent can manually test against it — the server process **must** be launched in a detached session. A process started directly from a heartbeat shell is killed when the heartbeat exits.\n\n### Use `tmux` for persistent servers\n\n```bash\n# 1. cd into the worktree (or main repo) and source the environment\ncd \u003Cworktree-path>\neval \"$(npx paperclipai worktree env)\"   # skip if using the primary instance\n\n# 2. Start the dev server in a named, detached tmux session\ntmux new-session -d -s \u003Csession-name> 'pnpm dev'\n\n# Example with a descriptive name:\ntmux new-session -d -s auth-fix-3102 'pnpm dev'\n```\n\n### Managing the session\n\n| Task | Command |\n|------|---------|\n| Check if the session is alive | `tmux has-session -t \u003Csession-name> 2>\u002Fdev\u002Fnull && echo running` |\n| View server output | `tmux capture-pane -t \u003Csession-name> -p` |\n| Kill the session | `tmux kill-session -t \u003Csession-name>` |\n| List all tmux sessions | `tmux list-sessions` |\n\n### Verifying the server is reachable\n\nAfter launching, confirm the port is listening before reporting success:\n\n```bash\n# Wait briefly for startup, then verify\nsleep 3\ncurl -sf http:\u002F\u002F127.0.0.1:\u003Cport>\u002Fapi\u002Fhealth && echo \"Server is up\"\nlsof -nP -iTCP:\u003Cport> -sTCP:LISTEN\n```\n\n### Key rules\n\n1. **Always use `tmux` (or equivalent)** when a dev server needs to stay running after the heartbeat ends. A server started directly from the agent shell will die when the heartbeat exits, even if it appeared healthy moments before.\n2. **Name the session descriptively** — include the worktree name and port (e.g., `auth-fix-3102`).\n3. **Verify the server is listening** before reporting the URL to anyone.\n4. **Do not use `nohup` or `&` alone** — these are unreliable for agent shells that may have their entire process group killed.\n5. **Clean up when done** — kill the tmux session when the testing is complete.\n\n## Common Mistakes\n\n| Mistake | Fix |\n|---------|-----|\n| Server won't start | Run `npx paperclipai doctor --repair` to diagnose and auto-fix |\n| Forgetting to source worktree env | Run `eval \"$(npx paperclipai worktree env)\"` after cd-ing into the worktree |\n| Stale dependencies after pull | Run `pnpm install && pnpm build` after pulling |\n| Schema out of date after pull | Run `pnpm db:generate && pnpm db:migrate` |\n| Reseeding while target DB is running | Stop the target server first, or use `--allow-live-target` |\n| Cleaning up with unmerged commits | Merge or push first, or use `--force` if intentionally discarding |\n| Running agents against wrong instance | Verify `PAPERCLIP_API_URL` points to the correct port |\n| CLI command fails | Do NOT work around it — report the error and block (see Hard Rules above) |\n| Agent tries manual postgres operations | NEVER do this — all DB ops go through the CLI (see Hard Rules above) |\n| Dev server dies between heartbeats | Launch in a detached `tmux` session — see \"Persistent Dev Servers\" above |\n| Pushed feature branch to `paperclipai\u002Fpaperclip` when a fork exists | Push to the user's fork remote instead — see \"Forks\" above |\n",{"name":5,"required":37,"description":7},"main","d1d0e5a045f856af95eb693add053cc329774806","skills\u002Fpaperclip-dev",2,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-app-paperclip","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-10-30 04:25:15",{"source":9,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add microsoft\u002Famplifier-app-paperclip --skill paperclip-dev",{"tool":56,"command":57},"bunx","bunx skills add microsoft\u002Famplifier-app-paperclip --skill paperclip-dev",{"tool":59,"command":60},"pnpm","pnpm dlx skills add microsoft\u002Famplifier-app-paperclip --skill paperclip-dev","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-app-paperclip\u002Fblob\u002Fmain\u002Fskills\u002Fpaperclip-dev\u002FSKILL.md",true,[],[65,85,108,128,148,166],{"skillNo":66,"name":67,"nameZh":68,"description":69,"descriptionZh":70,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":71,"categories":72,"keywords":79,"publishedAt":36},"01M69BXXE3997X52Z13XH9ZCK4","terminal-bench-loop","Terminal-Bench 循环迭代修复诊断","Run a single Terminal-Bench problem through Paperclip in a bounded, human-in-the-loop improvement cycle until the smoke passes, the board rejects the next fix, the iteration budget is exhausted, or a real blocker is named. Each iteration runs a bounded smoke against an isolated Paperclip App worktree, captures artifacts, diagnoses the exact stop point with `\u002Fdiagnose-why-work-stopped`, requests board confirmation before any product fix, then reruns against the same worktree. Use whenever an issue asks to \"run Terminal-Bench in a loop\", \"drive Terminal-Bench until it passes\", \"loop fix-git through Paperclip\", or otherwise points at a Terminal-Bench task and asks for bounded iteration with diagnosis.","通过 Paperclip，以有界、人工参与的改进循环运行单个 Terminal-Bench 题目，直到冒烟测试通过、评审委员会拒绝下一项修复、迭代预算耗尽，或明确指出真正的阻塞点。每次迭代都会针对隔离的 Paperclip App 工作树运行有界冒烟测试、捕获产物、使用 `\u002Fdiagnose-why-work-stopped` 诊断确切的停止点、在任何产品修复前请求评审委员会确认，然后在同一工作树上重新运行。当某个 issue 要求“循环运行 Terminal-Bench”“驱动 Terminal-Bench 直到通过”“通过 Paperclip 循环修复 fix-git”，或以其他方式指向 Terminal-Bench 任务并要求带诊断的有界迭代时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-app-paperclip\u002Fblob\u002Fmain\u002Fskills\u002Fterminal-bench-loop\u002FSKILL.md",[73,76],{"categoryNo":74,"categoryName":75,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师",{"categoryNo":77,"categoryName":78,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障",[80,81,82,32,83,34,35,84],"terminal bench loop","terminal","product","artifacts","git",{"skillNo":86,"name":87,"nameZh":88,"description":89,"descriptionZh":90,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":91,"categories":92,"keywords":99,"publishedAt":36},"01M69BXV7WMFG9YEPBB50Q40JY","para-memory-files","PARA 记忆文件管理","File-based memory system using Tiago Forte's PARA method. Use this skill whenever you need to store, retrieve, update, or organize knowledge across sessions. Covers three memory layers: (1) Knowledge graph in PARA folders with atomic YAML facts, (2) Daily notes as raw timeline, (3) Tacit knowledge about user patterns. Also handles planning files, memory decay, weekly synthesis, and recall via qmd. Trigger on any memory operation: saving facts, writing daily notes, creating entities, running weekly synthesis, recalling past context, or managing plans.","基于文件的记忆系统，采用 Tiago Forte 的 PARA 方法。当你需要跨会话存储、检索、更新或组织知识时使用此技能。涵盖三个记忆层：(1) PARA 文件夹中的知识图谱与原子化 YAML 事实，(2) 作为原始时间线的每日笔记，(3) 关于用户行为模式的隐性知识。还处理计划文件、记忆衰减、每周综合以及通过 qmd 进行的检索。在任何记忆操作时触发：保存事实、写每日笔记、创建实体、运行每周综合、回忆过去的上下文或管理计划。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-app-paperclip\u002Fblob\u002Fmain\u002Fskills\u002Fpara-memory-files\u002FSKILL.md",[93,96],{"categoryNo":94,"categoryName":95,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TRAEZFJ43R95HPEBJYG","知识工作者",{"categoryNo":97,"categoryName":98,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRFRAYBCBW9WKDY9TCSHY3","知识管理与沉淀",[100,101,102,103,104,105,106,107],"memory","para memory files","writing","qmd","sessions","notes","update","planning",{"skillNo":109,"name":32,"nameZh":110,"description":111,"descriptionZh":112,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":113,"categories":114,"keywords":121,"publishedAt":36},"01M69BXRE769BJ5W05W2XQ85T6","Paperclip 任务协调管理","Interact with the Paperclip control plane API to manage tasks, coordinate with other agents, and follow company governance. Use when you need to check assignments, update task status, delegate work, post comments, set up or manage routines (recurring scheduled tasks), or call any Paperclip API endpoint. Do NOT use for the actual domain work itself (writing code, research, etc.) — only for Paperclip coordination.","与 Paperclip 控制平面 API 交互，以管理任务、与其他智能体协调并遵循公司治理。当你需要检查任务分配、更新任务状态、委派工作、发布评论、设置或管理例程（周期性计划任务），或调用任何 Paperclip API 端点时使用。请勿将其用于实际的领域工作本身（编写代码、研究等）——仅用于 Paperclip 协调。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-app-paperclip\u002Fblob\u002Fmain\u002Fskills\u002Fpaperclip\u002FSKILL.md",[115,118],{"categoryNo":116,"categoryName":117,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRN0DBCRG4XGJMB6QQEP11","编码任务委派",{"categoryNo":119,"categoryName":120,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8C31AVFVV99RWJEGF9PS85F","项目经理",[32,122,123,106,124,125,126,127,102],"research","code","tasks","governance","status","routines",{"skillNo":129,"name":130,"nameZh":131,"description":132,"descriptionZh":133,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":134,"categories":135,"keywords":140,"publishedAt":36},"01M69BXHSPWG60R76MMXJCBRG2","paperclip-create-plugin","Paperclip 插件创建开发","Create and develop external Paperclip plugins with the CLI-first workflow. Use when scaffolding a new plugin, working on a local plugin against a running Paperclip instance, or updating plugin authoring docs. Covers `paperclipai plugin init`, the local install loop via `paperclipai plugin install \u003Cpath>`, worker\u002FUI rebuild and reload semantics, and the required success checklist.","使用 CLI 优先的工作流创建和开发外部 Paperclip 插件。适用于搭建新插件、针对运行中的 Paperclip 实例开发本地插件，或更新插件编写文档。涵盖 `paperclipai plugin init`、通过 `paperclipai plugin install \u003Cpath>` 进行的本地安装循环、worker\u002FUI 的重建与重新加载语义，以及必需的成功检查清单。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-app-paperclip\u002Fblob\u002Fmain\u002Fskills\u002Fpaperclip-create-plugin\u002FSKILL.md",[136,137],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":138,"categoryName":139,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRN0CV1NMDZ5TEJX1GVM29","插件与技能管理",[141,32,142,143,144,145,146,147],"paperclip create plugin","create","plugin","init","workflow","docs","cli",{"skillNo":149,"name":150,"nameZh":151,"description":152,"descriptionZh":153,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":154,"categories":155,"keywords":162,"publishedAt":36},"01M69BXF0D8J59MN3MF30F6NGW","paperclip-create-agent","Paperclip 智能体创建","Create new agents in Paperclip with governance-aware hiring. Use when you need to inspect adapter configuration options, compare existing agent configs, draft a new agent prompt\u002Fconfig, and submit a hire request.","在 Paperclip 中以治理感知的方式创建新智能体（招聘）。当你需要检查适配器配置选项、对比现有智能体配置、起草新的智能体提示\u002F配置并提交招聘请求时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-app-paperclip\u002Fblob\u002Fmain\u002Fskills\u002Fpaperclip-create-agent\u002FSKILL.md",[156,159],{"categoryNo":157,"categoryName":158,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师",{"categoryNo":160,"categoryName":161,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSAA4FBTWZP6X98STEHG99","智能体开发",[163,142,32,164,125,165],"paperclip create agent","create agent","config",{"skillNo":167,"name":168,"nameZh":169,"description":170,"descriptionZh":171,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":172,"categories":173,"keywords":178,"publishedAt":36},"01M69BXD20PF3AJ0QRR27FH5XX","paperclip-converting-plans-to-tasks","Paperclip 计划任务拆解","The Paperclip way of converting a plan into executable tasks. Use whenever you are asked to plan, scope, or break down work inside a Paperclip company. Industry-agnostic guidance on how to translate a plan into assigned issues with the right specialty, dependencies, and parallelization so Paperclip's executor can pick up the work — it does not prescribe a plan format. Pair with the `paperclip` skill, which covers the mechanics of writing the plan document and reassigning the issue.","将计划转换为可执行任务的 Paperclip 方式。当被要求在 Paperclip 公司内进行规划、界定范围或分解工作时使用。提供与行业无关的实用指导，说明如何将计划转换为已分配的问题，并赋予合适的专业、依赖关系和并行化设置，以便 Paperclip 的执行者能够接手工作——它不规定计划的具体格式。请与 `paperclip` 技能配合使用，后者涵盖编写计划文档和重新分配问题的具体机制。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-app-paperclip\u002Fblob\u002Fmain\u002Fskills\u002Fpaperclip-converting-plans-to-tasks\u002FSKILL.md",[174,177],{"categoryNo":175,"categoryName":176,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BTBRTQXJ9T5TABNS7XP1A0","任务规划与分解",{"categoryNo":119,"categoryName":120,"taxonomyType":23,"taxonomyTypeDesc":24},[124,179,32,102,180,181],"paperclip converting plans to tasks","issues","translate"]