agentleFS
matthewpmatthewp/tideway/skills/prune/SKILL.md

prune

Skill2 starsChanged 4 months agoBSD-3-ClauseView on GitHub

Find and remove unused CSS in a Tideway project — classes defined in stylesheets but never referenced in markup. Use whenever the user wants to prune dead CSS, find unused styles or classes, clean up or slim a stylesheet, find orphaned BEM classes, or "tree-shake" hand-written CSS.

12 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use deliver, wizard and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • GoogleSkill

    deliver

    Posts a condensed version of the briefing to a Google Chat or Slack incoming webhook, so the daily run delivers itself — skips silently when no webhook is configured.

    Also in 3 projects that use this

  • AWSSkill

    wizard

    Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.

    Also in 3 projects that use this

  • AWSSkill

    wait-what

    Stop. That last message did not land: re-pitch it.

    Also in 3 projects that use this

  • NVIDIASkill

    research

    Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.

    Also in 5 projects that use this

  • GoogleSkill

    prototype

    Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

    Also in 4 projects that use this

  • BlockSkill

    plan

    Draft a TDD, PRD, or lightweight plan in the conversation without committing it.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Report the findings to the user: before changing anything. Group by file so the scope is clear.

    line 20

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Tideway: prune

Prune finds CSS classes a project defines but no longer uses, so hand-written stylesheets don't accumulate dead rules. Tideway's conventions make this reliable: every selector is a single flat class, so each rule maps to exactly one class name, and the distinctive BEM names are unambiguous to search for.

Workflow

  1. Run the detector from the project root:

    python scripts/find_unused.py <project-dir>

    It scans every .css file for defined classes, searches the project's markup and scripts for each, and prints two groups: Unused (no reference anywhere) and Possibly dynamic (see below).

  2. Report the findings to the user before changing anything. Group by file so the scope is clear.
  3. Remove what's confirmed unused, on the user's go-ahead. Because a block's CSS lives together, removing an unused element or modifier is a local deletion; an entire unused block is its whole section or file. Removal is safe to do under version control.

The one thing to be careful about

A class can be referenced without its full name ever appearing in the source — when markup builds it at runtime: `card--${variant}`, clsx("card", isOpen && "card--open"), or other string construction. Such a class is live but looks unused to a text search.

The detector flags these as Possibly dynamic: the exact name isn't found, but its prefix (card--) does appear in the source. Never remove a class from this group on the report alone — open the construction site, confirm the full name can't be produced there, and only then treat it as dead. When unsure, keep it.

Out of scope

Writing new CSS is the style skill. Converting an existing project onto Tideway is the migrate skill.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.