Agent skill

Search Params

by promptfoo in promptfoo/promptfoo

URL search param and hash state management. An agent skill from promptfoo/promptfoo.

MITAuto-check passedFrontend & Design

Install Search Params

skills CLI
$ npx skills add promptfoo/promptfoo --skill search-params -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install promptfoo/promptfoo search-params --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/promptfoo/promptfoo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/search-params .claude/skills/search-params && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
search-params
GitHub stars
26k
Token cost
~1.1k tokens
SKILL.md length
261 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

URL search param and hash state management. An agent skill from promptfoo/promptfoo.

  • Modifying URL search params
  • SKILL.md covers Decision Framework, Correct Patterns, Anti-Patterns and Key Files
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Working with useSearchParams

What it does

Search Params is an agent skill from promptfoo/promptfoo. URL search param and hash state management. Use when adding or modifying URL search params, working with useSearchParams, setSearchParams, useSearchParamState, or navigate() with query strings or hash fragments, or fixing browser back/forward button issues.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering State management. The repository describes itself as: Test your prompts, agents, and RAGs. Red teaming/pentesting/vulnerability scanning for AI. Compare performance of GPT, Claude, Gemini, DeepSeek, and more. Simple declarative… The licence is MIT.

When your agent uses it

  • Modifying URL search params
  • Working with useSearchParams
  • SetSearchParams
  • UseSearchParamState

Example prompts

  • “/search-params”

What it can do on your machine

Read from SKILL.md and the folder at commit 2dbf3ec. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Search Params loads about 1.1k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 261 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from promptfoo/promptfoo at commit 2dbf3ec, republished under its MIT licence (© promptfoo). 261 words, ~1,125 tokens.

Download SKILL.mdSave it as .claude/skills/search-params/SKILL.md (or your agent's skills folder).
name
search-params
description
URL search param and hash state management. Use when adding or modifying URL search params, working with useSearchParams, setSearchParams, useSearchParamState, or navigate() with query strings or hash fragments, or fixing browser back/forward button issues.

URL Search Param State Management

Decision Framework

When updating the URL (search params or hash), choose between replace and push based on whether the change represents in-page state or a user-navigable step:

Change typeExamplesHistory behavior
In-page stateFilters, sort, pagination, tab switches, search queriesreplace - don't pollute history
Navigable stepWizard progression, multi-step formspush - back button should return to previous step
Unsure?Ask the developer before choosing

Why this matters: Pushing in-page state changes clutters the browser history. Users clicking "back" expect to leave the page, not undo a filter toggle. This is the #1 cause of "back button is broken" bugs.

Correct Patterns

Single search param - use useSearchParamState (preferred)

This hook validates with Zod and always uses replace: true internally, so you get correct history behavior for free.

tsx
import { useSearchParamState } from '@app/hooks/useSearchParamState';
import { z } from 'zod';

const TabSchema = z.enum(['overview', 'details', 'settings']);
const [activeTab, setActiveTab] = useSearchParamState('tab', TabSchema, 'overview');

Key file: src/app/src/hooks/useSearchParamState.ts

Multiple search params - use setSearchParams with replace: true

When updating multiple params at once, use setSearchParams directly but always pass { replace: true } for in-page state:

tsx
const [searchParams, setSearchParams] = useSearchParams();

// Updating filters (in-page state -> replace)
setSearchParams(
  (params) => {
    params.set('status', 'active');
    params.set('sort', 'name');
    return params;
  },
  { replace: true },
);
Hash-based navigation - navigate() with replace or push

For wizard/multi-step flows where back button should traverse steps, use push (the default):

tsx
// Wizard step navigation - push so back button works between steps
// See: src/app/src/pages/redteam/setup/page.tsx
const updateHash = (newStep: string) => {
  navigate(`#${newStep}`); // push (default) - intentional
};

For hash changes that represent in-page state, use replace:

tsx
// Tab switch on a detail page - replace to avoid history clutter
navigate(`#${section}`, { replace: true });
URL normalization after save

When the URL needs to be updated to include a new ID after a create/save operation (not a user action), use replace:

tsx
// After first save, update URL to include new ID without adding history entry
navigate(`/evals/${newConfigId}`, { replace: true });

Anti-Patterns

Pushing in-page state changes (breaks back button)
tsx
// WRONG - every filter change adds a history entry
setSearchParams((params) => {
  params.set('filter', value);
  return params;
});

// WRONG - navigate without replace for state change
navigate(`?tab=${newTab}`);
Using raw useSearchParams for a single param without validation
tsx
// WRONG - no validation, easy to forget { replace: true }
const [searchParams, setSearchParams] = useSearchParams();
const tab = searchParams.get('tab');
const setTab = (v: string) => {
  setSearchParams((p) => {
    p.set('tab', v);
    return p;
  });
};

// RIGHT - use the hook instead
const [tab, setTab] = useSearchParamState('tab', TabSchema, 'overview');
Using empty strings instead of null
tsx
// WRONG - useSearchParamState will throw an invariant error
setTab('');

// RIGHT - use null to clear a param
setTab(null);

Key Files

  • src/app/src/hooks/useSearchParamState.ts - primary hook (uses replace internally)
  • src/app/src/pages/eval/components/ResultsView.tsx - example of correct { replace: true } usage
  • src/app/src/pages/redteam/setup/page.tsx - example of intentional push for wizard steps

© promptfoo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/search-params of promptfoo/promptfoo.

Open the folder on GitHubat commit 2dbf3ec

Compare with similar skills

Search Params next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Search Params compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Search Params this skillpromptfoo/promptfoo26k—~1.1kAutomated safety check: PassMIT
Add Eap Methodtalkincode/toughradius691—~802Automated safety check: PassMIT
Frontend Large Feature Architecturelangfuse/langfuse36k—~1.4kAutomated safety check: PassCustom licence
Salesforce Component Standardsgithub/awesome-copilot40k1 repos~2.4kAutomated safety check: PassMIT
Agentsop State Reduceragentsope/SkillAlchemy459—~4.5kAutomated safety check: PassMIT
Svelte Core Best Practicesrilldata/rill2.9k4 repos~1.8kAutomated safety check: PassApache-2.0

Similar skills

  • Add Eap Method

    talkincode/toughradius

    Add an EAP authentication method (e.g. An agent skill from talkincode/toughradius.

    691 GitHub stars~802 tokensUpdated 4 days ago
    Frontend & DesignAuto-check passed
  • Architect large or state-heavy Langfuse frontend features. An agent skill from langfuse/langfuse.

    36k GitHub stars~1.4k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Salesforce Component Standards

    github/awesome-copilot

    Official

    Quality standards for Salesforce Lightning Web Components (LWC), Aura components, and Visualforce pages.

    40k GitHub starsUsed in 1 repo~2.4k tokens
    Frontend & DesignAuto-check passed
  • Agentsop State Reducer

    agentsope/SkillAlchemy

    Tool skill for declaring reducers on LangGraph state keys so parallel writes merge instead of crashing.

    459 GitHub stars~4.5k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • Rules for writing idiomatic Svelte 5 code: when to reach for runes like state, derived and effect, and how to handle props, attachments and bindings.

    2.9k GitHub starsUsed in 4 repos~1.8k tokens
    Frontend & DesignAuto-check passed
  • Use when implementing or refactoring React/TypeScript components and the task requires decisions about component ownership, feature boundaries, state, data…

    158k GitHub stars~626 tokensUpdated today
    Frontend & DesignAuto-check passed

Questions about Search Params

What does Search Params do?

URL search param and hash state management. An agent skill from promptfoo/promptfoo. Search Params is an agent skill from promptfoo/promptfoo. URL search param and hash state management.

When should I use Search Params?

Search Params fits situations like: modifying URL search params; working with useSearchParams; setSearchParams; useSearchParamState.

How do I install Search Params in Claude Code?

Run `npx skills add promptfoo/promptfoo --skill search-params -a claude-code`. Or copy the skill folder (.agents/skills/search-params in promptfoo/promptfoo) into .claude/skills/search-params in your project. Claude Code loads it when a task matches its description.

How do I install Search Params in Codex?

Run `npx skills add promptfoo/promptfoo --skill search-params -a codex`. Or copy the skill folder (.agents/skills/search-params in promptfoo/promptfoo) into .agents/skills/search-params in your project. Codex loads it when a task matches its description.

Can I use Search Params in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add promptfoo/promptfoo --skill search-params -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/search-params, .gemini/skills/search-params, .github/skills/search-params and .opencode/skills/search-params in your project.

What does Search Params need to run?

SKILL.md names no scripts, command-line tools or credentials: Search Params is instructions for the agent only.

Does Search Params access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Search Params safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Search Params use?

Search Params is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Search Params use?

About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Search Params?

Skills that share tags, products or a category with Search Params: Add Eap Method (talkincode/toughradius, 691 stars), Frontend Large Feature Architecture (langfuse/langfuse, 36k stars), Salesforce Component Standards (github/awesome-copilot, 40k stars) and Agentsop State Reducer (agentsope/SkillAlchemy, 459 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Search Params?

promptfoo (a GitHub organization) maintains it in promptfoo/promptfoo, which has 25,801 GitHub stars. The repository was last updated on October 7, 2026.

Source: promptfoo/promptfoo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.