Paperclip Skill Authoring
Create or repair Paperclip company skills that load cleanly and make agent behavior predictable. A good Paperclip skill should tell the agent when it fires, what state to inspect, what it may mutate, what proves each step is complete, and when to stop.
Required Shape
Every Paperclip skill is a folder with SKILL.md at its root. SKILL.md must start with YAML frontmatter delimited by --- and include name and description.
---
name: paperclip-skill-slug
description: Handle a specific Paperclip workflow. Use when the operator asks to inspect, plan, repair, validate, or execute that workflow.
---
Rules:
name matches the folder slug exactly.
- Slugs use lowercase letters, digits, and hyphens.
description is the invocation contract: what the skill does plus the distinct request branches that should trigger it.
- The Markdown body starts after the closing
--- and includes executable guidance beyond a heading.
Authoring Loop
- Choose the branch. Identify whether the skill drafts, reviews, repairs, imports, attaches, or operates something. If several branches share little workflow, split the skill or disclose branch-only reference behind a clearly worded pointer.
- Write the invocation contract. Keep the description concrete and model-facing. Use one trigger per distinct branch; collapse synonyms that name the same branch.
- Define inputs. List the Paperclip company, project, issue, agent, approval, wiki, local file, credential, URL, or operator decision needed before action. Completion criterion: the agent can tell which inputs are present, missing, or intentionally unnecessary.
- Write ordered steps. Each step must end with a checkable completion criterion. Prefer "read back the updated issue and verify field X" over "ensure the update worked".
- Set mutation boundaries. State what can be read freely, what requires approval, and what is forbidden. Paperclip control-plane writes, external-account changes, spending, outreach, secrets, assignment, approval, import, and destructive actions require explicit approval.
- Model event-producing mutations. When a write triggers asynchronous work, name the single dispatch trigger, require all preparation before it, and define the post-trigger phase as read-only observation. State how to detect queued/running success, skipped/failed dispatch, automatic retries, and full quiescence before correction. Assignment-driven execution must not be paired with heartbeat/resume, mentions, comments, or repeated assignment wakes.
- Add stop conditions. Stop on missing approval, missing credentials, ambiguous identity, unsafe scope, unavailable verification, duplicate records, an already queued/running dispatch, or a request outside the skill's branch.
- Add only useful examples. Keep examples when they prevent a likely malformed frontmatter block, unsafe mutation, wrong API shape, duplicate dispatch, or repeated operator mistake. Delete examples that merely restate the prose.
- Validate with a parser. Completion criterion: frontmatter parses, required fields exist, the body is non-empty, the slug matches the folder, and any live Paperclip import or attachment remains unperformed unless approved.
Information Hierarchy
Keep SKILL.md focused on steps every run needs. Put reference behind a pointer when only one branch needs it.
- Inline steps: invocation, inputs, workflow, approvals, verification, stop conditions.
- Inline reference: short Paperclip rules the agent needs every run.
- Disclosed reference: long schemas, object catalogs, API examples, import docs, or domain policies used by only some branches.
Use one source of truth for each rule. Do not repeat the same safety boundary in the description, workflow, checklist, and examples; put it once where the agent needs it most.
Minimal Skeleton
Use this as the smallest acceptable starting point:
---
name: example-paperclip-skill
description: Handle a specific Paperclip workflow. Use when the operator asks to inspect, plan, repair, validate, or execute that workflow.
---
# Example Paperclip Skill
Purpose sentence naming the workflow and the safe operating posture.
## Inputs
- Required Paperclip identifiers, local files, URLs, credentials, or operator decisions.
- Completion criterion: each input is present, missing, or explicitly unnecessary.
## Workflow
1. Inspect the relevant Paperclip and local state.
2. Decide whether the request is read-only or mutating.
3. For mutating work, present the exact planned change and wait for approval.
4. Execute the narrowest approved action.
5. Read back or otherwise verify the result.
## Safety Boundaries
- Read freely when credentials and context are already available.
- Ask before creating, updating, deleting, assigning, approving, spending, sending, importing, attaching, or changing external systems.
- Stop when identifiers, permissions, approval, or verification are missing.
## Verification
- Confirm `SKILL.md` starts with valid YAML frontmatter.
- Confirm required Paperclip records or files changed as expected.
- Report changed records, validation evidence, uncertainty, and follow-up import or attachment steps.
Frontmatter Repair
When repairing malformed SKILL.md, preserve the existing body unless the operator also asks for content edits.
- Read the whole file before editing.
- If the file begins with a Markdown heading or body text, insert frontmatter above it.
- If frontmatter exists but is incomplete, update only the YAML block unless the body also needs repair.
- Set
name to the folder slug unless the operator explicitly requires a different slug and matching folder rename.
- Write
description with purpose plus trigger branches.
- Preserve useful headings, examples, workflow steps, and operator-specific content below the closing
---.
- Validate with a YAML parser.
Example repair:
# Old Skill Title
Existing workflow body...
becomes:
---
name: old-skill-title
description: Handle the existing Paperclip workflow. Use when the operator asks for that workflow or needs the skill repaired for Paperclip import.
---
# Old Skill Title
Existing workflow body...
Review Checklist
Before publishing, packaging, importing, or attaching a Paperclip skill, verify:
- Required shape: root
SKILL.md, first line ---, closing ---, valid YAML, name, description, non-empty body.
- Invocation: description has distinct trigger branches and no synonym padding.
- Predictability: ordered steps have checkable completion criteria.
- Paperclip safety: reads, approval-gated mutations, forbidden actions, stop conditions, and verification are explicit.
- Information hierarchy: every line is relevant; branch-only reference is disclosed; duplicate rules and no-op prose are removed.
- Import boundary: no live Paperclip import, attachment, control-plane mutation, or external action happens without explicit operator approval.
Use a parser rather than visual inspection when possible:
python - path/to/skill/SKILL.md <<'PY'
from pathlib import Path
import sys
import yaml
path = Path(sys.argv[1])
text = path.read_text(encoding="utf-8")
if not text.startswith("---\n"):
raise SystemExit("SKILL.md must start with YAML frontmatter")
try:
_, raw, body = text.split("---", 2)
except ValueError:
raise SystemExit("SKILL.md frontmatter must be closed with ---")
data = yaml.safe_load(raw) or {}
for key in ("name", "description"):
if not isinstance(data.get(key), str) or not data[key].strip():
raise SystemExit(f"missing required frontmatter field: {key}")
if not body.strip():
raise SystemExit("SKILL.md body must not be empty")
if path.parent.name != data["name"]:
raise SystemExit(f"name must match folder slug: {path.parent.name}")
print("valid")
PY
If yaml is unavailable, use the repository's existing validation script or a language-native YAML parser already available in the workspace. Do not rely on regex-only validation for final checks.
1---2name: paperclip-skill-authoring3description: Create, review, or repair Paperclip company skills with valid SKILL.md frontmatter, predictable workflows, explicit safety boundaries, completion criteria, and import-ready validation. Use when drafting a new Paperclip skill, improving an existing skill, fixing malformed frontmatter, or preparing a skill for Paperclip import.4---56# Paperclip Skill Authoring78Create or repair Paperclip company skills that load cleanly and make agent behavior predictable. A good Paperclip skill should tell the agent when it fires, what state to inspect, what it may mutate, what proves each step is complete, and when to stop.910## Required Shape1112Every Paperclip skill is a folder with `SKILL.md` at its root. `SKILL.md` must start with YAML frontmatter delimited by `---` and include `name` and `description`.1314```yaml15---16name: paperclip-skill-slug17description: Handle a specific Paperclip workflow. Use when the operator asks to inspect, plan, repair, validate, or execute that workflow.18---19```2021Rules:2223- `name` matches the folder slug exactly.24- Slugs use lowercase letters, digits, and hyphens.25- `description` is the invocation contract: what the skill does plus the distinct request branches that should trigger it.26- The Markdown body starts after the closing `---` and includes executable guidance beyond a heading.2728## Authoring Loop29301. **Choose the branch.** Identify whether the skill drafts, reviews, repairs, imports, attaches, or operates something. If several branches share little workflow, split the skill or disclose branch-only reference behind a clearly worded pointer.312. **Write the invocation contract.** Keep the description concrete and model-facing. Use one trigger per distinct branch; collapse synonyms that name the same branch.323. **Define inputs.** List the Paperclip company, project, issue, agent, approval, wiki, local file, credential, URL, or operator decision needed before action. Completion criterion: the agent can tell which inputs are present, missing, or intentionally unnecessary.334. **Write ordered steps.** Each step must end with a checkable completion criterion. Prefer "read back the updated issue and verify field X" over "ensure the update worked".345. **Set mutation boundaries.** State what can be read freely, what requires approval, and what is forbidden. Paperclip control-plane writes, external-account changes, spending, outreach, secrets, assignment, approval, import, and destructive actions require explicit approval.356. **Model event-producing mutations.** When a write triggers asynchronous work, name the single dispatch trigger, require all preparation before it, and define the post-trigger phase as read-only observation. State how to detect queued/running success, skipped/failed dispatch, automatic retries, and full quiescence before correction. Assignment-driven execution must not be paired with heartbeat/resume, mentions, comments, or repeated assignment wakes.367. **Add stop conditions.** Stop on missing approval, missing credentials, ambiguous identity, unsafe scope, unavailable verification, duplicate records, an already queued/running dispatch, or a request outside the skill's branch.378. **Add only useful examples.** Keep examples when they prevent a likely malformed frontmatter block, unsafe mutation, wrong API shape, duplicate dispatch, or repeated operator mistake. Delete examples that merely restate the prose.389. **Validate with a parser.** Completion criterion: frontmatter parses, required fields exist, the body is non-empty, the slug matches the folder, and any live Paperclip import or attachment remains unperformed unless approved.3940## Information Hierarchy4142Keep `SKILL.md` focused on steps every run needs. Put reference behind a pointer when only one branch needs it.4344- **Inline steps:** invocation, inputs, workflow, approvals, verification, stop conditions.45- **Inline reference:** short Paperclip rules the agent needs every run.46- **Disclosed reference:** long schemas, object catalogs, API examples, import docs, or domain policies used by only some branches.4748Use one source of truth for each rule. Do not repeat the same safety boundary in the description, workflow, checklist, and examples; put it once where the agent needs it most.4950## Minimal Skeleton5152Use this as the smallest acceptable starting point:5354```markdown55---56name: example-paperclip-skill57description: Handle a specific Paperclip workflow. Use when the operator asks to inspect, plan, repair, validate, or execute that workflow.58---5960# Example Paperclip Skill6162Purpose sentence naming the workflow and the safe operating posture.6364## Inputs6566- Required Paperclip identifiers, local files, URLs, credentials, or operator decisions.67- Completion criterion: each input is present, missing, or explicitly unnecessary.6869## Workflow70711. Inspect the relevant Paperclip and local state.722. Decide whether the request is read-only or mutating.733. For mutating work, present the exact planned change and wait for approval.744. Execute the narrowest approved action.755. Read back or otherwise verify the result.7677## Safety Boundaries7879- Read freely when credentials and context are already available.80- Ask before creating, updating, deleting, assigning, approving, spending, sending, importing, attaching, or changing external systems.81- Stop when identifiers, permissions, approval, or verification are missing.8283## Verification8485- Confirm `SKILL.md` starts with valid YAML frontmatter.86- Confirm required Paperclip records or files changed as expected.87- Report changed records, validation evidence, uncertainty, and follow-up import or attachment steps.88```8990## Frontmatter Repair9192When repairing malformed `SKILL.md`, preserve the existing body unless the operator also asks for content edits.93941. Read the whole file before editing.952. If the file begins with a Markdown heading or body text, insert frontmatter above it.963. If frontmatter exists but is incomplete, update only the YAML block unless the body also needs repair.974. Set `name` to the folder slug unless the operator explicitly requires a different slug and matching folder rename.985. Write `description` with purpose plus trigger branches.996. Preserve useful headings, examples, workflow steps, and operator-specific content below the closing `---`.1007. Validate with a YAML parser.101102Example repair:103104```markdown105# Old Skill Title106107Existing workflow body...108```109110becomes:111112```markdown113---114name: old-skill-title115description: Handle the existing Paperclip workflow. Use when the operator asks for that workflow or needs the skill repaired for Paperclip import.116---117118# Old Skill Title119120Existing workflow body...121```122123## Review Checklist124125Before publishing, packaging, importing, or attaching a Paperclip skill, verify:126127- Required shape: root `SKILL.md`, first line `---`, closing `---`, valid YAML, `name`, `description`, non-empty body.128- Invocation: description has distinct trigger branches and no synonym padding.129- Predictability: ordered steps have checkable completion criteria.130- Paperclip safety: reads, approval-gated mutations, forbidden actions, stop conditions, and verification are explicit.131- Information hierarchy: every line is relevant; branch-only reference is disclosed; duplicate rules and no-op prose are removed.132- Import boundary: no live Paperclip import, attachment, control-plane mutation, or external action happens without explicit operator approval.133134Use a parser rather than visual inspection when possible:135136```sh137python - path/to/skill/SKILL.md <<'PY'138from pathlib import Path139import sys140import yaml141142path = Path(sys.argv[1])143text = path.read_text(encoding="utf-8")144if not text.startswith("---\n"):145 raise SystemExit("SKILL.md must start with YAML frontmatter")146try:147 _, raw, body = text.split("---", 2)148except ValueError:149 raise SystemExit("SKILL.md frontmatter must be closed with ---")150data = yaml.safe_load(raw) or {}151for key in ("name", "description"):152 if not isinstance(data.get(key), str) or not data[key].strip():153 raise SystemExit(f"missing required frontmatter field: {key}")154if not body.strip():155 raise SystemExit("SKILL.md body must not be empty")156if path.parent.name != data["name"]:157 raise SystemExit(f"name must match folder slug: {path.parent.name}")158print("valid")159PY160```161162If `yaml` is unavailable, use the repository's existing validation script or a language-native YAML parser already available in the workspace. Do not rely on regex-only validation for final checks.