first-plan-semantic-reuse

first-plan-semantic-reuse is a skill for Claude Code from vynazevedo/first-plan. It costs 88 tokens per session (1,571 once invoked), scanned A, original, MIT.

A semantic code-search method that finds reusable project symbols by meaning rather than exact names. BM25 is a text-search ranking method used here to match an intended task with functions or components in a project.

In plain words
What is it for?
Use it during planning or reuse work to find validators, retrying HTTP clients, modal components, and other reusable code from descriptions of what they should do.
Why use it?
It helps locate existing code when the words in a request differ from the names used in the codebase.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the fp plugin — 19 skills, 19 commands, 4 agents, 1 hook shipped together

Good fit Use it during planning or reuse work to find validators, retrying HTTP clients, modal components, and other reusable code from descriptions of what they should do.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add vynazevedo/first-plan
Claude Code
/plugin install fp

Made for: Claude Code.

Or install fp, the plugin that ships this one along with the rest of its 19 skills, 19 commands, 4 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for first-plan-semantic-reuse

README.md
[![agentmods](https://agentmods.dev/badge/skills/vynazevedo/first-plan/semantic-reuse.svg)](https://agentmods.dev/skills/vynazevedo/first-plan/semantic-reuse)
Your own site
<a href="https://agentmods.dev/skills/vynazevedo/first-plan/semantic-reuse"><img src="https://agentmods.dev/badge/skills/vynazevedo/first-plan/semantic-reuse.svg" alt="Measured on agentmods" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,571 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00088 $0.01571
Opus 5 $0.00044 $0.00785
Sonnet 5 $0.00018 $0.00314
Haiku 4.5 $0.00009 $0.00157

Measured 8d ago against content hash 5061d9b1071b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

first-plan-semantic-reuse scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/semantic-reuse/SKILL.md · 150 lines

How it starts

The opening of the file, as written. The whole thing — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Semantic Reuse via BM25

Habilita busca por intencao em vez de busca por nome exato. Isso fecha o gap mais comum entre Claude e o codigo: nomes de simbolos divergem da forma como descrevemos intencoes.

Exemplos:

  • Query: "validar email" -> encontra validateEmailRFC, is_valid_email, EmailValidator
  • Query: "fetch HTTP com retry" -> encontra httpClientWithBackoff, fetchWithRetries, RetryableClient
  • Query: "modal de confirmacao" -> encontra ConfirmDialog, useConfirmModal, AlertConfirmation

Workflow

Passo 1 - Detectar engine

ENGINE=""
for c in "${CLAUDE_PLUGIN_ROOT}/engine/bin/first-plan-engine" "${HOME}/.local/bin/first-plan-engine" "$(command -v first-plan-engine 2>/dev/null)"; do
  [ -x "$c" ] && ENGINE="$c" && break
done

Se ausente, oferecer first-plan-engine-bootstrap skill ou cair no fallback markdown.

Passo 2 - Garantir indice atualizado

DB=".first-plan/cache/search.db"
# Re-indexar se DB nao existe ou esta stale (>= 24h)
if [ ! -f "$DB" ] || [ $(find "$DB" -mmin +1440 | wc -l) -gt 0 ]; then
  "$ENGINE" index --repo . --db-path "$DB" --output-json /tmp/idx.json
  echo "indexado: $(jq -r .total_symbols /tmp/idx.json) simbolos em $(jq -r .elapsed_ms /tmp/idx.json)ms"
fi

Passo 3 - Query

"$ENGINE" search \
  --db-path "$DB" \
  --query "<intencao>" \
  --limit 10 \
  --output-json /tmp/search.json

Output JSON first-plan-search-v1:

{
  "$schema": "first-plan-search-v1",
  "query": "<intencao>",
  "hits": [
    {
      "symbol": {
        "name": "ValidateEmail",
        "kind": "function",
        "language": "go",
        "path": "pkg/validation/email.go",
        "line": 12,
        "signature": "func ValidateEmail(s string) error",
        "doc": "Valida formato RFC 5322"
      },
      "score": 8.42,
      "matched_tokens": ["validate", "email"]
    }
  ]
}

Passo 4 - Renderizar para usuario

Para /fp:reuse <intencao>, mostrar top 5 com:

  • Nome + path:line
  • Signature
  • Doc resumida
  • Score (ajuda o usuario calibrar relevancia)
  • Matched tokens (transparencia sobre o ranking)

Read the full file on GitHub · 150 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 150 lines · 88 tokens per session scan A 5061d9b1071b

Subscribe to this mod's changes

first-plan-semantic-reuse is a skill published in the GitHub repository vynazevedo/first-plan (23 stars, last pushed 14d ago), licensed MIT. It adds 88 tokens to every session and 1,571 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories