Skip to content
Agentmart
Submit a tool

funcvec-dedupe-fixer

Use when the user wants Rust duplicate-function detection and cleanup with funcvec, especially crate-by-crate scans, duplicate triage, boilerplate refactors…

Skill by sssemil

IndexedMIT★ 2
Write a review

Chalk Labs

Need help deploying funcvec-dedupe-fixer?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/sssemil-funcvec-dedupe-fixer

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when the user wants Rust duplicate-function detection and cleanup with funcvec, especially crate-by-crate scans, duplicate triage, boilerplate refactors, or safe dedupe fixes across a Rust workspace.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/funcvec-dedupe-fixer

What's inside

Skill name
funcvec-dedupe-fixer
Description
Use when the user wants Rust duplicate-function detection and cleanup with funcvec, especially crate-by-crate scans, duplicate triage, boilerplate refactors, or safe dedupe fixes across a Rust workspace.
License
MIT
Instructions
150 lines in SKILL.md · view on GitHub

Files (2)

  • SKILL.md
  • openai.yaml · agents/

SKILL.md (first lines)

# Funcvec Dedupe Fixer

Run a crate-by-crate **sieve**: discover candidates with `funcvec`, inspect the
code behind each hit, refactor only high-confidence duplication, and verify each
crate before moving on.

## Ground Rules

- Work one crate at a time. Do not batch edits across unrelated crates.
- Treat `funcvec` output as suspects, not proof.
- Prefer deleting duplication by reusing existing helpers, extracting a small
  private helper, or introducing a macro only when the repeated shape is real.
- Do not merge tiny getters, setters, builders, or forwarding methods unless a
  larger repeated pattern makes the refactor pay for itself.
- Preserve public APIs unless the user explicitly asked for breaking cleanup.
- Preserve error mapping, metrics, logging, tracing, auth, validation, endpoint
  names, serialization, and async behavior.
- Leave generated code alone unless the generator is also updated.

## Step 1: Build The Crate Queue

Identify workspace crates in deterministic order:

```bash
cargo metadata --no-deps --format-version 1
```

Use package manifest paths from metadata. Skip crates that cannot be built in
the current environment only after recording the exact blocker.

Completion criterion: every workspace package is either queued once or recorded
with a concrete skip reason.

## Step 2: Run The Sieve

For each queued crate, run a focused scan:

```bash
funcvec <crate-dir> --top-k 60 --min-lines 4 --min-tokens 20
```

If the output is dominated by trivial accessors or route wrappers, tighten:

```bash
funcvec <crate-dir> --top-k 80 --min-lines 6 --min-tokens 30 --threshold 0.98
```

When native Nomic is installed and useful for semantic ranking:

```bash
funcvec <crate-dir> --provider nomic --top-k 40 --threshold 0.95
```

Completion criterion: the crate has a saved candidate list in notes or the final
response, including command, candidate count, and the top repeated pattern.

## Step 3: Classify Candidates

Read the full bodies and immediate call sites for each candidate before editing.
Classify each as:

- **Fix**: same behavior is repeated and a small refactor removes real
  maintenance risk.
- **Template**: repeated service/client/DTO/route shape. Fix with a shared
  helper, macro, or generator change only when the pattern repeats enough.
- **Ignore**: accessors, setters, builders, tests, or deliberately parallel
  domain methods where abstraction would hide intent.
- **Defer**: plausible duplication, but public API, generated code, or missing
  tests makes the change too risky for this pass.

Completion criterion: every candidate considered for editing has a classification
and a stated reason tied to code, not just score.

## Step 4: Refactor One Pattern

Pick the highest-payoff **Fix** or **Template** in the current crate.

Before editing, identify:

- the smallest shared abstraction that removes the duplication
- the behavior that must remain identical
- tests that currently cover it, or the focused test to add
- public API and semver impact

Implement the smallest refactor that removes the repeated behavior. Avoid
renaming, reformatting, or moving unrelated code.

Completion criterion: the selected candidate pair or cluster no longer appears
as duplicated implementation after inspection, and no unrelated files changed.

## Step 5: Verify The Crate

Run the narrowest useful checks first:

```bash
cargo fmt --check
cargo test -p <package>
cargo clippy -p <package> --all-targets -- -D warnings
```

If the crate uses feature gates, use the feature set that covers the touched
code. If a check is too broad or blocked by unrelated failures, run a narrower
test and record the blocker.

Re-run `funcvec <crate-dir>` after the fix. The original cluster should either
be gone or reduced to intentional wrappers.

Completion criterion: formatting passes, relevant tests pass, clippy passes or
has a recorded unrelated blocker, and the original funcvec finding is resolved
or explicitly reclassified.

## Step 6: Continue Or Stop

After one verified refactor, decide whether to continue in the same crate:

- Continue if another high-confidence **Fix** remains in the crate.
- Move to the next crate if remaining hits are **Ignore** or **Defer**.
- Stop and report if a refactor changes public API, generated code, or shared
  behavior enough to need user approval.

From sssemil/SKILLS, MIT.

More from sssemil/SKILLS

Signals

Stars
2
Forks
0
Open issues
0
Last commit (this folder)
Jul 22, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from sssemil

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get funcvec-dedupe-fixer running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying funcvec-dedupe-fixer?

CallGet help
Cite this page

funcvec-dedupe-fixer skill. Agent Mart. https://agentmart.dev/skills/sssemil-funcvec-dedupe-fixer (last updated 2026-10-24)