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 agentmods add skills/jasperhartong/sketchup-code/refactor-with-validationnpx skills add jasperhartong/sketchup-code --skill refactor-with-validationgit clone --depth 1 https://github.com/jasperhartong/sketchup-codeWrote 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/jasperhartong/sketchup-code/refactor-with-validation)<a href="https://agentmods.dev/skills/jasperhartong/sketchup-code/refactor-with-validation"><img src="https://agentmods.dev/badge/skills/jasperhartong/sketchup-code/refactor-with-validation.svg" alt="Measured on agentmods" 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 | $0.00081 | $0.01843 |
| Opus 5 | $0.00041 | $0.00922 |
| Sonnet 5 | $0.00016 | $0.00369 |
| Haiku 4.5 | $0.00008 | $0.00184 |
Grade A, and why
refactor-with-validation 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 5d 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 — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactor with Validation
Safe workflow for refactoring SketchUp Ruby code: capture baseline → refactor → compare → clean up.
Audit helper (reused in Steps 1 & 3)
Important: Audit only the plugin’s dimensions (same selection + sublayer as clear/run). Do not use model.entities.grep(Sketchup::DimensionLinear) — that includes every linear dimension in the model (other plugins, manual dims) and produces wrong counts (e.g. 158 instead of 49).
def fmt_pt(pt)
"(#{(pt.x*25.4).round(3)}, #{(pt.y*25.4).round(3)}, #{(pt.z*25.4).round(3)})mm"
end
def fmt_vec(v)
"(#{v.x.round(6)}, #{v.y.round(6)}, #{v.z.round(6)})"
end
# dims_array: only plugin dimensions (from target_entities + sublayer), not model.entities
def audit_dims(dims_array)
lines = []
dims_array.each_with_index do |d, i|
p1 = d.start[1]
p2 = d.send(:end)[1]
ov = d.offset_vector
dir = Geom::Vector3d.new(p2.x - p1.x, p2.y - p1.y, p2.z - p1.z)
normal = dir.cross(ov)
normal.normalize! rescue nil
lines << [
"dim #{i}: layer='#{d.layer.name}' text='#{d.text}' 3d_dist=#{(p1.distance(p2)*25.4).round(1)}mm",
" p1=#{fmt_pt(p1)} p2=#{fmt_pt(p2)}",
" offset=#{fmt_vec(ov)}",
" normal=#{fmt_vec(normal)}"
].join("\n")
end
lines.join("\n")
end
# Returns the array of DimensionLinear that belong to the plugin (current selection, maten sublayer).
def plugin_dims(model)
inst = Timmerman::SkeletonDimensions.send(:selected_component_instance, model.selection)
return [] unless inst
sublayer = Timmerman::SkeletonDimensions.send(:find_or_create_maten_sublayer, model, inst)
target = Timmerman::SkeletonDimensions.send(:entities_containing_instance, inst)
target.grep(Sketchup::DimensionLinear).select { |d| d.layer == sublayer }
end
Per dimension this captures:
text— displayed measurement (catches wrong values)p1/p2— exact 3D world-space anchor coordinates in mm (catches wrong corner/beam edge selection)3d_dist— scalar distance as a quick sanity checkoffset— 3D vector positioning the dim line (catches stagger, padding, top-vs-bottom, side-of-beam)normal— computed asnormalize((p2−p1) × offset); catches orientation flips that wouldn't show in the other fields.DimensionLinearhas no built-innormalmethod, so we derive it.
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.
- 5d ago First seen · 154 lines · 81 tokens per session scan A 7e2fd1309213
refactor-with-validation is a skill published in the GitHub repository jasperhartong/sketchup-code (5 stars, last pushed 3mo ago), licensed MIT. It adds 81 tokens to every session and 1,843 once invoked, about $0.0004 per session on Opus 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-08-31.
Other skills, from other repositories
contributing
Contribute to RubyLLM - set up the repo, run and record specs, add providers or chat options, work on the Rails integration, and edit docs. Use when fixing a bug, building a feature, writing specs, or changing documentation in the RubyLLM codebase.
new
Create a new project to start development quickly.
rspec-conventions
Rootstrap RSpec conventions. Use when writing, reviewing, or editing RSpec test files (spec//spec.rb, spec/railshelper.rb, spec/spechelper.rb, spec/support//.rb) or factories. Covers describe/context structure, let/subject, matchers, factories, mocking/stubbing, shared examples, and spec types (model, request…
ruby-patterns
Ruby/Rails: blocks, metaprogramming, ActiveRecord, Sidekiq, RSpec, Sorbet, Hanami. Triggers: Ruby, Rails, ActiveRecord, Sidekiq, RSpec, Gemfile, bundler, Hanami, Sorbet.
ruby-idioms
Ruby rewards expressiveness, convention, and developer happiness. Modern Ruby (3.x) favors pattern matching, Ractor for concurrency, and strict typing via Sorbet/RBS. Idiomatic Ruby = readable, tested, convention-following.
ruby-rules
Ruby coding rules: style, patterns, security, testing. Triggers: .rb, Gemfile, .gemspec, Rails, ActiveRecord, Sidekiq, RSpec, Sorbet, rubocop.