Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

optimize-button-patterns

Skill by duckduckgo

Improves the heuristic button regex patterns in autoconsent against a labelled button text dataset. It aims for zero false positives and above 90% weighted coverage per label. Built for maintainers who update button labels or tune pattern coverage.

  • Score 70
  • 140 stars
  • MPL-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install optimize-button-patterns

Built from the published package, never by AI.

git clone --depth 1 https://github.com/duckduckgo/autoconsent /tmp/autoconsent && mkdir -p ~/.claude/skills && cp -r /tmp/autoconsent/.agents/skills/optimize-button-patterns ~/.claude/skills/optimize-button-patterns

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install optimize-button-patterns in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill improves the heuristic button regex patterns in lib/heuristic-patterns.ts so they match the labelled dataset in data/labelled-button-texts.csv. It runs in a loop: measure with the benchmark, fix false positives first, add patterns for misses under target, then merge duplicate and similar patterns. The benchmark runs after each batch of edits.

The success criteria are zero weighted false positives and above 90% weighted coverage for settings, accept, reject and acknowledge. The patterns decide which buttons autoconsent clicks in users' browsers. The skill is written for maintainers who update labels or need to raise low benchmark coverage, and it runs npm run test:lib and npm run lint before reporting results.

Written from the project's SKILL.md and checked against it.

What it can do

  • Measure pattern accuracyRuns the button benchmark and reports weighted false positives and per-label coverage.
  • Fix false positivesRemoves, moves or narrows patterns that match text under the wrong label.
  • Improve coverageAdds the smallest pattern that fixes top misses for labels below the target.
  • Merge patternsRemoves exact duplicates and combines clusters of similar literals into anchored regexes.
  • Check collisionsScans the labelled CSV for rows a new pattern would wrongly match before keeping it.
  • Report resultsProduces a before and after summary with false positives, coverage and pattern counts.

What you need

  • Node.js with npm
  • The autoconsent repository with lib/heuristic-patterns.ts and data/labelled-button-texts.csv
  • tracker-radar-collector repository, only to label new CSV rows with an LLM

Try asking

  • Optimize the button patterns against the labelled button text CSV
  • Fix the false positives in the heuristic button regexes
  • Raise the accept and reject coverage above 90 percent

Good to know

  • Edits only the button lists in lib/heuristic-patterns.ts, not detection patterns or classification code.
  • Stops after about 10 iterations or when no under-target label improves for 2 rounds.
  • Marked disable-model-invocation, so the source sets it to run only when called directly.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .agents/skills/optimize-button-patterns/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to optimize-button-patterns

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

optimize-button-patterns: common questions

What does this skill change?

It edits the button pattern lists in lib/heuristic-patterns.ts. The source says it does not change DETECT patterns or the classification code in lib/heuristic-classify.ts.

How is success measured?

The source sets zero weighted false positives and above 90% weighted coverage for settings, accept, reject and acknowledge. The npm run test:lib command enforces the first two criteria.

What if a label in the CSV looks wrong?

The skill says to fix the row in the CSV rather than changing patterns to fit a wrong label.

How do I install optimize-button-patterns?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is optimize-button-patterns free?

The code is published under the MPL-2.0 licence. The service it connects to may have its own pricing.

Is optimize-button-patterns safe to use?

It scores 70 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to optimize-button-patterns?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

optimize-button-patterns Install

Add to stack

Loading.