wormeyman-skills
Health Uyari
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Uyari
- network request — Outbound network request in skills/publishing-behind-cloudflare-access/references/fail-closed-worker.ts
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
Agent skills I actually use: a dependency audit built around project-specific constraints, and a session handoff generator.
wormeyman-skills
Agent skills I actually use, kept here so they survive a machine and so other
people can take them. All were written against real work rather than imagined
work, and the design notes below are the part worth reading - the skills
themselves are short.
The skill format is a directory with aSKILL.md carrying YAML frontmatter. It is read by Claude Code and by a growing
number of other agent tools.
| Skill | What it does |
|---|---|
accessibility-audit |
Audits a page against WCAG 2.2 AA in light, dark and mobile, then fixes what it finds |
asking-for-decisions |
Puts a decision to you as a prompt with real options, not as a question buried in prose |
cloudflare-migration-sweep |
Finds every repo you can reach that still needs a Cloudflare migration or deprecation fix |
decompiling-with-ghidra |
Turns a function in a big binary with debug info into readable C in minutes, where Ghidra's defaults take hours |
dependency-audit |
Decides what to update, remove or replace, and whether a new major is worth it here |
getting-command-output |
Runs commands that need your password in a logged tmux window, and gets results back from other machines by Taildrop, so you never paste output |
passing-json-between-agents |
Hands data to another agent as plain JSON with its field notes inside, checked with a real parser |
pruning-tests |
Finds the tests that cannot fail or that another test already covers, and proves each cut by breaking the code on purpose |
publishing-behind-cloudflare-access |
Puts a login in front of a static page, in an order that never leaves it public |
python-quality |
Sets up strict linting and type checking for a Python repo, with a hook that checks each file as it is edited |
refactoring |
Decides whether code is worth refactoring, from git history and the real test safety net |
sandboxed-execution |
Picks a sandbox for code you do not trust, and proves it holds before running anything |
session-handoff |
Writes a self-contained prompt so a fresh session can pick up the work |
tracker-consent-audit |
Measures what a WordPress food blog sends before visitors agree, and who put each tracker there |
The design notes under Skills explain why each one is built the way
it is.
Install
Pick one route. Installing the same skills two ways gives you every skill twice.
Any agent, with the skills CLI, the
installer behind skills.sh:
npx skills add wormeyman/wormeyman-skills --list # see what is here
npx skills add wormeyman/wormeyman-skills --skill refactoring # one skill, this project
npx skills add wormeyman/wormeyman-skills --skill '*' --global # all of them, every project
Add --agent claude-code to install for one agent only. npx skills update
pulls in later changes.
Claude Code, as a plugin:
/plugin marketplace add wormeyman/wormeyman-skills
/plugin install wormeyman-skills@wormeyman
This installs all fourteen. Plugin skills carry the plugin's name, so you invoke/wormeyman-skills:refactoring. Run /plugin marketplace update wormeyman for
later changes, or turn on auto-update for the marketplace in /plugin.
By hand:
git clone https://github.com/wormeyman/wormeyman-skills.git
cp -R wormeyman-skills/skills/dependency-audit ~/.claude/skills/
Copy into .claude/skills/ inside a repo instead to install for that project
only.
However you install, you can invoke a skill by name or just describe the task.
The description field in each skill's frontmatter is what decides whether it
triggers on its own.
Skills
dependency-audit
Audits a project's dependencies - what can be updated, removed, or replaced, and
whether a major version brings anything this codebase would actually use.
There are already several published dependency skills and they converge on the
same shape: inventory, then usage analysis, then changelog research, then a
phased plan. This one is built around a different observation.
Most of that work belongs to tools, not to a model. npm outdated lists
versions. knip finds unused packages. npm audit finds advisories. Renovate
does all three forever, unattended. If the deliverable is a table of version
numbers, an agent is a slow and unreliable way to produce it.
Two things tools cannot do, and they are the whole value:
- Decide whether this codebase would use what a new major brings. A changelog
says what changed; only reading the code says whether it matters here. - Know what this repo forbids. Mature projects hold things back on purpose,
and the reason is rarely in the package - it is in a doc, an issue, or
somebody's head.
So the skill's central mechanic is four slots that must be filled before any
analysis begins:
| Slot | What it captures | What it prevents |
|---|---|---|
| Constraints | What is pinned or coupled, and why - treated as possibly stale | Recommending an upgrade that is deliberately held |
| Update mechanism | How a change actually gets applied here | Advice the project cannot execute |
| In flight | Open PRs and issues touching dependencies | Recommending work already underway |
| Settled | Decisions already taken, with references | Re-litigating a rejected idea |
An unfilled slot is reported as unfilled rather than skipped, because "I found
nothing" and "I did not look" otherwise produce the identical empty section.
Two real examples of what those slots catch. One project holds a types package
several majors back because the newer line targets a game version its committed
dataset does not match - upstream publishes a dedicated dist-tag for exactly
that, so the hold is the sanctioned path rather than neglect. Another forbids a
blanket pnpm up outright, because transitive re-resolution tips a config file
past TypeScript's comparison-depth limit and produces an error naming a package
that has nothing to do with it. Neither is discoverable from the dependency
tree.
The skill also insists on tools over grep for unused dependencies. Grep cannot
see a package that is declared and never imported, which is the single most
common removable thing - a mistake this skill exists partly because I made.
session-handoff
Turns everything learned in a session into one self-contained prompt for a fresh
session that knows nothing about the conversation, and puts it on the clipboard.
The design point is that the future reader has zero context - it cannot see
the chat, the scratchpad, or the reasoning. So the skill collects real state
first (branch, git log, what is uncommitted, what to read) rather than handing
back a template full of placeholders, and it leans on pointers: telling the next
session to read an authoritative file transfers more, more reliably, than three
paragraphs paraphrasing it.
It also warns against guessing. A wrong fact in a handoff is worse than an
omission, because the next session will act on it.
refactoring
Decides whether code is worth refactoring, finds the candidates from evidence,
and knows the cases where duplication is deliberate and must be left alone.
Language-agnostic - it was built against a TypeScript SPA, a forked TS monorepo,
and a C# solution at the same time.
Published refactoring skills are not scarce, and they broadly agree on the
criteria: knowledge duplication is bad, deep nesting is bad, magic numbers are
bad, do not refactor speculatively. Those are correct. The gap is that they are
criteria without a method. Every one of them rests on "abstract what would
change together" and then leaves you to eyeball whether two files would change
together - which is exactly the judgement people get wrong, because
similar-looking code is the most common false lead in refactoring.
Git already recorded the answer. The skill shipsscripts/co-change.sh, which ranks
file pairs by how often they appear in the same commit, normalised so a busy
file does not pair with everything. Two files that look like twins and share
zero commits are parallel evolution, and merging them couples things that want
to drift apart. That measurement works identically on C# and TypeScript, which
is most of why the skill is language-agnostic at all.
Honesty about that script, though: when I A/B tested the skill, the model
reached for git history on its own even without it. The script makes the
measurement consistent and normalised rather than ad hoc, which is worth having
- but it is not where the skill earns its keep. That turned out to be somewhere
I did not predict, which is the next section.
The other three departures:
It assesses the safety net before trusting it. "Behavior-preserving under
existing tests" means nothing until you know what the tests prove. So the skill
checks coverage of the specific code being moved, and checks what CI actually
runs - when the skill was built, one repo here had 159 end-to-end specs
holding nearly all its real coverage and none of them ran in CI, so a green
pipeline proved about 7 unit files. It also suggests deleting a line to confirm something goes red, because
that answers the question in thirty seconds.
It has an exception list for duplication that must stay. Forks that merge
upstream, ports pinned to an external spec, generated output, and code that
cross-compiles to a second target. Two real cases from the repos it was built
on. In one, two loops that could obviously be one are deliberately separate;
collapsing them type-checks, reads as a pure simplification, and is a filed bug.
In the other, the C# transpiles to Lua, so LINQ, yield return and try/catch
are all forbidden - meaning the single most likely "cleanup" an agent would
propose compiles fine and silently breaks the build for the other target.
"No refactor needed" is a result. The survey that produced this skill
concluded that the most obvious-looking target in the codebase - seven pairs of
near-identical files - should not be touched, on the evidence that they share
0-2 commits each and mirror upstream files that version independently. Reporting
the refactor you considered and rejected, with the number that killed it, saves
the next person the whole investigation.
Does it actually help?
I A/B tested it: three realistic prompts against two real repos, each run twice,
with and without the skill, graded by a separate agent told to mark strictly and
verify claims against the repos. 18/18 assertions with it, 11/18 without, at
a cost of about 25% more tokens and 80 seconds more wall time per run.
But the aggregate hides the finding, which is that the benefit is narrow and
lopsided:
| case | with | without |
|---|---|---|
| Split a 2,700-line file (repo is a fork) | 6/6 | 1/6 |
| Modernise imperative C# (transpiles to Lua) | 6/6 | 5/6 |
| Survey a Vue app and rank the work | 6/6 | 5/6 |
Two of the three cases barely separate. In those, the constraint is written down
in the repo's own CLAUDE.md and README, and a careful agent finds it either
way - the skill adds one finding and a lot of runtime.
The first case is different in kind. Without the skill the model produced a
confident, well-evidenced, nine-module refactoring plan, having correctly
analysed churn and found the characterisation-test harness - and never once rangit remote -v. At the time the repo was a fork sitting 399 commits ahead of
a live upstream. It also called the safety net "unusually good" and staked its
recommendation on that, when the suite it was pointing at never ran in CI. (Both
have since changed: upstream wound down and the suite now runs in CI. The
skill's repo notes track that.)
So the real lesson is not "measure co-change". It is that the constraints
which sink a refactor are disproportionately the ones not visible in the
source: whether the repo is a fork, whether a suite actually runs in CI,
whether a file is generated. Reading the code more carefully never surfaces
those, so the skill now spends thirty seconds on repository provenance before
it reads anything at all.
The eval also embarrassed one of my own claims, which is the other reason to run
one: I had predicted the co-change script would be the differentiator. It was
not.
accessibility-audit
Audits a page against WCAG 2.2 AA, reports what it finds, fixes it once you
approve, then re-runs to show the score actually moved. Works on a live URL, a
local file, or a published Claude artifact.
Chrome DevTools already ships an accessibility skill and it is a good one:
accessibility tree, form labels, ARIA, focus traps, tap targets. This does not
replace it, and its own text says so and defers to it. It exists for one
observation that skill does not make.
Lighthouse audits one theme, whichever the browser happens to be in, and never
mentions which.
I found that the usual way. I ran an audit on a page I had just built, got 87
with no contrast findings, and reported it as fine. The browser was in dark mode.
Forced to light, the same page scored 77 with 41 failing elements.
A moving score is the merciful version. The skill ships a fixture with two color
tokens that were never redefined per theme, one too pale and one too dark, and it
scores 62 in both. The contrast failures behind that identical number do not
overlap at all:
| Theme | What Lighthouse flags |
|---|---|
| Dark | p.dark-fail, p.fade-fail, span.status.good |
| Light | p.light-fail, p.fade-fail, and four <th> |
Fix everything the dark run reports and five failures remain, still at 62. A
stable score across themes is not evidence that the themes are equally sound, and
nothing in the output hints otherwise. That is the silent-failure test from the
note at the bottom of this README, which is why the skill's central mechanic is a
matrix rather than a run: light, dark, mobile, every time.
Three other departures:
It computes contrast instead of sampling it. The skill walks every
text-bearing element, resolves the real background by climbing ancestors until it
finds one that is not transparent, and applies the threshold that element's
computed size and weight actually call for. It reports exact ratios, because
"fails" does not tell you what to change the color to. There is also a pre-check
for the palette itself, since contrast is far cheaper to fix in six token values
than in 41 rendered elements.
It runs the checks Lighthouse skips. axe has a rule requiring scrollable
regions to be keyboard reachable. Lighthouse does not run it, so a wide table in
an overflow-x:auto container is unreachable by keyboard and nothing says a word.
Lighthouse's table audits return "not applicable", which on a quick read is
indistinguishable from a pass. Color used as the only signal has no automated
check anywhere, in any tool.
A published artifact cannot be audited at its own URL. Point Lighthouse atclaude.ai/code/artifact/... and you have audited the wrapper page. You have to
serve the source locally inside the same skeleton the publisher wraps it in.
Doing that separates your score from the host's, which matters: html-has-lang is
worth 7 points and belongs to the <html> tag, and you do not write that tag.
Does it actually work?
The fixture carries eleven planted defects and a manifest in its source comment.
Nine are caught by script and split across the two themes. One of those, text
faded with opacity, is caught only by a sweep that composites the fade, because
the computed color passes. A tenth needs the focus probe. The last, state
carried by color alone, has no automated check anywhere, and the skill says so
rather than implying the manual pass is optional.
While verifying it I found a defect I had not planted: a hardcoded green in the
fixture's own status column, never redefined for dark, failing at 3.12:1. The
sweep caught it before I did, which is the most reassuring thing I can say about
it. The expected results are inreferences/verifying.md.
publishing-behind-cloudflare-access
Puts a login in front of a static page using Cloudflare Access, without buying a
domain, moving DNS, or writing auth code. Built for the case where a report or
artifact has to go online but only two named people should see it.
Most of the skill is the ordering problem, because that is where the damage is.
Deploying the page and adding the login are two steps, and doing them in that
order publishes the document. There is no warning. The page is simply live,
and for confidential material that window is indexable and unrecoverable. So the
whole sequence is built around deploying with the public URL switched off,
attaching Access, and only then turning the URL on.
The rest is the things that cost an hour each:
- The Access bootstrap is dashboard-only. Before it is clicked, every Access
API call fails, including reads, and the error names the button. - Cloudflare MCP tokens are often read-only. Writes fail with
10000: Authentication error, which reads like a broken credential rather
than a scope limit. Probe with a throwaway write before planning around it. - Access can attach to a Worker by name, which covers its
workers.devURL,
routes, custom domains and previews at once. That removes the domain question
entirely, which matters when the obvious alternative - moving a business
domain onto Cloudflare - would also move its MX records.
It also answers the question people actually ask. They want a password. Access
does not do passwords, and that is the better outcome: a shared password gets
forwarded, cannot be revoked for one person, and leaves no record of who used
it. The skill says that in two sentences and moves on.
asking-for-decisions
Put a decision to the user as an interactive prompt with grounded options,
rather than asking it in prose. Covers what counts as a decision, how to write
options worth choosing between, and the tool mechanics.
The design point is where the habit breaks. It is not the obvious forks, which
anyone handles. It is the end of a long report. You have finished something, you
are writing it up, the prose is flowing, and a question occurs to you that feels
like a natural closing sentence. So you write it as one, and it goes out buried
in the last paragraph instead of as something the reader can act on.
That is not a hypothetical. It happened in the session that produced this skill.
Every other decision that session went into a prompt correctly. The one that
slipped was at the end of a long write-up about finishing a different skill,
which is exactly where the rule says to watch. I had to be asked for the prompt.
So the skill's check is mechanical rather than a matter of judgement: before
sending a long message, read your own last paragraph. Anything in it the reader
could act on belongs in a prompt.
The other half is that the options are the whole value. "Option A: darken it /
Option B: change the text" makes the reader do the thinking. "Darken the green to#00856E, which keeps white text and computes to 4.58:1" lets them decide in five
seconds. If you do not have the numbers yet, you are not ready to ask.
One thing worth being explicit about: this skill is the craft, not the
trigger. A skill has to be invoked, and this behavior has to be automatic, so
the rule itself lives in CLAUDE.md where it fires every time. Keeping both is
the point. The rule remembers to ask; this file explains how to ask well.
sandboxed-execution
Choose an OS-enforced sandbox for code you do not trust, then prove the sandbox
holds before you run anything in it. Covers picking between a plain container and
a full isolated VM, the fetch-then-cut pattern for code that has to download
before it can run, and getting evidence back out without following a symlink.
The point of the skill is the second half. Building a sandbox is easy and the
commands are in every tutorial. What goes wrong is that nobody checks it, or the
check is broken in a way that reads as success.
Two examples from the session that produced this, both of which I believed at
first. A "loopback still works" control ran when nothing was listening, so it
reported the port closed and proved nothing at all. And an HTTP probe dialled127.0.0.1 against a server bound to ::1, got ECONNREFUSED for every case,
and looked exactly like a sandbox denying everything. Neither probe could have
failed in a way I would have noticed.
So every check in scripts/verify-sandbox.py is a pair: the unsafe thing must be
refused and a safe thing must still work. If only one half holds, it reportsINCONCLUSIVE rather than passing, because "I could not tell" is a real answer
and treating it as a pass is how you end up trusting a result.
The script found a bug in itself on its first run. Its memory probe piped intotail -c 1, which streams and holds a single byte, so it allocated nothing and
reported a working 256 MB cap as broken. Fixed, it now buffers the full amount
and gets exit 137.
One measured fact worth the whole file: OrbStack's --isolate-network does not
mean "no network". It blocks other machines and host IPs while keeping internet
access, and a machine created with it could still reach another box on my
tailnet. The flag name invites exactly the wrong reading. Running the script
against a fresh isolated machine reports no external network: BROKEN, which is
how I would rather find that out.
cloudflare-migration-sweep
Finds every repo across a GitHub account and its orgs that still needs a
Cloudflare migration: a renamed test package, a removed Wrangler key, a GitHub
Action that no longer exists, an API route with an end-of-life date. Two scripts
do the work. fetch_repos.py shallow-clones everything the signed-in gh account
can reach, and scan.py runs about 60 rules over the clones. Each rule links to
an entry in references/catalog.md with the docs link, the fix, and the
deadline.
It exists because my first attempt used GitHub code search, which returned
nothing for a private repo that used the package in three files. An empty
search result looks exactly like a clean account. Cloning 93 repos took 30
seconds and scanning them took 6, so there was never a reason to search.
Most of the skill is about not believing the scan. The same sweep produced 15
hits for deprecated AI models, and every one of them was in a generated types
file that lists all models. A note left behind after a finished migration
matches the same pattern as the code that needed it. So scan.py skips
generated files, marks hits that sit in comments, and ends with a list of repos
that mention Cloudflare but matched no rule. That list is where the real misses
were: a Pages deploy run through wrangler-action with no wrangler in the
command, and a site whose only deploy instructions were in its docs.
The catalog was built from every Cloudflare llms.txt index and the changelog
on 2026-09-25, and it will go stale. The skill says so at the top and explains
how to refresh it.
tracker-consent-audit
Measures what a WordPress food blog sends to ad and analytics companies before a
visitor agrees to anything, and names the plugin, theme or setting that put each
tracker there. It ends in a report the site owner can read.
It uses a real browser, not a plugin list. A list of installed plugins says
what could run. A browser says what did. Consent plugins are often installed but
inert, their banner buttons do nothing, or the site ignores the Global Privacy
Control signal on the server. None of that shows in a list. Only loading the
page, with and without a consent choice, and watching the requests shows it.
It scaffolds a folder per client. A re-test is only worth something if it
runs the same code as the first test. So the skill copies a template into a new
folder for each site, and every later run uses that copy. The numbers from two
months apart then mean the same thing.
It uses a self-expiring probe, not a database export. The probe is a small
plugin that stops working after a short time. It makes no changes itself. It
runs the site's own head and footer code and rolls back the database writes
that code makes. It answers with the plugin and theme names and versions, the
must-use plugin file names, and each hooked callback with its file and owner.
For what each callback prints, it gives the hosts and tracker IDs and a
300-character excerpt, which is the same markup visitors receive. It also lists
the option names that hold tracker IDs, with the matched IDs, and the consent
plugins' option names. It never returns users, comments, subscribers, or option
values beyond the matched IDs. It names the hook that prints each tracker,
which an export cannot do. It has limits. Its rollback cannot undo file writes,
cache writes, outbound requests, or writes to tables that are not InnoDB, and
it reports those tables. The skill says so before you install it. The report Worker fails closed: it checks
the Access token itself, so a deleted Access app means 403, not a public report.
It runs in containers. Chrome and a virtual display run in a container, so
the host stays clean. Any database copy lives in a container too, which makes it
easy to delete completely when the work is done.
Not built yet: canaries in every input type, more session recorders, cookie-write
stack traces, and a consent-withdrawal test.
getting-command-output
Run commands that need the user's hands without ever asking them to paste the
output back. On the agent's own machine the command runs in a new tmux window
inside script, which logs everything to a file the agent reads. On a machine
the agent can't reach, a one-line command saves the output and sends it back
over Tailscale's Taildrop.
It came out of a long night encrypting a Linux box, where nearly every step
needed sudo and the agent kept opening logged tmux windows rather than asking
for a paste. To check that the habit was not just luck, I gave a fresh agent,
with the same CLAUDE.md, two tasks: run a sudo script, and check FileVault on
a Mac it could not reach. It handled the first well, but used tee, which
changes how prompts and progress bars behave. For the Mac it wrote a command
that copied the result to the clipboard "so just paste it back here", and
mentioned Taildrop only as a fallback for long output. That second answer is the
exact habit the skill exists to break.
With the skill loaded, the same tasks came back with script, a Taildrop round
trip, and the recovery-key command run outside the logger because it prints a
secret. The test agent also listed eight gaps it had to guess at, and most of
them are now in the file: printing the window number, a timeout on the wait,
logs in /tmp that a reboot wipes, and keeping a secret out of tmux's
scrollback.
Like asking-for-decisions, the trigger lives in CLAUDE.md ("never ask me to
paste output"), and this file is the how.
passing-json-between-agents
Hand data to another agent as a plain .json file, with the notes on each
field stored as text inside it, in an about string and a field_notes
object. The agent on the other end has none of your context, so the file has
to explain itself.
It came out of passing Medicare plan figures to the Claude PowerPoint agent.
Asked to put the field notes in as comments, I wrote a .jsonc file. The
upload box refused it ("File type '.jsonc' is not supported"), and the agent's
sandbox has no JSON5 reader either. Plain JSON with field_notes went through.
The PowerPoint agent then called that the safest way to pass data back and
forth.
Two fresh agents with no skill both chose plain JSON with the notes in their
own keys, including one asked to put the notes in as comments. It refused, and
said JSON has no comments. So the habit is already the default, and the.jsonc was a slip late in a long session. The skill adds what neither agent
knew. One is the receiver's upload filter: neither checked it. The other is
how to check the file, where the obvious tool is wrong. vp fmt --check passed a .json file with a //
comment in it and failed valid JSON over layout. jq empty andpython3 -m json.tool caught both a comment and a trailing comma.
python-quality
Strict linting and type checking for a Python repo, enforced by tools rather
than instructions, so that code an agent writes meets the bar without anyone
asking. It ships a Claude Code hook that formats, lints and type-checks each
file right after an edit. The hook says nothing when the file is clean, so it
costs nothing until something fails.
It came out of setting up four repos and benchmarking six type checkers on
them, about 70,000 lines. Pyrefly in strict mode was the pick: 0.1-0.4 s a
file against 0.5-2 s for pyright, with a real strict preset and a baseline
for old code. ty was faster still but has no strict mode yet.
Three fresh agents with no skill then did three jobs: set up a new repo,
grandfather an old one, and move one off pyright. They did most of it well.
They kept behavior the same, tested how their baselines behaved, and found an
import trap on their own. So the skill holds only what they got wrong or could
not know:
- One rejected Pyrefly because it "only catches missing annotations rule by
rule".preset = "strict"turns them all on. - One chose ruff's
ALLrules, which want a docstring on every function. - Pyrefly's default baseline matching can hide a new error. Once an old error
was fixed, a new error in a new function took its slot, and the default
mode reported nothing.concise-descriptioncaught it. - Pyrefly copies
pyrightconfig.jsonon its own, so a straight migration
carries any search-path bug across.
Run again with the skill, all three chose Pyrefly strict and a chosen rule
list, and set the baseline mode. Their notes made the hook better. It now
says when a repo's tools are missing rather than passing silently, shows a
misspelled config key, and accepts a pyrefly.toml.
Its first day of real use found one more silent failure. The hook started with#!/usr/bin/env python3, and when Claude Code put /usr/bin first on PATH,
that found macOS's Python 3.9. The hook needs 3.11, so it crashed on every
edit. Claude Code does not show that kind of hook failure to Claude, so
nothing looked wrong until a repo's own type check caught code the hook had
let through. The hook now runs under uv run --script, which finds a new
enough Python. When it does get an old one, it exits with a message Claude
can see. Register it with uv's full path:
"command": "/opt/homebrew/bin/uv run --quiet --script /path/to/python-quality-hook.py"
decompiling-with-ghidra
Read one function of a large binary as C, using Ghidra from a short Python
script (PyGhidra, run by uv). It has three commands: import a binary once,find a function by name, and decompile a list of functions to .c files.
It came out of reading Factorio's game code to match its map generator. The
free Linux headless build is 257 MB and ships full debug info (DWARF). The
first try used REA, an agent tool that drives Ghidra. Ghidra's default
analysis was still running when a two-hour limit stopped it, and REA answers
nothing until that finishes. Skipping analysis was fast but useless: 9,522
lines of C for a 2.7 KB function, with no names and no types.
The fix is one setting. Turn off every analyzer except DWARF and the GNU
demangler, and the same binary is ready in 4 to 6 minutes using about 3 GB of
memory. After that, each run decompiles several functions in about 15 seconds.
The noise function that had come out as 9,522 lines came out as 180, with
every known constant in plain sight.
Three traps cost most of the night, and the script handles each one:
- Ghidra moves a position-independent binary to
0x100000, so an address fromobjdumplands in the middle of the wrong function. The script reads the
original base from the file and shifts for you. - Debug-info-only analysis names functions but does not turn their bytes into
instructions. The script does that first. - On this binary every function came in as
void f(void), so the C was full of
raw register names. Two debug-info options that looked like the fix did not
help. Rebuilding each signature from its C++ mangled name, plusthisfor
methods, did.
Before trusting the C on an open question, I decompiled a function whose rules
I already had from reading the assembly by hand. The C showed the same compare.
Only then did I use it on the collision code nobody had read yet. I checked
the published Ghidra skills on skills.sh first. They wrap Ghidra's default
analysis with a timeout, the same path that ran past two hours here.
Then I tested it on a small C++ program whose source I had, built three ways:
with debug info, with symbols only, and stripped. Most of the C matched the
source. One trap did not show up on Factorio. At -O2 GCC makes "clones" of
some functions, named like wins(...) [clone .isra.0], that take different
arguments than the declaration says. Forcing the declared signature onto one
labelled a plain int as this, which reads as a pointer check and is wrong.
The script now leaves clones alone and lets Ghidra infer their arguments, and
that matched the machine code exactly.
Two more agents then tested it: one followed the skill as a new user would, and
one reviewed the script against a dozen test builds (C and C++, GCC and clang,
32-bit and 64-bit). They found eight problems, all fixed:
- Good debug-info signatures were being replaced by worse ones from the C++
name. The script now keeps them when they are real. - Library calls lost their arguments, and code after a
throwran on into the
next block, because the import never set up the PLT (the jump table for
imported functions) or marked functions that never return. It does both now. - An address in the middle of a function quietly became a fake new function.
It is now refused, with the real start. - Clang changes some functions' arguments without renaming them. Its debug info
marks them, Ghidra ignores the mark, and the script now reads it. - Smaller ones: overloads overwrote each other's output, a second import into one
folder broke the project, andfindmixed up thunks, clones and imports.
pruning-tests
Finds the tests in a suite that are not worth their cost, proves each cut is
safe, and lands the cuts. The rule underneath it: a test earns its place when
it can fail for a real bug that no cheaper test would catch.
It grew out of a real run. I used Matthew Blode'stest-audit,
itself adapted from Peter Steinberger's and Ayaan Zaidi's
OpenClaw skill,
on a browser-heavy suite: 96 Playwright files and 535 tests. Eight read-only
agents graded every test. The cuts that landed removed 33 test runs, about 12%
of the suite's CI time, and each was proved by breaking the product code and
watching the kept test go red. Their method is the core of this one, the
R/F/C/D ledger and an agent per area especially, and NOTICE carries both MIT
notices.
Then I read about twenty other published test skills: mutation testing,
anti-pattern catalogues, CI slimming, flaky-test triage, suite "doctors". They
are good at listing what a junk test looks like. Almost none of them can prove
a cut on a browser suite, because they rely on coverage or a mutation tool, and
neither works there. That gap is where the run went wrong, or nearly did, so
it is where this skill differs:
- It proves cuts by breaking the code, for any runner.
scripts/mutation_check.py
makes a one-line break, runs the tests, reads which ones failed from JUnit
XML (Playwright, Vitest, Jest and pytest all write it), and restores the
file with a checksum. It runs the unbroken code first, because a keeper that
already fails proves nothing. - A failure only counts if it is the keeper's own assertion. A timeout or
a page that never loaded would fail any test. The script reports those as
inconclusive, an idea from CircleCI'schunk-testing-gaps. - It asks how the keeper reaches the code. The run's worst near-miss was
three "keepers" for one cut, of which only one went through the real load
path. The other two read the same data another way and stayed green when
that path was broken. Every keeper now needs a line on what it does not
prove, after gstack'stest-audit. - Moving a test down a layer is a verdict of its own, as in
thedavidweng'sci-slim. The run found a unit test that a merge had
deleted, leaving eight slow browser rows as the only guard. Restoring it let
six of them go. - Savings come from per-test CI timings, medians over several runs, not
from a local run or one job's wall time. Runner speed varied by 2x or more.
Writing the script turned up two more traps, each now pinned by a test:
- Python's bytecode cache trusts a file's mtime to the second and its size. A
mutation that keeps the size, written in the same second as the run before
it, quietly runs the old code, and every keeper looks like it survived. The
script moves the mutant's file time and puts the original back. - Run on the real Playwright suite, the first version called a genuine kill
harness noise. The keeper was a polled assertion that ran out of time, so
"Timeout 60000ms exceeded" sat in its call log under anexpect(...).not.toBe(...)headline. The script now judges by the headline
alone. A break that stops the app loading still reads as inconclusive: it
fails in thebeforeEachhook.
A second run, on a unit-heavy suite (3,286 Vitest tests for a Vue site and
its Cloudflare Worker), added four lessons the browser run had not needed,
plus one fix:
- A fix gets the same proof as a cut. 26 tests could not fail on the bug
their title names. Each was shown green under a break, then red under the
same break once fixed. - Some tests fail with no bug. One read the newest year from the live
data file and would have gone red the day next year's figure was entered.
That is the opposite of a test that cannot fail, and the old junk lists
miss it. - Shared setup beats cuts for speed. One emulator per file instead of one
per test took the suite from 188 s to 52 s, with no test removed. The 131
proven cuts made after that saved lines, not time. - A table row needs a break of its own. A count target is easiest to
meet by thinning big tables, and a general break that any row catches says
nothing about the row that was removed. - The lost-test search now passes
-mtogit log. Without it, merge
commits list no files, and a merge is how the first run's lost unit test
disappeared.
A third run, on the first run's own Vitest suite, needed none of the cutting
machinery. That suite ran in 2.5 s and was 26% of the tracked lines, so cuts
could save nothing. A narrower weak-test pass, which hunted only for tests
that could not fail, found 12, and each held up under its proof. That pass is
now on the skill's menu, with when to recommend it. One of the 12 fixes
removed table rows that compared nothing, which the old proof could not
check, so the skill now says how to prove a fix like that.
The smaller ideas borrowed from darkroomengineering's audit, fallow'sfallow-mutation, obra's writing-good-tests and OpenClaw'sopenclaw-test-performance are credited one by one at the end of the skill.
A note on writing skills
These got shorter as they got better. The temptation is to write
exhaustive rules; what actually works is explaining why something matters and
trusting the model with the rest. Where these do give a hard instruction - use a
real tool rather than grep, use absolute paths - it is because the failure mode
is silent. A stale working directory turns a glob into an empty result that
reads exactly like a clean report, and nothing in the output says otherwise.
Licence
MIT - see LICENSE.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi