oliverweissl/context-garden / skills/weeder
weeder
VerifiedMeasure and reduce a Skill's token footprint (always-loaded description + on-trigger SKILL.md body) without regressing routing accuracy or losing instructions. Use when a SKILL.md feels oversized, repeats rules, or has a vague description that might mis-route.
| File | Kind | Size |
|---|---|---|
| .gitignore | other | 32 B |
| SKILL.md | skill md | 3.1 KB |
| agents/weeder.md | markdown | 1.2 KB |
| bin/weederexecutable | script | 292 B |
| references/classification.md | markdown | 4.9 KB |
| references/llm-assist.md | markdown | 2.1 KB |
| references/routing-heuristic.md | markdown | 4.1 KB |
| scripts/cg_mode.py | script | 5.4 KB |
| scripts/we_apply_suggestion.py | script | 5.7 KB |
| scripts/we_audit.py | script | 5.6 KB |
| scripts/we_config.py | script | 2.5 KB |
| scripts/we_constraints.py | script | 5.1 KB |
| scripts/we_dupes.py | script | 6.1 KB |
| scripts/we_filler.py | script | 4.9 KB |
| scripts/we_optimize.py | script | 4.3 KB |
| scripts/we_parse.py | script | 5.0 KB |
| scripts/we_routing.py | script | 4.5 KB |
| scripts/we_suggest.py | script | 3.8 KB |
| scripts/we_text.py | script | 2.1 KB |
| scripts/we_tokens.py | script | 4.1 KB |
| scripts/weeder.pyexecutable | script | 12.0 KB |
| tests/fixtures/answer_lot.json | config | 875 B |
| tests/fixtures/filler_sentences.json | config | 2.6 KB |
| tests/fixtures/routing_examples.json | config | 489 B |
| tests/smoke_test.shexecutable | script | 14.3 KB |
references/routing-heuristic.md
View on GitHub# The routing and function proxies: what they do and don't guarantee
Neither `test-routing` nor `test-function` calls a model. Both are
deterministic, offline proxies: useful for exactly what they measure, not
a substitute for the thing they approximate.
## `test-routing`: lexical-overlap proxy, not model prediction
`we_routing.py`'s `relevance_score` is a coverage score: the fraction of
a prompt's keywords that the skill description contains
(|prompt ∩ description| / |prompt|; lowercased, `snake_case`/`camelCase`
split into sub-words, stopwords removed, light suffix stripping so
"files"/"file" and "deleting"/"delete" match). It doesn't penalise a
longer description for words the prompt doesn't use, so adding concrete
trigger vocabulary never lowers a score. `predict_trigger` picks
whichever candidate description (the skill under test, plus any
`--competing` descriptions) scores highest; a best score below
`MIN_SCORE` (0.2) resolves to "no prediction".
**What this predicts reasonably well**: whether a description contains
the concrete nouns/verbs a real prompt about this skill's domain would
use, relative to competing descriptions. An all-generic description
("helps you with various tasks") carries almost no keyword signal and
loses to any competitor with real domain vocabulary.
**What this does NOT predict**: an actual model's routing decision, which
reasons about intent, ambiguity, and multi-skill applicability. Two
failure directions:
- **False confidence without competitors.** With no `--competing`
descriptions, any prompt clearing the `MIN_SCORE` floor "wins" by
default. A 100% score against zero competitors means much less than
the same score against five real ones.
- **Missed near-synonyms.** "compact this log" vs. a description that
says "summarize output" shares no keywords and scores 0. If the proxy
and your judgment disagree, spot-check the borderline prompts with a
real agent session before finalizing a rewrite.
For real-model validation, the context-garden repo's top-level
`scripts/validate-routing` (not shipped with this skill) compares real
routing against this proxy on the same prompts.
Beyond the aggregate number, always investigate a *specific prompt* that
flips from correct to incorrect.
## `test-function`: constraint-coverage proxy, not a behavioral eval
`we_constraints.py` extracts sentences matching an imperative/constraint
pattern (`never`, `always`, `must`, `do not`, `required`, `critical`,
`cannot`, `shall not`, `prohibited`, `forbidden`) from the **before**
skill's full reachable text (SKILL.md + every reference), one per
sentence, and checks each one is still stated within a **single sentence**
of the **after** skill's full reachable text: that sentence must contain
the constraint's non-trivial keywords (>3 chars, common words excluded)
at a >=60% coverage ratio by default, every negation/modal marker it uses
(`never`, `always`, `not`/`don't`/`do not`, `must`, `only`, ...), and the
same polarity. So deleting a rule, flipping "Never X" to "Always X", or
"must X" to "must not X" is reported MISSING even though the vocabulary
survives elsewhere. A move to a reference file counts as preserved.
Hyphenated forms like "always-loaded" are not treated as constraints.
**What this proves**: a constraint's wording was not deleted outright —
the most common and most damaging failure of a "let me tighten this up"
edit.
**What this does NOT prove**: that the *meaning* survived a rewrite that
kept similar words. E.g. rephrasing "always confirm first" as "confirm first
where practical" drops the marker and is caught, but a subtler hedge
added alongside the original markers would still pass. Read the actual diff
for anything reported as preserved before trusting that the *rule*, not
just its vocabulary, survived.
**Extraction is pattern-based, not universal.** A constraint phrased
without any trigger word (e.g. "Confirmation is needed before deletion" —
no "must"/"never"/"required"/etc.) won't be extracted at all, so it's
silently absent from the *before* count rather than flagged as at-risk. Prefer the explicit imperative words when
writing constraints.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |