@skilly-hand/skilly-hand 0.14.0 → 0.15.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.
- package/CHANGELOG.md +40 -0
- package/catalog/README.md +4 -2
- package/catalog/catalog-index.json +2 -0
- package/catalog/skills/frontend-design/SKILL.md +55 -9
- package/catalog/skills/frontend-design/agents/component-designer.md +25 -1
- package/catalog/skills/frontend-design/agents/design-context-setter.md +156 -0
- package/catalog/skills/frontend-design/agents/motion-designer.md +184 -0
- package/catalog/skills/frontend-design/agents/visual-refiner.md +137 -0
- package/catalog/skills/frontend-design/assets/aesthetic-archetypes.md +155 -0
- package/catalog/skills/frontend-design/manifest.json +11 -7
- package/catalog/skills/output-optimizer/SKILL.md +159 -0
- package/catalog/skills/output-optimizer/manifest.json +33 -0
- package/catalog/skills/output-optimizer/references/mode-protocols.md +76 -0
- package/catalog/skills/project-security/SKILL.md +163 -0
- package/catalog/skills/project-security/assets/generic-ci-security-gate.sh +36 -0
- package/catalog/skills/project-security/assets/github-actions-security-gate.yml +38 -0
- package/catalog/skills/project-security/assets/gitlab-ci-security-gate.yml +21 -0
- package/catalog/skills/project-security/assets/high-risk-files-checklist.md +49 -0
- package/catalog/skills/project-security/assets/pre-commit.sample.sh +9 -0
- package/catalog/skills/project-security/assets/pre-publish.sample.sh +12 -0
- package/catalog/skills/project-security/assets/pre-push.sample.sh +38 -0
- package/catalog/skills/project-security/assets/run-security-check.shared.sh +27 -0
- package/catalog/skills/project-security/manifest.json +41 -0
- package/package.json +1 -1
- package/packages/catalog/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/core/package.json +1 -1
- package/packages/detectors/package.json +1 -1
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Visual Refiner
|
|
2
|
+
|
|
3
|
+
## Precondition
|
|
4
|
+
|
|
5
|
+
**Run only after `component-designer` has produced output.**
|
|
6
|
+
|
|
7
|
+
This agent evaluates what was just generated — not what the user wants next. Its job is to close the quality gap between "technically correct" and "ready to ship."
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
Use this agent when:
|
|
14
|
+
|
|
15
|
+
- A component or page has been generated and needs a quality check before the user moves on.
|
|
16
|
+
- The user asks "does this look right?", "can you improve this?", or "polish this."
|
|
17
|
+
- The generated output feels generic or inconsistent — even if it technically matches the stack.
|
|
18
|
+
- You want to verify all interactive states are handled before handoff.
|
|
19
|
+
|
|
20
|
+
Do not use this agent when:
|
|
21
|
+
|
|
22
|
+
- Stack detection has not yet been run.
|
|
23
|
+
- No component has been generated in this session yet.
|
|
24
|
+
- The user has explicitly said "it's fine as-is."
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Evaluation Protocol
|
|
29
|
+
|
|
30
|
+
Run all four checks. Do not skip any. Report findings grouped by check — do not interleave.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
### Check 1 — AI Slop Detection
|
|
35
|
+
|
|
36
|
+
Look for generic patterns that signal uncontextualized AI output. Flag each one found.
|
|
37
|
+
|
|
38
|
+
**Visual tells to catch:**
|
|
39
|
+
|
|
40
|
+
- Glassmorphism (backdrop-filter: blur + semi-transparent backgrounds with no established project precedent)
|
|
41
|
+
- Default Inter font with no project declaration
|
|
42
|
+
- Standard hero + cards + CTA layout with no project-specific rationale
|
|
43
|
+
- Pure `#000000` or `#ffffff` for text/backgrounds instead of project tokens
|
|
44
|
+
- Generic card shadows (`box-shadow: 0 2px 8px rgba(0,0,0,0.1)`) not derived from project tokens
|
|
45
|
+
- Gradient text (`background-clip: text`) used decoratively without project precedent
|
|
46
|
+
- Icon + title + description card grids as default empty-state filler
|
|
47
|
+
- Identical padding and border-radius across every element (uniform blandness)
|
|
48
|
+
|
|
49
|
+
For each flag: name the pattern, show the line, and suggest a project-derived alternative.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
### Check 2 — Interaction State Coverage
|
|
54
|
+
|
|
55
|
+
Verify every interactive element has all required states. Missing states are incomplete work, not optional polish.
|
|
56
|
+
|
|
57
|
+
**Required states per element type:**
|
|
58
|
+
|
|
59
|
+
| Element | Required States |
|
|
60
|
+
| ------- | --------------- |
|
|
61
|
+
| Button (primary) | default, hover, focus-visible, active, disabled, loading |
|
|
62
|
+
| Button (secondary/ghost) | default, hover, focus-visible, active, disabled |
|
|
63
|
+
| Input / Textarea | default, focus, filled, error, disabled |
|
|
64
|
+
| Select / Dropdown | default, open, selected, disabled |
|
|
65
|
+
| Link | default, hover, visited, focus-visible |
|
|
66
|
+
| Checkbox / Radio | unchecked, checked, indeterminate (checkbox), focus, disabled |
|
|
67
|
+
| Toggle / Switch | on, off, focus, disabled |
|
|
68
|
+
| Card (interactive) | default, hover, focus, selected |
|
|
69
|
+
|
|
70
|
+
For each missing state: name the element, name the missing state, and provide the implementation using confirmed project tokens.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
### Check 3 — Nielsen's Heuristics (abbreviated)
|
|
75
|
+
|
|
76
|
+
Score only the heuristics relevant to a component-level review. Skip system-level heuristics.
|
|
77
|
+
|
|
78
|
+
| Heuristic | Check |
|
|
79
|
+
| --------- | ----- |
|
|
80
|
+
| Visibility of system status | Does loading/processing state communicate progress? |
|
|
81
|
+
| Match between system and world | Do labels use plain language the user would recognize? |
|
|
82
|
+
| Error prevention | Does the component validate or guard against bad input? |
|
|
83
|
+
| Recognition over recall | Are actions visible, not hidden behind hover/guess? |
|
|
84
|
+
| Consistency and standards | Does this match patterns established elsewhere in the project? |
|
|
85
|
+
| Aesthetic and minimalist design | Is every element present earning its space? |
|
|
86
|
+
|
|
87
|
+
Rate each: **Pass**, **Minor issue**, or **Blocker**. Provide a one-line note for anything not Pass.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
### Check 4 — Directional Assessment
|
|
92
|
+
|
|
93
|
+
After the three checks above, ask the user to choose a direction:
|
|
94
|
+
|
|
95
|
+
> The component is functionally solid. Here are three directions to take the refinement:
|
|
96
|
+
>
|
|
97
|
+
> **A — Polish**: Fix the flagged issues and fill missing states. No visual changes beyond corrections.
|
|
98
|
+
>
|
|
99
|
+
> **B — Bolder**: Increase visual impact. Larger type jumps, stronger contrast, more distinctive spacing rhythm. Still uses project tokens.
|
|
100
|
+
>
|
|
101
|
+
> **C — Quieter**: Reduce visual weight. More whitespace, softer contrast, subtler hierarchy. Still uses project tokens.
|
|
102
|
+
>
|
|
103
|
+
> Which direction, or a combination? (Or say "done" to accept as-is.)
|
|
104
|
+
|
|
105
|
+
Do not apply any directional changes without the user's explicit choice. Fixes from Check 1–3 are always applied.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Refinement Rules
|
|
110
|
+
|
|
111
|
+
When applying any refinement:
|
|
112
|
+
|
|
113
|
+
1. Use only tokens confirmed by stack detection or declared in `DESIGN.md`.
|
|
114
|
+
2. Do not introduce new dependencies.
|
|
115
|
+
3. Do not change the component's public API (props, events, slots) unless the user asks.
|
|
116
|
+
4. Do not add animation in this agent — hand off to `motion-designer` for that.
|
|
117
|
+
5. One round of refinement per invocation. If the user wants another pass, re-invoke this agent.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Output Format
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
VISUAL REFINER REPORT
|
|
125
|
+
---------------------
|
|
126
|
+
AI Slop Check: [N flags found / Clean]
|
|
127
|
+
State Coverage: [N states missing / Complete]
|
|
128
|
+
Heuristics: [N issues / All pass]
|
|
129
|
+
|
|
130
|
+
FINDINGS:
|
|
131
|
+
[grouped list of findings with suggested fixes]
|
|
132
|
+
|
|
133
|
+
RECOMMENDED ACTION:
|
|
134
|
+
[Polish only / Polish + Direction A/B/C / No changes needed]
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
After applying fixes, summarize what changed in 2–3 bullet points. Do not narrate every line edited.
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Aesthetic Archetypes
|
|
2
|
+
|
|
3
|
+
Reference card for greenfield projects or when a user asks for design direction with no existing codebase to read from.
|
|
4
|
+
|
|
5
|
+
Each archetype describes a coherent visual personality using framework-agnostic, implementation-neutral language. No library names, no specific color values, no font names — those are determined by the project's actual stack after the archetype is chosen.
|
|
6
|
+
|
|
7
|
+
**How to use:**
|
|
8
|
+
|
|
9
|
+
1. Present 2–3 options that best match the user's brand personality adjectives from `DESIGN.md`.
|
|
10
|
+
2. Let the user choose or mix.
|
|
11
|
+
3. Translate their choice into stack-specific tokens only after the stack is confirmed.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 1. Refined Minimal
|
|
16
|
+
|
|
17
|
+
**Character**: Quiet confidence. Less is deliberate, not lazy.
|
|
18
|
+
|
|
19
|
+
**Typography**: Small, tight type scale. Generous leading. Weight does the work — one bold statement surrounded by light body. No more than two font roles.
|
|
20
|
+
|
|
21
|
+
**Color**: Near-monochromatic. One neutral family (warm or cool), one restrained accent used sparingly. Near-black text, near-white backgrounds, or their dark-mode inversion.
|
|
22
|
+
|
|
23
|
+
**Spacing**: Generous. Breathing room is the dominant visual element. Consistent, predictable rhythm.
|
|
24
|
+
|
|
25
|
+
**Motion**: Subtle. Fade and micro-translate on interaction. Nothing draws attention to itself.
|
|
26
|
+
|
|
27
|
+
**Avoid**: Decorative dividers, rounded corners exceeding the system's established radius, anything that shouts.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 2. Editorial
|
|
32
|
+
|
|
33
|
+
**Character**: Print-informed. Content is the design.
|
|
34
|
+
|
|
35
|
+
**Typography**: Dramatic scale jumps. Display-size headings, small caption text. Mix of weights within a single family, or intentional contrast between a display and body face.
|
|
36
|
+
|
|
37
|
+
**Color**: High contrast. Often near-black + near-white + one ink-like accent. Color is used to mark, not decorate.
|
|
38
|
+
|
|
39
|
+
**Spacing**: Asymmetric. Grid-breaking is intentional. Vertical rhythm anchors the layout.
|
|
40
|
+
|
|
41
|
+
**Motion**: Minimal — content should feel immediate. Scroll-driven reveals acceptable.
|
|
42
|
+
|
|
43
|
+
**Avoid**: Card-heavy layouts, rounded blobs, friendly pastels.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 3. Brutalist
|
|
48
|
+
|
|
49
|
+
**Character**: Uncompromising. Honesty over comfort.
|
|
50
|
+
|
|
51
|
+
**Typography**: System stack or intentionally unglamorous. Oversized. Unkerned when intentional. All-caps statements.
|
|
52
|
+
|
|
53
|
+
**Color**: High contrast. Black, white, and one harsh accent (or pure black and white only). No gradients.
|
|
54
|
+
|
|
55
|
+
**Spacing**: Structural — not generous, not cramped. Grid is exposed.
|
|
56
|
+
|
|
57
|
+
**Motion**: Instant or near-instant. Snap, not glide.
|
|
58
|
+
|
|
59
|
+
**Avoid**: Soft shadows, border-radius, anything "friendly."
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 4. Retro-Futuristic
|
|
64
|
+
|
|
65
|
+
**Character**: Technology filtered through nostalgia.
|
|
66
|
+
|
|
67
|
+
**Typography**: Geometric or monospace. Tight tracking. All-caps labels. Clear grid hierarchy.
|
|
68
|
+
|
|
69
|
+
**Color**: Deep backgrounds (near-black or dark navy), bright accent (neon-adjacent — high chroma, not true neon). Subtle scanline or grid texture acceptable.
|
|
70
|
+
|
|
71
|
+
**Spacing**: Dense with breathing room only at macro level. Sections feel packed but orderly.
|
|
72
|
+
|
|
73
|
+
**Motion**: Purposeful. Reveal effects, typewriter entrances, scan-line wipes. All must have reduced-motion fallbacks.
|
|
74
|
+
|
|
75
|
+
**Avoid**: Glassmorphism, light-mode defaults, organic shapes.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 5. Organic
|
|
80
|
+
|
|
81
|
+
**Character**: Human-made, unhurried.
|
|
82
|
+
|
|
83
|
+
**Typography**: Humanist or transitional — faces with visible calligraphic origin. Variable weight welcomed. Generous leading.
|
|
84
|
+
|
|
85
|
+
**Color**: Earth-adjacent. Warm neutrals, muted greens, terracotta, dusty indigo. Nothing fully saturated.
|
|
86
|
+
|
|
87
|
+
**Spacing**: Flowing. Sections breathe into each other. Asymmetry that feels natural, not forced.
|
|
88
|
+
|
|
89
|
+
**Motion**: Eases that feel physical — spring or custom cubic-bezier that overshoots slightly. Gentle.
|
|
90
|
+
|
|
91
|
+
**Avoid**: Sharp corners, high-tech palettes, monospace.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 6. Luxury
|
|
96
|
+
|
|
97
|
+
**Character**: Restraint signals value.
|
|
98
|
+
|
|
99
|
+
**Typography**: Elegant — thin weights, generous tracking on headings. Serif display for brand moments, clean sans for utility.
|
|
100
|
+
|
|
101
|
+
**Color**: Muted, sophisticated. Champagne, slate, obsidian, aged gold. Saturation deliberately low. One metallic or warm-neutral accent.
|
|
102
|
+
|
|
103
|
+
**Spacing**: Very generous. White space is a premium material.
|
|
104
|
+
|
|
105
|
+
**Motion**: Slow and deliberate. 400–600ms entrances. Ease-out only — nothing bounces.
|
|
106
|
+
|
|
107
|
+
**Avoid**: Bright colors, heavy weights, any pattern that reads as cheap or casual.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## 7. Playful
|
|
112
|
+
|
|
113
|
+
**Character**: Fun is a feature, not a compromise.
|
|
114
|
+
|
|
115
|
+
**Typography**: Rounded or friendly. Variable weight for expression. Larger scale than strictly necessary.
|
|
116
|
+
|
|
117
|
+
**Color**: Multi-hue. 3–4 colors with clear semantic roles. Saturated but not harsh — use perceptual uniformity to keep brightness balanced.
|
|
118
|
+
|
|
119
|
+
**Spacing**: Responsive to content, not rigid. Cards can be different sizes. Grid can breathe unevenly.
|
|
120
|
+
|
|
121
|
+
**Motion**: Expressive micro-interactions. Confirmation states feel satisfying. Always reduced-motion safe.
|
|
122
|
+
|
|
123
|
+
**Avoid**: Pure black text, sharp corners, anything that reads as corporate or cold.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 8. Industrial
|
|
128
|
+
|
|
129
|
+
**Character**: Form follows function. No apology for complexity.
|
|
130
|
+
|
|
131
|
+
**Typography**: Utilitarian sans-serif. Dense but readable. Tabular figures for data. Weight for hierarchy, not decoration.
|
|
132
|
+
|
|
133
|
+
**Color**: Neutral-forward. Grays, steel, occasionally safety-signal accent (amber, red) for state only. Not decorative.
|
|
134
|
+
|
|
135
|
+
**Spacing**: Dense. Information-rich layouts. Tables, grids, dashboards. Whitespace is used to separate data, not to decorate.
|
|
136
|
+
|
|
137
|
+
**Motion**: Minimal. State changes are instant or near-instant. Loading indicators, not entrances.
|
|
138
|
+
|
|
139
|
+
**Avoid**: Rounded blobs, decorative gradients, anything that prioritizes aesthetics over clarity.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Mixing Archetypes
|
|
144
|
+
|
|
145
|
+
Users often want combinations. Common pairings:
|
|
146
|
+
|
|
147
|
+
| Combination | Character |
|
|
148
|
+
| ----------- | --------- |
|
|
149
|
+
| Refined Minimal + Editorial | High-end content publishing |
|
|
150
|
+
| Industrial + Retro-Futuristic | Developer tools with personality |
|
|
151
|
+
| Organic + Luxury | Premium wellness or lifestyle |
|
|
152
|
+
| Playful + Refined Minimal | Consumer product with restraint |
|
|
153
|
+
| Brutalist + Editorial | Independent media, strong POV |
|
|
154
|
+
|
|
155
|
+
When mixing, one archetype leads (governs spacing and color) and the other accents (contributes a single element — e.g., typography from Editorial onto a Refined Minimal base).
|
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "frontend-design",
|
|
3
3
|
"title": "Frontend Design",
|
|
4
|
-
"description": "Project-aware frontend design skill that detects the existing tech stack, UI libraries, CSS variables, and design tokens before proposing any UI work.",
|
|
4
|
+
"description": "Project-aware frontend design skill that detects the existing tech stack, UI libraries, CSS variables, and design tokens before proposing any UI work. Supports greenfield projects via DESIGN.md context setup, and includes post-generation motion and visual refinement phases.",
|
|
5
5
|
"portable": true,
|
|
6
|
-
"tags": ["frontend", "design", "workflow", "ui"],
|
|
6
|
+
"tags": ["frontend", "design", "workflow", "ui", "motion", "greenfield"],
|
|
7
7
|
"detectors": ["always"],
|
|
8
8
|
"detectionTriggers": ["manual"],
|
|
9
9
|
"installsFor": ["all"],
|
|
10
10
|
"agentSupport": ["codex", "claude", "cursor", "gemini", "copilot", "antigravity", "windsurf", "trae"],
|
|
11
11
|
"skillMetadata": {
|
|
12
12
|
"author": "skilly-hand",
|
|
13
|
-
"last-edit": "2026-04-
|
|
13
|
+
"last-edit": "2026-04-05",
|
|
14
14
|
"license": "Apache-2.0",
|
|
15
|
-
"version": "1.
|
|
16
|
-
"changelog": "
|
|
17
|
-
"auto-invoke": "Designing or generating UI components, pages, or layouts in a web or mobile project",
|
|
15
|
+
"version": "1.1.0",
|
|
16
|
+
"changelog": "v1.1.0: Added design-context-setter agent for greenfield/DESIGN.md workflow; added visual-refiner agent for post-generation quality evaluation; added motion-designer agent for stack-aware micro-interactions; added aesthetic-archetypes reference asset; expanded SKILL.md routing map with optional motion and refinement phases; upgraded component-designer with interaction states checklist and aesthetic principles",
|
|
17
|
+
"auto-invoke": "Designing or generating UI components, pages, or layouts in a web or mobile project; setting up visual direction for a greenfield project; adding motion or micro-interactions to existing UI; refining or polishing generated UI output",
|
|
18
18
|
"allowed-tools": ["Read", "Grep", "Glob", "Bash", "Edit", "Write"]
|
|
19
19
|
},
|
|
20
20
|
"files": [
|
|
21
21
|
{ "path": "SKILL.md", "kind": "instruction" },
|
|
22
22
|
{ "path": "agents/stack-detector.md", "kind": "asset" },
|
|
23
|
+
{ "path": "agents/design-context-setter.md", "kind": "asset" },
|
|
23
24
|
{ "path": "agents/component-designer.md", "kind": "asset" },
|
|
24
|
-
{ "path": "
|
|
25
|
+
{ "path": "agents/motion-designer.md", "kind": "asset" },
|
|
26
|
+
{ "path": "agents/visual-refiner.md", "kind": "asset" },
|
|
27
|
+
{ "path": "assets/stack-scan-checklist.md", "kind": "asset" },
|
|
28
|
+
{ "path": "assets/aesthetic-archetypes.md", "kind": "asset" }
|
|
25
29
|
],
|
|
26
30
|
"dependencies": []
|
|
27
31
|
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Output Optimizer Guide
|
|
2
|
+
|
|
3
|
+
## When to Use
|
|
4
|
+
|
|
5
|
+
Use this skill when:
|
|
6
|
+
|
|
7
|
+
- You want compact responses to reduce output token usage.
|
|
8
|
+
- You need deterministic output formats for repeated workflows.
|
|
9
|
+
- You need concise communication without losing core clarity.
|
|
10
|
+
- You want controlled detail expansion only when risk or ambiguity requires it.
|
|
11
|
+
|
|
12
|
+
Do not use this skill for:
|
|
13
|
+
|
|
14
|
+
- Cases where the user explicitly asks for long-form teaching or narrative detail.
|
|
15
|
+
- Tasks that require extensive legal, medical, or compliance explanation by default.
|
|
16
|
+
- Situations where a fixed external output schema already overrides style choices.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Critical Patterns
|
|
21
|
+
|
|
22
|
+
### Pattern 1: Activation and Precedence
|
|
23
|
+
|
|
24
|
+
Apply modes in this order:
|
|
25
|
+
|
|
26
|
+
1. If user writes `mode: <name>`, use that mode.
|
|
27
|
+
2. If no explicit mode, infer from phrasing:
|
|
28
|
+
- "keywords only" -> `machine`
|
|
29
|
+
- "yes or no" / "binary" -> `binary-decision`
|
|
30
|
+
- "json" / "structured output" -> `json-compact`
|
|
31
|
+
- "step by step, concise" -> `step-brief`
|
|
32
|
+
- "command style" / "minimal commands" -> `neandertal`
|
|
33
|
+
- "toon format" -> `toon`
|
|
34
|
+
3. If no strong signal, default to `step-brief` for human-readable compact output.
|
|
35
|
+
|
|
36
|
+
Explicit mode always wins over inferred mode.
|
|
37
|
+
|
|
38
|
+
### Pattern 2: Mode Contracts
|
|
39
|
+
|
|
40
|
+
| Mode | Contract | Token Profile |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| `neandertal` | Imperative command-like short phrases, no filler, minimal connectors. | Lowest human-readable |
|
|
43
|
+
| `machine` | Keywords only, grouped by labels, no prose sentences. | Ultra-low |
|
|
44
|
+
| `step-brief` | Numbered steps, each step max 3-4 short phrases. | Low with clarity |
|
|
45
|
+
| `toon` | Exactly 4 blocks: `Title`, `Objective`, `Output`, `Next`. | Low and stable |
|
|
46
|
+
| `json-compact` | Minimal stable JSON keys and short scalar values. | Low + parseable |
|
|
47
|
+
| `binary-decision` | `yes` or `no` plus one short reason. | Ultra-low for triage |
|
|
48
|
+
|
|
49
|
+
### Pattern 3: Complexity + Confidence Guard
|
|
50
|
+
|
|
51
|
+
Default to compact output. Expand only when:
|
|
52
|
+
|
|
53
|
+
1. Task complexity is moderate/high and concise output may cause mistakes.
|
|
54
|
+
2. Requirements are ambiguous and short output cannot preserve correctness.
|
|
55
|
+
3. Risk is elevated (security, production impact, irreversible operations).
|
|
56
|
+
4. User explicitly asks for more detail.
|
|
57
|
+
|
|
58
|
+
When expanding, keep structure compact and scoped to the needed clarification.
|
|
59
|
+
|
|
60
|
+
### Pattern 4: Compression Rules
|
|
61
|
+
|
|
62
|
+
Always prefer:
|
|
63
|
+
|
|
64
|
+
- Specific nouns over long explanations.
|
|
65
|
+
- One-pass direct answer over repeated restatement.
|
|
66
|
+
- Bounded lists over paragraphs.
|
|
67
|
+
- Deterministic templates where possible.
|
|
68
|
+
|
|
69
|
+
Avoid:
|
|
70
|
+
|
|
71
|
+
- Polite filler and redundant transitions.
|
|
72
|
+
- Repeating the prompt unless needed for disambiguation.
|
|
73
|
+
- Verbose caveats when risk is low.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Decision Tree
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
User provided `mode: <name>`? -> Use explicit mode
|
|
81
|
+
No explicit mode, strong phrasing signal? -> Infer mode from signal
|
|
82
|
+
No explicit mode and no signal? -> step-brief
|
|
83
|
+
Task complexity/ambiguity/risk is high? -> Expand within selected mode
|
|
84
|
+
User asks for detail/clarification? -> Expand within selected mode
|
|
85
|
+
Otherwise -> Keep compact output
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Output Examples
|
|
91
|
+
|
|
92
|
+
### Example 1: `neandertal`
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
Check logs. Find error. Patch file. Run tests. Report result.
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Example 2: `machine`
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
status:blocked
|
|
102
|
+
cause:missing-env
|
|
103
|
+
action:set-token,retry
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Example 3: `step-brief`
|
|
107
|
+
|
|
108
|
+
```text
|
|
109
|
+
1. Open config file. Find auth block. Confirm token key.
|
|
110
|
+
2. Add missing key. Save file. Re-run command.
|
|
111
|
+
3. Verify success output. Capture result. Share summary.
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Example 4: `toon`
|
|
115
|
+
|
|
116
|
+
```text
|
|
117
|
+
Title: Auth Fix
|
|
118
|
+
Objective: Restore CLI login flow
|
|
119
|
+
Output: Config key added, login passes
|
|
120
|
+
Next: Run smoke check
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Example 5: `json-compact`
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{"status":"ok","mode":"json-compact","next":"deploy"}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Example 6: `binary-decision`
|
|
130
|
+
|
|
131
|
+
```text
|
|
132
|
+
yes: tests pass on required suite
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Prompt Patterns
|
|
138
|
+
|
|
139
|
+
These are prompt fragments, not terminal commands.
|
|
140
|
+
|
|
141
|
+
```text
|
|
142
|
+
mode: neandertal
|
|
143
|
+
mode: machine
|
|
144
|
+
mode: step-brief
|
|
145
|
+
mode: toon
|
|
146
|
+
mode: json-compact
|
|
147
|
+
mode: binary-decision
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
```text
|
|
151
|
+
explain in detail
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Resources
|
|
157
|
+
|
|
158
|
+
- Mode protocol reference: [references/mode-protocols.md](references/mode-protocols.md)
|
|
159
|
+
- Related complexity control: [../token-optimizer/SKILL.md](../token-optimizer/SKILL.md)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "output-optimizer",
|
|
3
|
+
"title": "Output Optimizer",
|
|
4
|
+
"description": "Optimize output token consumption through compact interpreter modes with controlled expansion when complexity, ambiguity, or risk requires more detail. Trigger: minimizing response verbosity while preserving clarity and correctness.",
|
|
5
|
+
"portable": true,
|
|
6
|
+
"tags": ["core", "workflow", "efficiency", "communication"],
|
|
7
|
+
"detectors": ["always"],
|
|
8
|
+
"detectionTriggers": ["always"],
|
|
9
|
+
"installsFor": ["all"],
|
|
10
|
+
"agentSupport": ["codex", "claude", "cursor", "gemini", "copilot", "antigravity", "windsurf", "trae"],
|
|
11
|
+
"skillMetadata": {
|
|
12
|
+
"author": "skilly-hand",
|
|
13
|
+
"last-edit": "2026-04-07",
|
|
14
|
+
"license": "Apache-2.0",
|
|
15
|
+
"version": "1.0.0",
|
|
16
|
+
"changelog": "Added a new portable output compression skill with deterministic interpreter modes and guarded detail expansion; reduces response token costs while preserving safety and clarity; affects response shaping workflows and catalog routing",
|
|
17
|
+
"auto-invoke": "When minimizing output verbosity or selecting compact communication modes",
|
|
18
|
+
"allowed-tools": [
|
|
19
|
+
"Read",
|
|
20
|
+
"Edit",
|
|
21
|
+
"Write",
|
|
22
|
+
"Glob",
|
|
23
|
+
"Grep",
|
|
24
|
+
"Bash",
|
|
25
|
+
"Task"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
{ "path": "SKILL.md", "kind": "instruction" },
|
|
30
|
+
{ "path": "references/mode-protocols.md", "kind": "reference" }
|
|
31
|
+
],
|
|
32
|
+
"dependencies": []
|
|
33
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Output Optimizer Mode Protocols
|
|
2
|
+
|
|
3
|
+
## Activation Protocol
|
|
4
|
+
|
|
5
|
+
- Explicit selector format: `mode: <name>`
|
|
6
|
+
- Canonical names:
|
|
7
|
+
- `neandertal`
|
|
8
|
+
- `machine`
|
|
9
|
+
- `step-brief`
|
|
10
|
+
- `toon`
|
|
11
|
+
- `json-compact`
|
|
12
|
+
- `binary-decision`
|
|
13
|
+
- Resolution precedence:
|
|
14
|
+
1. explicit mode
|
|
15
|
+
2. inferred mode from wording
|
|
16
|
+
3. default `step-brief`
|
|
17
|
+
|
|
18
|
+
## TOON Protocol (Strict)
|
|
19
|
+
|
|
20
|
+
Always output these four blocks in this exact order:
|
|
21
|
+
|
|
22
|
+
1. `Title`
|
|
23
|
+
2. `Objective`
|
|
24
|
+
3. `Output`
|
|
25
|
+
4. `Next`
|
|
26
|
+
|
|
27
|
+
Constraints:
|
|
28
|
+
|
|
29
|
+
- One short line per block.
|
|
30
|
+
- No extra blocks.
|
|
31
|
+
- No decorative or comic phrasing requirement.
|
|
32
|
+
|
|
33
|
+
## `json-compact` Protocol
|
|
34
|
+
|
|
35
|
+
Use compact JSON with minimal stable keys:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{"status":"<value>","mode":"json-compact","next":"<value>"}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Rules:
|
|
42
|
+
|
|
43
|
+
- Keep keys short and predictable.
|
|
44
|
+
- Keep values concise.
|
|
45
|
+
- No explanatory prose outside JSON.
|
|
46
|
+
|
|
47
|
+
## `binary-decision` Protocol
|
|
48
|
+
|
|
49
|
+
Output contract:
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
yes: <short reason>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
or
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
no: <short reason>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Rules:
|
|
62
|
+
|
|
63
|
+
- Exactly one decision token: `yes` or `no`.
|
|
64
|
+
- Exactly one brief reason.
|
|
65
|
+
- No extra paragraphs.
|
|
66
|
+
|
|
67
|
+
## Expansion Guard
|
|
68
|
+
|
|
69
|
+
Expand output only if one or more apply:
|
|
70
|
+
|
|
71
|
+
- Complexity threatens correctness.
|
|
72
|
+
- Ambiguity prevents safe execution.
|
|
73
|
+
- Risk is material.
|
|
74
|
+
- User explicitly asks for detail.
|
|
75
|
+
|
|
76
|
+
When expanded, preserve the selected mode shape as much as possible.
|