Skip to content
SlashClone
Made by@brandkit

Social image templates

@brandkit/social-image-templates

Generate on-brand social image templates as editable SVGs from your brand.md tokens: an Open Graph image (1200x630), a square post (1080x1080), and a story (1080x1920 with safe zones). Checks text contrast and fits the headline for you.

SkillContentv1.0.1 (latest)Tested
Activity
New: be the first to try it
  1. 1{
  2. 2 "name": "social-image-templates",
  3. 3 "owner": "brandkit",
  4. 4 "version": "1.0.1",
  5. 5 "type": "skill",
  6. 6 "description": "Generate on-brand social image templates as editable SVGs from your brand.md tokens: an Open Graph image (1200x630), a square post (1080x1080), and a story (1080x1920 with safe zones). Checks text contrast and fits the headline for you.",
  7. 7 "category": "content",
  8. 8 "license": "MIT",
  9. 9 "compat": ["claude-code"],
  10. 10 "permissions": {
  11. 11 "shell": ["node scripts/make-templates.mjs"],
  12. 12 "files": {
  13. 13 "read": ["./brand.md", "./docs/brand.md", "./assets/**", "./brand/**"],
  14. 14 "write": ["./social-templates/**"]
  15. 15 }
  16. 16 },
  17. 17 "tests": {
  18. 18 "cases": [
  19. 19 {
  20. 20 "name": "builds three sizes with readable text on the brand color",
  21. 21 "inputs": {
  22. 22 "brand.md": "# Brand\n\n```yaml tokens\nname: Testco\ncolor:\n primary: \"#1F7A5C\"\n accent: \"#F2A541\"\n ink: \"#1B1F23\"\n paper: \"#FFFFFF\"\nfont:\n heading: [Fraunces, Georgia, serif]\n body: [Inter, sans-serif]\n```\n"
  23. 23 },
  24. 24 "checks": [
  25. 25 {
  26. 26 "type": "command_exits_zero",
  27. 27 "command": "node scripts/make-templates.mjs brand.md social-templates --title \"Launch week starts Monday\" --footer testco.example"
  28. 28 },
  29. 29 { "type": "file_contains", "path": "social-templates/og-1200x630.svg", "text": "width=\"1200\" height=\"630\"" },
  30. 30 { "type": "file_contains", "path": "social-templates/square-1080.svg", "text": "width=\"1080\" height=\"1080\"" },
  31. 31 { "type": "file_contains", "path": "social-templates/story-1080x1920.svg", "text": "Safe zone" },
  32. 32 { "type": "file_contains", "path": "social-templates/og-1200x630.svg", "text": "Launch week starts Monday" },
  33. 33 { "type": "file_contains", "path": "social-templates/og-1200x630.svg", "text": "fill=\"#1F7A5C\"" },
  34. 34 {
  35. 35 "type": "output_matches_schema",
  36. 36 "path": "social-templates/templates.json",
  37. 37 "schema": {
  38. 38 "type": "object",
  39. 39 "required": ["colors", "text_contrast", "templates"],
  40. 40 "properties": {
  41. 41 "colors": {
  42. 42 "type": "object",
  43. 43 "properties": { "background": { "const": "#1F7A5C" }, "text": { "const": "#FFFFFF" } }
  44. 44 },
  45. 45 "text_contrast": { "type": "number", "minimum": 4.5 },
  46. 46 "templates": { "type": "array", "minItems": 3, "maxItems": 3 }
  47. 47 }
  48. 48 }
  49. 49 }
  50. 50 ]
  51. 51 },
  52. 52 {
  53. 53 "name": "light style picks dark text and escapes special characters",
  54. 54 "inputs": {
  55. 55 "brand.md": "```yaml\ncolor:\n primary: \"#F2A541\"\n ink: \"#1B1F23\"\n paper: \"#FFFFFF\"\n```\n"
  56. 56 },
  57. 57 "checks": [
  58. 58 {
  59. 59 "type": "command_exits_zero",
  60. 60 "command": "node scripts/make-templates.mjs brand.md social-templates --style light --title \"Q&A: <live> today\""
  61. 61 },
  62. 62 { "type": "file_contains", "path": "social-templates/square-1080.svg", "text": "Q&amp;A: &lt;live&gt; today" },
  63. 63 { "type": "file_contains", "path": "social-templates/square-1080.svg", "text": "fill=\"#1B1F23\"" },
  64. 64 {
  65. 65 "type": "output_matches_schema",
  66. 66 "path": "social-templates/templates.json",
  67. 67 "schema": {
  68. 68 "type": "object",
  69. 69 "properties": { "colors": { "type": "object", "properties": { "text": { "const": "#1B1F23" } } } }
  70. 70 }
  71. 71 }
  72. 72 ]
  73. 73 }
  74. 74 ]
  75. 75 }