[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F6C0GGCBY18VHAE83E9P62":3,"skill-same:01M6F6C0GGCBY18VHAE83E9P62":79},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":59,"repositoryHtmlUrl":60,"repositoryHomepageUrl":6,"ownerHtmlUrl":61,"ownerBlogUrl":62,"ownerDescription":63,"updatedAt":64,"install":65,"resources":78},"01M6F6C0GGCBY18VHAE83E9P62","documenso-core-workflow-b",null,"Implement Documenso template-based workflows and direct signing links.\nUse when creating reusable templates, generating documents from templates,\nor implementing direct signing experiences.\nTrigger with phrases like \"documenso template\", \"signing link\",\n\"direct template\", \"reusable document\", \"template workflow\".","Dicklesworthstone\u002Fpi_agent_rust","Dicklesworthstone","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F35050222?v=4","01M6CG26AR942CSVMN1M5E3DSE","Jeff Emanuel","01M6CG26EPP71PSHW1VDS71121",1992,"MIT","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fdocumenso-pack\u002Fskills\u002Fdocumenso-core-workflow-b\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"workflow","core","documenso","documenso core workflow b","when","implement","implementing","links","with","link","trigger","io","document","reusable","use","edit","write","read","direct","template","templates","documents","workflows","2026-11-10 10:12:30",false,"---\nname: documenso-core-workflow-b\ndescription: |\n  Implement Documenso template-based workflows and direct signing links.\n  Use when creating reusable templates, generating documents from templates,\n  or implementing direct signing experiences.\n  Trigger with phrases like \"documenso template\", \"signing link\",\n  \"direct template\", \"reusable document\", \"template workflow\".\nallowed-tools: Read, Write, Edit\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\n---\n\n# Documenso Core Workflow B: Templates & Direct Signing\n\n## Overview\nCreate reusable templates, generate documents from templates, and implement direct signing experiences with Documenso.\n\n## Prerequisites\n- Completed `documenso-core-workflow-a`\n- Understanding of template-based document generation\n- PDF template files ready\n\n## Instructions\n\n### Step 1: Create a Template\n\n```typescript\nimport { Documenso } from \"@documenso\u002Fsdk-typescript\";\nimport { openAsBlob } from \"node:fs\";\n\nconst documenso = new Documenso({\n  apiKey: process.env.DOCUMENSO_API_KEY ?? \"\",\n});\n\ninterface CreateTemplateInput {\n  title: string;\n  pdfPath: string;\n  recipientRoles: Array\u003C{\n    name: string;  \u002F\u002F e.g., \"Employee\", \"Manager\"\n    role: \"SIGNER\" | \"APPROVER\" | \"VIEWER\" | \"CC\";\n    signingOrder?: number;\n  }>;\n}\n\nasync function createTemplate(\n  input: CreateTemplateInput\n): Promise\u003Cstring> {\n  const pdfBlob = await openAsBlob(input.pdfPath);\n\n  \u002F\u002F Create the template\n  const template = await documenso.templates.createV0({\n    title: input.title,\n    file: pdfBlob,\n  });\n\n  const templateId = template.templateId!;\n  console.log(`Created template: ${templateId}`);\n\n  \u002F\u002F Add recipient placeholders\n  for (const role of input.recipientRoles) {\n    await documenso.templatesRecipients.createV0({\n      templateId,\n      name: role.name,\n      role: role.role,\n      signingOrder: role.signingOrder,\n    });\n    console.log(`Added role: ${role.name}`);\n  }\n\n  return templateId;\n}\n\n\u002F\u002F Example: Create NDA template\nconst templateId = await createTemplate({\n  title: \"Non-Disclosure Agreement\",\n  pdfPath: \".\u002Ftemplates\u002Fnda.pdf\",\n  recipientRoles: [\n    { name: \"Disclosing Party\", role: \"SIGNER\", signingOrder: 1 },\n    { name: \"Receiving Party\", role: \"SIGNER\", signingOrder: 2 },\n  ],\n});\n```\n\n### Step 2: Add Template Fields\n\n```typescript\ninterface TemplateFieldInput {\n  recipientIndex: number;  \u002F\u002F Index of recipient in the roles array\n  type: \"SIGNATURE\" | \"INITIALS\" | \"NAME\" | \"EMAIL\" | \"DATE\" | \"TEXT\";\n  page: number;\n  x: number;\n  y: number;\n  width?: number;\n  height?: number;\n}\n\nasync function addTemplateFields(\n  templateId: string,\n  fields: TemplateFieldInput[]\n): Promise\u003Cvoid> {\n  \u002F\u002F Get template recipients to map indices to IDs\n  const template = await documenso.templates.getV0({ templateId });\n  const recipientIds = template.recipients?.map(r => r.id!) ?? [];\n\n  for (const field of fields) {\n    const recipientId = recipientIds[field.recipientIndex];\n    if (!recipientId) {\n      console.error(`No recipient at index ${field.recipientIndex}`);\n      continue;\n    }\n\n    await documenso.templatesFields.createV0({\n      templateId,\n      recipientId,\n      type: field.type,\n      page: field.page,\n      positionX: field.x,\n      positionY: field.y,\n      width: field.width ?? 200,\n      height: field.height ?? 60,\n    });\n    console.log(`Added ${field.type} field for recipient ${field.recipientIndex}`);\n  }\n}\n\n\u002F\u002F Example: Add fields to NDA template\nawait addTemplateFields(templateId, [\n  \u002F\u002F Disclosing Party fields (index 0)\n  { recipientIndex: 0, type: \"SIGNATURE\", page: 2, x: 100, y: 400 },\n  { recipientIndex: 0, type: \"NAME\", page: 2, x: 100, y: 350 },\n  { recipientIndex: 0, type: \"DATE\", page: 2, x: 350, y: 400 },\n  \u002F\u002F Receiving Party fields (index 1)\n  { recipientIndex: 1, type: \"SIGNATURE\", page: 2, x: 100, y: 200 },\n  { recipientIndex: 1, type: \"NAME\", page: 2, x: 100, y: 150 },\n  { recipientIndex: 1, type: \"DATE\", page: 2, x: 350, y: 200 },\n]);\n```\n\n### Step 3: Generate Document from Template\n\n```typescript\ninterface UseTemplateInput {\n  templateId: string;\n  title?: string;\n  recipients: Array\u003C{\n    email: string;\n    name: string;\n  }>;\n  sendImmediately?: boolean;\n}\n\nasync function createFromTemplate(\n  input: UseTemplateInput\n): Promise\u003C{ documentId: string }> {\n  \u002F\u002F Use the template to create a new document\n  const result = await documenso.envelopes.useV0({\n    templateId: input.templateId,\n    title: input.title,\n    recipients: input.recipients.map((r, index) => ({\n      email: r.email,\n      name: r.name,\n      signerIndex: index,\n    })),\n  });\n\n  const documentId = result.envelopeId!;\n  console.log(`Created document from template: ${documentId}`);\n\n  \u002F\u002F Send if requested\n  if (input.sendImmediately) {\n    await documenso.envelopes.distributeV0({\n      envelopeId: documentId,\n    });\n    console.log(\"Document sent to recipients\");\n  }\n\n  return { documentId };\n}\n\n\u002F\u002F Example: Create NDA from template\nconst document = await createFromTemplate({\n  templateId,\n  title: \"NDA - Acme Corp Partnership\",\n  recipients: [\n    { email: \"legal@yourcompany.com\", name: \"Your Company Legal\" },\n    { email: \"partner@acme.com\", name: \"Acme Corp Representative\" },\n  ],\n  sendImmediately: true,\n});\n```\n\n### Step 4: Direct Template Links\n\nDirect templates allow signers to access and sign documents without pre-registration.\n\n```typescript\nasync function createDirectTemplateLink(\n  templateId: string\n): Promise\u003C{ directLink: string }> {\n  \u002F\u002F Get template direct link settings\n  const template = await documenso.templates.getV0({ templateId });\n\n  \u002F\u002F The direct link is available when template is published\n  const directLink = template.directLink;\n\n  if (!directLink) {\n    console.log(\"Template direct link not enabled. Enable in dashboard.\");\n    throw new Error(\"Direct link not available\");\n  }\n\n  return { directLink };\n}\n\n\u002F\u002F Example usage with direct link\n\u002F\u002F Users can access: https:\u002F\u002Fapp.documenso.com\u002Fd\u002F{directLinkToken}\n```\n\n### Step 5: Embedding Signing Experience\n\n```typescript\n\u002F\u002F Get signing token for embedding\nasync function getSigningToken(\n  documentId: string,\n  recipientEmail: string\n): Promise\u003C{ signingToken: string; signingUrl: string }> {\n  \u002F\u002F Get document with recipients\n  const doc = await documenso.documents.getV0({ documentId });\n\n  const recipient = doc.recipients?.find(r => r.email === recipientEmail);\n  if (!recipient) {\n    throw new Error(`Recipient ${recipientEmail} not found`);\n  }\n\n  \u002F\u002F The signing token can be used for embedding\n  return {\n    signingToken: recipient.signingToken!,\n    signingUrl: recipient.signingUrl!,\n  };\n}\n\n\u002F\u002F For React embedding, use @documenso\u002Fembed-react\n\u002F\u002F npm install @documenso\u002Fembed-react\n\n\u002F\u002F React component example:\n\u002F*\nimport { EmbedDirectTemplate } from '@documenso\u002Fembed-react';\n\nfunction SigningComponent({ signingToken }) {\n  return (\n    \u003CEmbedDirectTemplate\n      token={signingToken}\n      host=\"https:\u002F\u002Fapp.documenso.com\"\n      onDocumentReady={() => console.log('Ready')}\n      onDocumentCompleted={() => console.log('Completed')}\n      onDocumentError={(error) => console.error(error)}\n    \u002F>\n  );\n}\n*\u002F\n```\n\n### Step 6: Pre-fill Template Fields\n\n```typescript\ninterface PrefillInput {\n  templateId: string;\n  recipients: Array\u003C{\n    email: string;\n    name: string;\n    prefillFields?: Array\u003C{\n      fieldId: string;\n      value: string;\n    }>;\n  }>;\n}\n\nasync function createWithPrefill(\n  input: PrefillInput\n): Promise\u003C{ documentId: string }> {\n  const result = await documenso.envelopes.useV0({\n    templateId: input.templateId,\n    recipients: input.recipients.map((r, index) => ({\n      email: r.email,\n      name: r.name,\n      signerIndex: index,\n      prefillFields: r.prefillFields,\n    })),\n  });\n\n  return { documentId: result.envelopeId! };\n}\n\n\u002F\u002F Example: Pre-fill contract details\nawait createWithPrefill({\n  templateId,\n  recipients: [\n    {\n      email: \"client@example.com\",\n      name: \"Client Name\",\n      prefillFields: [\n        { fieldId: \"company_name_field\", value: \"Acme Corporation\" },\n        { fieldId: \"contract_amount_field\", value: \"$50,000\" },\n      ],\n    },\n  ],\n});\n```\n\n### Step 7: Duplicate and Modify Templates\n\n```typescript\nasync function duplicateTemplate(\n  templateId: string,\n  newTitle: string\n): Promise\u003Cstring> {\n  const duplicate = await documenso.templates.duplicateV0({\n    templateId,\n    title: newTitle,\n  });\n\n  console.log(`Duplicated template: ${duplicate.templateId}`);\n  return duplicate.templateId!;\n}\n\n\u002F\u002F Example: Create region-specific variants\nconst usTemplateId = await duplicateTemplate(templateId, \"NDA - US Version\");\nconst euTemplateId = await duplicateTemplate(templateId, \"NDA - EU Version\");\n```\n\n## Template Workflow Patterns\n\n### Pattern 1: Sales Contract Flow\n```typescript\n\u002F\u002F 1. Create template once\nconst salesContractTemplate = await createTemplate({\n  title: \"Sales Agreement\",\n  pdfPath: \".\u002Ftemplates\u002Fsales-agreement.pdf\",\n  recipientRoles: [\n    { name: \"Sales Rep\", role: \"SIGNER\", signingOrder: 1 },\n    { name: \"Customer\", role: \"SIGNER\", signingOrder: 2 },\n    { name: \"Legal Review\", role: \"APPROVER\", signingOrder: 3 },\n  ],\n});\n\n\u002F\u002F 2. Use for each deal\nasync function createSalesContract(deal: DealInfo) {\n  return createFromTemplate({\n    templateId: salesContractTemplate,\n    title: `Sales Agreement - ${deal.customerName}`,\n    recipients: [\n      { email: deal.salesRepEmail, name: deal.salesRepName },\n      { email: deal.customerEmail, name: deal.customerName },\n      { email: \"legal@company.com\", name: \"Legal Team\" },\n    ],\n    sendImmediately: true,\n  });\n}\n```\n\n### Pattern 2: Self-Service Signing\n```typescript\n\u002F\u002F Customer visits your site, fills form, and signs\nasync function selfServiceSigning(customerInfo: CustomerInfo) {\n  \u002F\u002F Create document from template with customer info pre-filled\n  const doc = await createWithPrefill({\n    templateId: selfServiceTemplateId,\n    recipients: [\n      {\n        email: customerInfo.email,\n        name: customerInfo.name,\n        prefillFields: [\n          { fieldId: \"customer_name\", value: customerInfo.name },\n          { fieldId: \"customer_address\", value: customerInfo.address },\n        ],\n      },\n    ],\n  });\n\n  \u002F\u002F Get signing URL for immediate redirect\n  const { signingUrl } = await getSigningToken(\n    doc.documentId,\n    customerInfo.email\n  );\n\n  return { signingUrl };\n}\n```\n\n## Output\n- Created reusable templates\n- Generated documents from templates\n- Direct signing links available\n- Embedded signing experience ready\n- Pre-filled field values\n\n## Error Handling\n| Error | Cause | Solution |\n|-------|-------|----------|\n| Template not found | Invalid ID or deleted | Verify template exists |\n| Recipient mismatch | Wrong number of recipients | Match template roles |\n| Field not found | Invalid field ID for prefill | Get field IDs from template |\n| Direct link disabled | Feature not enabled | Enable in template settings |\n| Duplicate failed | Template in use | Try with different title |\n\n## Resources\n- [Templates API](https:\u002F\u002Fgithub.com\u002Fdocumenso\u002Fsdk-typescript\u002Fblob\u002Fmain\u002Fdocs\u002Fsdks\u002Ftemplates\u002FREADME.md)\n- [Embedding Documentation](https:\u002F\u002Fdocs.documenso.com\u002Fdevelopers\u002Fembedding)\n- [Direct Templates](https:\u002F\u002Fdocs.documenso.com\u002Fusers\u002Ftemplates)\n\n## Next Steps\nFor error handling patterns, see `documenso-common-errors`.\n","# Documenso Core Workflow B: Templates & Direct Signing\n\n## Overview\nCreate reusable templates, generate documents from templates, and implement direct signing experiences with Documenso.\n\n## Prerequisites\n- Completed `documenso-core-workflow-a`\n- Understanding of template-based document generation\n- PDF template files ready\n\n## Instructions\n\n### Step 1: Create a Template\n\n```typescript\nimport { Documenso } from \"@documenso\u002Fsdk-typescript\";\nimport { openAsBlob } from \"node:fs\";\n\nconst documenso = new Documenso({\n  apiKey: process.env.DOCUMENSO_API_KEY ?? \"\",\n});\n\ninterface CreateTemplateInput {\n  title: string;\n  pdfPath: string;\n  recipientRoles: Array\u003C{\n    name: string;  \u002F\u002F e.g., \"Employee\", \"Manager\"\n    role: \"SIGNER\" | \"APPROVER\" | \"VIEWER\" | \"CC\";\n    signingOrder?: number;\n  }>;\n}\n\nasync function createTemplate(\n  input: CreateTemplateInput\n): Promise\u003Cstring> {\n  const pdfBlob = await openAsBlob(input.pdfPath);\n\n  \u002F\u002F Create the template\n  const template = await documenso.templates.createV0({\n    title: input.title,\n    file: pdfBlob,\n  });\n\n  const templateId = template.templateId!;\n  console.log(`Created template: ${templateId}`);\n\n  \u002F\u002F Add recipient placeholders\n  for (const role of input.recipientRoles) {\n    await documenso.templatesRecipients.createV0({\n      templateId,\n      name: role.name,\n      role: role.role,\n      signingOrder: role.signingOrder,\n    });\n    console.log(`Added role: ${role.name}`);\n  }\n\n  return templateId;\n}\n\n\u002F\u002F Example: Create NDA template\nconst templateId = await createTemplate({\n  title: \"Non-Disclosure Agreement\",\n  pdfPath: \".\u002Ftemplates\u002Fnda.pdf\",\n  recipientRoles: [\n    { name: \"Disclosing Party\", role: \"SIGNER\", signingOrder: 1 },\n    { name: \"Receiving Party\", role: \"SIGNER\", signingOrder: 2 },\n  ],\n});\n```\n\n### Step 2: Add Template Fields\n\n```typescript\ninterface TemplateFieldInput {\n  recipientIndex: number;  \u002F\u002F Index of recipient in the roles array\n  type: \"SIGNATURE\" | \"INITIALS\" | \"NAME\" | \"EMAIL\" | \"DATE\" | \"TEXT\";\n  page: number;\n  x: number;\n  y: number;\n  width?: number;\n  height?: number;\n}\n\nasync function addTemplateFields(\n  templateId: string,\n  fields: TemplateFieldInput[]\n): Promise\u003Cvoid> {\n  \u002F\u002F Get template recipients to map indices to IDs\n  const template = await documenso.templates.getV0({ templateId });\n  const recipientIds = template.recipients?.map(r => r.id!) ?? [];\n\n  for (const field of fields) {\n    const recipientId = recipientIds[field.recipientIndex];\n    if (!recipientId) {\n      console.error(`No recipient at index ${field.recipientIndex}`);\n      continue;\n    }\n\n    await documenso.templatesFields.createV0({\n      templateId,\n      recipientId,\n      type: field.type,\n      page: field.page,\n      positionX: field.x,\n      positionY: field.y,\n      width: field.width ?? 200,\n      height: field.height ?? 60,\n    });\n    console.log(`Added ${field.type} field for recipient ${field.recipientIndex}`);\n  }\n}\n\n\u002F\u002F Example: Add fields to NDA template\nawait addTemplateFields(templateId, [\n  \u002F\u002F Disclosing Party fields (index 0)\n  { recipientIndex: 0, type: \"SIGNATURE\", page: 2, x: 100, y: 400 },\n  { recipientIndex: 0, type: \"NAME\", page: 2, x: 100, y: 350 },\n  { recipientIndex: 0, type: \"DATE\", page: 2, x: 350, y: 400 },\n  \u002F\u002F Receiving Party fields (index 1)\n  { recipientIndex: 1, type: \"SIGNATURE\", page: 2, x: 100, y: 200 },\n  { recipientIndex: 1, type: \"NAME\", page: 2, x: 100, y: 150 },\n  { recipientIndex: 1, type: \"DATE\", page: 2, x: 350, y: 200 },\n]);\n```\n\n### Step 3: Generate Document from Template\n\n```typescript\ninterface UseTemplateInput {\n  templateId: string;\n  title?: string;\n  recipients: Array\u003C{\n    email: string;\n    name: string;\n  }>;\n  sendImmediately?: boolean;\n}\n\nasync function createFromTemplate(\n  input: UseTemplateInput\n): Promise\u003C{ documentId: string }> {\n  \u002F\u002F Use the template to create a new document\n  const result = await documenso.envelopes.useV0({\n    templateId: input.templateId,\n    title: input.title,\n    recipients: input.recipients.map((r, index) => ({\n      email: r.email,\n      name: r.name,\n      signerIndex: index,\n    })),\n  });\n\n  const documentId = result.envelopeId!;\n  console.log(`Created document from template: ${documentId}`);\n\n  \u002F\u002F Send if requested\n  if (input.sendImmediately) {\n    await documenso.envelopes.distributeV0({\n      envelopeId: documentId,\n    });\n    console.log(\"Document sent to recipients\");\n  }\n\n  return { documentId };\n}\n\n\u002F\u002F Example: Create NDA from template\nconst document = await createFromTemplate({\n  templateId,\n  title: \"NDA - Acme Corp Partnership\",\n  recipients: [\n    { email: \"legal@yourcompany.com\", name: \"Your Company Legal\" },\n    { email: \"partner@acme.com\", name: \"Acme Corp Representative\" },\n  ],\n  sendImmediately: true,\n});\n```\n\n### Step 4: Direct Template Links\n\nDirect templates allow signers to access and sign documents without pre-registration.\n\n```typescript\nasync function createDirectTemplateLink(\n  templateId: string\n): Promise\u003C{ directLink: string }> {\n  \u002F\u002F Get template direct link settings\n  const template = await documenso.templates.getV0({ templateId });\n\n  \u002F\u002F The direct link is available when template is published\n  const directLink = template.directLink;\n\n  if (!directLink) {\n    console.log(\"Template direct link not enabled. Enable in dashboard.\");\n    throw new Error(\"Direct link not available\");\n  }\n\n  return { directLink };\n}\n\n\u002F\u002F Example usage with direct link\n\u002F\u002F Users can access: https:\u002F\u002Fapp.documenso.com\u002Fd\u002F{directLinkToken}\n```\n\n### Step 5: Embedding Signing Experience\n\n```typescript\n\u002F\u002F Get signing token for embedding\nasync function getSigningToken(\n  documentId: string,\n  recipientEmail: string\n): Promise\u003C{ signingToken: string; signingUrl: string }> {\n  \u002F\u002F Get document with recipients\n  const doc = await documenso.documents.getV0({ documentId });\n\n  const recipient = doc.recipients?.find(r => r.email === recipientEmail);\n  if (!recipient) {\n    throw new Error(`Recipient ${recipientEmail} not found`);\n  }\n\n  \u002F\u002F The signing token can be used for embedding\n  return {\n    signingToken: recipient.signingToken!,\n    signingUrl: recipient.signingUrl!,\n  };\n}\n\n\u002F\u002F For React embedding, use @documenso\u002Fembed-react\n\u002F\u002F npm install @documenso\u002Fembed-react\n\n\u002F\u002F React component example:\n\u002F*\nimport { EmbedDirectTemplate } from '@documenso\u002Fembed-react';\n\nfunction SigningComponent({ signingToken }) {\n  return (\n    \u003CEmbedDirectTemplate\n      token={signingToken}\n      host=\"https:\u002F\u002Fapp.documenso.com\"\n      onDocumentReady={() => console.log('Ready')}\n      onDocumentCompleted={() => console.log('Completed')}\n      onDocumentError={(error) => console.error(error)}\n    \u002F>\n  );\n}\n*\u002F\n```\n\n### Step 6: Pre-fill Template Fields\n\n```typescript\ninterface PrefillInput {\n  templateId: string;\n  recipients: Array\u003C{\n    email: string;\n    name: string;\n    prefillFields?: Array\u003C{\n      fieldId: string;\n      value: string;\n    }>;\n  }>;\n}\n\nasync function createWithPrefill(\n  input: PrefillInput\n): Promise\u003C{ documentId: string }> {\n  const result = await documenso.envelopes.useV0({\n    templateId: input.templateId,\n    recipients: input.recipients.map((r, index) => ({\n      email: r.email,\n      name: r.name,\n      signerIndex: index,\n      prefillFields: r.prefillFields,\n    })),\n  });\n\n  return { documentId: result.envelopeId! };\n}\n\n\u002F\u002F Example: Pre-fill contract details\nawait createWithPrefill({\n  templateId,\n  recipients: [\n    {\n      email: \"client@example.com\",\n      name: \"Client Name\",\n      prefillFields: [\n        { fieldId: \"company_name_field\", value: \"Acme Corporation\" },\n        { fieldId: \"contract_amount_field\", value: \"$50,000\" },\n      ],\n    },\n  ],\n});\n```\n\n### Step 7: Duplicate and Modify Templates\n\n```typescript\nasync function duplicateTemplate(\n  templateId: string,\n  newTitle: string\n): Promise\u003Cstring> {\n  const duplicate = await documenso.templates.duplicateV0({\n    templateId,\n    title: newTitle,\n  });\n\n  console.log(`Duplicated template: ${duplicate.templateId}`);\n  return duplicate.templateId!;\n}\n\n\u002F\u002F Example: Create region-specific variants\nconst usTemplateId = await duplicateTemplate(templateId, \"NDA - US Version\");\nconst euTemplateId = await duplicateTemplate(templateId, \"NDA - EU Version\");\n```\n\n## Template Workflow Patterns\n\n### Pattern 1: Sales Contract Flow\n```typescript\n\u002F\u002F 1. Create template once\nconst salesContractTemplate = await createTemplate({\n  title: \"Sales Agreement\",\n  pdfPath: \".\u002Ftemplates\u002Fsales-agreement.pdf\",\n  recipientRoles: [\n    { name: \"Sales Rep\", role: \"SIGNER\", signingOrder: 1 },\n    { name: \"Customer\", role: \"SIGNER\", signingOrder: 2 },\n    { name: \"Legal Review\", role: \"APPROVER\", signingOrder: 3 },\n  ],\n});\n\n\u002F\u002F 2. Use for each deal\nasync function createSalesContract(deal: DealInfo) {\n  return createFromTemplate({\n    templateId: salesContractTemplate,\n    title: `Sales Agreement - ${deal.customerName}`,\n    recipients: [\n      { email: deal.salesRepEmail, name: deal.salesRepName },\n      { email: deal.customerEmail, name: deal.customerName },\n      { email: \"legal@company.com\", name: \"Legal Team\" },\n    ],\n    sendImmediately: true,\n  });\n}\n```\n\n### Pattern 2: Self-Service Signing\n```typescript\n\u002F\u002F Customer visits your site, fills form, and signs\nasync function selfServiceSigning(customerInfo: CustomerInfo) {\n  \u002F\u002F Create document from template with customer info pre-filled\n  const doc = await createWithPrefill({\n    templateId: selfServiceTemplateId,\n    recipients: [\n      {\n        email: customerInfo.email,\n        name: customerInfo.name,\n        prefillFields: [\n          { fieldId: \"customer_name\", value: customerInfo.name },\n          { fieldId: \"customer_address\", value: customerInfo.address },\n        ],\n      },\n    ],\n  });\n\n  \u002F\u002F Get signing URL for immediate redirect\n  const { signingUrl } = await getSigningToken(\n    doc.documentId,\n    customerInfo.email\n  );\n\n  return { signingUrl };\n}\n```\n\n## Output\n- Created reusable templates\n- Generated documents from templates\n- Direct signing links available\n- Embedded signing experience ready\n- Pre-filled field values\n\n## Error Handling\n| Error | Cause | Solution |\n|-------|-------|----------|\n| Template not found | Invalid ID or deleted | Verify template exists |\n| Recipient mismatch | Wrong number of recipients | Match template roles |\n| Field not found | Invalid field ID for prefill | Get field IDs from template |\n| Direct link disabled | Feature not enabled | Enable in template settings |\n| Duplicate failed | Template in use | Try with different title |\n\n## Resources\n- [Templates API](https:\u002F\u002Fgithub.com\u002Fdocumenso\u002Fsdk-typescript\u002Fblob\u002Fmain\u002Fdocs\u002Fsdks\u002Ftemplates\u002FREADME.md)\n- [Embedding Documentation](https:\u002F\u002Fdocs.documenso.com\u002Fdevelopers\u002Fembedding)\n- [Direct Templates](https:\u002F\u002Fdocs.documenso.com\u002Fusers\u002Ftemplates)\n\n## Next Steps\nFor error handling patterns, see `documenso-common-errors`.\n",{"name":5,"author":52,"license":15,"version":53,"description":54,"allowed-tools":55},"Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Implement Documenso template-based workflows and direct signing links.\nUse when creating reusable templates, generating documents from templates,\nor implementing direct signing experiences.\nTrigger with phrases like \"documenso template\", \"signing link\",\n\"direct template\", \"reusable document\", \"template workflow\".\n","Read, Write, Edit","main","90b50ed0778745a80fd5bfb13b1843d45b9e82f7","tests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fdocumenso-pack\u002Fskills\u002Fdocumenso-core-workflow-b",233,"https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust","https:\u002F\u002Fgithub.com\u002FDicklesworthstone","https:\u002F\u002Fwww.jeffreyemanuel.com\u002F","Building in NY","2026-11-15 01:54:15",{"source":8,"skillName":5,"commands":66,"prompt":76,"zipAvailable":77},[67,70,73],{"tool":68,"command":69},"npx","npx skills add Dicklesworthstone\u002Fpi_agent_rust --skill documenso-core-workflow-b",{"tool":71,"command":72},"bunx","bunx skills add Dicklesworthstone\u002Fpi_agent_rust --skill documenso-core-workflow-b",{"tool":74,"command":75},"pnpm","pnpm dlx skills add Dicklesworthstone\u002Fpi_agent_rust --skill documenso-core-workflow-b","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fdocumenso-pack\u002Fskills\u002Fdocumenso-core-workflow-b\u002FSKILL.md",true,[],[80,111,146,169,195,219],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":84,"licenseFileUrl":85,"sourceHtmlUrl":86,"categories":87,"keywords":91,"publishedAt":110},"01M6FCR7G5A005P364Z6ZWCJDP","theme-factory","Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors\u002Ffonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fcreative-design\u002Ftheme-factory\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fcreative-design\u002Ftheme-factory\u002FSKILL.md",[88],{"categoryNo":89,"categoryName":90,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",[92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,32,108,109],"theme factory","factory","theme","docs","toolkit","generate","artifacts","SET","fly","slides","landing","html","styling","artifact","pages","themes","you","fonts","2026-11-11 15:11:14",{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":84,"licenseFileUrl":115,"sourceHtmlUrl":116,"categories":117,"keywords":121,"publishedAt":47},"01M6FEGPPK0ZTKCCM0R3E3KS33","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[118],{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[122,123,98,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,38,103,139,140,141,142,143,144,145],"web artifacts builder","web","artifacts builder","builder","frontend","css","components","react","component","routing","state management","state","shadcn","file","ui","Tools","Tailwind","single-file","simple","ui components","multi","for","jsx","suite",{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":84,"licenseFileUrl":150,"sourceHtmlUrl":151,"categories":152,"keywords":157,"publishedAt":47},"01M6FEE9VTK1W4GY21AKREJXRG","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[153,156],{"categoryNo":154,"categoryName":155,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},[158,159,160,126,161,162,123,163,96,164,136,165,166,167,168,32,143],"testing","webapp testing","webapp","screenshots","playwright","debugging","browser","logs","applications","behavior","local",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":173,"sourceHtmlUrl":174,"categories":175,"keywords":176,"publishedAt":47},"01M6FE20F7ZTQBFWKF4MPJ2SBX","neuropixels-analysis","Neuropixels neural recording analysis. Load SpikeGLX\u002FOpenEphys data, preprocess, motion correction, Kilosort4 spike sorting, quality metrics, Allen\u002FIBL curation, AI-assisted visual analysis, for Neuropixels 1.0\u002F2.0 extracellular electrophysiology. Use when working with neural recordings, spike sorting, extracellular electrophysiology, or when the user mentions Neuropixels, SpikeGLX, Open Ephys, Kilosort, quality metrics, or unit curation.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FSKILL.md",[],[177,178,179,180,181,182,183,184,38,185,186,187,188,189,190,191,32,192,193,194,143,28],"analysis","neuropixels analysis","spike","metrics","data","open","quality","user","recordings","Neural","motion","visual","quality metrics","unit","sorting","curation","recording","load",{"skillNo":196,"name":197,"nameZh":6,"description":198,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":84,"licenseFileUrl":199,"sourceHtmlUrl":200,"categories":201,"keywords":203,"publishedAt":47},"01M6FDP0PDK6F1GGX395C7625Z","skill-creator","Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FSKILL.md",[202],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[204,205,46,206,207,208,209,210,211,212,213,214,215,216,32,143,217,28,218],"skill creator","creator","create","update","capabilities","knowledge","tool","integrations","specialized","guide","new skill","existing skill","users","Existing","new",{"skillNo":220,"name":221,"nameZh":6,"description":222,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":223,"sourceHtmlUrl":224,"categories":225,"keywords":227,"publishedAt":47},"01M6FDM8Y7VK7NYG9SM7QPA3PW","notebooklm","Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FSKILL.md",[226],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[221,228,229,230,231,232,233,164,234,235,38,236,36,237,238,143,239],"google","browser automation","gemini","automation","auth","code","library","management","only","query","Citation","source"]