Skip to content
SlashClone
Made by@dealdesk

Po creator

@dealdesk/po-creator

Turn a deal into a clean order form or purchase order, in markdown and printable HTML. Computes line totals, discounts, contract value, and a billing schedule, and lists what finance needs before signature. Works offline from a JSON file or a short text form.

SkillRevOpsv1.0.0 (latest)Tested
Activity
New: be the first to try it
  1. 1{
  2. 2 "name": "po-creator",
  3. 3 "owner": "dealdesk",
  4. 4 "version": "1.0.0",
  5. 5 "type": "skill",
  6. 6 "description": "Turn a deal into a clean order form or purchase order, in markdown and printable HTML. Computes line totals, discounts, contract value, and a billing schedule, and lists what finance needs before signature. Works offline from a JSON file or a short text form.",
  7. 7 "category": "revops",
  8. 8 "license": "MIT",
  9. 9 "compat": [
  10. 10 "claude-code"
  11. 11 ],
  12. 12 "permissions": {
  13. 13 "shell": [
  14. 14 "node scripts/po-creator.mjs"
  15. 15 ],
  16. 16 "files": {
  17. 17 "read": [
  18. 18 "./data/**"
  19. 19 ],
  20. 20 "write": [
  21. 21 "./data/**",
  22. 22 "./out/**"
  23. 23 ]
  24. 24 }
  25. 25 },
  26. 26 "tests": {
  27. 27 "cases": [
  28. 28 {
  29. 29 "name": "JSON deal: totals, quarterly schedule, and a missing PO blocker",
  30. 30 "inputs": {
  31. 31 "data/deal.json": "{\"order_number\":\"OF-T-1\",\"customer\":{\"legal_name\":\"Northwind Traders LLC\",\"address\":\"100 Market Street\",\"billing_contact\":{\"name\":\"Accounts Payable\",\"email\":\"ap@northwind.example\"}},\"start_date\":\"2026-12-01\",\"term_months\":12,\"billing_frequency\":\"quarterly\",\"payment_terms\":\"Net 45\",\"po_required\":true,\"lines\":[{\"sku\":\"PLAT-SEAT\",\"description\":\"Platform seat\",\"quantity\":50,\"list_price\":600,\"net_price\":480},{\"sku\":\"SUP-PREM\",\"description\":\"Premium support\",\"quantity\":1,\"list_price\":6000,\"net_price\":6000},{\"sku\":\"ONB-STD\",\"description\":\"Onboarding\",\"quantity\":1,\"list_price\":5000,\"net_price\":4000,\"billing\":\"one_time\"}]}"
  32. 32 },
  33. 33 "checks": [
  34. 34 {
  35. 35 "type": "command_exits_zero",
  36. 36 "command": "node scripts/po-creator.mjs data/deal.json --out out --today 2026-11-04"
  37. 37 },
  38. 38 {
  39. 39 "type": "file_exists",
  40. 40 "path": "out/order-form.html"
  41. 41 },
  42. 42 {
  43. 43 "type": "file_contains",
  44. 44 "path": "out/order-form.md",
  45. 45 "text": "| **Total contract value** | **$34,000.00** |"
  46. 46 },
  47. 47 {
  48. 48 "type": "output_matches_schema",
  49. 49 "path": "out/order-form.json",
  50. 50 "schema": {
  51. 51 "type": "object",
  52. 52 "required": [
  53. 53 "totals",
  54. 54 "billing_schedule",
  55. 55 "blockers",
  56. 56 "ready_for_signature"
  57. 57 ],
  58. 58 "properties": {
  59. 59 "totals": {
  60. 60 "type": "object",
  61. 61 "properties": {
  62. 62 "list_total": {
  63. 63 "const": 41000
  64. 64 },
  65. 65 "tcv": {
  66. 66 "const": 34000
  67. 67 },
  68. 68 "acv": {
  69. 69 "const": 30000
  70. 70 },
  71. 71 "one_time_total": {
  72. 72 "const": 4000
  73. 73 },
  74. 74 "discount_pct": {
  75. 75 "const": 17.1
  76. 76 }
  77. 77 }
  78. 78 },
  79. 79 "billing_schedule": {
  80. 80 "type": "array",
  81. 81 "minItems": 4,
  82. 82 "maxItems": 4
  83. 83 },
  84. 84 "blockers": {
  85. 85 "const": 1
  86. 86 },
  87. 87 "ready_for_signature": {
  88. 88 "const": false
  89. 89 }
  90. 90 }
  91. 91 }
  92. 92 }
  93. 93 ]
  94. 94 },
  95. 95 {
  96. 96 "name": "short text form: two-year term, monthly-priced line, annual billing",
  97. 97 "inputs": {
  98. 98 "data/deal.txt": "number: OF-T-2\ncustomer: Contoso Robotics Inc.\naddress: 22 Harbor Road\nbilling contact: Finance Team, invoices@contoso.example\nsigner: Operations Lead, VP Operations\nstart: 2027-01-01\nterm: 24 months\nbilling: annual\npayment terms: Net 30\npo required: no\nline: PLAT-SEAT | Platform seat | 120 | 600 | 510\nline: API-1K | API calls per 1,000 | 500 | 2 | 1.6 | month\nline: ONB-PLUS | Onboarding plus training | 1 | 9000 | 9000 | one-time\n"
  99. 99 },
  100. 100 "checks": [
  101. 101 {
  102. 102 "type": "command_exits_zero",
  103. 103 "command": "node scripts/po-creator.mjs data/deal.txt --out out --name of-t-2 --today 2026-11-04"
  104. 104 },
  105. 105 {
  106. 106 "type": "output_matches_schema",
  107. 107 "path": "out/of-t-2.json",
  108. 108 "schema": {
  109. 109 "type": "object",
  110. 110 "properties": {
  111. 111 "end_date": {
  112. 112 "const": "2028-12-31"
  113. 113 },
  114. 114 "totals": {
  115. 115 "type": "object",
  116. 116 "properties": {
  117. 117 "tcv": {
  118. 118 "const": 150600
  119. 119 },
  120. 120 "acv": {
  121. 121 "const": 70800
  122. 122 },
  123. 123 "first_year_total": {
  124. 124 "const": 79800
  125. 125 }
  126. 126 }
  127. 127 },
  128. 128 "billing_schedule": {
  129. 129 "type": "array",
  130. 130 "minItems": 2,
  131. 131 "maxItems": 2
  132. 132 },
  133. 133 "blockers": {
  134. 134 "const": 0
  135. 135 }
  136. 136 }
  137. 137 }
  138. 138 }
  139. 139 ]
  140. 140 }
  141. 141 ]
  142. 142 }