@rune-kit/rune 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +357 -0
  3. package/agents/.gitkeep +0 -0
  4. package/agents/architect.md +29 -0
  5. package/agents/asset-creator.md +11 -0
  6. package/agents/audit.md +11 -0
  7. package/agents/autopsy.md +11 -0
  8. package/agents/brainstorm.md +11 -0
  9. package/agents/browser-pilot.md +11 -0
  10. package/agents/coder.md +29 -0
  11. package/agents/completion-gate.md +11 -0
  12. package/agents/constraint-check.md +11 -0
  13. package/agents/context-engine.md +11 -0
  14. package/agents/cook.md +11 -0
  15. package/agents/db.md +11 -0
  16. package/agents/debug.md +11 -0
  17. package/agents/dependency-doctor.md +11 -0
  18. package/agents/deploy.md +11 -0
  19. package/agents/design.md +11 -0
  20. package/agents/docs-seeker.md +11 -0
  21. package/agents/fix.md +11 -0
  22. package/agents/hallucination-guard.md +11 -0
  23. package/agents/incident.md +11 -0
  24. package/agents/integrity-check.md +11 -0
  25. package/agents/journal.md +11 -0
  26. package/agents/launch.md +11 -0
  27. package/agents/logic-guardian.md +11 -0
  28. package/agents/marketing.md +11 -0
  29. package/agents/onboard.md +11 -0
  30. package/agents/perf.md +11 -0
  31. package/agents/plan.md +11 -0
  32. package/agents/preflight.md +11 -0
  33. package/agents/problem-solver.md +11 -0
  34. package/agents/rescue.md +11 -0
  35. package/agents/research.md +11 -0
  36. package/agents/researcher.md +29 -0
  37. package/agents/review-intake.md +11 -0
  38. package/agents/review.md +11 -0
  39. package/agents/reviewer.md +28 -0
  40. package/agents/safeguard.md +11 -0
  41. package/agents/sast.md +11 -0
  42. package/agents/scanner.md +28 -0
  43. package/agents/scope-guard.md +11 -0
  44. package/agents/scout.md +11 -0
  45. package/agents/sentinel.md +11 -0
  46. package/agents/sequential-thinking.md +11 -0
  47. package/agents/session-bridge.md +11 -0
  48. package/agents/skill-forge.md +11 -0
  49. package/agents/skill-router.md +11 -0
  50. package/agents/surgeon.md +11 -0
  51. package/agents/team.md +11 -0
  52. package/agents/test.md +11 -0
  53. package/agents/trend-scout.md +11 -0
  54. package/agents/verification.md +11 -0
  55. package/agents/video-creator.md +11 -0
  56. package/agents/watchdog.md +11 -0
  57. package/agents/worktree.md +11 -0
  58. package/commands/.gitkeep +0 -0
  59. package/commands/rune.md +168 -0
  60. package/compiler/__tests__/openclaw-adapter.test.js +140 -0
  61. package/compiler/__tests__/parser.test.js +55 -0
  62. package/compiler/adapters/antigravity.js +59 -0
  63. package/compiler/adapters/claude.js +37 -0
  64. package/compiler/adapters/cursor.js +67 -0
  65. package/compiler/adapters/generic.js +60 -0
  66. package/compiler/adapters/index.js +45 -0
  67. package/compiler/adapters/openclaw.js +150 -0
  68. package/compiler/adapters/windsurf.js +60 -0
  69. package/compiler/bin/rune.js +288 -0
  70. package/compiler/doctor.js +153 -0
  71. package/compiler/emitter.js +240 -0
  72. package/compiler/parser.js +208 -0
  73. package/compiler/transformer.js +69 -0
  74. package/compiler/transforms/branding.js +27 -0
  75. package/compiler/transforms/cross-references.js +29 -0
  76. package/compiler/transforms/frontmatter.js +38 -0
  77. package/compiler/transforms/hooks.js +68 -0
  78. package/compiler/transforms/subagents.js +36 -0
  79. package/compiler/transforms/tool-names.js +60 -0
  80. package/contexts/dev.md +34 -0
  81. package/contexts/research.md +43 -0
  82. package/contexts/review.md +55 -0
  83. package/extensions/ai-ml/PACK.md +517 -0
  84. package/extensions/analytics/PACK.md +557 -0
  85. package/extensions/backend/PACK.md +678 -0
  86. package/extensions/chrome-ext/PACK.md +995 -0
  87. package/extensions/content/PACK.md +381 -0
  88. package/extensions/devops/PACK.md +520 -0
  89. package/extensions/ecommerce/PACK.md +280 -0
  90. package/extensions/gamedev/PACK.md +393 -0
  91. package/extensions/mobile/PACK.md +273 -0
  92. package/extensions/saas/PACK.md +805 -0
  93. package/extensions/security/PACK.md +536 -0
  94. package/extensions/trading/PACK.md +597 -0
  95. package/extensions/ui/PACK.md +947 -0
  96. package/package.json +47 -0
  97. package/skills/.gitkeep +0 -0
  98. package/skills/adversary/SKILL.md +271 -0
  99. package/skills/asset-creator/SKILL.md +157 -0
  100. package/skills/audit/SKILL.md +466 -0
  101. package/skills/autopsy/SKILL.md +200 -0
  102. package/skills/ba/SKILL.md +279 -0
  103. package/skills/brainstorm/SKILL.md +266 -0
  104. package/skills/browser-pilot/SKILL.md +168 -0
  105. package/skills/completion-gate/SKILL.md +151 -0
  106. package/skills/constraint-check/SKILL.md +165 -0
  107. package/skills/context-engine/SKILL.md +176 -0
  108. package/skills/cook/SKILL.md +636 -0
  109. package/skills/db/SKILL.md +256 -0
  110. package/skills/debug/SKILL.md +240 -0
  111. package/skills/dependency-doctor/SKILL.md +235 -0
  112. package/skills/deploy/SKILL.md +174 -0
  113. package/skills/design/DESIGN-REFERENCE.md +365 -0
  114. package/skills/design/SKILL.md +462 -0
  115. package/skills/doc-processor/SKILL.md +254 -0
  116. package/skills/docs/SKILL.md +336 -0
  117. package/skills/docs-seeker/SKILL.md +166 -0
  118. package/skills/fix/SKILL.md +192 -0
  119. package/skills/git/SKILL.md +285 -0
  120. package/skills/hallucination-guard/SKILL.md +204 -0
  121. package/skills/incident/SKILL.md +241 -0
  122. package/skills/integrity-check/SKILL.md +169 -0
  123. package/skills/journal/SKILL.md +190 -0
  124. package/skills/launch/SKILL.md +330 -0
  125. package/skills/logic-guardian/SKILL.md +240 -0
  126. package/skills/marketing/SKILL.md +229 -0
  127. package/skills/mcp-builder/SKILL.md +311 -0
  128. package/skills/onboard/SKILL.md +298 -0
  129. package/skills/perf/SKILL.md +297 -0
  130. package/skills/plan/SKILL.md +520 -0
  131. package/skills/preflight/SKILL.md +231 -0
  132. package/skills/problem-solver/SKILL.md +284 -0
  133. package/skills/rescue/SKILL.md +434 -0
  134. package/skills/research/SKILL.md +122 -0
  135. package/skills/review/SKILL.md +354 -0
  136. package/skills/review-intake/SKILL.md +222 -0
  137. package/skills/safeguard/SKILL.md +188 -0
  138. package/skills/sast/SKILL.md +190 -0
  139. package/skills/scaffold/SKILL.md +276 -0
  140. package/skills/scope-guard/SKILL.md +150 -0
  141. package/skills/scout/SKILL.md +232 -0
  142. package/skills/sentinel/SKILL.md +320 -0
  143. package/skills/sentinel-env/SKILL.md +226 -0
  144. package/skills/sequential-thinking/SKILL.md +234 -0
  145. package/skills/session-bridge/SKILL.md +287 -0
  146. package/skills/skill-forge/SKILL.md +317 -0
  147. package/skills/skill-router/SKILL.md +267 -0
  148. package/skills/surgeon/SKILL.md +203 -0
  149. package/skills/team/SKILL.md +397 -0
  150. package/skills/test/SKILL.md +271 -0
  151. package/skills/trend-scout/SKILL.md +145 -0
  152. package/skills/verification/SKILL.md +201 -0
  153. package/skills/video-creator/SKILL.md +201 -0
  154. package/skills/watchdog/SKILL.md +166 -0
  155. package/skills/worktree/SKILL.md +140 -0
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@rune-kit/rune",
3
+ "version": "2.1.1",
4
+ "description": "57-skill mesh for AI coding assistants — 5-layer architecture, 200+ connections, all platforms (Claude Code, Cursor, Windsurf, Antigravity)",
5
+ "type": "module",
6
+ "bin": {
7
+ "rune": "./compiler/bin/rune.js"
8
+ },
9
+ "scripts": {
10
+ "build": "node compiler/bin/rune.js build",
11
+ "doctor": "node compiler/bin/rune.js doctor",
12
+ "test": "node --test compiler/__tests__/*.test.js"
13
+ },
14
+ "keywords": [
15
+ "claude-code",
16
+ "cursor",
17
+ "windsurf",
18
+ "antigravity",
19
+ "ai-assistant",
20
+ "ai-coding",
21
+ "skills",
22
+ "coding-agent",
23
+ "tdd",
24
+ "multi-platform"
25
+ ],
26
+ "author": "runedev",
27
+ "license": "MIT",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "https://github.com/rune-kit/rune"
31
+ },
32
+ "engines": {
33
+ "node": ">=18"
34
+ },
35
+ "files": [
36
+ "compiler/",
37
+ "skills/",
38
+ "extensions/",
39
+ "contexts/",
40
+ "commands/",
41
+ "agents/"
42
+ ],
43
+ "homepage": "https://github.com/rune-kit/rune",
44
+ "bugs": {
45
+ "url": "https://github.com/rune-kit/rune/issues"
46
+ }
47
+ }
File without changes
@@ -0,0 +1,271 @@
1
+ ---
2
+ name: adversary
3
+ description: Pre-implementation red-team analysis. Challenges plans before code is written — finds edge cases, security holes, scalability bottlenecks, error propagation risks, and integration conflicts. Catches flaws at plan time (10x cheaper than post-implementation).
4
+ metadata:
5
+ author: runedev
6
+ version: "0.1.0"
7
+ layer: L2
8
+ model: opus
9
+ group: quality
10
+ tools: "Read, Glob, Grep"
11
+ ---
12
+
13
+ # adversary
14
+
15
+ ## Purpose
16
+
17
+ Pre-implementation adversarial analysis. After a plan is approved but BEFORE code is written, adversary stress-tests the plan across 5 dimensions: edge cases, security, scalability, error propagation, and integration risk. It does NOT fix or redesign — it reports weaknesses so the plan can be hardened before implementation begins.
18
+
19
+ This fills the only gap in the plan-to-ship pipeline: all other quality skills (review, preflight, sentinel) operate AFTER code exists. Catching a flaw in a plan costs minutes; catching it in implementation costs hours.
20
+
21
+ <HARD-GATE>
22
+ adversary MUST NOT approve a plan without at least one specific challenge per dimension analyzed.
23
+ A report that says "plan looks solid" without concrete attack vectors is NOT a red-team analysis.
24
+ Every finding MUST reference the specific plan section, file, or assumption it challenges.
25
+ </HARD-GATE>
26
+
27
+ ## Triggers
28
+
29
+ - Called by `cook` Phase 2.5 — after plan approved, before Phase 3 (TEST)
30
+ - `/rune adversary` — manual red-team analysis of any plan or design document
31
+ - Auto-trigger: when plan files are created in `.rune/` or `docs/plans/`
32
+
33
+ ## Calls (outbound)
34
+
35
+ - `sentinel` (L2): deep security scan when adversary identifies auth/crypto/payment attack vectors in the plan
36
+ - `perf` (L2): scalability analysis when adversary identifies potential bottleneck patterns
37
+ - `scout` (L2): find existing code that might conflict with planned changes
38
+ - `docs-seeker` (L3): verify framework/API assumptions in the plan are correct and current
39
+ - `hallucination-guard` (L3): verify that APIs, packages, or patterns referenced in the plan actually exist
40
+
41
+ ## Called By (inbound)
42
+
43
+ - `cook` (L1): Phase 2.5 — after plan approval, before TDD
44
+ - `plan` (L2): optional post-step for critical features
45
+ - `team` (L1): when decomposing large tasks, adversary validates the decomposition
46
+ - User: `/rune adversary` direct invocation
47
+
48
+ ## Cross-Hub Connections
49
+
50
+ - `adversary` ← `cook` — plan produced → adversary challenges it → hardened plan feeds Phase 3
51
+ - `adversary` → `sentinel` — security attack vector identified → sentinel validates depth
52
+ - `adversary` → `perf` — scalability concern raised → perf quantifies the bottleneck
53
+ - `adversary` → `scout` — integration risk flagged → scout finds affected code
54
+ - `adversary` → `plan` — CRITICAL findings → plan revises before implementation
55
+
56
+ ## Execution
57
+
58
+ ### Step 0: Load Context
59
+
60
+ 1. Read the plan document (from `.rune/features/<name>/plan.md`, phase file, or user-specified path)
61
+ 2. Read the requirements document if it exists (`.rune/features/<name>/requirements.md` from BA)
62
+ 3. Use `scout` to identify existing code files that the plan will touch or depend on
63
+ 4. Identify the plan's core assumptions — what MUST be true for this plan to work?
64
+
65
+ ### Step 1: Edge Case Analysis
66
+
67
+ Challenge the plan's handling of boundary conditions.
68
+
69
+ For each input/output/state transition in the plan, ask:
70
+ - **Empty/zero**: What happens with no data, zero items, empty strings, null users?
71
+ - **Overflow**: What happens at MAX — 10K items, 1MB payload, 1000 concurrent users?
72
+ - **Race conditions**: What if two operations happen simultaneously? Can state become inconsistent?
73
+ - **Partial failure**: What if step 3 of 5 fails? Is there rollback? Or orphaned state?
74
+ - **Invalid combinations**: What input combinations are technically possible but semantically nonsensical?
75
+
76
+ ```
77
+ EDGE_CASE_TEMPLATE:
78
+ - Scenario: [specific edge case]
79
+ - Plan assumption: [what the plan assumes]
80
+ - Attack: [how this breaks]
81
+ - Impact: [what fails — data loss, crash, wrong result, security breach]
82
+ - Remediation: [1-sentence fix suggestion]
83
+ ```
84
+
85
+ ### Step 2: Security Attack Vectors
86
+
87
+ Analyze the plan for security weaknesses BEFORE any code exists.
88
+
89
+ - **Input trust boundaries**: Where does the plan accept external input? Is validation specified?
90
+ - **Authentication gaps**: Does the plan assume auth exists? Are there unprotected routes or actions?
91
+ - **Data exposure**: Could the planned API responses leak sensitive fields? Are there over-fetching risks?
92
+ - **Privilege escalation**: Can a normal user reach admin functionality through the planned flow?
93
+ - **Injection surfaces**: Does the plan involve dynamic queries, template rendering, or shell commands?
94
+ - **Dependency risk**: Does the plan introduce new dependencies? Are they well-maintained and trusted?
95
+
96
+ If any auth, crypto, or payment logic is in the plan: MUST call `rune:sentinel` for deep analysis.
97
+
98
+ ```
99
+ SECURITY_TEMPLATE:
100
+ - Vector: [attack type — OWASP category if applicable]
101
+ - Entry point: [which part of the plan is vulnerable]
102
+ - Exploit scenario: [how an attacker would use this]
103
+ - Severity: CRITICAL | HIGH | MEDIUM
104
+ - Remediation: [what the plan should specify to prevent this]
105
+ ```
106
+
107
+ ### Step 3: Scalability Stress Test
108
+
109
+ Project the plan forward — what happens at 10x and 100x scale?
110
+
111
+ - **N+1 queries**: Does the plan describe data fetching that will create N+1 database calls?
112
+ - **Missing pagination**: Does the plan handle lists without specifying limits?
113
+ - **Synchronous bottlenecks**: Are there blocking operations in the hot path?
114
+ - **Cache invalidation**: If caching is planned, what happens when data changes? Stale reads?
115
+ - **State growth**: Does the plan accumulate state (in-memory, database, file system) without cleanup?
116
+ - **External service limits**: Does the plan account for rate limits on third-party APIs?
117
+
118
+ If bottleneck patterns detected: call `rune:perf` for quantitative analysis.
119
+
120
+ ```
121
+ SCALE_TEMPLATE:
122
+ - Bottleneck: [what breaks at scale]
123
+ - Current plan: [what the plan specifies]
124
+ - At 10x: [what happens]
125
+ - At 100x: [what happens]
126
+ - Remediation: [what to add to the plan]
127
+ ```
128
+
129
+ ### Step 4: Error Propagation Analysis
130
+
131
+ Trace failure paths through the planned system.
132
+
133
+ - **Cascade failures**: If Service A fails, does the plan specify what happens to B, C, D?
134
+ - **Retry storms**: Does the plan include retries? Could retries amplify the failure?
135
+ - **Silent failures**: Are there operations that could fail without anyone knowing?
136
+ - **Inconsistent state**: If a multi-step operation fails midway, is the data left in a valid state?
137
+ - **User experience**: When things fail, what does the user see? Is there a degraded mode?
138
+ - **Recovery path**: After failure + fix, can the system resume? Or does it require manual intervention?
139
+
140
+ ```
141
+ ERROR_TEMPLATE:
142
+ - Failure point: [where in the plan]
143
+ - Propagation: [what else breaks]
144
+ - User impact: [what the user experiences]
145
+ - Recovery: [how to get back to good state]
146
+ - Missing in plan: [what the plan should specify]
147
+ ```
148
+
149
+ ### Step 5: Integration Risk Assessment
150
+
151
+ Check for conflicts with existing code and architecture.
152
+
153
+ - Use `rune:scout` to find all files the plan will modify or depend on
154
+ - **Breaking changes**: Does the plan modify shared interfaces, types, or APIs that other code depends on?
155
+ - **Migration gaps**: Does the plan require database migrations? Are they reversible?
156
+ - **Configuration drift**: Does the plan add new environment variables, feature flags, or config files?
157
+ - **Test invalidation**: Will existing tests break from the planned changes?
158
+ - **Deployment ordering**: Does the plan require specific deployment sequence? (DB first, then API, then frontend?)
159
+
160
+ ```
161
+ INTEGRATION_TEMPLATE:
162
+ - Conflict: [what clashes]
163
+ - Existing code: [file:line that would be affected]
164
+ - Plan assumption: [what the plan assumes about existing code]
165
+ - Reality: [what the existing code actually does]
166
+ - Remediation: [how to resolve the conflict]
167
+ ```
168
+
169
+ ### Step 6: Verdict and Report
170
+
171
+ Synthesize all findings into an actionable report.
172
+
173
+ **Before reporting, apply rigor filter:**
174
+ - Only report findings you can justify with specific references to the plan or codebase
175
+ - Do NOT report theoretical concerns that require 3+ unlikely conditions to trigger
176
+ - Prioritize findings that would cause the MOST wasted implementation time if discovered later
177
+ - Consolidate related findings — "auth is underspecified" not 5 separate auth findings
178
+
179
+ **Verdict logic:**
180
+ - Any CRITICAL finding → **REVISE** (plan must be updated before Phase 3)
181
+ - 3+ HIGH findings → **REVISE**
182
+ - HIGH findings with clear remediations → **HARDEN** (add remediations to plan, then proceed)
183
+ - Only MEDIUM/LOW findings → **PROCEED** (note findings for implementation awareness)
184
+
185
+ After reporting:
186
+ - If verdict is REVISE: return to `plan` with findings attached as constraints
187
+ - If verdict is HARDEN: present remediations to user for plan update
188
+ - If verdict is PROCEED: pass findings to cook Phase 3 as implementation notes
189
+
190
+ ## Output Format
191
+
192
+ ```
193
+ ## Adversary Report: [feature/plan name]
194
+ - **Plan analyzed**: [path to plan file]
195
+ - **Dimensions checked**: [which of the 5 were relevant]
196
+ - **Findings**: [count by severity]
197
+ - **Verdict**: REVISE | HARDEN | PROCEED
198
+
199
+ ### CRITICAL
200
+ - [ADV-001] [dimension]: [description with plan reference]
201
+ - Attack: [how this breaks]
202
+ - Remediation: [specific fix]
203
+
204
+ ### HIGH
205
+ - [ADV-002] [dimension]: [description with plan reference]
206
+ - Attack: [how this breaks]
207
+ - Remediation: [specific fix]
208
+
209
+ ### MEDIUM
210
+ - [ADV-003] [dimension]: [description]
211
+
212
+ ### Strength Notes
213
+ - [what the plan does well — adversary is harsh but fair]
214
+
215
+ ### Verdict
216
+ [Summary: why REVISE/HARDEN/PROCEED, what to do next]
217
+ ```
218
+
219
+ ## Workflow Modes
220
+
221
+ ### Full Red-Team (default)
222
+ All 5 dimensions analyzed. Used for new features, architectural changes, security-sensitive plans.
223
+
224
+ ### Quick Challenge (for smaller plans)
225
+ Skip Steps 3-4 (scalability, error propagation). Focus on edge cases, security, and integration.
226
+ Trigger: plan modifies < 3 files AND no auth/payment/data logic.
227
+
228
+ ### Security-Focused
229
+ Steps 2 and 5 only (security + integration). Used when `sentinel` requests adversarial pre-analysis.
230
+ Trigger: plan involves auth, crypto, payment, or user data handling.
231
+
232
+ ## Constraints
233
+
234
+ 1. MUST challenge every plan — no rubber-stamping. At minimum, one finding per analyzed dimension
235
+ 2. MUST NOT modify the plan or write code — adversary is read-only analysis
236
+ 3. MUST reference specific plan sections or existing code for every finding
237
+ 4. MUST escalate to sentinel when auth/crypto/payment attack vectors are identified
238
+ 5. MUST use concrete attack scenarios, not vague warnings ("could be a problem" is NOT a finding)
239
+ 6. MUST NOT block on MEDIUM/LOW findings — only CRITICAL and HIGH trigger REVISE verdict
240
+ 7. MUST include Strength Notes — adversary finds weaknesses AND acknowledges what's well-designed
241
+
242
+ ## Mesh Gates
243
+
244
+ | Gate | Requires | If Missing |
245
+ |------|----------|------------|
246
+ | Plan Gate | A plan document exists (from plan skill or user-provided) | Cannot run — ask for plan first |
247
+ | Codebase Gate | Access to existing codebase (for integration checks) | Skip Step 5, note in report |
248
+
249
+ ## Sharp Edges
250
+
251
+ | Failure Mode | Severity | Mitigation |
252
+ |---|---|---|
253
+ | Over-challenging — nitpicking every line of the plan | HIGH | Rigor filter: only findings you can justify with specific references. Skip theoretical 3+ condition chains |
254
+ | False security alarms — flagging secure patterns as vulnerable | HIGH | Call sentinel for validation before reporting security findings as CRITICAL |
255
+ | Analysis paralysis — too many findings block all progress | MEDIUM | Max 3 CRITICAL + 5 HIGH. If more found, consolidate or prioritize top impact |
256
+ | Missing context — challenging plan without understanding existing codebase | HIGH | Step 0 MUST load existing code context via scout before challenging |
257
+ | Scope creep — reviewing existing code quality instead of plan quality | MEDIUM | Adversary reviews THE PLAN, not the codebase. Existing code is context only |
258
+ | Redundancy with review/preflight — duplicating post-implementation checks | MEDIUM | Adversary operates PRE-implementation only. Never run adversary on existing code |
259
+
260
+ ## Done When
261
+
262
+ - All relevant dimensions analyzed (minimum: edge cases + security + integration)
263
+ - Every finding references specific plan section or codebase file
264
+ - Security-sensitive plans escalated to sentinel (or confirmed not security-relevant)
265
+ - Verdict rendered: REVISE, HARDEN, or PROCEED
266
+ - Findings formatted for consumption by cook Phase 3 (if PROCEED) or plan (if REVISE)
267
+ - Strength Notes section acknowledges well-designed aspects of the plan
268
+
269
+ ## Cost Profile
270
+
271
+ ~4000-8000 tokens input (plan + codebase context), ~2000-3000 tokens output. Opus model for adversarial depth. Runs once per feature plan — high cost justified by preventing wasted implementation cycles.
@@ -0,0 +1,157 @@
1
+ ---
2
+ name: asset-creator
3
+ description: Creates code-based visual assets — SVG icons, OG image HTML templates, social banners, and icon sets. Outputs files with usage instructions.
4
+ metadata:
5
+ author: runedev
6
+ version: "0.2.0"
7
+ layer: L3
8
+ model: sonnet
9
+ group: media
10
+ tools: "Read, Write, Edit, Glob, Grep"
11
+ ---
12
+
13
+ # asset-creator
14
+
15
+ ## Purpose
16
+
17
+ Creates code-based visual assets (SVG, CSS, HTML) for projects and marketing. Handles logos, OG images, social cards, and icon sets. Outputs actual files with light/dark variants and usage instructions. This skill creates CODE-based assets — not raster images.
18
+
19
+ ## Called By (inbound)
20
+
21
+ - `marketing` (L2): banners, OG images, social graphics
22
+ - `design` (L2): UI asset generation during design phase
23
+ - L4 `@rune/ui`: design system assets
24
+
25
+ ## Calls (outbound)
26
+
27
+ None — pure L3 utility.
28
+
29
+ ## Executable Instructions
30
+
31
+ ### Step 1: Receive Brief
32
+
33
+ Accept input from calling skill:
34
+ - `asset_type` — one of: `logo` | `og_image` | `social_card` | `icon` | `icon_set` | `banner`
35
+ - `dimensions` — width x height in pixels (e.g. `1200x630` for OG images)
36
+ - `style` — description of visual style (e.g. "minimal dark", "comic bold", "glassmorphism")
37
+ - `content` — text, brand name, tagline, or icon names to include
38
+ - `output_dir` — where to save files (default: `assets/`)
39
+
40
+ ### Step 2: Design
41
+
42
+ Before writing code, determine design parameters:
43
+
44
+ 1. Check if the project has `.rune/conventions.md` — use `Read` to load color palette and typography
45
+ 2. If no conventions file, apply defaults based on `style`:
46
+ - "dark" → `#0c1419` bg, `#ffffff` text, `#2196f3` accent
47
+ - "light" → `#faf8f3` bg, `#1a1a1a` text, `#1d4ed8` accent
48
+ - "comic" → `#fffef9` bg, `#1a1a1a` text, `2px solid #2a2a2a` border, `4px 4px 0 #2a2a2a` shadow
49
+ - "glassmorphism" → `rgba(255,255,255,0.05)` bg, `backdrop-filter: blur(12px)`, `rgba(255,255,255,0.1)` border
50
+
51
+ 3. Select typography:
52
+ - Display/headlines: Space Grotesk 700
53
+ - Body: Inter 400
54
+ - Monospace/prices: JetBrains Mono 700
55
+
56
+ 4. Apply standard dimensions by asset type if not specified:
57
+ - OG image: 1200x630px
58
+ - Twitter card: 1200x628px
59
+ - Instagram square: 1080x1080px
60
+ - Icon: 24x24px (or 512x512px for app icon)
61
+
62
+ ### Step 3: Create
63
+
64
+ Use `Write` to generate the asset files:
65
+
66
+ **For SVG icons and logos:**
67
+ - Write inline SVG with proper `viewBox` attribute
68
+ - Use `xmlns="http://www.w3.org/2000/svg"`
69
+ - Include `role="img"` and `aria-label` for accessibility
70
+ - Optimize paths — no unnecessary groups or transforms
71
+ - File: `assets/[name].svg`
72
+
73
+ **For OG images and social cards:**
74
+ - Create an HTML file with embedded CSS
75
+ - Use absolute pixel values (no relative units) for pixel-perfect output
76
+ - Include Google Fonts import for Space Grotesk and Inter
77
+ - File: `assets/[name]-og.html`
78
+
79
+ **For icon sets:**
80
+ - Create a single SVG sprite file with `<symbol>` elements
81
+ - Each icon as a named `<symbol id="icon-[name]">` with `viewBox`
82
+ - Include a usage example comment at the top
83
+ - File: `assets/icons/sprite.svg`
84
+
85
+ **For HTML banners:**
86
+ - Self-contained HTML with all styles inline (no external deps)
87
+ - File: `assets/banner-[platform].html`
88
+
89
+ ### Step 4: Variants
90
+
91
+ If `style` contains "dark" or the asset type is OG/banner, also create a light mode variant:
92
+ - Suffix dark variant with `-dark` (e.g. `og-dark.html`)
93
+ - Suffix light variant with `-light` (e.g. `og-light.html`)
94
+
95
+ For icon sets, create both a filled and outline variant if applicable.
96
+
97
+ ### Step 5: Report
98
+
99
+ Output the following:
100
+
101
+ ```
102
+ ## Assets Created
103
+
104
+ ### Generated Files
105
+ - [asset_type]: [file_path] ([dimensions])
106
+ - [asset_type] (dark): [file_path]
107
+ - [asset_type] (light): [file_path]
108
+
109
+ ### Usage Instructions
110
+ - OG image: Add <meta property="og:image" content="[url]/[filename]"> to <head>
111
+ - SVG icon: <img src="assets/[name].svg" alt="[description]">
112
+ - Icon sprite: <svg><use href="assets/icons/sprite.svg#icon-[name]"></use></svg>
113
+ - Banner: Open [file] in browser, screenshot at [width]x[height]
114
+
115
+ ### Design Tokens Used
116
+ - Background: [color]
117
+ - Text: [color]
118
+ - Accent: [color]
119
+ - Font: [font-family]
120
+ ```
121
+
122
+ ## Note
123
+
124
+ This skill creates CODE-based assets (SVG/CSS/HTML). It does not generate raster images (PNG/JPG) directly — those require screenshotting the generated HTML files using browser-pilot.
125
+
126
+ ## Output Format
127
+
128
+ Structured report with generated file paths, usage instructions (HTML snippets), and design tokens used. See Step 5 Report above for full template.
129
+
130
+ ## Constraints
131
+
132
+ 1. MUST confirm output format and dimensions before generating
133
+ 2. MUST NOT generate copyrighted or trademarked content
134
+ 3. MUST save to project assets directory — not random locations
135
+
136
+ ## Sharp Edges
137
+
138
+ Known failure modes for this skill. Check these before declaring done.
139
+
140
+ | Failure Mode | Severity | Mitigation |
141
+ |---|---|---|
142
+ | Generating copyrighted or trademarked content (logos, characters) | CRITICAL | Constraint 2: only generate original assets — no brand marks, characters, or protected symbols |
143
+ | Saving to random location instead of assets/ | MEDIUM | Constraint 3: output_dir defaults to assets/ — always save there |
144
+ | Missing light/dark variants for OG/banner assets | MEDIUM | Step 4: dark mode variant required for any OG/banner asset |
145
+ | Generating raster images (PNG/JPG) directly | MEDIUM | This skill creates SVG/HTML CODE only — raster requires browser-pilot screenshot of generated HTML |
146
+
147
+ ## Done When
148
+
149
+ - Asset type, dimensions, and style confirmed from input
150
+ - Design tokens from .rune/conventions.md loaded (or defaults applied)
151
+ - Asset files written to assets/ directory in correct format (SVG/HTML)
152
+ - Light/dark variants created if applicable (OG/banner)
153
+ - Assets Created report emitted with file paths and usage instructions
154
+
155
+ ## Cost Profile
156
+
157
+ ~500-1500 tokens input, ~500-1000 tokens output. Sonnet for creative quality.