docusign-manager
Export and archive DocuSign envelopes, templates, and documents for migration to Documenso. Read-only — no creating or modifying content. Use when: downloading signed documents, exporting templates, bulk archiving, querying envelope status, migrating to Documenso. Triggers on: docusign, export, archive, migration, signed documents, bulk download.
What this skill does
# DocuSign Manager
Read-only export and archive skill for migrating from DocuSign to Documenso + n8n.
## Configuration
- **API**: DocuSign eSignature REST API v2.1
- **Auth**: JWT Grant (RSA-signed assertion → access token, 1-hour expiry, auto-refresh)
- **Base URI**: Auto-discovered via `/oauth/userinfo` (varies by account: na1, na2, na3, eu, au)
- **Rate Limits**: 3,000 calls/hour, 500 per 30 seconds
- **Scripts**: `plugins/psd-productivity/skills/docusign-manager/scripts/`
All scripts use `bun` and read credentials from `secrets.js` (env vars → Geoffrey .env).
### Required Secrets
| Secret | Description |
|--------|-------------|
| `DOCUSIGN_INTEGRATION_KEY` | Integration key (client ID) from DocuSign admin |
| `DOCUSIGN_USER_ID` | User ID (GUID) of the API user |
| `DOCUSIGN_ACCOUNT_ID` | Account ID (GUID) |
| `DOCUSIGN_RSA_KEY_PATH` | Path to RSA private key file (PEM format) |
| `DOCUSIGN_ENVIRONMENT` | `production` or `demo` (default: `production`) |
See `references/docusign-jwt-setup.md` for credential setup instructions.
## Command Reference
### Account
| Command | Script | Description |
|---------|--------|-------------|
| `/docusign status` | `bun health_check.js` | Test JWT auth, show account info |
### Templates
| Command | Script | Description |
|---------|--------|-------------|
| `/docusign list-templates` | `bun list_templates.js` | List all templates |
| `/docusign list-templates '{"search":"permission"}'` | `bun list_templates.js '{"search":"permission"}'` | Search templates |
| `/docusign get-template <id>` | `bun get_template.js <id>` | Full template with fields/recipients |
| `/docusign export-template <id>` | `bun export_template.js <id>` | Export as Documenso-compatible JSON |
| `/docusign export-templates` | `bun export_all_templates.js` | Export ALL templates with manifest |
| `/docusign download-template <id>` | `bun download_template.js <id>` | Download template PDF(s) + Documenso field mapping |
### PowerForms
| Command | Script | Description |
|---------|--------|-------------|
| `/docusign list-powerforms` | `bun list_powerforms.js` | List all PowerForms (self-service links) |
| `/docusign get-powerform <id>` | `bun get_powerform.js <id>` | PowerForm details with migration hints |
### Account Inventory
| Command | Script | Description |
|---------|--------|-------------|
| `/docusign export-account` | `bun export_account.js` | Full account inventory (templates, PowerForms, groups, envelope stats by year) |
### Envelopes
| Command | Script | Description |
|---------|--------|-------------|
| `/docusign list-envelopes` | `bun list_envelopes.js` | List recent envelopes |
| `/docusign list-envelopes '{"status":"completed","from_date":"2024-01-01"}'` | `bun list_envelopes.js '...'` | Filter by status/date |
| `/docusign get-envelope <id>` | `bun get_envelope.js <id>` | Full envelope details |
| `/docusign download <id>` | `bun download_document.js <id>` | Download signed PDF |
| `/docusign download-audit <id>` | `bun download_audit.js <id>` | Download audit trail JSON |
| `/docusign download-audit <id> certificate` | `bun download_audit.js <id> certificate` | Download Certificate of Completion PDF |
### Bulk Operations
| Command | Script | Description |
|---------|--------|-------------|
| `/docusign bulk-download` | `bun bulk_download.js` | Download ALL completed envelopes (with checkpointing) |
| `/docusign bulk-download --status` | `bun bulk_download.js --status` | Show bulk download progress |
| `/docusign bulk-download --retry-failed` | `bun bulk_download.js --retry-failed` | Retry previously failed downloads |
| `/docusign bulk-download --from 2024-01-01` | `bun bulk_download.js --from 2024-01-01` | Download from specific date |
| `/docusign bulk-download --reset` | `bun bulk_download.js --reset` | Clear checkpoint and start fresh |
## Bulk Download Details
The `bulk-download` command is designed for large-scale export (50,000+ envelopes):
**Two phases:**
1. **Enumerate** — paginate through all completed envelopes, collect IDs (~30 seconds)
2. **Download** — download each envelope's combined PDF with rate limiting
**Checkpointing:** Progress saved to `~/.docusign-export/checkpoint.json` every 50 downloads. Safe to stop (Ctrl+C) and resume later — picks up where it left off. Already-downloaded files are skipped.
**Output structure:**
```
~/DocuSign-Export/envelopes/
2024/
01/
Permission-Slip-abc12345.pdf
Employment-Agreement-def67890.pdf
02/
...
2025/
...
```
**Time estimate:** 50,000 envelopes at 3,000 API calls/hour = **~17 hours**. Designed for overnight runs.
## Migration Plan (20 Days)
See `references/docusign-migration-guide.md` for the full 20-day migration plan.
| Days | Phase | Key Commands |
|------|-------|-------------|
| 1-2 | Inventory & Archive | `export-account`, `bulk-download` (runs ~18hrs) |
| 3-5 | Template Triage | `export-templates`, `download-template` for each |
| 6-12 | Template Migration | Upload PDFs to Documenso, map fields from exported JSON |
| 13-17 | PowerForm Migration | `list-powerforms`, `get-powerform`, rebuild as n8n workflows |
| 18-19 | Testing & Cutover | Test all workflows, redirect users |
| 20 | Decommission | Disable PowerForms, notify users |
**Account stats**: 655 named templates, 50 PowerForms, 55,068 completed envelopes (2020-2026)
## Template Export for Documenso Migration
The `export-template` command transforms DocuSign templates into Documenso-compatible JSON:
- **Tab type mapping**: `signHereTabs` → `SIGNATURE`, `textTabs` → `TEXT`, `dateSignedTabs` → `DATE`, etc.
- **Coordinate conversion**: DocuSign absolute pixels (72 DPI) → Documenso percentages (0-100)
- **Recipient role mapping**: DocuSign roles → Documenso roles (SIGNER, CC)
- **Unmapped tabs**: Tabs with no Documenso equivalent are logged (e.g., `formulaTabs`, `notarizeTabs`)
See `references/docusign-migration-guide.md` for the complete mapping table.
## Safety Notes
This is a **read-only** skill. No operations create, modify, or delete content in DocuSign.
### Always confirm before:
- **Bulk downloads** — communicate the ~17 hour time estimate upfront
- **Export-all-templates** — may generate many files
## Key Technical Warnings
- **JWT consent is required once** — first-time auth needs a one-time browser-based consent grant. Cannot be automated. See `references/docusign-jwt-setup.md`.
- **`from_date` is REQUIRED** — the envelopes list endpoint silently defaults to 30 days ago if `from_date` is omitted. All scripts pass this explicitly.
- **Base URI varies by account** — DocuSign accounts live on different regional servers. The client auto-discovers via `/oauth/userinfo`.
- **Rate limits: 3,000 calls/hour** — the client implements a token bucket rate limiter (480 tokens, 16/sec refill). Bulk downloads respect this automatically.
- **No npm dependencies** — uses native `crypto.createSign` for JWT signing, native `fetch` for HTTP. Matches the existing skill pattern.
## Reference Documents
| Document | Contents |
|----------|----------|
| `references/docusign-jwt-setup.md` | Step-by-step JWT credential setup for DocuSign admin |
| `references/docusign-api-reference.md` | API endpoints, pagination, rate limits, auth flow |
| `references/docusign-migration-guide.md` | DocuSign → Documenso concept mapping, field types, coordinates |
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.