Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add lossless-group/lossless-agent-skills --skill spike-then-refactor-into-componentsgit clone --depth 1 https://github.com/lossless-group/lossless-agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/lossless-group/lossless-agent-skills/spike-then-refactor-into-components)<a href="https://agentmods.dev/skills/lossless-group/lossless-agent-skills/spike-then-refactor-into-components"><img src="https://agentmods.dev/badge/skills/lossless-group/lossless-agent-skills/spike-then-refactor-into-components/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/lossless-group/lossless-agent-skills/spike-then-refactor-into-components"><img src="https://agentmods.dev/badge/skills/lossless-group/lossless-agent-skills/spike-then-refactor-into-components.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00185 | $0.01636 |
| Opus 5.5 | $0.00074 | $0.00654 |
| Sonnet 5.5 | $0.00037 | $0.00327 |
| Haiku 4.5 | $0.00018 | $0.00164 |
Grade A, and why
spike-then-refactor-into-components scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 20d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Spike, then refactor into components
Coding agents are faster and better at building new features, pages and UI when they aren't thinking about the existing component library. Holding a library in mind while being creative pulls every new idea toward what already exists. So we let creative work break free of the library, and then refactor it back into the library once it's approved.
The design system has two halves, and a spike breaks free of both: the component library (it builds its own markup) and the theme (it hard-codes colors, fonts, spacing and effects). The refactor brings it back into both.
The second half is the discipline. Most developers forget it, and the team
pays later: one-off markup everywhere, the same card built four ways, a theme
change that has to be made in twelve files, and a /design-system page that
no longer describes the site.
1. Make the gametime decision, out loud
Before writing UI, decide whether to use the component library, and say so in one line ("Spiking this freely; refactor after approval" or "Building from the library: Card, SectionHeader").
| Use the library | Break free (spike) |
|---|---|
| Extending a pattern the site already has | The emphasis is to be creative: a new page, a new feature, a redesign, design variants |
| A small change to an existing page | The library would steer the idea toward what exists |
| Consistency is the point (a new entry in a list, another pricing tier) | Exploring several directions before anyone picks one |
| A component exists that fits without contortion | Fitting it would need props or variants nobody has wanted before |
When unsure and the work is visible to a stakeholder, spike. A spike that gets approved is cheap to refactor; a library-bound build that misses the brief is expensive to redo.
2. Spike freely, and mark it
Write it the fastest clear way: inline markup, local styles, hard-coded content. Still follow the hard rules (Astro and Svelte only, no React or JSX habits, semantic tokens in styles where you can). Mark every file the spike created or reshaped, so the refactor can't be forgotten:
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 20d ago First seen · 125 lines · 185 tokens per session scan A a6f5c084dc44
spike-then-refactor-into-components is a skill published in the GitHub repository lossless-group/lossless-agent-skills (4 stars, last pushed yesterday), licensed MIT. It adds 185 tokens to every session and 1,636 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-10.
spike-then-refactor-into-components compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| spike-then-refactor-into-componentslossless-group/lossless-agent-skills | Skill | 4 | yesterday | MIT | A | 185 | Claude Code, Codex |
| gsd-sketchopen-gsd/gsd-core | Skill | 12k | yesterday | MIT | A | 27 | Claude Code |
| gsd-ui-phaseopen-gsd/gsd-core | Skill | 12k | yesterday | MIT | A | 18 | Claude Code |
| gsd-ui-reviewopen-gsd/gsd-core | Skill | 12k | yesterday | MIT | A | 17 | Claude Code |
| top-designwondelai/skills | Skill | 2.8k | 9d ago | MIT | A | 113 | Claude Code, Codex |
| web-typographywondelai/skills | Skill | 2.8k | 9d ago | MIT | A | 128 | Claude Code, Codex |
| userinterface-wikiopen-gsd/gsd-pi | Skill | 1.4k | 2d ago | MIT | A | 52 | Claude Code, Codex |