Guide · Agent skill
How to use the Paperclip Dev Workspace Repair agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
This is an agent skill for engineers working on Paperclip itself. It gives an AI agent a strict checklist for restarting and repairing a Paperclip development workspace, which is a separate git worktree running a local Paperclip server. After reading this guide you will know what the skill makes the agent do, how to install it, how to ask for it in plain language, and what it needs to run.
Quick start
- 1Download the ZIP. Download the skill ZIP from this page and unzip it. The folder contains SKILL.md.
- 2Place the skill folder. Copy the unzipped folder into ~/.claude/skills/ for personal use, or into your project's .claude/skills/ folder.
- 3Or upload in the Claude apps. Open Settings → Capabilities → Skills and upload the ZIP instead.
- 4Confirm your environment. Make sure PAPERCLIP_API_URL, PAPERCLIP_API_KEY and the Paperclip checkout with doc/DEVELOPING.md are available.
- 5Ask for the outcome. Describe the workspace service and the result you need, such as a restart with verified health and login.
- 6Review the verification. Check that the agent confirmed health, login, cloned data, runtime visibility and port-owner identity before accepting the result.
What is an agent skill?
An agent skill is a folder containing a SKILL.md file. The file holds instructions that an AI agent reads when a task matches the skill's description, so the agent follows a defined procedure instead of improvising.
This skill is named paperclip-dev-workspace-run-verify-fix and is released under the MIT licence. Its SKILL.md is the only file listed for it.
What the skill makes the agent do
The skill is for a Paperclip development workspace whose service is started through a project execution workspace runtime service, typically a worktree service such as paperclip-dev. The agent does not declare success until every check passes. Those checks include:
- The service was started through the normal managed runtime path, not a detached workaround.
- The worktree database is a full bootstrapped isolated clone of the primary instance database.
- /api/health returns status: ok and bootstrapStatus: ready.
- The root page returns 200 and does not show the first-admin setup gate.
- The board user can log in with their normal dev credentials, and the app shows populated cloned data.
- The main control plane and the served workspace app both show the service as running and healthy.
- The process owning the service port really belongs to the target worktree, confirmed with readlink /proc/<pid>/cwd.
Install the skill
Download the skill ZIP from this page and unzip it. For a personal install, place the skill folder in ~/.claude/skills/. For a single project, place it in that project's .claude/skills/ folder.
In the Claude apps you can instead upload the ZIP under Settings → Capabilities → Skills.
- Personal install: ~/.claude/skills/
- Project install: <your project>/.claude/skills/
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
Trigger the skill with natural requests
The skill's description says it applies when asked to start or fix a managed project or worktree service and prove health, login readiness, cloned data, runtime visibility and correct port ownership. You do not need to name the skill. Ask for the outcome you want, and mention the workspace or service.
The skill expects the agent to work from the current Paperclip issue. It collects inputs such as PAPERCLIP_API_URL, PAPERCLIP_API_KEY and the expected service URL from environment variables where available. It will not print API keys or passwords.
- Start the paperclip-dev workspace service for this issue and verify it.
- The paperclip-dev service is healthy but the page shows the wrong workspace. Fix it.
- Restart the stale workspace service and prove the login works with cloned data.
- Check who owns port 40631 and repair the workspace if a sibling process holds it.
Understand the port-ownership check
The service pins an explicit port in its config, so every workspace that runs it claims the same port. A sibling workspace's process can hold that port and still answer health checks, so a green status can be misleading.
The skill's identity check finds the process listening on the port and reads its working directory. The resolved path must be inside the target worktree, usually <worktree>/server.
pid=$(lsof -nP -iTCP:"$SERVICE_PORT" -sTCP:LISTEN -t | head -1)
readlink "/proc/$pid/cwd"Examples of what the agent does
In a typical repair, the agent reads the latest issue comment, inspects runtime state from the main control plane, checks the port owner, stops any conflicting owner through its managed control path, reseeds the worktree from the primary instance if database completeness is in doubt, starts the service through the managed runtime API, and then verifies everything from both the control plane and the served app.
If a check fails, the agent loops back to the narrowest repair step rather than marking the issue done.
What the skill needs
The skill is written for a Paperclip checkout and its environment. It requires access to a Paperclip control plane API (PAPERCLIP_API_URL) and an agent API key. The checkout must include doc/DEVELOPING.md, which the agent is told to read before running CLI, dev server, worktree, database, build or test commands.
Shell tools such as curl and readlink are used, and readlink needs /proc access, so it is Linux-oriented. Node, pnpm and an embedded Postgres setup are used indirectly through the Paperclip CLI.
- Access to a Paperclip control plane API and agent API key
- A Paperclip checkout with doc/DEVELOPING.md and a worktree environment
- curl and readlink on Linux (/proc access)
- Node/pnpm and embedded Postgres, used through the Paperclip CLI
Safety notes: scripts and network
This skill runs scripts and uses the network. It calls the Paperclip runtime-service start and stop endpoints, and it can stop processes and replace a workspace database clone. The skill's hard rules say the master checkout is never a repair target, that the agent must not edit its .env during a repair, and that it must avoid destructive git or database actions and preserve user changes in the worktree.
Review the actions before approving destructive reseeds. The skill is not meant for running reseeds without review.
- Never point a worktree runtime service at the master checkout.
- Do not use psql or ad hoc row copying for the normal fix path.
- Copying only auth rows is not accepted as a final fix.
Tips for good results
Give the issue ID and the expected service URL so the agent does not have to guess. If the service command ID or execution workspace ID is missing, the skill tells the agent to read the issue, project or execution-workspace records rather than start an unmanaged server on a random port.
Expect the agent to run the smallest verification that proves the repair. It adds focused tests only when code changed.
- Provide the execution workspace ID and expected service URL.
- Ask for a final comment on the issue with root cause, fix and verification.
- Do not paste passwords into the request; the skill never posts them.
What people use it for
- Restarting a paperclip-dev worktree service that has gone stale after an issue was reassigned.
- Diagnosing a dev service that reports healthy but serves a sibling workspace's app.
- Repairing a workspace whose first-admin setup gate appears because the database clone is incomplete.
- Freeing a pinned port held by another workspace's process before starting the target service.
Frequently asked questions
Is the paperclip-dev-workspace-run-verify-fix skill free?
The skill is released under the MIT licence, as stated on this page. Check the licence file in the source repository for the full terms.
How do I install an agent skill like this?
Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder. In the Claude apps, you can upload the ZIP under Settings → Capabilities → Skills.
What do I need to use this skill?
You need access to a Paperclip control plane API through PAPERCLIP_API_URL and an agent API key, plus a Paperclip checkout that includes doc/DEVELOPING.md. The checks use curl and readlink, and readlink needs /proc access on Linux.
Can I use this skill for projects other than Paperclip?
No. It names Paperclip-specific paths, endpoints and roles, and it only applies to the Paperclip repository's internal dev setup. It is not meant for users of Paperclip as an application.
Why does my paperclip-dev service show healthy but serve the wrong workspace?
A sibling workspace's process can own the pinned port and still answer health checks. The skill tells the agent to confirm the port owner's real working directory with readlink /proc/<pid>/cwd, which must resolve inside the target worktree.
Does the skill run scripts or use the network?
Yes, on both counts. It calls Paperclip runtime-service endpoints and can stop processes and replace a workspace database clone, so review destructive reseeds before approving them.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits engineers and maintainers who work on Paperclip itself and run several isolated dev worktrees, especially when a service looks healthy but serves the wrong workspace. It is not useful for people running Paperclip as an application or for other projects, and it should not be used for destructive reseeds without review.
Download the skill