@ia-ccun/code-agent-cli 0.0.2 → 0.0.4-8.beta.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 (189) hide show
  1. package/README.md +92 -11
  2. package/bin/cli.js +212 -59
  3. package/config/agent/APPEND_SYSTEM.md +46 -5
  4. package/config/agent/bin/fd +0 -0
  5. package/config/agent/bin/rg +0 -0
  6. package/config/agent/dangerous-patterns.json +106 -0
  7. package/config/agent/extensions/aicode-tips.ts +191 -0
  8. package/config/agent/extensions/bash-check.ts +227 -0
  9. package/config/agent/extensions/context-monitor.ts +275 -0
  10. package/config/agent/extensions/context.ts +1 -0
  11. package/config/agent/extensions/custom-footer.ts +33 -2
  12. package/config/agent/extensions/custom.ts +24 -91
  13. package/config/agent/extensions/error-monitor.ts +142 -0
  14. package/config/agent/extensions/msg-debug.ts +185 -0
  15. package/config/agent/extensions/review.ts +4 -0
  16. package/config/agent/extensions/working-msg.ts +39 -20
  17. package/config/agent/mcp.json +4 -0
  18. package/config/agent/models.json +16 -43
  19. package/config/agent/prompts/code-simplifier.md +51 -0
  20. package/config/agent/prompts/feat.md +2 -2
  21. package/config/agent/prompts/git-commit.md +9 -15
  22. package/config/agent/prompts/init-project.md +2 -1
  23. package/config/agent/prompts/workflow.md +3 -2
  24. package/config/agent/settings.json +17 -5
  25. package/config/agent/skills/brainstorming/SKILL.md +167 -0
  26. package/config/agent/skills/brainstorming/scripts/frame-template.html +214 -0
  27. package/config/agent/skills/brainstorming/scripts/helper.js +88 -0
  28. package/config/agent/skills/brainstorming/scripts/server.cjs +338 -0
  29. package/config/agent/skills/brainstorming/scripts/start-server.sh +153 -0
  30. package/config/agent/skills/brainstorming/scripts/stop-server.sh +55 -0
  31. package/config/agent/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  32. package/config/agent/skills/brainstorming/visual-companion.md +286 -0
  33. package/config/agent/skills/code-review/SKILL.md +4 -2
  34. package/config/agent/skills/commit/SKILL.md +10 -5
  35. package/config/agent/skills/csv-data-summarizer/SKILL.md +2 -1
  36. package/config/agent/skills/design-md/README.md +34 -0
  37. package/config/agent/skills/design-md/SKILL.md +172 -0
  38. package/config/agent/skills/design-md/examples/DESIGN.md +154 -0
  39. package/config/agent/skills/dispatching-parallel-agents/SKILL.md +185 -0
  40. package/config/agent/skills/executing-plans/SKILL.md +73 -0
  41. package/config/agent/skills/find-skills/SKILL.md +5 -1
  42. package/config/agent/skills/finishing-a-development-branch/SKILL.md +204 -0
  43. package/config/agent/skills/fireworks-tech-graph/LICENSE +21 -0
  44. package/config/agent/skills/fireworks-tech-graph/README.md +528 -0
  45. package/config/agent/skills/fireworks-tech-graph/README.zh.md +499 -0
  46. package/config/agent/skills/fireworks-tech-graph/SKILL.md +537 -0
  47. package/config/agent/skills/fireworks-tech-graph/agentloop-core.svg +101 -0
  48. package/config/agent/skills/fireworks-tech-graph/agents/openai.yaml +4 -0
  49. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style1-flat.png +0 -0
  50. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style2-dark.png +0 -0
  51. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style3-blueprint.png +0 -0
  52. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style4-notion.png +0 -0
  53. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style5-glass.png +0 -0
  54. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style6-claude.png +0 -0
  55. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style7-openai.png +0 -0
  56. package/config/agent/skills/fireworks-tech-graph/fixtures/agent-memory-types-style4.json +181 -0
  57. package/config/agent/skills/fireworks-tech-graph/fixtures/api-flow-style7.json +40 -0
  58. package/config/agent/skills/fireworks-tech-graph/fixtures/mem0-style1.json +297 -0
  59. package/config/agent/skills/fireworks-tech-graph/fixtures/microservices-style3.json +64 -0
  60. package/config/agent/skills/fireworks-tech-graph/fixtures/multi-agent-style5.json +45 -0
  61. package/config/agent/skills/fireworks-tech-graph/fixtures/system-architecture-style6.json +48 -0
  62. package/config/agent/skills/fireworks-tech-graph/fixtures/tool-call-style2.json +182 -0
  63. package/config/agent/skills/fireworks-tech-graph/package.json +42 -0
  64. package/config/agent/skills/fireworks-tech-graph/references/icons.md +406 -0
  65. package/config/agent/skills/fireworks-tech-graph/references/style-1-flat-icon.md +108 -0
  66. package/config/agent/skills/fireworks-tech-graph/references/style-2-dark-terminal.md +107 -0
  67. package/config/agent/skills/fireworks-tech-graph/references/style-3-blueprint.md +113 -0
  68. package/config/agent/skills/fireworks-tech-graph/references/style-4-notion-clean.md +94 -0
  69. package/config/agent/skills/fireworks-tech-graph/references/style-5-glassmorphism.md +125 -0
  70. package/config/agent/skills/fireworks-tech-graph/references/style-6-claude-official.md +209 -0
  71. package/config/agent/skills/fireworks-tech-graph/references/style-7-openai.md +215 -0
  72. package/config/agent/skills/fireworks-tech-graph/references/style-diagram-matrix.md +135 -0
  73. package/config/agent/skills/fireworks-tech-graph/references/svg-layout-best-practices.md +100 -0
  74. package/config/agent/skills/fireworks-tech-graph/scripts/README.md +244 -0
  75. package/config/agent/skills/fireworks-tech-graph/scripts/generate-diagram.sh +157 -0
  76. package/config/agent/skills/fireworks-tech-graph/scripts/generate-from-template.py +1556 -0
  77. package/config/agent/skills/fireworks-tech-graph/scripts/test-all-styles.sh +135 -0
  78. package/config/agent/skills/fireworks-tech-graph/scripts/validate-svg.sh +292 -0
  79. package/config/agent/skills/fireworks-tech-graph/templates/agent-architecture.svg +28 -0
  80. package/config/agent/skills/fireworks-tech-graph/templates/architecture.svg +23 -0
  81. package/config/agent/skills/fireworks-tech-graph/templates/comparison-matrix.svg +14 -0
  82. package/config/agent/skills/fireworks-tech-graph/templates/data-flow.svg +28 -0
  83. package/config/agent/skills/fireworks-tech-graph/templates/er-diagram.svg +21 -0
  84. package/config/agent/skills/fireworks-tech-graph/templates/flowchart.svg +21 -0
  85. package/config/agent/skills/fireworks-tech-graph/templates/sequence.svg +20 -0
  86. package/config/agent/skills/fireworks-tech-graph/templates/state-machine.svg +20 -0
  87. package/config/agent/skills/fireworks-tech-graph/templates/timeline.svg +19 -0
  88. package/config/agent/skills/fireworks-tech-graph/templates/use-case.svg +21 -0
  89. package/config/agent/skills/frontend-design/SKILL.md +4 -1
  90. package/config/agent/skills/hello/SKILL.md +5 -2
  91. package/config/agent/skills/impeccable/adapt/SKILL.md +204 -0
  92. package/config/agent/skills/impeccable/animate/SKILL.md +177 -0
  93. package/config/agent/skills/impeccable/arrange/SKILL.md +127 -0
  94. package/config/agent/skills/impeccable/audit/SKILL.md +128 -0
  95. package/config/agent/skills/impeccable/bolder/SKILL.md +119 -0
  96. package/config/agent/skills/impeccable/clarify/SKILL.md +185 -0
  97. package/config/agent/skills/impeccable/colorize/SKILL.md +145 -0
  98. package/config/agent/skills/impeccable/critique/SKILL.md +122 -0
  99. package/config/agent/skills/impeccable/delight/SKILL.md +306 -0
  100. package/config/agent/skills/impeccable/distill/SKILL.md +124 -0
  101. package/config/agent/skills/impeccable/extract/SKILL.md +94 -0
  102. package/config/agent/skills/impeccable/frontend-design/reference/color-and-contrast.md +132 -0
  103. package/config/agent/skills/impeccable/frontend-design/reference/interaction-design.md +123 -0
  104. package/config/agent/skills/impeccable/frontend-design/reference/motion-design.md +99 -0
  105. package/config/agent/skills/impeccable/frontend-design/reference/responsive-design.md +114 -0
  106. package/config/agent/skills/impeccable/frontend-design/reference/spatial-design.md +100 -0
  107. package/config/agent/skills/impeccable/frontend-design/reference/typography.md +133 -0
  108. package/config/agent/skills/impeccable/frontend-design/reference/ux-writing.md +107 -0
  109. package/config/agent/skills/impeccable/harden/SKILL.md +357 -0
  110. package/config/agent/skills/impeccable/normalize/SKILL.md +73 -0
  111. package/config/agent/skills/impeccable/onboard/SKILL.md +248 -0
  112. package/config/agent/skills/impeccable/optimize/SKILL.md +268 -0
  113. package/config/agent/skills/impeccable/overdrive/SKILL.md +144 -0
  114. package/config/agent/skills/impeccable/polish/SKILL.md +205 -0
  115. package/config/agent/skills/impeccable/quieter/SKILL.md +105 -0
  116. package/config/agent/skills/impeccable/teach-impeccable/SKILL.md +71 -0
  117. package/config/agent/skills/impeccable/typeset/SKILL.md +118 -0
  118. package/config/agent/skills/librarian/SKILL.md +5 -1
  119. package/config/agent/skills/markdown-to-html/SKILL.md +5 -2
  120. package/config/agent/skills/owasp-security/SKILL.md +539 -0
  121. package/config/agent/skills/pr/SKILL.md +5 -2
  122. package/config/agent/skills/receiving-code-review/SKILL.md +216 -0
  123. package/config/agent/skills/refactor/SKILL.md +5 -2
  124. package/config/agent/skills/requesting-code-review/SKILL.md +108 -0
  125. package/config/agent/skills/requesting-code-review/code-reviewer.md +146 -0
  126. package/config/agent/skills/session-learning/SKILL.md +185 -0
  127. package/config/agent/skills/skill-creator/SKILL.md +339 -213
  128. package/config/agent/skills/skill-creator/agents/analyzer.md +274 -0
  129. package/config/agent/skills/skill-creator/agents/comparator.md +202 -0
  130. package/config/agent/skills/skill-creator/agents/grader.md +223 -0
  131. package/config/agent/skills/skill-creator/assets/eval_review.html +146 -0
  132. package/config/agent/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  133. package/config/agent/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  134. package/config/agent/skills/skill-creator/references/schemas.md +430 -0
  135. package/config/agent/skills/skill-creator/scripts/__init__.py +0 -0
  136. package/config/agent/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  137. package/config/agent/skills/skill-creator/scripts/generate_report.py +326 -0
  138. package/config/agent/skills/skill-creator/scripts/improve_description.py +248 -0
  139. package/config/agent/skills/skill-creator/scripts/package_skill.py +33 -7
  140. package/config/agent/skills/skill-creator/scripts/quick_validate.py +11 -3
  141. package/config/agent/skills/skill-creator/scripts/run_eval.py +310 -0
  142. package/config/agent/skills/skill-creator/scripts/run_loop.py +332 -0
  143. package/config/agent/skills/skill-creator/scripts/utils.py +47 -0
  144. package/config/agent/skills/subagent-driven-development/SKILL.md +280 -0
  145. package/config/agent/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
  146. package/config/agent/skills/subagent-driven-development/implementer-prompt.md +113 -0
  147. package/config/agent/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  148. package/config/agent/skills/systematic-debugging/CREATION-LOG.md +119 -0
  149. package/config/agent/skills/systematic-debugging/SKILL.md +300 -0
  150. package/config/agent/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  151. package/config/agent/skills/systematic-debugging/condition-based-waiting.md +115 -0
  152. package/config/agent/skills/systematic-debugging/defense-in-depth.md +122 -0
  153. package/config/agent/skills/systematic-debugging/find-polluter.sh +63 -0
  154. package/config/agent/skills/systematic-debugging/root-cause-tracing.md +169 -0
  155. package/config/agent/skills/systematic-debugging/test-academic.md +14 -0
  156. package/config/agent/skills/systematic-debugging/test-pressure-1.md +58 -0
  157. package/config/agent/skills/systematic-debugging/test-pressure-2.md +68 -0
  158. package/config/agent/skills/systematic-debugging/test-pressure-3.md +69 -0
  159. package/config/agent/skills/test-driven-development/SKILL.md +375 -0
  160. package/config/agent/skills/test-driven-development/testing-anti-patterns.md +299 -0
  161. package/config/agent/skills/ui-ux-pro-max/SKILL.md +4 -1
  162. package/config/agent/skills/unit-test/SKILL.md +4 -2
  163. package/config/agent/skills/using-git-worktrees/SKILL.md +222 -0
  164. package/config/agent/skills/using-superpowers/SKILL.md +118 -0
  165. package/config/agent/skills/using-superpowers/references/codex-tools.md +25 -0
  166. package/config/agent/skills/using-superpowers/references/gemini-tools.md +33 -0
  167. package/config/agent/skills/verification-before-completion/SKILL.md +142 -0
  168. package/config/agent/skills/writing-plans/SKILL.md +148 -0
  169. package/config/agent/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  170. package/config/agent/skills/writing-skills/SKILL.md +669 -0
  171. package/config/agent/skills/writing-skills/anthropic-best-practices.md +1150 -0
  172. package/config/agent/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  173. package/config/agent/skills/writing-skills/graphviz-conventions.dot +172 -0
  174. package/config/agent/skills/writing-skills/persuasion-principles.md +187 -0
  175. package/config/agent/skills/writing-skills/render-graphs.js +168 -0
  176. package/config/agent/skills/writing-skills/testing-skills-with-subagents.md +384 -0
  177. package/config.json +23 -2
  178. package/dist/banner.js +3 -3
  179. package/dist/banner.js.map +1 -1
  180. package/package.json +20 -15
  181. package/scripts/banner.txt +6 -0
  182. package/scripts/postinstall.js +203 -11
  183. package/config/agent/prompts/git-rollback.md +0 -91
  184. package/config/agent/prompts/git-worktree.md +0 -277
  185. package/config/agent/prompts/help.md +0 -10
  186. package/config/agent/skills/github/SKILL.md +0 -47
  187. package/config/agent/skills/skill-creator/references/output-patterns.md +0 -82
  188. package/config/agent/skills/skill-creator/references/workflows.md +0 -28
  189. package/config/agent/skills/skill-creator/scripts/init_skill.py +0 -303
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: quieter
3
+ description: Tone down overly bold or visually aggressive designs. Reduces intensity while maintaining design quality and impact.
4
+ user-invocable: true
5
+ args:
6
+ - name: target
7
+ description: The feature or component to make quieter (optional)
8
+ required: false
9
+ ---
10
+
11
+ Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness.
12
+
13
+ ## MANDATORY PREPARATION
14
+
15
+ Use the frontend-design skill — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run teach-impeccable first.
16
+
17
+ ---
18
+
19
+ ## Assess Current State
20
+
21
+ Analyze what makes the design feel too intense:
22
+
23
+ 1. **Identify intensity sources**:
24
+ - **Color saturation**: Overly bright or saturated colors
25
+ - **Contrast extremes**: Too much high-contrast juxtaposition
26
+ - **Visual weight**: Too many bold, heavy elements competing
27
+ - **Animation excess**: Too much motion or overly dramatic effects
28
+ - **Complexity**: Too many visual elements, patterns, or decorations
29
+ - **Scale**: Everything is large and loud with no hierarchy
30
+
31
+ 2. **Understand the context**:
32
+ - What's the purpose? (Marketing vs tool vs reading experience)
33
+ - Who's the audience? (Some contexts need energy)
34
+ - What's working? (Don't throw away good ideas)
35
+ - What's the core message? (Preserve what matters)
36
+
37
+ If any of these are unclear from the codebase, STOP and call the AskUserQuestion tool to clarify.
38
+
39
+ **CRITICAL**: "Quieter" doesn't mean boring or generic. It means refined, sophisticated, and easier on the eyes. Think luxury, not laziness.
40
+
41
+ ## Plan Refinement
42
+
43
+ Create a strategy to reduce intensity while maintaining impact:
44
+
45
+ - **Color approach**: Desaturate or shift to more sophisticated tones?
46
+ - **Hierarchy approach**: Which elements should stay bold (very few), which should recede?
47
+ - **Simplification approach**: What can be removed entirely?
48
+ - **Sophistication approach**: How can we signal quality through restraint?
49
+
50
+ **IMPORTANT**: Great quiet design is harder than great bold design. Subtlety requires precision.
51
+
52
+ ## Refine the Design
53
+
54
+ Systematically reduce intensity across these dimensions:
55
+
56
+ ### Color Refinement
57
+ - **Reduce saturation**: Shift from fully saturated to 70-85% saturation
58
+ - **Soften palette**: Replace bright colors with muted, sophisticated tones
59
+ - **Reduce color variety**: Use fewer colors more thoughtfully
60
+ - **Neutral dominance**: Let neutrals do more work, use color as accent (10% rule)
61
+ - **Gentler contrasts**: High contrast only where it matters most
62
+ - **Tinted grays**: Use warm or cool tinted grays instead of pure gray—adds sophistication without loudness
63
+ - **Never gray on color**: If you have gray text on a colored background, use a darker shade of that color or transparency instead
64
+
65
+ ### Visual Weight Reduction
66
+ - **Typography**: Reduce font weights (900 → 600, 700 → 500), decrease sizes where appropriate
67
+ - **Hierarchy through subtlety**: Use weight, size, and space instead of color and boldness
68
+ - **White space**: Increase breathing room, reduce density
69
+ - **Borders & lines**: Reduce thickness, decrease opacity, or remove entirely
70
+
71
+ ### Simplification
72
+ - **Remove decorative elements**: Gradients, shadows, patterns, textures that don't serve purpose
73
+ - **Simplify shapes**: Reduce border radius extremes, simplify custom shapes
74
+ - **Reduce layering**: Flatten visual hierarchy where possible
75
+ - **Clean up effects**: Reduce or remove blur effects, glows, multiple shadows
76
+
77
+ ### Motion Reduction
78
+ - **Reduce animation intensity**: Shorter distances (10-20px instead of 40px), gentler easing
79
+ - **Remove decorative animations**: Keep functional motion, remove flourishes
80
+ - **Subtle micro-interactions**: Replace dramatic effects with gentle feedback
81
+ - **Refined easing**: Use ease-out-quart for smooth, understated motion—never bounce or elastic
82
+ - **Remove animations entirely** if they're not serving a clear purpose
83
+
84
+ ### Composition Refinement
85
+ - **Reduce scale jumps**: Smaller contrast between sizes creates calmer feeling
86
+ - **Align to grid**: Bring rogue elements back into systematic alignment
87
+ - **Even out spacing**: Replace extreme spacing variations with consistent rhythm
88
+
89
+ **NEVER**:
90
+ - Make everything the same size/weight (hierarchy still matters)
91
+ - Remove all color (quiet ≠ grayscale)
92
+ - Eliminate all personality (maintain character through refinement)
93
+ - Sacrifice usability for aesthetics (functional elements still need clear affordances)
94
+ - Make everything small and light (some anchors needed)
95
+
96
+ ## Verify Quality
97
+
98
+ Ensure refinement maintains quality:
99
+
100
+ - **Still functional**: Can users still accomplish tasks easily?
101
+ - **Still distinctive**: Does it have character, or is it generic now?
102
+ - **Better reading**: Is text easier to read for extended periods?
103
+ - **Sophistication**: Does it feel more refined and premium?
104
+
105
+ Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality.
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: teach-impeccable
3
+ description: One-time setup that gathers design context for your project and saves it to your AI config file. Run once to establish persistent design guidelines.
4
+ user-invocable: true
5
+ ---
6
+
7
+ Gather design context for this project, then persist it for all future sessions.
8
+
9
+ ## Step 1: Explore the Codebase
10
+
11
+ Before asking questions, thoroughly scan the project to discover what you can:
12
+
13
+ - **README and docs**: Project purpose, target audience, any stated goals
14
+ - **Package.json / config files**: Tech stack, dependencies, existing design libraries
15
+ - **Existing components**: Current design patterns, spacing, typography in use
16
+ - **Brand assets**: Logos, favicons, color values already defined
17
+ - **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales
18
+ - **Any style guides or brand documentation**
19
+
20
+ Note what you've learned and what remains unclear.
21
+
22
+ ## Step 2: Ask UX-Focused Questions
23
+
24
+ STOP and call the AskUserQuestion tool to clarify. Focus only on what you couldn't infer from the codebase:
25
+
26
+ ### Users & Purpose
27
+ - Who uses this? What's their context when using it?
28
+ - What job are they trying to get done?
29
+ - What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.)
30
+
31
+ ### Brand & Personality
32
+ - How would you describe the brand personality in 3 words?
33
+ - Any reference sites or apps that capture the right feel? What specifically about them?
34
+ - What should this explicitly NOT look like? Any anti-references?
35
+
36
+ ### Aesthetic Preferences
37
+ - Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.)
38
+ - Light mode, dark mode, or both?
39
+ - Any colors that must be used or avoided?
40
+
41
+ ### Accessibility & Inclusion
42
+ - Specific accessibility requirements? (WCAG level, known user needs)
43
+ - Considerations for reduced motion, color blindness, or other accommodations?
44
+
45
+ Skip questions where the answer is already clear from the codebase exploration.
46
+
47
+ ## Step 3: Write Design Context
48
+
49
+ Synthesize your findings and the user's answers into a `## Design Context` section:
50
+
51
+ ```markdown
52
+ ## Design Context
53
+
54
+ ### Users
55
+ [Who they are, their context, the job to be done]
56
+
57
+ ### Brand Personality
58
+ [Voice, tone, 3-word personality, emotional goals]
59
+
60
+ ### Aesthetic Direction
61
+ [Visual tone, references, anti-references, theme]
62
+
63
+ ### Design Principles
64
+ [3-5 principles derived from the conversation that should guide all design decisions]
65
+ ```
66
+
67
+ Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place.
68
+
69
+ Then STOP and call the AskUserQuestion tool to clarify. whether they'd also like the Design Context appended to CLAUDE.md. If yes, append or update the section there as well.
70
+
71
+ Confirm completion and summarize the key design principles that will now guide all future work.
@@ -0,0 +1,118 @@
1
+ ---
2
+ name: typeset
3
+ description: Improve typography by fixing font choices, hierarchy, sizing, weight consistency, and readability. Makes text feel intentional and polished.
4
+ user-invocable: true
5
+ args:
6
+ - name: target
7
+ description: The feature or component to improve typography for (optional)
8
+ required: false
9
+ ---
10
+
11
+ Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type.
12
+
13
+ ## MANDATORY PREPARATION
14
+
15
+ Use the frontend-design skill — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run teach-impeccable first.
16
+
17
+ ---
18
+
19
+ ## Assess Current Typography
20
+
21
+ Analyze what's weak or generic about the current type:
22
+
23
+ 1. **Font choices**:
24
+ - Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults)
25
+ - Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface)
26
+ - Are there too many font families? (More than 2-3 is almost always a mess)
27
+
28
+ 2. **Hierarchy**:
29
+ - Can you tell headings from body from captions at a glance?
30
+ - Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy)
31
+ - Are weight contrasts strong enough? (Medium vs Regular is barely visible)
32
+
33
+ 3. **Sizing & scale**:
34
+ - Is there a consistent type scale, or are sizes arbitrary?
35
+ - Does body text meet minimum readability? (16px+)
36
+ - Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings)
37
+
38
+ 4. **Readability**:
39
+ - Are line lengths comfortable? (45-75 characters ideal)
40
+ - Is line-height appropriate for the font and context?
41
+ - Is there enough contrast between text and background?
42
+
43
+ 5. **Consistency**:
44
+ - Are the same elements styled the same way throughout?
45
+ - Are font weights used consistently? (Not bold in one section, semibold in another for the same role)
46
+ - Is letter-spacing intentional or default everywhere?
47
+
48
+ **CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting.
49
+
50
+ ## Plan Typography Improvements
51
+
52
+ Consult the [typography reference](reference/typography.md) from the frontend-design skill for detailed guidance on scales, pairing, and loading strategies.
53
+
54
+ Create a systematic plan:
55
+
56
+ - **Font selection**: Do fonts need replacing? What fits the brand/context?
57
+ - **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy
58
+ - **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits)
59
+ - **Spacing**: Line-heights, letter-spacing, and margins between typographic elements
60
+
61
+ ## Improve Typography Systematically
62
+
63
+ ### Font Selection
64
+
65
+ If fonts need replacing:
66
+ - Choose fonts that reflect the brand personality
67
+ - Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights
68
+ - Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks)
69
+
70
+ ### Establish Hierarchy
71
+
72
+ Build a clear type scale:
73
+ - **5 sizes cover most needs**: caption, secondary, body, subheading, heading
74
+ - **Use a consistent ratio** between levels (1.25, 1.333, or 1.5)
75
+ - **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone
76
+ - **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need
77
+ - **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed
78
+
79
+ ### Fix Readability
80
+
81
+ - Set `max-width` on text containers using `ch` units (`max-width: 65ch`)
82
+ - Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7)
83
+ - Increase line-height slightly for light-on-dark text
84
+ - Ensure body text is at least 16px / 1rem
85
+
86
+ ### Refine Details
87
+
88
+ - Use `tabular-nums` for data tables and numbers that should align
89
+ - Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text
90
+ - Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`)
91
+ - Set `font-kerning: normal` and consider OpenType features where appropriate
92
+
93
+ ### Weight Consistency
94
+
95
+ - Define clear roles for each weight and stick to them
96
+ - Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty)
97
+ - Load only the weights you actually use (each weight adds to page load)
98
+
99
+ **NEVER**:
100
+ - Use more than 2-3 font families
101
+ - Pick sizes arbitrarily — commit to a scale
102
+ - Set body text below 16px
103
+ - Use decorative/display fonts for body text
104
+ - Disable browser zoom (`user-scalable=no`)
105
+ - Use `px` for font sizes — use `rem` to respect user settings
106
+ - Default to Inter/Roboto/Open Sans when personality matters
107
+ - Pair fonts that are similar but not identical (two geometric sans-serifs)
108
+
109
+ ## Verify Typography Improvements
110
+
111
+ - **Hierarchy**: Can you identify heading vs body vs caption instantly?
112
+ - **Readability**: Is body text comfortable to read in long passages?
113
+ - **Consistency**: Are same-role elements styled identically throughout?
114
+ - **Personality**: Does the typography reflect the brand?
115
+ - **Performance**: Are web fonts loading efficiently without layout shift?
116
+ - **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%?
117
+
118
+ Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make.
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: librarian
3
- description: Research open-source libraries with evidence-backed answers and GitHub permalinks. Use when the user asks about library internals, needs implementation details with source code references, wants to understand why something was changed, or needs authoritative answers backed by actual code. Excels at navigating large open-source repos and providing citations to exact lines of code.
3
+ description: "Research open-source libraries with evidence-backed answers and GitHub permalinks. Use when asking about library internals, implementation details, source code references, or why something was changed."
4
+ disable-model-invocation: true
5
+ metadata:
6
+ version: "1.0.0"
7
+ author: "xujianjiang"
4
8
  ---
5
9
 
6
10
  # Librarian
@@ -1,7 +1,10 @@
1
1
  ---
2
2
  name: markdown-to-html
3
- description: "将 Markdown 转换为精美的 HTML 页面 "
4
- author: xujianjiang
3
+ description: "Convert Markdown documents to beautiful HTML presentation pages. Use when converting Markdown to HTML, creating HTML pages from MD files, or generating web pages."
4
+ disable-model-invocation: true
5
+ metadata:
6
+ version: "1.0.0"
7
+ author: "xujianjiang"
5
8
  ---
6
9
 
7
10
  # Baoyu Markdown to HTML